diff --git a/.eslintrc b/.eslintrc
index 808ac90b2db..2445c0c7288 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -6,7 +6,9 @@
"rules": {
"no-console": 0,
"no-cond-assign": 0,
- "no-unused-vars": 1
+ "no-unused-vars": 1,
+ "no-extra-semi": "warn",
+ "semi": "warn"
},
"extends": "eslint:recommended"
}
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 133cdf519df..df5aedd1c04 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -17,25 +17,6 @@
"sourceMaps": true,
"outDir": "${workspaceRoot}/out"
},
- {
- "name": "Stacks Tests",
- "type": "node",
- "request": "launch",
- "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
- "stopOnEntry": false,
- "args": [
- "--timeout",
- "999999",
- "--colors",
- "-g",
- "Stacks"
- ],
- "cwd": "${workspaceRoot}",
- "runtimeArgs": [],
- "env": {},
- "sourceMaps": true,
- "outDir": "${workspaceRoot}/out"
- },
{
"name": "Attach to Extension Host",
"type": "node",
@@ -91,7 +72,15 @@
"name": "Launch VSCode",
"type": "chrome",
"request": "launch",
- "runtimeExecutable": "${workspaceRoot}/scripts/code.bat",
+ "windows": {
+ "runtimeExecutable": "${workspaceRoot}/scripts/code.bat"
+ },
+ "osx": {
+ "runtimeExecutable": "${workspaceRoot}/scripts/code.sh"
+ },
+ "linux": {
+ "runtimeExecutable": "${workspaceRoot}/scripts/code.sh"
+ },
"sourceMaps": true
},
{
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 691000844b3..3b946931d76 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -17,5 +17,11 @@
"tslint.enable": true,
"tslint.rulesDirectory": "build/lib/tslint",
"lcov.path": ["./.build/coverage/lcov.info", "./.build/coverage-single/lcov.info"],
- "lcov.watcherExec.windows": "${workspaceRoot}\\scripts\\test.bat --coverage --run ${file.replace(/^src/,'out').replace(/\\.ts$/,'.js')}"
+ "lcov.watch": [{
+ "pattern": "**/*.test.js",
+ "command": "${workspaceRoot}\\scripts\\test.sh --coverage --run ${file}",
+ "windows": {
+ "command": "${workspaceRoot}\\scripts\\test.bat --coverage --run ${file}"
+ }
+ }]
}
\ No newline at end of file
diff --git a/OSSREADME.json b/OSSREADME.json
index 343ae205326..5fe88517ee4 100644
--- a/OSSREADME.json
+++ b/OSSREADME.json
@@ -6,6 +6,36 @@
"license": "MIT",
"isProd": true
},
+{
+ "isLicense": true,
+ "name": "async-each",
+ "repositoryURL": "https://github.com/paulmillr/async-each",
+ "license": "MIT",
+ "licenseDetail": [
+ "The MIT License (MIT)",
+ "",
+ "Copyright (c) 2016 Paul Miller [(paulmillr.com)](http://paulmillr.com)",
+ "",
+ "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
+},
{
"name": "chromium",
"version": "49.0.2623.75",
diff --git a/README.md b/README.md
index 1862261e1fb..119cf632d13 100644
--- a/README.md
+++ b/README.md
@@ -43,4 +43,7 @@ Many of the core components and extensions to Code live in their own repositorie
For a complete list, please see the [Related Projects](https://github.com/Microsoft/vscode/wiki/Related-Projects) page on our wiki.
## License
-[MIT](LICENSE.txt)
+
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+Licensed under the [MIT](LICENSE.txt) License.
diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt
index ed5ffe9901d..d33bcabbfd7 100644
--- a/ThirdPartyNotices.txt
+++ b/ThirdPartyNotices.txt
@@ -23,40 +23,40 @@ This project incorporates components from the projects listed below. The origina
16. language-go version 0.39.0 (https://github.com/atom/language-go)
17. language-php version 0.29.0 (https://github.com/atom/language-php)
18. language-rust version 0.4.4 (https://github.com/zargony/atom-language-rust)
-19. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage)
-20. mmcgrana/textmate-clojure (https://github.com/mmcgrana/textmate-clojure)
-21. octicons-code version 3.1.0 (https://octicons.github.com)
-22. octicons-font version 3.1.0 (https://octicons.github.com)
-23. string_scorer version 0.1.20 (https://github.com/joshaven/string_score)
-24. sublimehq/Packages (https://github.com/sublimehq/Packages)
-25. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell)
-26. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle)
-27. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle)
-28. textmate/coffee-script.tmbundle (https://github.com/textmate/coffee-script.tmbundle)
-29. textmate/css.tmbundle (https://github.com/textmate/css.tmbundle)
-30. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle)
-31. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle)
-32. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle)
-33. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle)
-34. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle)
-35. textmate/java.tmbundle (https://github.com/textmate/java.tmbundle)
-36. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle)
-37. textmate/less.tmbundle (https://github.com/textmate/less.tmbundle)
-38. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle)
-39. textmate/make.tmbundle (https://github.com/textmate/make.tmbundle)
-40. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle)
-41. textmate/objective-c.tmbundle (https://github.com/textmate/objective-c.tmbundle)
-42. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle)
-43. textmate/php.tmbundle (https://github.com/textmate/php.tmbundle)
-44. textmate/python.tmbundle (https://github.com/textmate/python.tmbundle)
-45. textmate/r.tmbundle (https://github.com/textmate/r.tmbundle)
-46. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle)
-47. textmate/shellscript.tmbundle (https://github.com/textmate/shellscript.tmbundle)
-48. textmate/sql.tmbundle (https://github.com/textmate/sql.tmbundle)
-49. textmate/xml.tmbundle (https://github.com/textmate/xml.tmbundle)
-50. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle)
-51. typescript version 1.5 (https://github.com/Microsoft/TypeScript)
-52. typescript version 1.8.2 (https://github.com/Microsoft/TypeScript)
+19. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython)
+20. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage)
+21. mmcgrana/textmate-clojure (https://github.com/mmcgrana/textmate-clojure)
+22. octicons-code version 3.1.0 (https://octicons.github.com)
+23. octicons-font version 3.1.0 (https://octicons.github.com)
+24. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui)
+25. string_scorer version 0.1.20 (https://github.com/joshaven/string_score)
+26. sublimehq/Packages (https://github.com/sublimehq/Packages)
+27. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell)
+28. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle)
+29. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle)
+30. textmate/coffee-script.tmbundle (https://github.com/textmate/coffee-script.tmbundle)
+31. textmate/css.tmbundle (https://github.com/textmate/css.tmbundle)
+32. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle)
+33. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle)
+34. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle)
+35. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle)
+36. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle)
+37. textmate/java.tmbundle (https://github.com/textmate/java.tmbundle)
+38. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle)
+39. textmate/less.tmbundle (https://github.com/textmate/less.tmbundle)
+40. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle)
+41. textmate/make.tmbundle (https://github.com/textmate/make.tmbundle)
+42. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle)
+43. textmate/objective-c.tmbundle (https://github.com/textmate/objective-c.tmbundle)
+44. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle)
+45. textmate/php.tmbundle (https://github.com/textmate/php.tmbundle)
+46. textmate/r.tmbundle (https://github.com/textmate/r.tmbundle)
+47. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle)
+48. textmate/shellscript.tmbundle (https://github.com/textmate/shellscript.tmbundle)
+49. textmate/sql.tmbundle (https://github.com/textmate/sql.tmbundle)
+50. textmate/xml.tmbundle (https://github.com/textmate/xml.tmbundle)
+51. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle)
+52. typescript version 1.5 (https://github.com/Microsoft/TypeScript)
53. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage)
54. unity-shader-files version 0.1.0 (https://github.com/nashella/unity-shader-files)
55. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift)
@@ -784,6 +784,32 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=========================================
END OF language-rust NOTICES AND INFORMATION
+%% MagicStack/MagicPython NOTICES AND INFORMATION BEGIN HERE
+=========================================
+The MIT License
+
+Copyright (c) 2015 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
+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.
+=========================================
+END OF MagicStack/MagicPython NOTICES AND INFORMATION
+
%% Microsoft/TypeScript-TmLanguage NOTICES AND INFORMATION BEGIN HERE
=========================================
Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1110,6 +1136,31 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
=========================================
END OF octicons-font NOTICES AND INFORMATION
+%% seti-ui NOTICES AND INFORMATION BEGIN HERE
+=========================================
+Copyright (c) 2014 Jesse Weed
+
+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.
+=========================================
+END OF seti-ui NOTICES AND INFORMATION
+
%% string_scorer NOTICES AND INFORMATION BEGIN HERE
=========================================
This software is released under the MIT license:
@@ -1514,24 +1565,6 @@ to the base-name name of the original file, and an extension of txt, html, or si
=========================================
END OF textmate/php.tmbundle NOTICES AND INFORMATION
-%% textmate/python.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
-Copyright (c) textmate-python.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/python.tmbundle NOTICES AND INFORMATION
-
%% textmate/r.tmbundle NOTICES AND INFORMATION BEGIN HERE
=========================================
Copyright (c) textmate-r.tmbundle project authors
@@ -1697,68 +1730,6 @@ END OF TERMS AND CONDITIONS
=========================================
END OF typescript NOTICES AND INFORMATION
-%% typescript 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 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 86d73d0671f..67d80cae24f 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -3,7 +3,8 @@ environment:
VSCODE_BUILD_VERBOSE: true
install:
- - ps: Install-Product node 5.10.1 x64
+ - ps: Install-Product node 6.5.0 x64
+ - npm install -g npm
- npm install -g gulp mocha
build_script:
@@ -12,5 +13,7 @@ build_script:
- gulp compile
test_script:
+ - node --version
+ - npm --version
- .\scripts\test.bat
- .\scripts\test-integration.bat
diff --git a/build/gulpfile.editor.js b/build/gulpfile.editor.js
index 286cc7ad973..fb56d7c575f 100644
--- a/build/gulpfile.editor.js
+++ b/build/gulpfile.editor.js
@@ -32,6 +32,7 @@ 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/base/worker/workerMainCompatibility.html',
'out-build/vs/base/worker/workerMain.{js,js.map}',
'!out-build/vs/workbench/**',
@@ -59,7 +60,8 @@ function editorLoaderConfig() {
// never ship octicons in editor
result.paths['vs/base/browser/ui/octiconLabel/octiconLabel'] = 'out-build/vs/base/browser/ui/octiconLabel/octiconLabel.mock';
- result['vs/css'] = { inlineResources: true };
+ // force css inlining to use base64 -- see https://github.com/Microsoft/monaco-editor/issues/148
+ result['vs/css'] = { inlineResources: 'base64' };
return result;
}
@@ -84,7 +86,6 @@ gulp.task('editor-distro', ['clean-editor-distro', 'minify-editor', 'optimize-ed
// other assets
es.merge(
gulp.src('build/monaco/LICENSE'),
- gulp.src('build/monaco/CHANGELOG.md'),
gulp.src('build/monaco/ThirdPartyNotices.txt'),
gulp.src('src/vs/monaco.d.ts')
).pipe(gulp.dest('out-monaco-editor-core')),
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index 97523c34cbe..fc896f9a11f 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -11,7 +11,7 @@ const path = require('path');
const es = require('event-stream');
const azure = require('gulp-azure-storage');
const electron = require('gulp-atom-electron');
-const symdest = require('gulp-symdest');
+const vfs = require('vinyl-fs');
const rename = require('gulp-rename');
const replace = require('gulp-replace');
const filter = require('gulp-filter');
@@ -130,7 +130,7 @@ gulp.task('electron', ['clean-electron'], () => {
.pipe(json({ name }))
.pipe(electron(opts))
.pipe(filter(['**', '!**/app/package.json']))
- .pipe(symdest('.build/electron'));
+ .pipe(vfs.dest('.build/electron'));
});
const languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita'];
@@ -186,7 +186,7 @@ function packageTask(platform, arch, opts) {
const productJsonStream = gulp.src(['product.json'], { base: '.' })
.pipe(json({ commit, date }));
- const license = gulp.src(['Credits_*', 'LICENSE.txt', 'ThirdPartyNotices.txt', 'licenses/**'], { base: '.' });
+ const license = gulp.src(['LICENSES.chromium.html', 'LICENSE.txt', 'ThirdPartyNotices.txt', 'licenses/**'], { base: '.' });
// TODO the API should be copied to `out` during compile, not here
const api = gulp.src('src/vs/vscode.d.ts').pipe(rename('out/vs/vscode.d.ts'));
@@ -243,7 +243,7 @@ function packageTask(platform, arch, opts) {
.pipe(rename('bin/' + product.applicationName)));
}
- return result.pipe(symdest(destination));
+ return result.pipe(vfs.dest(destination));
};
}
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
index 23d1a3d6f72..628a9dff844 100644
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -10,13 +10,13 @@ const replace = require('gulp-replace');
const rename = require('gulp-rename');
const shell = require('gulp-shell');
const es = require('event-stream');
-const symdest = require('gulp-symdest');
+const vfs = require('vinyl-fs');
const util = require('./lib/util');
const packageJson = require('../package.json');
const product = require('../product.json');
function getDebPackageArch(arch) {
- return { x64: 'amd64', ia32: 'i386' }[arch];
+ return { x64: 'amd64', ia32: 'i386', arm: 'armhf' }[arch];
}
const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
@@ -55,29 +55,29 @@ function prepareDebPackage(arch) {
const prerm = gulp.src('resources/linux/debian/prerm.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(rename('DEBIAN/prerm'))
+ .pipe(rename('DEBIAN/prerm'));
const postrm = gulp.src('resources/linux/debian/postrm.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(rename('DEBIAN/postrm'))
+ .pipe(rename('DEBIAN/postrm'));
const postinst = gulp.src('resources/linux/debian/postinst.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@ARCHITECTURE@@', debArch))
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))
- .pipe(rename('DEBIAN/postinst'))
+ .pipe(rename('DEBIAN/postinst'));
const all = es.merge(control, postinst, postrm, prerm, desktop, icon, code);
- return all.pipe(symdest(destination));
+ return all.pipe(vfs.dest(destination));
};
}
function buildDebPackage(arch) {
const debArch = getDebPackageArch(arch);
return shell.task([
- 'chmod 755 ' + product.applicationName + '-' + debArch + '/DEBIAN/postinst ' + product.applicationName + '-' + debArch + '/DEBIAN/prerm',
+ 'chmod 755 ' + product.applicationName + '-' + debArch + '/DEBIAN/postinst ' + product.applicationName + '-' + debArch + '/DEBIAN/prerm ' + product.applicationName + '-' + debArch + '/DEBIAN/postrm',
'mkdir -p deb',
'fakeroot dpkg-deb -b ' + product.applicationName + '-' + debArch + ' deb',
'dpkg-scanpackages deb /dev/null > Packages'
@@ -89,7 +89,7 @@ function getRpmBuildPath(rpmArch) {
}
function getRpmPackageArch(arch) {
- return { x64: 'x86_64', ia32: 'i386' }[arch];
+ return { x64: 'x86_64', ia32: 'i386', arm: 'armhf' }[arch];
}
function prepareRpmPackage(arch) {
@@ -124,8 +124,8 @@ function prepareRpmPackage(arch) {
const all = es.merge(code, desktop, icon, spec, specIcon);
- return all.pipe(symdest(getRpmBuildPath(rpmArch)));
- }
+ return all.pipe(vfs.dest(getRpmBuildPath(rpmArch)));
+ };
}
function buildRpmPackage(arch) {
@@ -133,6 +133,7 @@ function buildRpmPackage(arch) {
const rpmBuildPath = getRpmBuildPath(rpmArch);
const rpmOut = rpmBuildPath + '/RPMS/' + rpmArch;
const destination = '.build/linux/rpm/' + rpmArch;
+
return shell.task([
'mkdir -p ' + destination,
'HOME="$(pwd)/' + destination + '" fakeroot rpmbuild -bb ' + rpmBuildPath + '/SPECS/' + product.applicationName + '.spec --target=' + rpmArch,
@@ -143,15 +144,21 @@ function buildRpmPackage(arch) {
gulp.task('clean-vscode-linux-ia32-deb', util.rimraf('.build/linux/deb/i386'));
gulp.task('clean-vscode-linux-x64-deb', util.rimraf('.build/linux/deb/amd64'));
+gulp.task('clean-vscode-linux-arm-deb', util.rimraf('.build/linux/deb/armhf'));
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'));
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('armhf'));
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('armhf'));
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('armhf'));
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('armhf'));
diff --git a/build/lib/bundle.js b/build/lib/bundle.js
index c01a56844c7..cbc7e92e55d 100644
--- a/build/lib/bundle.js
+++ b/build/lib/bundle.js
@@ -161,7 +161,7 @@ function extractStrings(destFiles) {
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] + "], __M([" + defineCall.deps.map(function (dep) { return replacementMap[dep]; }).join(',') + "])";
+ return "define(__m[" + replacementMap[defineCall.module] + "/*" + defineCall.module + "*/], __M([" + defineCall.deps.map(function (dep) { return replacementMap[dep] + '/*' + dep + '*/'; }).join(',') + "])";
});
});
destFile.sources.unshift({
diff --git a/build/lib/bundle.ts b/build/lib/bundle.ts
index 0b68d98271d..bf500e5c92b 100644
--- a/build/lib/bundle.ts
+++ b/build/lib/bundle.ts
@@ -268,7 +268,7 @@ function extractStrings(destFiles:IConcatFile[]):IConcatFile[] {
destFile.sources.forEach((source) => {
source.contents = source.contents.replace(/define\(("[^"]+"),\s*\[(((, )?("|')[^"']+("|'))+)\]/, (_, moduleMatch, depsMatch) => {
let defineCall = parseDefineCall(moduleMatch, depsMatch);
- return `define(__m[${replacementMap[defineCall.module]}], __M([${defineCall.deps.map(dep => replacementMap[dep]).join(',')}])`;
+ return `define(__m[${replacementMap[defineCall.module]}/*${defineCall.module}*/], __M([${defineCall.deps.map(dep => replacementMap[dep] + '/*' + dep + '*/').join(',')}])`;
});
});
diff --git a/build/monaco/CHANGELOG.md b/build/monaco/CHANGELOG.md
deleted file mode 100644
index 6cccaa0d532..00000000000
--- a/build/monaco/CHANGELOG.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Monaco Editor Change log
-
-## [0.5.1]
-
-- Fixed mouse handling in IE
-
-## [0.5.0]
-
-### Breaking changes
-- `monaco.editor.createWebWorker` now loads the AMD module and calls `create` and passes in as first argument a context of type `monaco.worker.IWorkerContext` and as second argument the `initData`. This breaking change was needed to allow handling the case of misconfigured web workers (running on a file protocol or the cross-domain case)
-- the `CodeActionProvider.provideCodeActions` now gets passed in a `CodeActionContext` that contains the markers at the relevant range.
-- the `hoverMessage` of a decoration is now a `MarkedString | MarkedString[]`
-- the `contents` of a `Hover` returned by a `HoverProvider` is now a `MarkedString | MarkedString[]`
-- removed deprecated `IEditor.onDidChangeModelRawContent`, `IModel.onDidChangeRawContent`
-
-### Notable fixes
-- Broken configurations (loading from `file://` or misconfigured cross-domain loading) now load the web worker code in the UI thread. This caused a breaking change in the behaviour of `monaco.editor.createWebWorker`
-- The right-pointing mouse pointer is oversized in high DPI - [issue](https://github.com/Microsoft/monaco-editor/issues/5)
-- The editor functions now correctly when hosted inside a `position:fixed` element.
-- Cross origin configuration is now picked up (as advertised in documentation from MonacoEnvironment)
diff --git a/build/monaco/ThirdPartyNotices.txt b/build/monaco/ThirdPartyNotices.txt
index 29b175e7597..ced73100132 100644
--- a/build/monaco/ThirdPartyNotices.txt
+++ b/build/monaco/ThirdPartyNotices.txt
@@ -8,6 +8,28 @@ herein, whether by implication, estoppel or otherwise.
+%% winjs version 4.4.0 (https://github.com/winjs/winjs)
+=========================================
+WinJS
+
+Copyright (c) Microsoft Corporation
+
+All rights reserved.
+
+MIT License
+
+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.
+
+=========================================
+END OF winjs NOTICES AND INFORMATION
+
+
+
+
%% HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/)
=========================================
Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang). This software or document includes material copied
diff --git a/build/monaco/monaco.d.ts.recipe b/build/monaco/monaco.d.ts.recipe
index ff27705017d..af39c661697 100644
--- a/build/monaco/monaco.d.ts.recipe
+++ b/build/monaco/monaco.d.ts.recipe
@@ -53,6 +53,7 @@ declare module monaco {
declare module monaco.editor {
#includeAll(vs/editor/browser/standalone/standaloneEditor;modes.=>languages.):
+#include(vs/editor/common/services/webWorker): MonacoWebWorker, IWebWorkerOptions
#include(vs/editor/browser/standalone/standaloneCodeEditor): IEditorConstructionOptions, IDiffEditorConstructionOptions, IStandaloneCodeEditor, IStandaloneDiffEditor
export interface ICommandHandler {
(...args:any[]): void;
diff --git a/build/monaco/package.json b/build/monaco/package.json
index 9575f609362..0394ef9c29b 100644
--- a/build/monaco/package.json
+++ b/build/monaco/package.json
@@ -1,7 +1,7 @@
{
"name": "monaco-editor-core",
"private": true,
- "version": "0.5.3",
+ "version": "0.6.1",
"description": "A browser based code editor",
"author": "Microsoft Corporation",
"license": "MIT",
diff --git a/build/win32/code.iss b/build/win32/code.iss
index 2d5d4281991..e6e906038b5 100644
--- a/build/win32/code.iss
+++ b/build/win32/code.iss
@@ -47,6 +47,7 @@ Name: "traditionalChinese"; MessagesFile: "{#RepoDir}\build\win32\i18n\Default.z
Type: filesandordirs; Name: {app}\resources\app\plugins
Type: filesandordirs; Name: {app}\resources\app\extensions
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}"
diff --git a/extensions/css/client/src/colorDecorators.ts b/extensions/css/client/src/colorDecorators.ts
index 39165bc42dc..90a0c28607d 100644
--- a/extensions/css/client/src/colorDecorators.ts
+++ b/extensions/css/client/src/colorDecorators.ts
@@ -28,7 +28,7 @@ export function activateColorDecorations(decoratorProvider: (uri: string) => The
let colorsDecorationType = window.createTextEditorDecorationType(decorationType);
disposables.push(colorsDecorationType);
- let pendingUpdateRequests : { [key:string]:number; } = {};
+ let pendingUpdateRequests : { [key:string]: NodeJS.Timer; } = {};
// we care about all visible editors
window.visibleTextEditors.forEach(editor => {
diff --git a/extensions/css/npm-shrinkwrap.json b/extensions/css/npm-shrinkwrap.json
index e7216492872..0b55dcb027a 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": "2.2.0",
- "from": "vscode-jsonrpc@>=2.2.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.2.0.tgz"
+ "version": "2.3.2-next.5",
+ "from": "vscode-jsonrpc@>=2.3.2-next.2 <3.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.3.2-next.5.tgz"
},
"vscode-languageclient": {
- "version": "2.4.2-next.3",
+ "version": "2.4.2-next.22",
"from": "vscode-languageclient@next",
- "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-2.4.2-next.3.tgz"
+ "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-2.4.2-next.22.tgz"
},
"vscode-languageserver-types": {
- "version": "1.0.1",
- "from": "vscode-languageserver-types@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.1.tgz"
+ "version": "1.0.3",
+ "from": "vscode-languageserver-types@>=1.0.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.3.tgz"
},
"vscode-nls": {
"version": "1.0.7",
diff --git a/extensions/css/package.json b/extensions/css/package.json
index 0c0e65189bb..a58f5f3387c 100644
--- a/extensions/css/package.json
+++ b/extensions/css/package.json
@@ -646,7 +646,7 @@
}
},
"dependencies": {
- "vscode-languageclient": "^2.4.2-next.3",
+ "vscode-languageclient": "^2.4.2-next.22",
"vscode-nls": "^1.0.7"
}
}
diff --git a/extensions/css/server/npm-shrinkwrap.json b/extensions/css/server/npm-shrinkwrap.json
index 2c2f3c23ee8..5a3feef73f3 100644
--- a/extensions/css/server/npm-shrinkwrap.json
+++ b/extensions/css/server/npm-shrinkwrap.json
@@ -3,23 +3,31 @@
"version": "1.0.0",
"dependencies": {
"vscode-css-languageservice": {
- "version": "1.0.7-next.2",
- "from": "vscode-css-languageservice@1.0.7-next.2"
+ "version": "1.0.9-next.1",
+ "from": "vscode-css-languageservice@next",
+ "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-1.0.9-next.1.tgz"
},
"vscode-jsonrpc": {
- "version": "2.2.0",
- "from": "vscode-jsonrpc@>=2.2.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.2.0.tgz"
+ "version": "2.3.2-next.5",
+ "from": "vscode-jsonrpc@>=2.3.2-next.2 <3.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.3.2-next.5.tgz"
},
"vscode-languageserver": {
- "version": "2.4.0-next.4",
+ "version": "2.4.0-next.12",
"from": "vscode-languageserver@next",
- "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-2.4.0-next.4.tgz"
+ "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-2.4.0-next.12.tgz",
+ "dependencies": {
+ "vscode-languageserver-types": {
+ "version": "1.0.3",
+ "from": "vscode-languageserver-types@>=1.0.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.3.tgz"
+ }
+ }
},
"vscode-languageserver-types": {
- "version": "1.0.1",
- "from": "vscode-languageserver-types@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.1.tgz"
+ "version": "1.0.3",
+ "from": "vscode-languageserver-types@>=1.0.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.3.tgz"
},
"vscode-nls": {
"version": "1.0.7",
diff --git a/extensions/css/server/package.json b/extensions/css/server/package.json
index 087a4bd4dc3..a5a90bb7138 100644
--- a/extensions/css/server/package.json
+++ b/extensions/css/server/package.json
@@ -8,8 +8,8 @@
"node": "*"
},
"dependencies": {
- "vscode-css-languageservice": "^1.0.7-next.2",
- "vscode-languageserver": "^2.4.0-next.4"
+ "vscode-css-languageservice": "^1.0.9-next.1",
+ "vscode-languageserver": "^2.4.0-next.12"
},
"scripts": {
"compile": "gulp compile-extension:css-server",
diff --git a/extensions/css/server/src/cssServerMain.ts b/extensions/css/server/src/cssServerMain.ts
index e90bfe41aaa..751be2baefd 100644
--- a/extensions/css/server/src/cssServerMain.ts
+++ b/extensions/css/server/src/cssServerMain.ts
@@ -44,7 +44,7 @@ connection.onShutdown(() => {
});
// After the server has started the client sends an initilize request. The server receives
-// in the passed params the rootPath of the workspace plus the client capabilites.
+// in the passed params the rootPath of the workspace plus the client capabilities.
connection.onInitialize((params: InitializeParams): InitializeResult => {
return {
capabilities: {
@@ -90,7 +90,7 @@ function updateConfiguration(settings: Settings) {
documents.all().forEach(triggerValidation);
}
-let pendingValidationRequests : {[uri:string]:number} = {};
+let pendingValidationRequests : { [uri:string]: NodeJS.Timer } = {};
const validationDelayMs = 200;
// The content of a text document has changed. This event is emitted
diff --git a/extensions/declares.d.ts b/extensions/declares.d.ts
index 7f9ee0a8862..2f1f06c0bf2 100644
--- a/extensions/declares.d.ts
+++ b/extensions/declares.d.ts
@@ -4,40 +4,16 @@
*--------------------------------------------------------------------------------------------*/
///
///
-///
-
-declare var define: {
- (moduleName: string, dependencies: string[], callback: (...args: any[]) => any): any;
- (moduleName: string, dependencies: string[], definition: any): any;
- (moduleName: string, callback: (...args: any[]) => any): any;
- (moduleName: string, definition: any): any;
- (dependencies: string[], callback: (...args: any[]) => any): any;
- (dependencies: string[], definition: any): any;
-};
-
-declare var require: {
- toUrl(path: string): string;
- (moduleName: string): any;
- (dependencies: string[], callback: (...args: any[]) => any, errorback?: (err: any) => void): any;
- config(data: any): any;
- onError: Function;
- __$__nodeRequire(moduleName: string): T;
-};
// Declaring the following because the code gets compiled with es5, which lack definitions for console and timers.
declare var console: {
- info(message?: any, ...optionalParams: any[]): void;
- profile(reportName?: string): void;
- assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
- clear(): void;
- dir(value?: any, ...optionalParams: any[]): void;
- warn(message?: any, ...optionalParams: any[]): void;
- error(message?: any, ...optionalParams: any[]): void;
- log(message?: any, ...optionalParams: any[]): void;
- profileEnd(): void;
-};
-
-declare function clearTimeout(handle: number): void;
-declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
-declare function clearInterval(handle: number): void;
-declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
+ assert(value: any, message?: string, ...optionalParams: any[]): void;
+ dir(obj: any, options?: {showHidden?: boolean, depth?: number, colors?: boolean}): void;
+ error(message?: any, ...optionalParams: any[]): void;
+ info(message?: any, ...optionalParams: any[]): void;
+ log(message?: any, ...optionalParams: any[]): void;
+ time(label: string): void;
+ timeEnd(label: string): void;
+ trace(message?: any, ...optionalParams: any[]): void;
+ warn(message?: any, ...optionalParams: any[]): void;
+};
\ No newline at end of file
diff --git a/extensions/javascript/src/features/bowerJSONContribution.ts b/extensions/javascript/src/features/bowerJSONContribution.ts
index ae8e664ccdd..c2034433ce8 100644
--- a/extensions/javascript/src/features/bowerJSONContribution.ts
+++ b/extensions/javascript/src/features/bowerJSONContribution.ts
@@ -8,6 +8,7 @@ import {MarkedString, CompletionItemKind, CompletionItem, DocumentSelector} from
import {IJSONContribution, ISuggestionsCollector} from './jsonContributions';
import {XHRRequest} from 'request-light';
import {Location} from 'jsonc-parser';
+import {textToMarkedString} from './markedTextUtil';
import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle();
@@ -173,7 +174,7 @@ export class BowerJSONContribution implements IJSONContribution {
htmlContent.push(localize('json.bower.package.hover', '{0}', pack));
return this.getInfo(pack).then(documentation => {
if (documentation) {
- htmlContent.push({ language: 'string', value: documentation});
+ htmlContent.push(textToMarkedString(documentation));
}
return htmlContent;
});
diff --git a/src/vs/workbench/common/constants.ts b/extensions/javascript/src/features/markedTextUtil.ts
similarity index 53%
rename from src/vs/workbench/common/constants.ts
rename to extensions/javascript/src/features/markedTextUtil.ts
index b20bae1c145..97f3198b80c 100644
--- a/src/vs/workbench/common/constants.ts
+++ b/extensions/javascript/src/features/markedTextUtil.ts
@@ -2,15 +2,10 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-
'use strict';
-// Container Identifiers
-export const Identifiers = {
- WORKBENCH_CONTAINER: 'workbench.main.container',
- ACTIVITYBAR_PART: 'workbench.parts.activitybar',
- SIDEBAR_PART: 'workbench.parts.sidebar',
- PANEL_PART: 'workbench.parts.panel',
- EDITOR_PART: 'workbench.parts.editor',
- STATUSBAR_PART: 'workbench.parts.statusbar'
-};
\ No newline at end of file
+import {MarkedString} from 'vscode';
+
+export function textToMarkedString(text: string) : MarkedString {
+ return text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
+}
\ No newline at end of file
diff --git a/extensions/javascript/src/features/packageJSONContribution.ts b/extensions/javascript/src/features/packageJSONContribution.ts
index cd1bc8e4d15..e7107bef811 100644
--- a/extensions/javascript/src/features/packageJSONContribution.ts
+++ b/extensions/javascript/src/features/packageJSONContribution.ts
@@ -8,6 +8,7 @@ import {MarkedString, CompletionItemKind, CompletionItem, DocumentSelector} from
import {IJSONContribution, ISuggestionsCollector} from './jsonContributions';
import {XHRRequest} from 'request-light';
import {Location} from 'jsonc-parser';
+import {textToMarkedString} from './markedTextUtil';
import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle();
@@ -121,29 +122,29 @@ export class PackageJSONContribution implements IJSONContribution {
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']) || location.matches(['optionalDependencies', '*']) || location.matches(['peerDependencies', '*']))) {
let currentKey = location.path[location.path.length - 1];
if (typeof currentKey === 'string') {
- let queryUrl = 'http://registry.npmjs.org/' + encodeURIComponent(currentKey) + '/latest';
+ let queryUrl = 'http://registry.npmjs.org/' + encodeURIComponent(currentKey).replace('%40', '@');
return this.xhr({
url : queryUrl
}).then((success) => {
try {
let obj = JSON.parse(success.responseText);
- if (obj && obj.version) {
- let version = obj.version;
- let name = JSON.stringify(version);
+ let latest = obj && obj['dist-tags'] && obj['dist-tags']['latest'];
+ if (latest) {
+ let name = JSON.stringify(latest);
let proposal = new CompletionItem(name);
proposal.kind = CompletionItemKind.Property;
proposal.insertText = name;
proposal.documentation = localize('json.npm.latestversion', 'The currently latest version of the package');
result.add(proposal);
- name = JSON.stringify('^' + version);
+ name = JSON.stringify('^' + latest);
proposal = new CompletionItem(name);
proposal.kind = CompletionItemKind.Property;
proposal.insertText = name;
proposal.documentation = localize('json.npm.majorversion', 'Matches the most recent major version (1.x.x)');
result.add(proposal);
- name = JSON.stringify('~' + version);
+ name = JSON.stringify('~' + latest);
proposal = new CompletionItem(name);
proposal.kind = CompletionItemKind.Property;
proposal.insertText = name;
@@ -179,8 +180,8 @@ export class PackageJSONContribution implements IJSONContribution {
}
private getInfo(pack: string): Thenable {
- let queryUrl = 'http://registry.npmjs.org/' + encodeURIComponent(pack) + '/latest';
+ let queryUrl = 'http://registry.npmjs.org/' + encodeURIComponent(pack).replace('%40', '@');
return this.xhr({
url : queryUrl
}).then((success) => {
@@ -191,8 +192,9 @@ export class PackageJSONContribution implements IJSONContribution {
if (obj.description) {
result.push(obj.description);
}
- if (obj.version) {
- result.push(localize('json.npm.version.hover', 'Latest version: {0}', obj.version));
+ let latest = obj && obj['dist-tags'] && obj['dist-tags']['latest'];
+ if (latest) {
+ result.push(localize('json.npm.version.hover', 'Latest version: {0}', latest));
}
return result;
}
@@ -213,7 +215,7 @@ export class PackageJSONContribution implements IJSONContribution {
htmlContent.push(localize('json.npm.package.hover', '{0}', pack));
return this.getInfo(pack).then(infos => {
infos.forEach(info => {
- htmlContent.push({language: 'string', value: info});
+ htmlContent.push(textToMarkedString(info));
});
return htmlContent;
});
diff --git a/extensions/json/npm-shrinkwrap.json b/extensions/json/npm-shrinkwrap.json
index b4c97acd780..c6f216d2d28 100644
--- a/extensions/json/npm-shrinkwrap.json
+++ b/extensions/json/npm-shrinkwrap.json
@@ -13,19 +13,19 @@
"resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.5.tgz"
},
"vscode-jsonrpc": {
- "version": "2.2.0",
- "from": "vscode-jsonrpc@>=2.2.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.2.0.tgz"
+ "version": "2.3.2-next.5",
+ "from": "vscode-jsonrpc@>=2.3.2-next.2 <3.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.3.2-next.5.tgz"
},
"vscode-languageclient": {
- "version": "2.4.2-next.3",
+ "version": "2.4.2-next.22",
"from": "vscode-languageclient@next",
- "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-2.4.2-next.3.tgz"
+ "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-2.4.2-next.22.tgz"
},
"vscode-languageserver-types": {
- "version": "1.0.1",
- "from": "vscode-languageserver-types@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.1.tgz"
+ "version": "1.0.3",
+ "from": "vscode-languageserver-types@>=1.0.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.3.tgz"
},
"vscode-nls": {
"version": "1.0.7",
diff --git a/extensions/json/package.json b/extensions/json/package.json
index 973728f5472..b5603841c6b 100644
--- a/extensions/json/package.json
+++ b/extensions/json/package.json
@@ -98,7 +98,7 @@
},
"dependencies": {
"vscode-extension-telemetry": "^0.0.5",
- "vscode-languageclient": "^2.4.2-next.3",
+ "vscode-languageclient": "^2.4.2-next.22",
"vscode-nls": "^1.0.7"
}
}
diff --git a/extensions/json/server/npm-shrinkwrap.json b/extensions/json/server/npm-shrinkwrap.json
index 47d61112c09..6ce6dfe75fc 100644
--- a/extensions/json/server/npm-shrinkwrap.json
+++ b/extensions/json/server/npm-shrinkwrap.json
@@ -43,29 +43,41 @@
"resolved": "https://registry.npmjs.org/request-light/-/request-light-0.1.0.tgz"
},
"vscode-json-languageservice": {
- "version": "1.1.4",
- "from": "vscode-json-languageservice@1.1.4",
- "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-1.1.4.tgz"
+ "version": "1.1.8-next.1",
+ "from": "vscode-json-languageservice@next",
+ "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-1.1.8-next.1.tgz",
+ "dependencies": {
+ "vscode-languageserver-types": {
+ "version": "1.0.3",
+ "from": "vscode-languageserver-types@>=1.0.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.3.tgz"
+ }
+ }
},
"vscode-jsonrpc": {
- "version": "2.2.0",
- "from": "vscode-jsonrpc@>=2.2.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.2.0.tgz"
+ "version": "2.3.2-next.5",
+ "from": "vscode-jsonrpc@>=2.3.2-next.2 <3.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.3.2-next.5.tgz"
},
"vscode-languageserver": {
- "version": "2.4.0-next.4",
+ "version": "2.4.0-next.12",
"from": "vscode-languageserver@next",
- "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-2.4.0-next.4.tgz"
+ "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-2.4.0-next.12.tgz"
},
"vscode-languageserver-types": {
- "version": "1.0.1",
- "from": "vscode-languageserver-types@1.0.1",
- "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.1.tgz"
+ "version": "1.0.3",
+ "from": "vscode-languageserver-types@>=1.0.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.3.tgz"
},
"vscode-nls": {
"version": "1.0.7",
"from": "vscode-nls@>=1.0.4 <2.0.0",
"resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-1.0.7.tgz"
+ },
+ "vscode-uri": {
+ "version": "0.0.6",
+ "from": "vscode-uri@>=0.0.6 <0.0.7",
+ "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-0.0.6.tgz"
}
}
}
diff --git a/extensions/json/server/package.json b/extensions/json/server/package.json
index 23be3423884..8fa3aa27e34 100644
--- a/extensions/json/server/package.json
+++ b/extensions/json/server/package.json
@@ -9,8 +9,8 @@
},
"dependencies": {
"request-light": "^0.1.0",
- "vscode-json-languageservice": "^1.1.4",
- "vscode-languageserver": "^2.4.0-next.4",
+ "vscode-json-languageservice": "^1.1.8-next.1",
+ "vscode-languageserver": "^2.4.0-next.12",
"vscode-nls": "^1.0.4"
},
"scripts": {
diff --git a/extensions/json/server/src/jsonServerMain.ts b/extensions/json/server/src/jsonServerMain.ts
index 393a606230f..3340ba905f4 100644
--- a/extensions/json/server/src/jsonServerMain.ts
+++ b/extensions/json/server/src/jsonServerMain.ts
@@ -52,7 +52,7 @@ documents.listen(connection);
const filesAssociationContribution = new FileAssociationContribution();
// After the server has started the client sends an initilize request. The server receives
-// in the passed params the rootPath of the workspace plus the client capabilites.
+// in the passed params the rootPath of the workspace plus the client capabilities.
let workspaceRoot: URI;
connection.onInitialize((params: InitializeParams): InitializeResult => {
workspaceRoot = URI.parse(params.rootPath);
@@ -204,7 +204,7 @@ documents.onDidClose(event => {
connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] });
});
-let pendingValidationRequests : {[uri:string]:number} = {};
+let pendingValidationRequests : { [uri: string]: NodeJS.Timer; } = {};
const validationDelayMs = 200;
function cleanPendingValidation(textDocument: TextDocument): void {
diff --git a/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts b/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts
index 381a8d1aec8..6a458db385c 100644
--- a/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts
+++ b/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts
@@ -219,10 +219,10 @@ export class ProjectJSONContribution implements JSONWorkerContribution {
this.addCached(res.id, res.version, res.description);
if (res.id === pack) {
if (res.description) {
- htmlContent.push({ language: 'string', value: res.description });
+ htmlContent.push(MarkedString.fromPlainText(res.description));
}
if (res.version) {
- htmlContent.push({ language: 'string', value: localize('json.nugget.version.hover', 'Latest version: {0}', res.version)});
+ htmlContent.push(MarkedString.fromPlainText(localize('json.nugget.version.hover', 'Latest version: {0}', res.version)));
}
break;
}
diff --git a/extensions/lib.core.d.ts b/extensions/lib.core.d.ts
index e898494d299..fb3fe52c13d 100644
--- a/extensions/lib.core.d.ts
+++ b/extensions/lib.core.d.ts
@@ -1,20 +1,19 @@
/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
+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
-
+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.
-
+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
/////////////////////////////
@@ -23,7 +22,7 @@ declare var NaN: number;
declare var Infinity: number;
/**
- * Evaluates JavaScript code and executes it.
+ * Evaluates JavaScript code and executes it.
* @param x A String value that contains valid JavaScript code.
*/
declare function eval(x: string): any;
@@ -31,25 +30,25 @@ 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.
+ * @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.
+ * 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).
+ * 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.
*/
@@ -67,7 +66,7 @@ declare function decodeURI(encodedURI: string): string;
*/
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.
*/
@@ -106,18 +105,18 @@ interface Object {
valueOf(): Object;
/**
- * Determines whether an object has a property with the specified name.
+ * 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.
+ * 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.
*/
@@ -132,36 +131,36 @@ interface ObjectConstructor {
/** A reference to the prototype for a class of objects. */
prototype: Object;
- /**
- * Returns the prototype of an 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.
+ * 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
+ /**
+ * 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.
+ * @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.
+ * 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.
@@ -169,7 +168,7 @@ interface ObjectConstructor {
defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;
/**
- * Adds one or more properties to an object, and/or modifies attributes of existing properties.
+ * 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.
*/
@@ -177,7 +176,7 @@ interface ObjectConstructor {
/**
* Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
+ * @param o Object on which to lock the attributes.
*/
seal(o: T): T;
@@ -189,25 +188,25 @@ interface ObjectConstructor {
/**
* Prevents the addition of new properties to an object.
- * @param o Object to make non-extensible.
+ * @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.
+ * @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.
+ * @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.
+ * @param o Object to test.
*/
isExtensible(o: any): boolean;
@@ -242,7 +241,7 @@ interface Function {
call(thisArg: any, ...argArray: any[]): any;
/**
- * For a given function, creates a bound function that has the same body as the original function.
+ * 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.
@@ -285,7 +284,7 @@ interface String {
*/
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.
*/
@@ -293,12 +292,12 @@ interface String {
/**
* Returns a string that contains the concatenation of two or more strings.
- * @param strings The strings to append to the end of the string.
+ * @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.
+ * 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.
*/
@@ -317,82 +316,82 @@ interface 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.
+ * @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.
+ * @param searchValue A string that represents the regular expression.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
*/
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.
+ * @param searchValue A string that represents the regular expression.
+ * @param replacer A function that returns the replacement text.
*/
- replace(searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string;
+ replace(searchValue: string, replacer: (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.
+ * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
*/
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.
+ * @param replacer A function that returns the replacement text.
*/
- replace(searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string;
+ replace(searchValue: RegExp, replacer: (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.
+ * @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.
+ * @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.
+ * @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 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 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.
+ * 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.
@@ -438,8 +437,8 @@ interface StringConstructor {
fromCharCode(...codes: number[]): string;
}
-/**
- * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
+/**
+ * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
*/
declare var String: StringConstructor;
@@ -463,7 +462,7 @@ interface Number {
*/
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.
*/
@@ -496,21 +495,21 @@ interface NumberConstructor {
/** 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.
+ * 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.
+ * A value greater than the largest number that can be represented in JavaScript.
+ * JavaScript displays POSITIVE_INFINITY values as infinity.
*/
POSITIVE_INFINITY: number;
}
@@ -540,23 +539,23 @@ interface Math {
/** 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).
+ * 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.
+ * 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.
+ /**
+ * Returns the arcsine of a number.
* @param x A numeric expression.
*/
asin(x: number): number;
/**
- * Returns the arctangent of a number.
+ * Returns the arctangent of a number.
* @param x A numeric expression for which the arctangent is needed.
*/
atan(x: number): number;
@@ -567,49 +566,49 @@ interface Math {
*/
atan2(y: number, x: number): number;
/**
- * Returns the smallest number greater than or equal to its numeric argument.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
*/
@@ -685,24 +684,24 @@ interface Date {
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.
+ * @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.
+ * 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.
+ * @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.
+ * 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.
*/
@@ -714,16 +713,16 @@ interface Date {
*/
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.
+ * 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 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;
@@ -731,7 +730,7 @@ interface Date {
* 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 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;
@@ -739,23 +738,23 @@ interface Date {
* 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 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.
+ * 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.
+ * @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.
+ /**
+ * 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;
@@ -800,7 +799,7 @@ interface DateConstructor {
*/
parse(s: string): number;
/**
- * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
+ * 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.
@@ -826,13 +825,13 @@ interface RegExpExecArray extends Array {
}
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.
*/
@@ -959,8 +958,8 @@ 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.
+ * @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;
/**
@@ -986,14 +985,14 @@ interface JSON {
* @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;
+ stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): 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;
+ stringify(value: any, replacer: any[], space: string | number): string;
}
/**
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
@@ -1040,14 +1039,14 @@ interface Array {
*/
join(separator?: string): string;
/**
- * Reverses the elements in an Array.
+ * 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.
@@ -1110,21 +1109,21 @@ interface Array {
/**
* 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 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 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.
+ * 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[];
@@ -1142,15 +1141,15 @@ interface Array {
*/
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 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 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;
@@ -1165,7 +1164,7 @@ interface ArrayConstructor {
(arrayLength?: number): any[];
(arrayLength: number): T[];
(...items: T[]): T[];
- isArray(arg: any): boolean;
+ isArray(arg: any): arg is Array;
prototype: Array;
}
@@ -1184,3 +1183,2657 @@ declare type ClassDecorator = (target: TFunction) =>
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 PromiseConstructorLike = new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike;
+
+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;
+}
+
+interface ArrayLike {
+ length: number;
+ [n: number]: T;
+}
+
+
+/**
+ * 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;
+}
+
+interface ArrayBufferConstructor {
+ prototype: ArrayBuffer;
+ new (byteLength: number): ArrayBuffer;
+ isView(arg: any): arg is ArrayBufferView;
+}
+declare var ArrayBuffer: ArrayBufferConstructor;
+
+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;
+}
+
+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;
+}
+
+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;
+
+ /**
+ * 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 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: ArrayLike, 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;
+
+ [index: number]: number;
+}
+interface Int8ArrayConstructor {
+ prototype: Int8Array;
+ new (length: number): Int8Array;
+ new (array: ArrayLike): 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, 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;
+
+ /**
+ * 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 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: ArrayLike, 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;
+
+ [index: number]: number;
+}
+
+interface Uint8ArrayConstructor {
+ prototype: Uint8Array;
+ new (length: number): Uint8Array;
+ new (array: ArrayLike): 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, 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;
+
+ /**
+ * 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 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;
+
+ [index: number]: number;
+}
+
+interface Uint8ClampedArrayConstructor {
+ prototype: Uint8ClampedArray;
+ new (length: number): Uint8ClampedArray;
+ new (array: ArrayLike): 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, 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;
+
+ /**
+ * 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 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: ArrayLike, 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;
+
+ [index: number]: number;
+}
+
+interface Int16ArrayConstructor {
+ prototype: Int16Array;
+ new (length: number): Int16Array;
+ new (array: ArrayLike): 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, 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;
+
+ /**
+ * 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 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: ArrayLike, 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;
+
+ [index: number]: number;
+}
+
+interface Uint16ArrayConstructor {
+ prototype: Uint16Array;
+ new (length: number): Uint16Array;
+ new (array: ArrayLike): 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, 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;
+
+ /**
+ * 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 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: ArrayLike, 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;
+
+ [index: number]: number;
+}
+
+interface Int32ArrayConstructor {
+ prototype: Int32Array;
+ new (length: number): Int32Array;
+ new (array: ArrayLike): 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, 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;
+
+ /**
+ * 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 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: ArrayLike, 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;
+
+ [index: number]: number;
+}
+
+interface Uint32ArrayConstructor {
+ prototype: Uint32Array;
+ new (length: number): Uint32Array;
+ new (array: ArrayLike): 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, 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;
+
+ /**
+ * 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 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: ArrayLike, 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;
+
+ [index: number]: number;
+}
+
+interface Float32ArrayConstructor {
+ prototype: Float32Array;
+ new (length: number): Float32Array;
+ new (array: ArrayLike): 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, 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;
+
+ /**
+ * 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 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: ArrayLike, 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;
+
+ [index: number]: number;
+}
+
+interface Float64ArrayConstructor {
+ prototype: Float64Array;
+ new (length: number): Float64Array;
+ new (array: ArrayLike): 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, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
+}
+declare var Float64Array: Float64ArrayConstructor;
diff --git a/extensions/node-debug/node-debug.azure.json b/extensions/node-debug/node-debug.azure.json
index b71b93ca684..b5e964fb7c1 100644
--- a/extensions/node-debug/node-debug.azure.json
+++ b/extensions/node-debug/node-debug.azure.json
@@ -1,6 +1,6 @@
{
"account": "monacobuild",
"container": "debuggers",
- "zip": "6366d8f/node-debug.zip",
+ "zip": "864e0bd/node-debug.zip",
"output": ""
}
diff --git a/extensions/node.d.ts b/extensions/node.d.ts
index 89f52915a65..df0802add52 100644
--- a/extensions/node.d.ts
+++ b/extensions/node.d.ts
@@ -1,14 +1,29 @@
-// Type definitions for Node.js v0.11.13
+// Type definitions for Node.js v4.x
// Project: http://nodejs.org/
-// Definitions by: Microsoft TypeScript , DefinitelyTyped
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
+// Definitions by: Microsoft TypeScript , DefinitelyTyped
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
/************************************************
* *
-* Node.js v0.11.13 API *
+* Node.js v4.x API *
* *
************************************************/
+interface Error {
+ stack?: string;
+}
+
+
+// compat for TypeScript 1.8
+// if you use with --target es3 or --target es5 and use below definitions,
+// use the lib.es6.d.ts that is bundled with TypeScript 1.8.
+interface MapConstructor {}
+interface WeakMapConstructor {}
+interface SetConstructor {}
+interface WeakSetConstructor {}
+
/************************************************
* *
* GLOBAL *
@@ -20,55 +35,44 @@ declare var global: any;
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 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;
-//};
+interface NodeRequireFunction {
+ (id: string): any;
+}
-// declare var define: {
-// (moduleName: string, dependencies: string[], callback: (...args: any[]) => any): any;
-// (moduleName: string, dependencies: string[], definition: any): any;
-// (moduleName: string, callback: (...args: any[]) => any): any;
-// (moduleName: string, definition: any): any;
-// (dependencies: string[], callback: (...args: any[]) => any): any;
-// (dependencies: string[], definition: any): any;
-// };
+interface NodeRequire extends NodeRequireFunction {
+ resolve(id:string): string;
+ cache: any;
+ extensions: any;
+ main: any;
+}
-// declare var require: {
-// toUrl(path: string): string;
-// (moduleName: string): any;
-// (dependencies: string[], callback: (...args: any[]) => any, errorback?: (err: any) => void): any;
-// config(data: any): any;
-// onError: Function;
-// __$__nodeRequire(moduleName: string): T;
-// };
+declare var require: NodeRequire;
-//declare var module: {
-// exports: any;
-// require(id: string): any;
-// id: string;
-// filename: string;
-// loaded: boolean;
-// parent: any;
-// children: any[];
-//};
+interface NodeModule {
+ exports: any;
+ require: NodeRequireFunction;
+ id: string;
+ filename: string;
+ loaded: boolean;
+ parent: any;
+ children: any[];
+}
+
+declare var module: 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 (size: Uint8Array): Buffer;
new (array: any[]): Buffer;
prototype: Buffer;
isBuffer(obj: any): boolean;
@@ -78,16 +82,84 @@ declare var SlowBuffer: {
// Buffer class
+type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "binary" | "hex";
interface Buffer extends NodeBuffer {}
+
+/**
+ * Raw data is stored in instances of the Buffer class.
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
+ */
declare var Buffer: {
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ */
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: Uint8Array): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
+ new (array: Uint8Array): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
new (array: any[]): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ */
+ new (buffer: Buffer): Buffer;
prototype: Buffer;
- isBuffer(obj: any): boolean;
+ /**
+ * Returns true if {obj} is a Buffer
+ *
+ * @param obj object to test.
+ */
+ isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns true if {encoding} is a valid encoding argument.
+ * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
+ *
+ * @param encoding string to test.
+ */
+ isEncoding(encoding: string): boolean;
+ /**
+ * Gives the actual byte length of a string. encoding defaults to 'utf8'.
+ * This is not the same as String.prototype.length since that returns the number of characters in a string.
+ *
+ * @param string string to test.
+ * @param encoding encoding used to evaluate (defaults to 'utf8')
+ */
byteLength(string: string, encoding?: string): number;
+ /**
+ * Returns a buffer which is the result of concatenating all the buffers in the list together.
+ *
+ * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
+ * If the list has exactly one item, then the first item of the list is returned.
+ * If the list has more than one item, then a new Buffer is created.
+ *
+ * @param list An array of Buffer objects to concatenate
+ * @param totalLength Total length of the buffers when concatenated.
+ * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
+ */
concat(list: Buffer[], totalLength?: number): Buffer;
+ /**
+ * The same as buf1.compare(buf2).
+ */
+ compare(buf1: Buffer, buf2: Buffer): number;
};
/************************************************
@@ -95,28 +167,31 @@ declare var Buffer: {
* GLOBAL INTERFACES *
* *
************************************************/
-declare module NodeJS {
+declare namespace NodeJS {
export interface ErrnoException extends Error {
- errno?: any;
+ errno?: number;
code?: string;
path?: string;
syscall?: string;
+ stack?: 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;
+ addListener(event: string, listener: Function): this;
+ on(event: string, listener: Function): this;
+ once(event: string, listener: Function): this;
+ removeListener(event: string, listener: Function): this;
+ removeAllListeners(event?: string): this;
+ setMaxListeners(n: number): this;
+ getMaxListeners(): number;
listeners(event: string): Function[];
emit(event: string, ...args: any[]): boolean;
+ listenerCount(type: string): number;
}
export interface ReadableStream extends EventEmitter {
readable: boolean;
- read(size?: number): any;
+ read(size?: number): string|Buffer;
setEncoding(encoding: string): void;
pause(): void;
resume(): void;
@@ -129,8 +204,7 @@ declare module NodeJS {
export interface WritableStream extends EventEmitter {
writable: boolean;
- write(buffer: Buffer, cb?: Function): boolean;
- write(str: string, cb?: Function): boolean;
+ write(buffer: Buffer|string, cb?: Function): boolean;
write(str: string, encoding?: string, cb?: Function): boolean;
end(): void;
end(buffer: Buffer, cb?: Function): void;
@@ -140,11 +214,35 @@ declare module NodeJS {
export interface ReadWriteStream extends ReadableStream, WritableStream {}
+ export interface Events extends EventEmitter { }
+
+ export interface Domain extends Events {
+ run(fn: Function): void;
+ add(emitter: Events): void;
+ remove(emitter: Events): void;
+ bind(cb: (err: Error, data: any) => any): any;
+ intercept(cb: (data: any) => any): any;
+ dispose(): void;
+
+ addListener(event: string, listener: Function): this;
+ on(event: string, listener: Function): this;
+ once(event: string, listener: Function): this;
+ removeListener(event: string, listener: Function): this;
+ removeAllListeners(event?: string): this;
+ }
+
+ export interface MemoryUsage {
+ rss: number;
+ heapTotal: number;
+ heapUsed: number;
+ }
+
export interface Process extends EventEmitter {
stdout: WritableStream;
stderr: WritableStream;
stdin: ReadableStream;
argv: string[];
+ execArgv: string[];
execPath: string;
abort(): void;
chdir(directory: string): void;
@@ -193,19 +291,88 @@ declare module NodeJS {
visibility: string;
};
};
- kill(pid: number, signal?: string): void;
+ kill(pid:number, signal?: string|number): void;
pid: number;
title: string;
arch: string;
platform: string;
- memoryUsage(): { rss: number; heapTotal: number; heapUsed: number; };
+ memoryUsage(): MemoryUsage;
nextTick(callback: Function): void;
umask(mask?: number): number;
uptime(): number;
hrtime(time?:number[]): number[];
+ domain: Domain;
// Worker
send?(message: any, sendHandle?: any): void;
+ disconnect(): void;
+ connected: boolean;
+ }
+
+ 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: MapConstructor;
+ Math: typeof Math;
+ NaN: typeof NaN;
+ Number: typeof Number;
+ Object: typeof Object;
+ Promise: Function;
+ RangeError: typeof RangeError;
+ ReferenceError: typeof ReferenceError;
+ RegExp: typeof RegExp;
+ Set: SetConstructor;
+ 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: WeakMapConstructor;
+ WeakSet: WeakSetConstructor;
+ 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;
+ v8debug?: any;
}
export interface Timer {
@@ -223,9 +390,19 @@ interface NodeBuffer {
toString(encoding?: string, start?: number, end?: number): string;
toJSON(): any;
length: number;
+ equals(otherBuffer: Buffer): boolean;
+ compare(otherBuffer: Buffer): number;
copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
slice(start?: number, end?: number): Buffer;
- readUInt8(offset: number, noAsset?: boolean): number;
+ writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readUInt8(offset: number, noAssert?: boolean): number;
readUInt16LE(offset: number, noAssert?: boolean): number;
readUInt16BE(offset: number, noAssert?: boolean): number;
readUInt32LE(offset: number, noAssert?: boolean): number;
@@ -239,21 +416,22 @@ interface NodeBuffer {
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;
+ writeUInt8(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt8(value: number, offset: number, noAssert?: boolean): number;
+ writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
+ writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
+ writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
+ fill(value: any, offset?: number, end?: number): Buffer;
+ indexOf(value: string | number | Buffer, byteOffset?: number): number;
}
/************************************************
@@ -263,52 +441,76 @@ interface NodeBuffer {
************************************************/
declare module "buffer" {
export var INSPECT_MAX_BYTES: number;
+ var BuffType: typeof Buffer;
+ var SlowBuffType: typeof SlowBuffer;
+ export { BuffType as Buffer, SlowBuffType as SlowBuffer };
}
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(): any;
- export function unescape(): any;
+ export interface StringifyOptions {
+ encodeURIComponent?: Function;
+ }
+
+ export interface ParseOptions {
+ maxKeys?: number;
+ decodeURIComponent?: Function;
+ }
+
+ export function stringify(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string;
+ export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): any;
+ export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): T;
+ 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;
+ static EventEmitter: EventEmitter;
+ static listenerCount(emitter: EventEmitter, event: string): number; // deprecated
+ static defaultMaxListeners: 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;
+ addListener(event: string, listener: Function): this;
+ on(event: string, listener: Function): this;
+ once(event: string, listener: Function): this;
+ removeListener(event: string, listener: Function): this;
+ removeAllListeners(event?: string): this;
+ setMaxListeners(n: number): this;
+ getMaxListeners(): number;
listeners(event: string): Function[];
emit(event: string, ...args: any[]): boolean;
- }
+ listenerCount(type: string): number;
+ }
}
declare module "http" {
- import events = require("events");
- import net = require("net");
- import stream = require("stream");
+ import * as events from "events";
+ import * as net from "net";
+ import * as stream from "stream";
- export interface Server extends events.EventEmitter {
- listen(port: number, hostname?: string, backlog?: number, 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;
+ export interface RequestOptions {
+ protocol?: string;
+ host?: string;
+ hostname?: string;
+ family?: number;
+ port?: number;
+ localAddress?: string;
+ socketPath?: string;
+ method?: string;
+ path?: string;
+ headers?: { [key: string]: any };
+ auth?: string;
+ agent?: Agent|boolean;
}
- export interface ServerRequest extends events.EventEmitter, stream.Readable {
- method: string;
- url: string;
- headers: any;
- trailers: string;
- httpVersion: string;
- setEncoding(encoding?: string): void;
- pause(): void;
- resume(): void;
+
+ export interface Server extends events.EventEmitter, net.Server {
+ setTimeout(msecs: number, callback: Function): void;
+ maxHeadersCount: number;
+ timeout: number;
+ }
+ /**
+ * @deprecated Use IncomingMessage
+ */
+ export interface ServerRequest extends IncomingMessage {
connection: net.Socket;
}
export interface ServerResponse extends events.EventEmitter, stream.Writable {
@@ -323,7 +525,9 @@ declare module "http" {
writeHead(statusCode: number, reasonPhrase?: string, headers?: any): void;
writeHead(statusCode: number, headers?: any): void;
statusCode: number;
- setHeader(name: string, value: string): void;
+ statusMessage: string;
+ headersSent: boolean;
+ setHeader(name: string, value: string | string[]): void;
sendDate: boolean;
getHeader(name: string): string;
removeHeader(name: string): void;
@@ -351,6 +555,11 @@ declare module "http" {
setNoDelay(noDelay?: boolean): void;
setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
+ setHeader(name: string, value: string | string[]): void;
+ getHeader(name: string): string;
+ removeHeader(name: string): void;
+ addTrailers(headers: any): void;
+
// Extended base methods
end(): void;
end(buffer: Buffer, cb?: Function): void;
@@ -358,31 +567,88 @@ declare module "http" {
end(str: string, encoding?: string, cb?: Function): void;
end(data?: any, encoding?: string): void;
}
- export interface ClientResponse extends events.EventEmitter, stream.Readable {
- statusCode: number;
+ export interface IncomingMessage extends events.EventEmitter, stream.Readable {
httpVersion: string;
headers: any;
+ rawHeaders: string[];
trailers: any;
- setEncoding(encoding?: string): void;
- pause(): void;
- resume(): void;
+ 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;
}
- export interface Agent { maxSockets: number; sockets: any; requests: any; }
+ /**
+ * @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 METHODS: string[];
export var STATUS_CODES: {
[errorCode: number]: string;
[errorCode: string]: string;
};
- export function createServer(requestListener?: (request: ServerRequest, response: ServerResponse) =>void ): Server;
+ export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) =>void ): Server;
export function createClient(port?: number, host?: string): any;
- export function request(options: any, callback?: Function): ClientRequest;
- export function get(options: any, callback?: Function): ClientRequest;
+ export function request(options: RequestOptions, 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");
+ import * as child from "child_process";
+ import * as events from "events";
export interface ClusterSettings {
exec?: string;
@@ -390,6 +656,12 @@ declare module "cluster" {
silent?: boolean;
}
+ export interface Address {
+ address: string;
+ port: number;
+ addressType: string;
+ }
+
export class Worker extends events.EventEmitter {
id: string;
process: child.ChildProcess;
@@ -411,6 +683,13 @@ declare module "cluster" {
// Event emitter
export function addListener(event: string, listener: Function): void;
+ export function on(event: "disconnect", listener: (worker: Worker) => void): void;
+ export function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): void;
+ export function on(event: "fork", listener: (worker: Worker) => void): void;
+ export function on(event: "listening", listener: (worker: Worker, address: any) => void): void;
+ export function on(event: "message", listener: (worker: Worker, message: any) => void): void;
+ export function on(event: "online", listener: (worker: Worker) => void): void;
+ export function on(event: "setup", listener: (settings: any) => void): 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;
@@ -421,7 +700,7 @@ declare module "cluster" {
}
declare module "zlib" {
- import stream = require("stream");
+ import * as stream from "stream";
export interface ZlibOptions { chunkSize?: number; windowBits?: number; level?: number; memLevel?: number; strategy?: number; dictionary?: any; }
export interface Gzip extends stream.Transform { }
@@ -441,12 +720,19 @@ declare module "zlib" {
export function createUnzip(options?: ZlibOptions): Unzip;
export function deflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
+ export function deflateSync(buf: Buffer, options?: ZlibOptions): any;
export function deflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
+ export function deflateRawSync(buf: Buffer, options?: ZlibOptions): any;
export function gzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
+ export function gzipSync(buf: Buffer, options?: ZlibOptions): any;
export function gunzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
+ export function gunzipSync(buf: Buffer, options?: ZlibOptions): any;
export function inflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
+ export function inflateSync(buf: Buffer, options?: ZlibOptions): any;
export function inflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
+ export function inflateRawSync(buf: Buffer, options?: ZlibOptions): any;
export function unzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
+ export function unzipSync(buf: Buffer, options?: ZlibOptions): any;
// Constants
export var Z_NO_FLUSH: number;
@@ -483,7 +769,29 @@ declare module "zlib" {
}
declare module "os" {
+ export interface CpuInfo {
+ model: string;
+ speed: number;
+ times: {
+ user: number;
+ nice: number;
+ sys: number;
+ idle: number;
+ irq: number;
+ };
+ }
+
+ export interface NetworkInterfaceInfo {
+ address: string;
+ netmask: string;
+ family: string;
+ mac: string;
+ internal: boolean;
+ }
+
export function tmpdir(): string;
+ export function homedir(): string;
+ export function endianness(): string;
export function hostname(): string;
export function type(): string;
export function platform(): string;
@@ -493,15 +801,15 @@ declare module "os" {
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 function cpus(): CpuInfo[];
+ export function networkInterfaces(): {[index: string]: NetworkInterfaceInfo[]};
export var EOL: string;
}
declare module "https" {
- import tls = require("tls");
- import events = require("events");
- import http = require("http");
+ import * as tls from "tls";
+ import * as events from "events";
+ import * as http from "http";
export interface ServerOptions {
pfx?: any;
@@ -518,15 +826,7 @@ declare module "https" {
SNICallback?: (servername: string) => any;
}
- export interface RequestOptions {
- host?: string;
- hostname?: string;
- port?: number;
- path?: string;
- method?: string;
- headers?: any;
- auth?: string;
- agent?: any;
+ export interface RequestOptions extends http.RequestOptions{
pfx?: any;
key?: any;
passphrase?: string;
@@ -534,6 +834,7 @@ declare module "https" {
ca?: any;
ciphers?: string;
rejectUnauthorized?: boolean;
+ secureProtocol?: string;
}
export interface Agent {
@@ -546,8 +847,8 @@ declare module "https" {
};
export interface Server extends tls.Server { }
export function createServer(options: ServerOptions, requestListener?: Function): Server;
- export function request(options: RequestOptions, callback?: (res: events.EventEmitter) =>void ): http.ClientRequest;
- export function get(options: RequestOptions, callback?: (res: events.EventEmitter) =>void ): http.ClientRequest;
+ 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;
}
@@ -558,15 +859,15 @@ declare module "punycode" {
export function toASCII(domain: string): string;
export var ucs2: ucs2;
interface ucs2 {
- decode(string: string): string;
+ decode(string: string): number[];
encode(codePoints: number[]): string;
}
export var version: any;
}
declare module "repl" {
- import stream = require("stream");
- import events = require("events");
+ import * as stream from "stream";
+ import * as events from "events";
export interface ReplOptions {
prompt?: string;
@@ -583,25 +884,52 @@ declare module "repl" {
}
declare module "readline" {
- import events = require("events");
- import stream = require("stream");
+ import * as events from "events";
+ import * as stream from "stream";
+
+ export interface Key {
+ sequence?: string;
+ name?: string;
+ ctrl?: boolean;
+ meta?: boolean;
+ shift?: boolean;
+ }
export interface ReadLine extends events.EventEmitter {
- setPrompt(prompt: string, length: number): void;
+ setPrompt(prompt: string): void;
prompt(preserveCursor?: boolean): void;
- question(query: string, callback: Function): void;
- pause(): void;
- resume(): void;
+ question(query: string, callback: (answer: string) => void): void;
+ pause(): ReadLine;
+ resume(): ReadLine;
close(): void;
- write(data: any, key?: any): void;
+ write(data: string|Buffer, key?: Key): void;
}
+
+ export interface Completer {
+ (line: string): CompleterResult;
+ (line: string, callback: (err: any, result: CompleterResult) => void): any;
+ }
+
+ export interface CompleterResult {
+ completions: string[];
+ line: string;
+ }
+
export interface ReadLineOptions {
input: NodeJS.ReadableStream;
- output: NodeJS.WritableStream;
- completer?: Function;
+ output?: NodeJS.WritableStream;
+ completer?: Completer;
terminal?: boolean;
+ historySize?: number;
}
+
+ export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer, terminal?: boolean): ReadLine;
export function createInterface(options: ReadLineOptions): ReadLine;
+
+ export function cursorTo(stream: NodeJS.WritableStream, x: number, y: number): void;
+ export function moveCursor(stream: NodeJS.WritableStream, dx: number|string, dy: number|string): void;
+ export function clearLine(stream: NodeJS.WritableStream, dir: number): void;
+ export function clearScreenDown(stream: NodeJS.WritableStream): void;
}
declare module "vm" {
@@ -618,71 +946,179 @@ declare module "vm" {
}
declare module "child_process" {
- import events = require("events");
- import stream = require("stream");
+ import * as events from "events";
+ import * as stream from "stream";
export interface ChildProcess extends events.EventEmitter {
stdin: stream.Writable;
stdout: stream.Readable;
stderr: stream.Readable;
+ stdio: [stream.Writable, stream.Readable, stream.Readable];
pid: number;
+ connected: boolean;
kill(signal?: string): void;
- send(message: any, sendHandle: any): void;
+ send(message: any, sendHandle?: any): void;
disconnect(): void;
+ unref(): void;
}
- export function spawn(command: string, args?: string[], options?: {
+ export interface SpawnOptions {
cwd?: string;
- stdio?: any;
- custom?: any;
env?: any;
+ stdio?: any;
detached?: boolean;
- }): ChildProcess;
- export function exec(command: string, options: {
+ uid?: number;
+ gid?: number;
+ shell?: boolean | string;
+ }
+ export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess;
+
+ export interface ExecOptions {
cwd?: string;
- stdio?: any;
- customFds?: any;
env?: any;
- encoding?: string;
+ shell?: string;
timeout?: number;
maxBuffer?: number;
killSignal?: string;
- }, callback: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
+ uid?: number;
+ gid?: number;
+ }
+ export interface ExecOptionsWithStringEncoding extends ExecOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecOptionsWithBufferEncoding extends ExecOptions {
+ encoding: string; // specify `null`.
+ }
export function exec(command: string, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function execFile(file: string, args: string[], options: {
+ export function exec(command: string, options: ExecOptions, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
+
+ export interface ExecFileOptions {
cwd?: string;
- stdio?: any;
- customFds?: any;
env?: any;
- encoding?: string;
timeout?: number;
- maxBuffer?: string;
+ maxBuffer?: number;
killSignal?: string;
- }, callback: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
- export function fork(modulePath: string, args?: string[], options?: {
+ uid?: number;
+ gid?: number;
+ }
+ export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+ encoding: string; // specify `null`.
+ }
+ export function execFile(file: string, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ export function execFile(file: string, options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ // usage. child_process.execFile("file.sh", {encoding: null as string}, (err, stdout, stderr) => {});
+ export function execFile(file: string, options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
+ export function execFile(file: string, options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ export function execFile(file: string, args?: string[], callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+ // usage. child_process.execFile("file.sh", ["foo"], {encoding: null as string}, (err, stdout, stderr) => {});
+ export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
+ export function execFile(file: string, args?: string[], options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
+
+ export interface ForkOptions {
cwd?: string;
env?: any;
+ execPath?: string;
+ execArgv?: string[];
+ silent?: boolean;
+ uid?: number;
+ gid?: number;
+ }
+ export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess;
+
+ export interface SpawnSyncOptions {
+ cwd?: string;
+ input?: string | Buffer;
+ stdio?: any;
+ env?: any;
+ uid?: number;
+ gid?: number;
+ timeout?: number;
+ killSignal?: string;
+ maxBuffer?: number;
encoding?: string;
- }): ChildProcess;
+ shell?: boolean | string;
+ }
+ export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+ encoding: BufferEncoding;
+ }
+ export interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ export interface SpawnSyncReturns {
+ pid: number;
+ output: string[];
+ stdout: T;
+ stderr: T;
+ status: number;
+ signal: string;
+ error: Error;
+ }
+ export function spawnSync(command: string): SpawnSyncReturns;
+ export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns;
+ export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
+ export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns;
+
+ export interface ExecSyncOptions {
+ cwd?: string;
+ input?: string | Buffer;
+ stdio?: any;
+ env?: any;
+ shell?: string;
+ uid?: number;
+ gid?: number;
+ timeout?: number;
+ killSignal?: string;
+ maxBuffer?: number;
+ encoding?: string;
+ }
+ export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ export function execSync(command: string): Buffer;
+ export function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
+ export function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
+ export function execSync(command: string, options?: ExecSyncOptions): Buffer;
+
+ export interface ExecFileSyncOptions {
+ cwd?: string;
+ input?: string | Buffer;
+ stdio?: any;
+ env?: any;
+ uid?: number;
+ gid?: number;
+ timeout?: number;
+ killSignal?: string;
+ maxBuffer?: number;
+ encoding?: string;
+ }
+ export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding;
+ }
+ export interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ export function execFileSync(command: string): Buffer;
+ export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
+ export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
+ export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string;
+ export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer;
}
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 {
+ href?: string;
protocol?: string;
auth?: string;
hostname?: string;
@@ -690,13 +1126,14 @@ declare module "url" {
host?: string;
pathname?: string;
search?: string;
- query?: any;
+ query?: any; // string | Object
+ slashes?: boolean;
hash?: string;
path?: string;
}
export function parse(urlStr: string, parseQueryString?: boolean , slashesDenoteHost?: boolean ): Url;
- export function format(url: UrlOptions): string;
+ export function format(url: Url): string;
export function resolve(from: string, to: string): string;
}
@@ -716,7 +1153,7 @@ declare module "dns" {
}
declare module "net" {
- import stream = require("stream");
+ import * as stream from "stream";
export interface Socket extends stream.Duplex {
// Extended base methods
@@ -738,8 +1175,14 @@ declare module "net" {
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;
@@ -755,21 +1198,38 @@ declare module "net" {
new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket;
};
+ export interface ListenOptions {
+ port?: number;
+ host?: string;
+ backlog?: number;
+ path?: string;
+ exclusive?: boolean;
+ }
+
export interface Server extends Socket {
- listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server;
+ listen(port: number, hostname?: string, backlog?: number, listeningListener?: Function): Server;
+ listen(port: number, hostname?: string, listeningListener?: Function): Server;
+ listen(port: number, backlog?: number, listeningListener?: Function): Server;
+ listen(port: number, listeningListener?: Function): Server;
+ listen(path: string, backlog?: number, listeningListener?: Function): Server;
listen(path: string, listeningListener?: Function): Server;
+ listen(handle: any, backlog?: number, listeningListener?: Function): Server;
listen(handle: any, listeningListener?: Function): Server;
+ listen(options: ListenOptions, listeningListener?: Function): Server;
close(callback?: Function): Server;
address(): { port: number; family: string; address: string; };
+ getConnections(cb: (error: Error, count: number) => void): void;
+ ref(): Server;
+ unref(): Server;
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(options: { port: number, host?: string, localAddress? : string, localPort? : string, family? : number, 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(options: { port: number, host?: string, localAddress? : string, localPort? : string, family? : number, 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;
@@ -778,7 +1238,7 @@ declare module "net" {
}
declare module "dgram" {
- import events = require("events");
+ import * as events from "events";
interface RemoteInfo {
address: string;
@@ -808,8 +1268,8 @@ declare module "dgram" {
}
declare module "fs" {
- import stream = require("stream");
- import events = require("events");
+ import * as stream from "stream";
+ import * as events from "events";
interface Stats {
isFile(): boolean;
@@ -831,18 +1291,34 @@ declare module "fs" {
blocks: number;
atime: Date;
mtime: Date;
- birthtime: Date;
ctime: Date;
+ birthtime: Date;
}
interface FSWatcher extends events.EventEmitter {
close(): void;
}
- export interface ReadStream extends stream.Readable {}
- export interface WriteStream extends stream.Writable {}
+ export interface ReadStream extends stream.Readable {
+ close(): void;
+ }
+ export interface WriteStream extends stream.Writable {
+ close(): void;
+ bytesWritten: number;
+ }
+ /**
+ * Asynchronous rename.
+ * @param oldPath
+ * @param newPath
+ * @param callback No arguments other than a possible exception are given to the completion callback.
+ */
export function rename(oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
+ /**
+ * Synchronous rename
+ * @param oldPath
+ * @param newPath
+ */
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;
@@ -882,15 +1358,71 @@ declare module "fs" {
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 realpathSync(path: string, cache?: { [path: string]: string }): string;
+ /*
+ * Asynchronous unlink - deletes the file specified in {path}
+ *
+ * @param path
+ * @param callback No arguments other than a possible exception are given to the completion callback.
+ */
export function unlink(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
+ /*
+ * Synchronous unlink - deletes the file specified in {path}
+ *
+ * @param path
+ */
export function unlinkSync(path: string): void;
+ /*
+ * Asynchronous rmdir - removes the directory specified in {path}
+ *
+ * @param path
+ * @param callback No arguments other than a possible exception are given to the completion callback.
+ */
export function rmdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
+ /*
+ * Synchronous rmdir - removes the directory specified in {path}
+ *
+ * @param path
+ */
export function rmdirSync(path: string): void;
+ /*
+ * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
+ *
+ * @param path
+ * @param callback No arguments other than a possible exception are given to the completion callback.
+ */
export function mkdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
+ /*
+ * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
+ *
+ * @param path
+ * @param mode
+ * @param callback No arguments other than a possible exception are given to the completion callback.
+ */
export function mkdir(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
+ /*
+ * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
+ *
+ * @param path
+ * @param mode
+ * @param callback No arguments other than a possible exception are given to the completion callback.
+ */
export function mkdir(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
+ /*
+ * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
+ *
+ * @param path
+ * @param mode
+ * @param callback No arguments other than a possible exception are given to the completion callback.
+ */
export function mkdirSync(path: string, mode?: number): void;
+ /*
+ * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
+ *
+ * @param path
+ * @param mode
+ * @param callback No arguments other than a possible exception are given to the completion callback.
+ */
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[];
@@ -911,20 +1443,72 @@ declare module "fs" {
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 fdatasync(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
+ export function fdatasyncSync(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 write(fd: number, buffer: Buffer, offset: number, length: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void;
+ export function write(fd: number, data: any, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
+ export function write(fd: number, data: any, offset: number, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
+ export function write(fd: number, data: any, offset: number, encoding: string, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
+ export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position?: number): number;
+ export function writeSync(fd: number, data: any, position?: number, enconding?: string): 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;
+ /*
+ * Asynchronous readFile - Asynchronously reads the entire contents of a file.
+ *
+ * @param fileName
+ * @param encoding
+ * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
+ */
export function readFile(filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
+ /*
+ * Asynchronous readFile - Asynchronously reads the entire contents of a file.
+ *
+ * @param fileName
+ * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer.
+ * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
+ */
export function readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
+ /*
+ * Asynchronous readFile - Asynchronously reads the entire contents of a file.
+ *
+ * @param fileName
+ * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer.
+ * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
+ */
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;
+ /*
+ * Asynchronous readFile - Asynchronously reads the entire contents of a file.
+ *
+ * @param fileName
+ * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
+ */
+ export function readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
+ /*
+ * Synchronous readFile - Synchronously reads the entire contents of a file.
+ *
+ * @param fileName
+ * @param encoding
+ */
export function readFileSync(filename: string, encoding: string): string;
+ /*
+ * Synchronous readFile - Synchronously reads the entire contents of a file.
+ *
+ * @param fileName
+ * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer.
+ */
export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string;
+ /*
+ * Synchronous readFile - Synchronously reads the entire contents of a file.
+ *
+ * @param fileName
+ * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer.
+ */
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 writeFile(filename: string|number, data: any, 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;
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;
@@ -939,36 +1523,178 @@ declare module "fs" {
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;
+ /** Constant for fs.access(). File is visible to the calling process. */
+ export var F_OK: number;
+ /** Constant for fs.access(). File can be read by the calling process. */
+ export var R_OK: number;
+ /** Constant for fs.access(). File can be written by the calling process. */
+ export var W_OK: number;
+ /** Constant for fs.access(). File can be executed by the calling process. */
+ export var X_OK: number;
+ /** Tests a user's permissions for the file specified by path. */
+ export function access(path: string, callback: (err: NodeJS.ErrnoException) => void): void;
+ export function access(path: string, mode: number, callback: (err: NodeJS.ErrnoException) => void): void;
+ /** Synchronous version of fs.access. This throws if any accessibility checks fail, and does nothing otherwise. */
+ export function accessSync(path: string, mode ?: number): void;
export function createReadStream(path: string, options?: {
flags?: string;
encoding?: string;
- fd?: string;
+ fd?: number;
mode?: number;
- bufferSize?: number;
- }): ReadStream;
- export function createReadStream(path: string, options?: {
- flags?: string;
- encoding?: string;
- fd?: string;
- mode?: string;
- bufferSize?: number;
+ autoClose?: boolean;
}): ReadStream;
export function createWriteStream(path: string, options?: {
flags?: string;
encoding?: string;
- string?: string;
+ fd?: number;
+ mode?: number;
}): WriteStream;
}
declare module "path" {
+
+ /**
+ * A parsed path object generated by path.parse() or consumed by path.format().
+ */
+ export interface ParsedPath {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root: string;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir: string;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base: string;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext: string;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name: string;
+ }
+
+ /**
+ * Normalize a string path, reducing '..' and '.' parts.
+ * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
+ *
+ * @param p string path to normalize.
+ */
export function normalize(p: string): string;
+ /**
+ * Join all arguments together and normalize the resulting path.
+ * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
+ *
+ * @param paths string paths to join.
+ */
export function join(...paths: any[]): string;
+ /**
+ * Join all arguments together and normalize the resulting path.
+ * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
+ *
+ * @param paths string paths to join.
+ */
+ export function join(...paths: string[]): string;
+ /**
+ * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
+ *
+ * Starting from leftmost {from} paramter, resolves {to} to an absolute path.
+ *
+ * If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory.
+ *
+ * @param pathSegments string paths to join. Non-string arguments are ignored.
+ */
export function resolve(...pathSegments: any[]): string;
+ /**
+ * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
+ *
+ * @param path path to test.
+ */
+ export function isAbsolute(path: string): boolean;
+ /**
+ * Solve the relative path from {from} to {to}.
+ * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
+ *
+ * @param from
+ * @param to
+ */
export function relative(from: string, to: string): string;
+ /**
+ * Return the directory name of a path. Similar to the Unix dirname command.
+ *
+ * @param p the path to evaluate.
+ */
export function dirname(p: string): string;
+ /**
+ * Return the last portion of a path. Similar to the Unix basename command.
+ * Often used to extract the file name from a fully qualified path.
+ *
+ * @param p the path to evaluate.
+ * @param ext optionally, an extension to remove from the result.
+ */
export function basename(p: string, ext?: string): string;
+ /**
+ * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
+ * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
+ *
+ * @param p the path to evaluate.
+ */
export function extname(p: string): string;
+ /**
+ * The platform-specific file separator. '\\' or '/'.
+ */
export var sep: string;
+ /**
+ * The platform-specific file delimiter. ';' or ':'.
+ */
+ export var delimiter: string;
+ /**
+ * Returns an object from a path string - the opposite of format().
+ *
+ * @param pathString path to evaluate.
+ */
+ export function parse(pathString: string): ParsedPath;
+ /**
+ * Returns a path string from an object - the opposite of parse().
+ *
+ * @param pathString path to evaluate.
+ */
+ export function format(pathObject: 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" {
@@ -982,14 +1708,16 @@ declare module "string_decoder" {
}
declare module "tls" {
- import crypto = require("crypto");
- import net = require("net");
- import stream = require("stream");
+ import * as crypto from "crypto";
+ import * as net from "net";
+ import * as stream from "stream";
var CLIENT_RENEG_LIMIT: number;
var CLIENT_RENEG_WINDOW: number;
export interface TlsOptions {
+ host?: string;
+ port?: number;
pfx?: any; //string or buffer
key?: any; //string or buffer
passphrase?: string;
@@ -1019,12 +1747,6 @@ declare module "tls" {
}
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: {
@@ -1058,11 +1780,27 @@ declare module "tls" {
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" {
@@ -1080,13 +1818,13 @@ declare module "crypto" {
export function createHash(algorithm: string): Hash;
export function createHmac(algorithm: string, key: string): Hmac;
export function createHmac(algorithm: string, key: Buffer): Hmac;
- interface Hash {
+ export interface Hash {
update(data: any, input_encoding?: string): Hash;
digest(encoding: 'buffer'): Buffer;
digest(encoding: string): any;
digest(): Buffer;
}
- interface Hmac {
+ export interface Hmac extends NodeJS.ReadWriteStream {
update(data: any, input_encoding?: string): Hmac;
digest(encoding: 'buffer'): Buffer;
digest(encoding: string): any;
@@ -1094,31 +1832,41 @@ declare module "crypto" {
}
export function createCipher(algorithm: string, password: any): Cipher;
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
- interface Cipher {
- update(data: any, input_encoding?: string, output_encoding?: string): string;
- final(output_encoding?: string): string;
+ export interface Cipher extends NodeJS.ReadWriteStream {
+ update(data: Buffer): Buffer;
+ update(data: string, input_encoding: "utf8"|"ascii"|"binary"): Buffer;
+ update(data: Buffer, input_encoding: any, output_encoding: "binary"|"base64"|"hex"): string;
+ update(data: string, input_encoding: "utf8"|"ascii"|"binary", output_encoding: "binary"|"base64"|"hex"): string;
+ final(): Buffer;
+ final(output_encoding: string): string;
setAutoPadding(auto_padding: boolean): void;
+ getAuthTag(): Buffer;
}
export function createDecipher(algorithm: string, password: any): Decipher;
export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher;
- interface Decipher {
- update(data: any, input_encoding?: string, output_encoding?: string): void;
- final(output_encoding?: string): string;
+ export interface Decipher extends NodeJS.ReadWriteStream {
+ update(data: Buffer): Buffer;
+ update(data: string, input_encoding: "binary"|"base64"|"hex"): Buffer;
+ update(data: Buffer, input_encoding: any, output_encoding: "utf8"|"ascii"|"binary"): string;
+ update(data: string, input_encoding: "binary"|"base64"|"hex", output_encoding: "utf8"|"ascii"|"binary"): string;
+ final(): Buffer;
+ final(output_encoding: string): string;
setAutoPadding(auto_padding: boolean): void;
+ setAuthTag(tag: Buffer): void;
}
export function createSign(algorithm: string): Signer;
- interface Signer {
+ export interface Signer extends NodeJS.WritableStream {
update(data: any): void;
sign(private_key: string, output_format: string): string;
}
export function createVerify(algorith: string): Verify;
- interface Verify {
+ export interface Verify extends NodeJS.WritableStream {
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 {
+ export interface DiffieHellman {
generateKeys(encoding?: string): string;
computeSecret(other_public_key: string, input_encoding?: string, output_encoding?: string): string;
getPrime(encoding?: string): string;
@@ -1129,18 +1877,31 @@ declare module "crypto" {
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 pbkdf2(password: string|Buffer, salt: string|Buffer, iterations: number, keylen: number, callback: (err: Error, derivedKey: Buffer) => any): void;
+ export function pbkdf2(password: string|Buffer, salt: string|Buffer, iterations: number, keylen: number, digest: string, callback: (err: Error, derivedKey: Buffer) => any): void;
+ export function pbkdf2Sync(password: string|Buffer, salt: string|Buffer, iterations: number, keylen: number) : Buffer;
+ export function pbkdf2Sync(password: string|Buffer, salt: string|Buffer, iterations: number, keylen: number, digest: string) : 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;
+ export interface RsaPublicKey {
+ key: string;
+ padding?: any;
+ }
+ export interface RsaPrivateKey {
+ key: string;
+ passphrase?: string,
+ padding?: any;
+ }
+ export function publicEncrypt(public_key: string|RsaPublicKey, buffer: Buffer): Buffer
+ export function privateDecrypt(private_key: string|RsaPrivateKey, buffer: Buffer): Buffer
}
declare module "stream" {
- import events = require("events");
+ import * as events from "events";
- export interface Stream extends events.EventEmitter {
+ export class Stream extends events.EventEmitter {
pipe(destination: T, options?: { end?: boolean; }): T;
}
@@ -1158,10 +1919,10 @@ declare module "stream" {
setEncoding(encoding: string): void;
pause(): void;
resume(): void;
+ destroy(): void;
pipe(destination: T, options?: { end?: boolean; }): T;
unpipe(destination?: T): void;
- unshift(chunk: string): void;
- unshift(chunk: Buffer): void;
+ unshift(chunk: any): void;
wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream;
push(chunk: any, encoding?: string): boolean;
}
@@ -1169,20 +1930,18 @@ declare module "stream" {
export interface WritableOptions {
highWaterMark?: number;
decodeStrings?: boolean;
+ objectMode?: 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;
+ _write(chunk: any, encoding: string, callback: Function): void;
+ write(chunk: any, cb?: Function): boolean;
+ write(chunk: any, 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;
+ end(chunk: any, cb?: Function): void;
+ end(chunk: any, encoding?: string, cb?: Function): void;
}
export interface DuplexOptions extends ReadableOptions, WritableOptions {
@@ -1193,15 +1952,12 @@ declare module "stream" {
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;
+ _write(chunk: any, encoding: string, callback: Function): void;
+ write(chunk: any, cb?: Function): boolean;
+ write(chunk: any, 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;
+ end(chunk: any, cb?: Function): void;
+ end(chunk: any, encoding?: string, cb?: Function): void;
}
export interface TransformOptions extends ReadableOptions, WritableOptions {}
@@ -1211,8 +1967,7 @@ declare module "stream" {
readable: boolean;
writable: boolean;
constructor(opts?: TransformOptions);
- _transform(chunk: Buffer, encoding: string, callback: Function): void;
- _transform(chunk: string, encoding: string, callback: Function): void;
+ _transform(chunk: any, encoding: string, callback: Function): void;
_flush(callback: Function): void;
read(size?: number): any;
setEncoding(encoding: string): void;
@@ -1220,17 +1975,14 @@ declare module "stream" {
resume(): void;
pipe(destination: T, options?: { end?: boolean; }): T;
unpipe(destination?: T): void;
- unshift(chunk: string): void;
- unshift(chunk: Buffer): void;
+ unshift(chunk: any): 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;
+ write(chunk: any, cb?: Function): boolean;
+ write(chunk: any, 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;
+ end(chunk: any, cb?: Function): void;
+ end(chunk: any, encoding?: string, cb?: Function): void;
}
export class PassThrough extends Transform {}
@@ -1245,38 +1997,24 @@ declare module "util" {
}
export function format(format: any, ...param: any[]): string;
- export function deprecate(fn: Function, msg: string): Function;
- export function debuglog(set: string): Function;
+ 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 isBoolean(arg: any): boolean;
- export function isNull(arg: any): boolean;
- export function isNullOrUndefined(arg: any): boolean;
- export function isNumber(arg: any): boolean;
- export function isString(arg: any): boolean;
- export function isSymbol(arg: any): boolean;
- export function isUndefined(arg: any): boolean;
- export function isRegExp(arg: any): boolean;
- export function isObject(arg: any): boolean;
- export function isDate(arg: any): boolean;
- export function isError(arg: any): boolean;
- export function isFunction(arg: any): boolean;
- export function isPrimitive(arg: any): boolean;
- export function isBuffer(arg: any): boolean;
- export function log(...arg: any[]): void
+ 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;
- export function p(...arg: any[]): void;
- export function exec(...arg: any[]): void;
- export function print(...arg: any[]): void;
- export function puts(...arg: any[]): void;
- export function debug(string: string): void;
- export function error(...arg: any[]): void;
+ export function debuglog(key:string): (msg:string,...param: any[])=>void;
}
declare module "assert" {
function internal (value: any, message?: string): void;
- module internal {
+ namespace internal {
export class AssertionError implements Error {
name: string;
message: string;
@@ -1297,6 +2035,8 @@ declare module "assert" {
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 function deepStrictEqual(actual: any, expected: any, message?: string): void;
+ export function notDeepStrictEqual(actual: any, expected: any, message?: string): void;
export var throws: {
(block: Function, message?: string): void;
(block: Function, error: Function, message?: string): void;
@@ -1318,36 +2058,256 @@ declare module "assert" {
}
declare module "tty" {
- import net = require("net");
+ import * as net from "net";
export function isatty(fd: number): boolean;
export interface ReadStream extends net.Socket {
isRaw: boolean;
setRawMode(mode: boolean): void;
+ isTTY: boolean;
}
export interface WriteStream extends net.Socket {
columns: number;
rows: number;
+ isTTY: boolean;
}
}
declare module "domain" {
- import events = require("events");
+ import * as events from "events";
- export class Domain extends events.EventEmitter {
+ export class Domain extends events.EventEmitter implements NodeJS.Domain {
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;
}
+
+declare module "constants" {
+ export var E2BIG: number;
+ export var EACCES: number;
+ export var EADDRINUSE: number;
+ export var EADDRNOTAVAIL: number;
+ export var EAFNOSUPPORT: number;
+ export var EAGAIN: number;
+ export var EALREADY: number;
+ export var EBADF: number;
+ export var EBADMSG: number;
+ export var EBUSY: number;
+ export var ECANCELED: number;
+ export var ECHILD: number;
+ export var ECONNABORTED: number;
+ export var ECONNREFUSED: number;
+ export var ECONNRESET: number;
+ export var EDEADLK: number;
+ export var EDESTADDRREQ: number;
+ export var EDOM: number;
+ export var EEXIST: number;
+ export var EFAULT: number;
+ export var EFBIG: number;
+ export var EHOSTUNREACH: number;
+ export var EIDRM: number;
+ export var EILSEQ: number;
+ export var EINPROGRESS: number;
+ export var EINTR: number;
+ export var EINVAL: number;
+ export var EIO: number;
+ export var EISCONN: number;
+ export var EISDIR: number;
+ export var ELOOP: number;
+ export var EMFILE: number;
+ export var EMLINK: number;
+ export var EMSGSIZE: number;
+ export var ENAMETOOLONG: number;
+ export var ENETDOWN: number;
+ export var ENETRESET: number;
+ export var ENETUNREACH: number;
+ export var ENFILE: number;
+ export var ENOBUFS: number;
+ export var ENODATA: number;
+ export var ENODEV: number;
+ export var ENOENT: number;
+ export var ENOEXEC: number;
+ export var ENOLCK: number;
+ export var ENOLINK: number;
+ export var ENOMEM: number;
+ export var ENOMSG: number;
+ export var ENOPROTOOPT: number;
+ export var ENOSPC: number;
+ export var ENOSR: number;
+ export var ENOSTR: number;
+ export var ENOSYS: number;
+ export var ENOTCONN: number;
+ export var ENOTDIR: number;
+ export var ENOTEMPTY: number;
+ export var ENOTSOCK: number;
+ export var ENOTSUP: number;
+ export var ENOTTY: number;
+ export var ENXIO: number;
+ export var EOPNOTSUPP: number;
+ export var EOVERFLOW: number;
+ export var EPERM: number;
+ export var EPIPE: number;
+ export var EPROTO: number;
+ export var EPROTONOSUPPORT: number;
+ export var EPROTOTYPE: number;
+ export var ERANGE: number;
+ export var EROFS: number;
+ export var ESPIPE: number;
+ export var ESRCH: number;
+ export var ETIME: number;
+ export var ETIMEDOUT: number;
+ export var ETXTBSY: number;
+ export var EWOULDBLOCK: number;
+ export var EXDEV: number;
+ export var WSAEINTR: number;
+ export var WSAEBADF: number;
+ export var WSAEACCES: number;
+ export var WSAEFAULT: number;
+ export var WSAEINVAL: number;
+ export var WSAEMFILE: number;
+ export var WSAEWOULDBLOCK: number;
+ export var WSAEINPROGRESS: number;
+ export var WSAEALREADY: number;
+ export var WSAENOTSOCK: number;
+ export var WSAEDESTADDRREQ: number;
+ export var WSAEMSGSIZE: number;
+ export var WSAEPROTOTYPE: number;
+ export var WSAENOPROTOOPT: number;
+ export var WSAEPROTONOSUPPORT: number;
+ export var WSAESOCKTNOSUPPORT: number;
+ export var WSAEOPNOTSUPP: number;
+ export var WSAEPFNOSUPPORT: number;
+ export var WSAEAFNOSUPPORT: number;
+ export var WSAEADDRINUSE: number;
+ export var WSAEADDRNOTAVAIL: number;
+ export var WSAENETDOWN: number;
+ export var WSAENETUNREACH: number;
+ export var WSAENETRESET: number;
+ export var WSAECONNABORTED: number;
+ export var WSAECONNRESET: number;
+ export var WSAENOBUFS: number;
+ export var WSAEISCONN: number;
+ export var WSAENOTCONN: number;
+ export var WSAESHUTDOWN: number;
+ export var WSAETOOMANYREFS: number;
+ export var WSAETIMEDOUT: number;
+ export var WSAECONNREFUSED: number;
+ export var WSAELOOP: number;
+ export var WSAENAMETOOLONG: number;
+ export var WSAEHOSTDOWN: number;
+ export var WSAEHOSTUNREACH: number;
+ export var WSAENOTEMPTY: number;
+ export var WSAEPROCLIM: number;
+ export var WSAEUSERS: number;
+ export var WSAEDQUOT: number;
+ export var WSAESTALE: number;
+ export var WSAEREMOTE: number;
+ export var WSASYSNOTREADY: number;
+ export var WSAVERNOTSUPPORTED: number;
+ export var WSANOTINITIALISED: number;
+ export var WSAEDISCON: number;
+ export var WSAENOMORE: number;
+ export var WSAECANCELLED: number;
+ export var WSAEINVALIDPROCTABLE: number;
+ export var WSAEINVALIDPROVIDER: number;
+ export var WSAEPROVIDERFAILEDINIT: number;
+ export var WSASYSCALLFAILURE: number;
+ export var WSASERVICE_NOT_FOUND: number;
+ export var WSATYPE_NOT_FOUND: number;
+ export var WSA_E_NO_MORE: number;
+ export var WSA_E_CANCELLED: number;
+ export var WSAEREFUSED: number;
+ export var SIGHUP: number;
+ export var SIGINT: number;
+ export var SIGILL: number;
+ export var SIGABRT: number;
+ export var SIGFPE: number;
+ export var SIGKILL: number;
+ export var SIGSEGV: number;
+ export var SIGTERM: number;
+ export var SIGBREAK: number;
+ export var SIGWINCH: number;
+ export var SSL_OP_ALL: number;
+ export var SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
+ export var SSL_OP_CIPHER_SERVER_PREFERENCE: number;
+ export var SSL_OP_CISCO_ANYCONNECT: number;
+ export var SSL_OP_COOKIE_EXCHANGE: number;
+ export var SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
+ export var SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
+ export var SSL_OP_EPHEMERAL_RSA: number;
+ export var SSL_OP_LEGACY_SERVER_CONNECT: number;
+ export var SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
+ export var SSL_OP_MICROSOFT_SESS_ID_BUG: number;
+ export var SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
+ export var SSL_OP_NETSCAPE_CA_DN_BUG: number;
+ export var SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
+ export var SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
+ export var SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
+ export var SSL_OP_NO_COMPRESSION: number;
+ export var SSL_OP_NO_QUERY_MTU: number;
+ export var SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
+ export var SSL_OP_NO_SSLv2: number;
+ export var SSL_OP_NO_SSLv3: number;
+ export var SSL_OP_NO_TICKET: number;
+ export var SSL_OP_NO_TLSv1: number;
+ export var SSL_OP_NO_TLSv1_1: number;
+ export var SSL_OP_NO_TLSv1_2: number;
+ export var SSL_OP_PKCS1_CHECK_1: number;
+ export var SSL_OP_PKCS1_CHECK_2: number;
+ export var SSL_OP_SINGLE_DH_USE: number;
+ export var SSL_OP_SINGLE_ECDH_USE: number;
+ export var SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
+ export var SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
+ export var SSL_OP_TLS_BLOCK_PADDING_BUG: number;
+ export var SSL_OP_TLS_D5_BUG: number;
+ export var SSL_OP_TLS_ROLLBACK_BUG: number;
+ export var ENGINE_METHOD_DSA: number;
+ export var ENGINE_METHOD_DH: number;
+ export var ENGINE_METHOD_RAND: number;
+ export var ENGINE_METHOD_ECDH: number;
+ export var ENGINE_METHOD_ECDSA: number;
+ export var ENGINE_METHOD_CIPHERS: number;
+ export var ENGINE_METHOD_DIGESTS: number;
+ export var ENGINE_METHOD_STORE: number;
+ export var ENGINE_METHOD_PKEY_METHS: number;
+ export var ENGINE_METHOD_PKEY_ASN1_METHS: number;
+ export var ENGINE_METHOD_ALL: number;
+ export var ENGINE_METHOD_NONE: number;
+ export var DH_CHECK_P_NOT_SAFE_PRIME: number;
+ export var DH_CHECK_P_NOT_PRIME: number;
+ export var DH_UNABLE_TO_CHECK_GENERATOR: number;
+ export var DH_NOT_SUITABLE_GENERATOR: number;
+ export var NPN_ENABLED: number;
+ export var RSA_PKCS1_PADDING: number;
+ export var RSA_SSLV23_PADDING: number;
+ export var RSA_NO_PADDING: number;
+ export var RSA_PKCS1_OAEP_PADDING: number;
+ export var RSA_X931_PADDING: number;
+ export var RSA_PKCS1_PSS_PADDING: number;
+ export var POINT_CONVERSION_COMPRESSED: number;
+ export var POINT_CONVERSION_UNCOMPRESSED: number;
+ export var POINT_CONVERSION_HYBRID: number;
+ export var O_RDONLY: number;
+ export var O_WRONLY: number;
+ export var O_RDWR: number;
+ export var S_IFMT: number;
+ export var S_IFREG: number;
+ export var S_IFDIR: number;
+ export var S_IFCHR: number;
+ export var S_IFLNK: number;
+ export var O_CREAT: number;
+ export var O_EXCL: number;
+ export var O_TRUNC: number;
+ export var O_APPEND: number;
+ export var F_OK: number;
+ export var R_OK: number;
+ export var W_OK: number;
+ export var X_OK: number;
+ export var UV_UDP_REUSEADDR: number;
+}
\ No newline at end of file
diff --git a/extensions/php/src/features/hoverProvider.ts b/extensions/php/src/features/hoverProvider.ts
index 9f19de9b7e1..abfe6f65c4b 100644
--- a/extensions/php/src/features/hoverProvider.ts
+++ b/extensions/php/src/features/hoverProvider.ts
@@ -7,6 +7,7 @@
import {HoverProvider, Hover, MarkedString, TextDocument, CancellationToken, Position} from 'vscode';
import phpGlobals = require('./phpGlobals');
+import { textToMarkedString } from './utils/markedTextUtil';
export default class PHPHoverProvider implements HoverProvider {
@@ -21,7 +22,7 @@ export default class PHPHoverProvider implements HoverProvider {
var entry = phpGlobals.globalfunctions[name] || phpGlobals.compiletimeconstants[name] || phpGlobals.globalvariables[name] || phpGlobals.keywords[name];
if (entry && entry.description) {
let signature = name + (entry.signature || '');
- let contents: MarkedString[] = [entry.description, { language: 'php', value: signature }];
+ let contents: MarkedString[] = [ textToMarkedString(entry.description), { language: 'php', value: signature }];
return new Hover(contents, wordRange);
}
}
diff --git a/extensions/php/src/features/utils/markedTextUtil.ts b/extensions/php/src/features/utils/markedTextUtil.ts
new file mode 100644
index 00000000000..97f3198b80c
--- /dev/null
+++ b/extensions/php/src/features/utils/markedTextUtil.ts
@@ -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.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import {MarkedString} from 'vscode';
+
+export function textToMarkedString(text: string) : MarkedString {
+ return text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
+}
\ No newline at end of file
diff --git a/extensions/ruby/package.json b/extensions/ruby/package.json
index 6745d14cdf8..2782d12525e 100644
--- a/extensions/ruby/package.json
+++ b/extensions/ruby/package.json
@@ -9,6 +9,7 @@
"extensions": [ ".rb", ".rbx", ".rjs", ".gemspec", ".rake", ".ru" ],
"filenames": [ "rakefile", "gemfile", "guardfile" ],
"aliases": [ "Ruby", "rb" ],
+ "firstLine": "^#!/.*\\bruby\\b",
"configuration": "./language-configuration.json"
}],
"grammars": [{
diff --git a/extensions/scss/syntaxes/scss.json b/extensions/scss/syntaxes/scss.json
index 3b7aafc7ad2..6821cee6913 100644
--- a/extensions/scss/syntaxes/scss.json
+++ b/extensions/scss/syntaxes/scss.json
@@ -155,7 +155,7 @@
"name": "meta.at-rule.else.scss",
"patterns": [
{
- "include": "#logical_operators"
+ "include": "#conditional_operators"
},
{
"include": "#variable"
@@ -295,7 +295,7 @@
"name": "meta.at-rule.if.scss",
"patterns": [
{
- "include": "#logical_operators"
+ "include": "#conditional_operators"
},
{
"include": "#variable"
@@ -388,53 +388,105 @@
]
},
"at_rule_keyframes": {
+ "begin": "(?<=^|\\s)(@)(?:-(?:webkit|moz)-)?keyframes\\b",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.control.at-rule.keyframes.scss"
+ },
+ "1": {
+ "name": "punctuation.definition.keyword.scss"
+ }
+ },
+ "end": "(?<=})",
+ "name": "meta.at-rule.keyframes.scss",
"patterns": [
{
- "begin": "^\\s*((@)(-[\\w-]*-)?keyframes\\b)\\s*([\\w-]*)",
+ "match": "(?<=@keyframes)\\s+((?:[_A-Za-z][-\\w]|-[_A-Za-z])[-\\w]*)",
"captures": {
"1": {
- "name": "keyword.control.at-rule.keyframes.scss"
- },
- "2": {
- "name": "punctuation.definition.keyword.scss"
- },
- "3": {
- "name": "punctuation.definition.keyword.scss"
- },
- "4": {
"name": "entity.name.function.scss"
}
+ }
+ },
+ {
+ "begin": "(?<=@keyframes)\\s+(\")",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.begin.scss"
+ }
},
- "comment": "Keyframes with Attributes",
- "end": "(?<=})(?:\\s*$)?",
- "name": "meta.at-rule.keyframes.scss",
+ "end": "\"",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.end.scss"
+ }
+ },
+ "name": "string.quoted.double.scss",
+ "contentName": "entity.name.function.scss",
"patterns": [
{
- "begin": "{",
- "end": "}",
- "beginCaptures": {
- "0": {
- "name": "punctuation.section.keyframes.begin.scss"
- }
- },
- "endCaptures": {
- "0": {
- "name": "punctuation.section.keyframes.end.scss"
- }
- },
- "name": "meta.keyframes.scss",
- "patterns": [
- {
- "match": "(\\b(\\d+%|from\\b|to\\b))",
- "name": "entity.other.attribute-name.scss"
- },
- {
- "include": "#interpolation"
- },
- {
- "include": "#property_list"
- }
- ]
+ "match": "\\\\(\\h{1,6}|.)",
+ "name": "constant.character.escape.scss"
+ },
+ {
+ "include": "#interpolation"
+ }
+ ]
+ },
+ {
+ "begin": "(?<=@keyframes)\\s+(')",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.begin.scss"
+ }
+ },
+ "end": "'",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.end.scss"
+ }
+ },
+ "name": "string.quoted.single.scss",
+ "contentName": "entity.name.function.scss",
+ "patterns": [
+ {
+ "match": "\\\\(\\h{1,6}|.)",
+ "name": "constant.character.escape.scss"
+ },
+ {
+ "include": "#interpolation"
+ }
+ ]
+ },
+ {
+ "begin": "{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.keyframes.begin.scss"
+ }
+ },
+ "end": "}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.keyframes.end.scss"
+ }
+ },
+ "patterns": [
+ {
+ "match": "\\b(?:(?:100|[1-9]\\d|\\d)%|from|to)(?=\\s*{)",
+ "name": "entity.other.attribute-name.scss"
+ },
+ {
+ "include": "#flow_control"
+ },
+ {
+ "include": "#interpolation"
+ },
+ {
+ "include": "#property_list"
+ },
+ {
+ "include": "#rules"
}
]
}
@@ -469,7 +521,7 @@
"include": "#variable"
},
{
- "include": "#logical_operators"
+ "include": "#conditional_operators"
},
{
"include": "#media_types"
@@ -665,29 +717,23 @@
]
},
"at_rule_supports": {
- "begin": "((@)supports)\\b",
+ "begin": "(?<=^|\\s)(@)supports\\b",
"captures": {
- "1": {
+ "0": {
"name": "keyword.control.at-rule.supports.scss"
},
- "2": {
+ "1": {
"name": "punctuation.definition.keyword.scss"
}
},
- "end": "(?={|$)",
+ "end": "(?={)|$",
"name": "meta.at-rule.supports.scss",
"patterns": [
{
"include": "#logical_operators"
},
{
- "include": "#constant_property_value"
- },
- {
- "include": "#property_names"
- },
- {
- "include": "#property_values"
+ "include": "#properties"
},
{
"match": "\\(",
@@ -696,10 +742,6 @@
{
"match": "\\)",
"name": "punctuation.definition.condition.end.bracket.round.scss"
- },
- {
- "match": ":",
- "name": "punctuation.separator.key-value.scss"
}
]
},
@@ -741,7 +783,7 @@
"name": "meta.at-rule.while.scss",
"patterns": [
{
- "include": "#logical_operators"
+ "include": "#conditional_operators"
},
{
"include": "#variable"
@@ -1034,9 +1076,23 @@
}
]
},
+ "conditional_operators": {
+ "patterns": [
+ {
+ "include": "#comparison_operators"
+ },
+ {
+ "include": "#logical_operators"
+ }
+ ]
+ },
+ "comparison_operators": {
+ "match": "==|!=|<=|>=|<|>",
+ "name": "keyword.operator.comparison.scss"
+ },
"logical_operators": {
- "match": "\\b(==|!=|<=|>=|<|>|not|or|and)\\b",
- "name": "keyword.control.operator"
+ "match": "\\b(not\\b|or\\b|and\\b)",
+ "name": "keyword.operator.logical.scss"
},
"map": {
"begin": "\\(",
@@ -1190,7 +1246,7 @@
}
},
"comment": "Kuroir: fixed nested elements for sass.",
- "end": "\\s*(;|(?=}))",
+ "end": "\\s*(;|(?=}|\\)))",
"endCaptures": {
"1": {
"name": "punctuation.terminator.rule.scss"
@@ -1386,7 +1442,7 @@
]
},
"selector_entities": {
- "match": "\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|bdi|bdo|big|blockquote|body|br|button|canvas|caption|circle|cite|code|col|colgroup|data|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|g|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|image|input|ins|kbd|keygen|label|legend|li|line(?!-)|link|main|map|mark|menu|menuitem|meta|meter|nav|noframes|noscript|object(?!-)|ol|optgroup|option|output|p|param|path|picture|polygon|polyline|pre|progress|q|rb|rect|rp|rt|rtc|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|svg|table(?!-)|tbody|td|template|text(?!-)|textarea|textpath|tfoot|th|thead|time|title|tr|track|tspan|tt|u|ul|var|video|wbr)\\b",
+ "match": "\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|bdi|bdo|big|blockquote|body|br|button|canvas|caption|circle|cite|code|col|colgroup|data|datalist|dd|del|details|dfn|dialog|div|dl|dt|ellipse|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|g|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|image|input|ins|kbd|keygen|label|legend|li|line(?!-)|link|main|map|mark|menu|menuitem|meta|meter|nav|noframes|noscript|object(?!-)|ol|optgroup|option|output|p|param|path|picture|polygon|polyline|pre|progress|q|rb|rect|rp|rt|rtc|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|svg|table(?!-)|tbody|td|template|text(?!-)|textarea|textpath|tfoot|th|thead|time|title|tr|track|tspan|tt|u|ul|var|video|wbr)\\b",
"name": "entity.name.tag.scss"
},
"selector_custom": {
@@ -1612,5 +1668,5 @@
"name": "variable.scss"
}
},
- "version": "https://github.com/atom/language-sass/commit/38b8d07b0e5edc8ac1e3ac1e370a208e838fc198"
+ "version": "https://github.com/atom/language-sass/commit/b0417d1412a9169562f637133099fe2bb841a735"
}
\ 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 ec12e65c9fc..e83ae1ea6b2 100644
--- a/extensions/scss/test/colorize-results/test-cssvariables_scss.json
+++ b/extensions/scss/test/colorize-results/test-cssvariables_scss.json
@@ -264,19 +264,8 @@
}
},
{
- "c": ")",
- "t": "meta.property-list.property-value.scss",
- "r": {
- "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
- "light_plus": ".vs .token rgb(0, 0, 0)",
- "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
- "light_vs": ".vs .token rgb(0, 0, 0)",
- "hc_black": ".hc-black .token rgb(255, 255, 255)"
- }
- },
- {
- "c": ";",
- "t": "meta.property-list.punctuation.rule.scss.terminator",
+ "c": ");",
+ "t": "meta.property-list.scss",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
diff --git a/extensions/scss/test/colorize-results/test_scss.json b/extensions/scss/test/colorize-results/test_scss.json
index feea42709a0..0ec4476459a 100644
--- a/extensions/scss/test/colorize-results/test_scss.json
+++ b/extensions/scss/test/colorize-results/test_scss.json
@@ -4181,7 +4181,7 @@
},
{
"c": ") ",
- "t": "meta.property-list.property-value.scss",
+ "t": "meta.property-list.scss",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -4192,40 +4192,18 @@
},
{
"c": "*",
- "t": "css.keyword.meta.operator.property-list.property-value.scss",
+ "t": "entity.meta.name.property-list.scss.tag.wildcard",
"r": {
- "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.operator rgb(212, 212, 212)",
- "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.operator rgb(0, 0, 0)",
- "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.keyword.operator rgb(212, 212, 212)",
- "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.keyword.operator rgb(0, 0, 0)",
- "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.keyword.operator rgb(212, 212, 212)"
+ "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.entity.name.tag rgb(86, 156, 214)",
+ "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.entity.name.tag rgb(128, 0, 0)",
+ "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.entity.name.tag rgb(86, 156, 214)",
+ "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.entity.name.tag rgb(128, 0, 0)",
+ "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.entity.name.tag rgb(86, 156, 214)"
}
},
{
- "c": " ",
- "t": "meta.property-list.property-value.scss",
- "r": {
- "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
- "light_plus": ".vs .token rgb(0, 0, 0)",
- "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
- "light_vs": ".vs .token rgb(0, 0, 0)",
- "hc_black": ".hc-black .token rgb(255, 255, 255)"
- }
- },
- {
- "c": "3",
- "t": "constant.meta.numeric.property-list.property-value.scss",
- "r": {
- "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.constant.numeric rgb(181, 206, 168)",
- "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.constant.numeric rgb(9, 136, 90)",
- "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.constant.numeric rgb(181, 206, 168)",
- "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.constant.numeric rgb(9, 136, 90)",
- "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.constant.numeric rgb(181, 206, 168)"
- }
- },
- {
- "c": ";",
- "t": "meta.property-list.punctuation.rule.scss.terminator",
+ "c": " 3;",
+ "t": "meta.property-list.scss",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -6755,10 +6733,10 @@
},
{
"c": "and",
- "t": "at-rule.control.keyword.media.meta.operator.property-list.scss",
+ "t": "at-rule.keyword.logical.media.meta.operator.property-list.scss",
"r": {
- "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.control rgb(197, 134, 192)",
- "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.control rgb(175, 0, 219)",
+ "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.operator rgb(0, 0, 0)",
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.keyword.operator rgb(212, 212, 212)",
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.keyword.operator rgb(0, 0, 0)",
"hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.keyword.operator rgb(212, 212, 212)"
@@ -9218,7 +9196,29 @@
}
},
{
- "c": " == ",
+ "c": " ",
+ "t": "at-rule.if.meta.property-list.scss",
+ "r": {
+ "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
+ "light_plus": ".vs .token rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
+ "light_vs": ".vs .token rgb(0, 0, 0)",
+ "hc_black": ".hc-black .token rgb(255, 255, 255)"
+ }
+ },
+ {
+ "c": "==",
+ "t": "at-rule.comparison.if.keyword.meta.operator.property-list.scss",
+ "r": {
+ "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.operator rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.keyword.operator rgb(0, 0, 0)",
+ "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.keyword.operator rgb(212, 212, 212)"
+ }
+ },
+ {
+ "c": " ",
"t": "at-rule.if.meta.property-list.scss",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
@@ -9438,7 +9438,29 @@
}
},
{
- "c": " < ",
+ "c": " ",
+ "t": "at-rule.if.meta.property-list.scss",
+ "r": {
+ "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
+ "light_plus": ".vs .token rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
+ "light_vs": ".vs .token rgb(0, 0, 0)",
+ "hc_black": ".hc-black .token rgb(255, 255, 255)"
+ }
+ },
+ {
+ "c": "<",
+ "t": "at-rule.comparison.if.keyword.meta.operator.property-list.scss",
+ "r": {
+ "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.operator rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.keyword.operator rgb(0, 0, 0)",
+ "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.keyword.operator rgb(212, 212, 212)"
+ }
+ },
+ {
+ "c": " ",
"t": "at-rule.if.meta.property-list.scss",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
@@ -9977,7 +9999,29 @@
}
},
{
- "c": " == ocean ",
+ "c": " ",
+ "t": "at-rule.if.meta.property-list.scss",
+ "r": {
+ "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
+ "light_plus": ".vs .token rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
+ "light_vs": ".vs .token rgb(0, 0, 0)",
+ "hc_black": ".hc-black .token rgb(255, 255, 255)"
+ }
+ },
+ {
+ "c": "==",
+ "t": "at-rule.comparison.if.keyword.meta.operator.property-list.scss",
+ "r": {
+ "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.operator rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.keyword.operator rgb(0, 0, 0)",
+ "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.keyword.operator rgb(212, 212, 212)"
+ }
+ },
+ {
+ "c": " ocean ",
"t": "at-rule.if.meta.property-list.scss",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
@@ -11209,7 +11253,29 @@
}
},
{
- "c": " > ",
+ "c": " ",
+ "t": "at-rule.each.meta.scss.while",
+ "r": {
+ "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
+ "light_plus": ".vs .token rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
+ "light_vs": ".vs .token rgb(0, 0, 0)",
+ "hc_black": ".hc-black .token rgb(255, 255, 255)"
+ }
+ },
+ {
+ "c": ">",
+ "t": "at-rule.comparison.each.keyword.meta.operator.scss.while",
+ "r": {
+ "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.operator rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.keyword.operator rgb(0, 0, 0)",
+ "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.keyword.operator rgb(212, 212, 212)"
+ }
+ },
+ {
+ "c": " ",
"t": "at-rule.each.meta.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
@@ -11990,7 +12056,29 @@
}
},
{
- "c": " == ",
+ "c": " ",
+ "t": "at-rule.each.if.meta.property-list.scss.while",
+ "r": {
+ "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
+ "light_plus": ".vs .token rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
+ "light_vs": ".vs .token rgb(0, 0, 0)",
+ "hc_black": ".hc-black .token rgb(255, 255, 255)"
+ }
+ },
+ {
+ "c": "==",
+ "t": "at-rule.comparison.each.if.keyword.meta.operator.property-list.scss.while",
+ "r": {
+ "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.operator rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.keyword.operator rgb(0, 0, 0)",
+ "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.keyword.operator rgb(212, 212, 212)"
+ }
+ },
+ {
+ "c": " ",
"t": "at-rule.each.if.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
@@ -12046,10 +12134,10 @@
},
{
"c": "and",
- "t": "at-rule.control.each.if.keyword.meta.operator.property-list.scss.while",
+ "t": "at-rule.each.if.keyword.logical.meta.operator.property-list.scss.while",
"r": {
- "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.control rgb(197, 134, 192)",
- "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.control rgb(175, 0, 219)",
+ "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.operator rgb(0, 0, 0)",
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.keyword.operator rgb(212, 212, 212)",
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.keyword.operator rgb(0, 0, 0)",
"hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.keyword.operator rgb(212, 212, 212)"
@@ -12078,7 +12166,29 @@
}
},
{
- "c": " == (",
+ "c": " ",
+ "t": "at-rule.each.if.meta.property-list.scss.while",
+ "r": {
+ "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
+ "light_plus": ".vs .token rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
+ "light_vs": ".vs .token rgb(0, 0, 0)",
+ "hc_black": ".hc-black .token rgb(255, 255, 255)"
+ }
+ },
+ {
+ "c": "==",
+ "t": "at-rule.comparison.each.if.keyword.meta.operator.property-list.scss.while",
+ "r": {
+ "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.operator rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.keyword.operator rgb(212, 212, 212)",
+ "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.keyword.operator rgb(0, 0, 0)",
+ "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.keyword.operator rgb(212, 212, 212)"
+ }
+ },
+ {
+ "c": " (",
"t": "at-rule.each.if.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
@@ -18623,7 +18733,7 @@
}
},
{
- "c": "@-webkit-",
+ "c": "@",
"t": "at-rule.control.definition.each.keyframes.keyword.meta.property-list.punctuation.scss.while",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.control rgb(197, 134, 192)",
@@ -18634,7 +18744,7 @@
}
},
{
- "c": "keyframes",
+ "c": "-webkit-keyframes",
"t": "at-rule.control.each.keyframes.keyword.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.control rgb(197, 134, 192)",
@@ -18645,29 +18755,7 @@
}
},
{
- "c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
- "r": {
- "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
- "light_plus": ".vs .token rgb(0, 0, 0)",
- "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
- "light_vs": ".vs .token rgb(0, 0, 0)",
- "hc_black": ".hc-black .token rgb(255, 255, 255)"
- }
- },
- {
- "c": "NAME-YOUR-ANIMATION",
- "t": "at-rule.each.entity.function.keyframes.meta.name.property-list.scss.while",
- "r": {
- "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.entity.name.function rgb(220, 220, 170)",
- "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.entity.name.function rgb(121, 94, 38)",
- "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.entity.name.function rgb(212, 212, 212)",
- "light_vs": ".vs .token rgb(0, 0, 0)",
- "hc_black": ".hc-black .token rgb(255, 255, 255)"
- }
- },
- {
- "c": " ",
+ "c": " NAME-YOUR-ANIMATION ",
"t": "at-rule.each.keyframes.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
@@ -18964,7 +19052,7 @@
}
},
{
- "c": "@-moz-",
+ "c": "@",
"t": "at-rule.control.definition.each.keyframes.keyword.meta.property-list.punctuation.scss.while",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.control rgb(197, 134, 192)",
@@ -18975,7 +19063,7 @@
}
},
{
- "c": "keyframes",
+ "c": "-moz-keyframes",
"t": "at-rule.control.each.keyframes.keyword.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.control rgb(197, 134, 192)",
@@ -18986,29 +19074,7 @@
}
},
{
- "c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
- "r": {
- "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
- "light_plus": ".vs .token rgb(0, 0, 0)",
- "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
- "light_vs": ".vs .token rgb(0, 0, 0)",
- "hc_black": ".hc-black .token rgb(255, 255, 255)"
- }
- },
- {
- "c": "NAME-YOUR-ANIMATION",
- "t": "at-rule.each.entity.function.keyframes.meta.name.property-list.scss.while",
- "r": {
- "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.entity.name.function rgb(220, 220, 170)",
- "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.entity.name.function rgb(121, 94, 38)",
- "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.entity.name.function rgb(212, 212, 212)",
- "light_vs": ".vs .token rgb(0, 0, 0)",
- "hc_black": ".hc-black .token rgb(255, 255, 255)"
- }
- },
- {
- "c": " ",
+ "c": " NAME-YOUR-ANIMATION ",
"t": "at-rule.each.keyframes.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
@@ -19305,30 +19371,30 @@
}
},
{
- "c": "@-o-",
- "t": "at-rule.control.definition.each.keyframes.keyword.meta.property-list.punctuation.scss.while",
+ "c": "@",
+ "t": "at-rule.each.meta.property-list.scss.while",
"r": {
- "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.control rgb(197, 134, 192)",
- "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.control rgb(175, 0, 219)",
- "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.keyword.control rgb(86, 156, 214)",
- "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.keyword.control rgb(0, 0, 255)",
- "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.keyword.control rgb(86, 156, 214)"
+ "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
+ "light_plus": ".vs .token rgb(0, 0, 0)",
+ "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
+ "light_vs": ".vs .token rgb(0, 0, 0)",
+ "hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
- "c": "keyframes",
- "t": "at-rule.control.each.keyframes.keyword.meta.property-list.scss.while",
+ "c": "-o-keyframes",
+ "t": "at-rule.each.illegal.invalid.meta.property-list.property-name.scss.while",
"r": {
- "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.keyword.control rgb(197, 134, 192)",
- "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.keyword.control rgb(175, 0, 219)",
- "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.keyword.control rgb(86, 156, 214)",
- "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.keyword.control rgb(0, 0, 255)",
- "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.keyword.control rgb(86, 156, 214)"
+ "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.invalid rgb(244, 71, 71)",
+ "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.invalid rgb(205, 49, 49)",
+ "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.invalid rgb(244, 71, 71)",
+ "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.invalid rgb(205, 49, 49)",
+ "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.invalid rgb(244, 71, 71)"
}
},
{
"c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
+ "t": "at-rule.each.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19339,18 +19405,18 @@
},
{
"c": "NAME-YOUR-ANIMATION",
- "t": "at-rule.each.entity.function.keyframes.meta.name.property-list.scss.while",
+ "t": "at-rule.custom.each.entity.meta.name.property-list.scss.tag.while",
"r": {
- "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.entity.name.function rgb(220, 220, 170)",
- "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.entity.name.function rgb(121, 94, 38)",
- "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.entity.name.function rgb(212, 212, 212)",
- "light_vs": ".vs .token rgb(0, 0, 0)",
- "hc_black": ".hc-black .token rgb(255, 255, 255)"
+ "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.entity.name.tag rgb(86, 156, 214)",
+ "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.entity.name.tag rgb(128, 0, 0)",
+ "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.entity.name.tag rgb(86, 156, 214)",
+ "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.entity.name.tag rgb(128, 0, 0)",
+ "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.entity.name.tag rgb(86, 156, 214)"
}
},
{
"c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
+ "t": "at-rule.each.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19361,7 +19427,7 @@
},
{
"c": "{",
- "t": "at-rule.begin.each.keyframes.meta.property-list.punctuation.scss.section.while",
+ "t": "at-rule.begin.bracket.curly.each.meta.property-list.punctuation.scss.section.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19371,30 +19437,8 @@
}
},
{
- "c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
- "r": {
- "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
- "light_plus": ".vs .token rgb(0, 0, 0)",
- "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
- "light_vs": ".vs .token rgb(0, 0, 0)",
- "hc_black": ".hc-black .token rgb(255, 255, 255)"
- }
- },
- {
- "c": "0%",
- "t": "at-rule.attribute-name.each.entity.keyframes.meta.other.property-list.scss.while",
- "r": {
- "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.entity.other.attribute-name rgb(156, 220, 254)",
- "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.entity.other.attribute-name.scss rgb(128, 0, 0)",
- "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.entity.other.attribute-name rgb(156, 220, 254)",
- "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.entity.other.attribute-name.scss rgb(128, 0, 0)",
- "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.entity.other.attribute-name rgb(156, 220, 254)"
- }
- },
- {
- "c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
+ "c": " 0% ",
+ "t": "at-rule.each.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19405,7 +19449,7 @@
},
{
"c": "{",
- "t": "at-rule.begin.bracket.curly.each.keyframes.meta.property-list.punctuation.scss.section.while",
+ "t": "at-rule.begin.bracket.curly.each.meta.property-list.punctuation.scss.section.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19416,7 +19460,7 @@
},
{
"c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
+ "t": "at-rule.each.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19427,7 +19471,7 @@
},
{
"c": "opacity",
- "t": "at-rule.each.keyframes.meta.property-list.property-name.scss.support.type.while",
+ "t": "at-rule.each.meta.property-list.property-name.scss.support.type.while",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.support.type.property-name rgb(156, 220, 254)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.support.type.property-name.scss rgb(255, 0, 0)",
@@ -19438,7 +19482,7 @@
},
{
"c": ":",
- "t": "at-rule.each.key-value.keyframes.meta.property-list.punctuation.scss.separator.while",
+ "t": "at-rule.each.key-value.meta.property-list.punctuation.scss.separator.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19449,7 +19493,7 @@
},
{
"c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
+ "t": "at-rule.each.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19460,7 +19504,7 @@
},
{
"c": "0",
- "t": "at-rule.constant.each.keyframes.meta.numeric.property-list.property-value.scss.while",
+ "t": "at-rule.constant.each.meta.numeric.property-list.property-value.scss.while",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.constant.numeric rgb(181, 206, 168)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.constant.numeric rgb(9, 136, 90)",
@@ -19471,7 +19515,7 @@
},
{
"c": ";",
- "t": "at-rule.each.keyframes.meta.property-list.punctuation.rule.scss.terminator.while",
+ "t": "at-rule.each.meta.property-list.punctuation.rule.scss.terminator.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19482,7 +19526,7 @@
},
{
"c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
+ "t": "at-rule.each.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19493,7 +19537,7 @@
},
{
"c": "}",
- "t": "at-rule.bracket.curly.each.end.keyframes.meta.property-list.punctuation.scss.section.while",
+ "t": "at-rule.bracket.curly.each.end.meta.property-list.punctuation.scss.section.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19503,30 +19547,8 @@
}
},
{
- "c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
- "r": {
- "dark_plus": ".vs-dark .token rgb(212, 212, 212)",
- "light_plus": ".vs .token rgb(0, 0, 0)",
- "dark_vs": ".vs-dark .token rgb(212, 212, 212)",
- "light_vs": ".vs .token rgb(0, 0, 0)",
- "hc_black": ".hc-black .token rgb(255, 255, 255)"
- }
- },
- {
- "c": "100%",
- "t": "at-rule.attribute-name.each.entity.keyframes.meta.other.property-list.scss.while",
- "r": {
- "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.entity.other.attribute-name rgb(156, 220, 254)",
- "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.entity.other.attribute-name.scss rgb(128, 0, 0)",
- "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.entity.other.attribute-name rgb(156, 220, 254)",
- "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.entity.other.attribute-name.scss rgb(128, 0, 0)",
- "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.entity.other.attribute-name rgb(156, 220, 254)"
- }
- },
- {
- "c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
+ "c": " 100% ",
+ "t": "at-rule.each.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19537,7 +19559,7 @@
},
{
"c": "{",
- "t": "at-rule.begin.bracket.curly.each.keyframes.meta.property-list.punctuation.scss.section.while",
+ "t": "at-rule.begin.bracket.curly.each.meta.property-list.punctuation.scss.section.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19548,7 +19570,7 @@
},
{
"c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
+ "t": "at-rule.each.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19559,7 +19581,7 @@
},
{
"c": "opacity",
- "t": "at-rule.each.keyframes.meta.property-list.property-name.scss.support.type.while",
+ "t": "at-rule.each.meta.property-list.property-name.scss.support.type.while",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.support.type.property-name rgb(156, 220, 254)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.support.type.property-name.scss rgb(255, 0, 0)",
@@ -19570,7 +19592,7 @@
},
{
"c": ":",
- "t": "at-rule.each.key-value.keyframes.meta.property-list.punctuation.scss.separator.while",
+ "t": "at-rule.each.key-value.meta.property-list.punctuation.scss.separator.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19581,7 +19603,7 @@
},
{
"c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
+ "t": "at-rule.each.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19592,7 +19614,7 @@
},
{
"c": "1",
- "t": "at-rule.constant.each.keyframes.meta.numeric.property-list.property-value.scss.while",
+ "t": "at-rule.constant.each.meta.numeric.property-list.property-value.scss.while",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.constant.numeric rgb(181, 206, 168)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.constant.numeric rgb(9, 136, 90)",
@@ -19603,7 +19625,7 @@
},
{
"c": ";",
- "t": "at-rule.each.keyframes.meta.property-list.punctuation.rule.scss.terminator.while",
+ "t": "at-rule.each.meta.property-list.punctuation.rule.scss.terminator.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19614,7 +19636,7 @@
},
{
"c": " ",
- "t": "at-rule.each.keyframes.meta.property-list.scss.while",
+ "t": "at-rule.each.meta.property-list.scss.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19625,7 +19647,7 @@
},
{
"c": "}",
- "t": "at-rule.bracket.curly.each.end.keyframes.meta.property-list.punctuation.scss.section.while",
+ "t": "at-rule.bracket.curly.each.end.meta.property-list.punctuation.scss.section.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -19636,7 +19658,7 @@
},
{
"c": "}",
- "t": "at-rule.each.end.keyframes.meta.property-list.punctuation.scss.section.while",
+ "t": "at-rule.bracket.curly.each.end.meta.property-list.punctuation.scss.section.while",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
diff --git a/extensions/shellscript/package.json b/extensions/shellscript/package.json
index 46f456c1087..94b8ad1db0a 100644
--- a/extensions/shellscript/package.json
+++ b/extensions/shellscript/package.json
@@ -12,7 +12,7 @@
"aliases": ["Shell Script (Bash)", "shellscript", "bash", "sh", "zsh"],
"extensions": [".sh", ".bash", ".bashrc", ".bash_aliases", ".bash_profile", ".bash_login", ".ebuild", ".install", ".profile", ".bash_logout", ".zsh", ".zshrc", ".zprofile", ".zlogin", ".zlogout", ".zshenv"],
"filenames": ["PKGBUILD"],
- "firstLine": "^#!.*\\b(bash|zsh|sh|tcsh)|^#\\s*-\\*-[^*]*mode:\\s*shell-script[^*]*-\\*-",
+ "firstLine": "^#!.*\\b(bash|zsh|sh|tcsh).*|^#\\s*-\\*-[^*]*mode:\\s*shell-script[^*]*-\\*-",
"configuration": "./language-configuration.json",
"mimetypes": ["text/x-shellscript"]
}],
diff --git a/extensions/theme-defaults/fileicons/images/Document_16x.svg b/extensions/theme-defaults/fileicons/images/Document_16x.svg
old mode 100755
new mode 100644
index 6fe50edf379..46a9f38cc88
--- a/extensions/theme-defaults/fileicons/images/Document_16x.svg
+++ b/extensions/theme-defaults/fileicons/images/Document_16x.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/extensions/theme-defaults/fileicons/images/FolderOpen_16x.svg b/extensions/theme-defaults/fileicons/images/FolderOpen_16x.svg
old mode 100755
new mode 100644
index 09903fb5c8c..1a3933d6351
--- a/extensions/theme-defaults/fileicons/images/FolderOpen_16x.svg
+++ b/extensions/theme-defaults/fileicons/images/FolderOpen_16x.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/extensions/theme-defaults/fileicons/images/Folder_16x.svg b/extensions/theme-defaults/fileicons/images/Folder_16x.svg
old mode 100755
new mode 100644
index 431af214571..3d64ae71db4
--- a/extensions/theme-defaults/fileicons/images/Folder_16x.svg
+++ b/extensions/theme-defaults/fileicons/images/Folder_16x.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/extensions/theme-defaults/fileicons/vs_standard.json b/extensions/theme-defaults/fileicons/vs_minimal_icons.json
similarity index 100%
rename from extensions/theme-defaults/fileicons/vs_standard.json
rename to extensions/theme-defaults/fileicons/vs_minimal_icons.json
diff --git a/extensions/theme-defaults/package.json b/extensions/theme-defaults/package.json
index a89c117d6b8..f7e58ccea08 100644
--- a/extensions/theme-defaults/package.json
+++ b/extensions/theme-defaults/package.json
@@ -36,9 +36,9 @@
],
"iconThemes": [
{
- "id": "vs-standard",
- "label": "Standard",
- "path": "./fileicons/vs_standard.json"
+ "id": "vs-minimal",
+ "label": "Minimal (Visual Studio Code)",
+ "path": "./fileicons/vs_minimal_icons.json"
}
]
}
diff --git a/extensions/theme-seti/OSSREADME.json b/extensions/theme-seti/OSSREADME.json
new file mode 100644
index 00000000000..7601d594b32
--- /dev/null
+++ b/extensions/theme-seti/OSSREADME.json
@@ -0,0 +1,8 @@
+// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
+
+[{
+ "name": "seti-ui",
+ "version": "0.1.0",
+ "repositoryURL": "https://github.com/jesseweed/seti-ui",
+ "description": "The file ./icons/seti.woff has been copied from https://github.com/jesseweed/seti-ui/blob/master/styles/_fonts/seti/seti.woff"
+}]
diff --git a/extensions/theme-seti/build/update-icon-theme.js b/extensions/theme-seti/build/update-icon-theme.js
new file mode 100644
index 00000000000..c8ff7733533
--- /dev/null
+++ b/extensions/theme-seti/build/update-icon-theme.js
@@ -0,0 +1,169 @@
+/*---------------------------------------------------------------------------------------------
+ * 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 path = require('path');
+var fs = require('fs');
+var https = require('https');
+var url = require('url');
+
+function getCommitSha(repoId, repoPath) {
+ var commitInfo = 'https://api.github.com/repos/' + repoId + '/commits?path=' + repoPath;
+ return download(commitInfo).then(function (content) {
+ try {
+ let lastCommit = JSON.parse(content)[0];
+ return Promise.resolve({
+ commitSha: lastCommit.sha,
+ commitDate: lastCommit.commit.author.date
+ });
+ } catch (e) {
+ return Promise.resolve(null);
+ }
+ }, function () {
+ console.err('Failed loading ' + commitInfo);
+ return Promise.resolve(null);
+ });
+}
+
+function download(urlString) {
+ return new Promise((c, e) => {
+ var _url = url.parse(urlString);
+ var options = { host: _url.host, port: _url.port, path: _url.path, headers: { 'User-Agent': 'NodeJS' }};
+ var content = '';
+ var request = https.get(options, function (response) {
+ response.on('data', function (data) {
+ content += data.toString();
+ }).on('end', function () {
+ c(content);
+ });
+ }).on('error', function (err) {
+ e(err.message);
+ });
+ });
+}
+
+function invertColor(color) {
+ var res = '#'
+ for (var i = 1; i < 7; i+=2) {
+ var newVal = 255 - parseInt('0x' + color.substr(i, 2), 16);
+ res += newVal.toString(16);
+ }
+ return res;
+}
+
+
+exports.update = function () {
+ var fontMappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti.less';
+ console.log('Reading from ' + fontMappings);
+ var def2Content = {};
+ var ext2Def = {};
+ var fileName2Def = {};
+ var def2ColorId = {};
+ var colorId2Value = {};
+
+ function writeFileIconContent(info) {
+ var iconDefinitions = {};
+
+ for (var def in def2Content) {
+ var entry = { fontCharacter: def2Content[def] };
+ var colorId = def2ColorId[def];
+ if (colorId) {
+ var colorValue = colorId2Value[colorId];
+ if (colorValue) {
+ entry.fontColor = colorValue;
+
+ var entryInverse = { fontCharacter: entry.fontCharacter, fontColor: invertColor(colorValue) };
+ iconDefinitions[def + '_light'] = entryInverse;
+ }
+ }
+ iconDefinitions[def] = entry;
+ }
+
+ function getInvertSet(input) {
+ var result = {};
+ for (var assoc in input) {
+ let invertDef = input[assoc] + '_light';;
+ if (iconDefinitions[invertDef]) {
+ result[assoc] = invertDef;
+ }
+ }
+ return result;
+ }
+
+ var res = {
+ fonts: [{
+ id: "seti",
+ src: [{ "path": "./seti.woff", "format": "woff" }],
+ weight: "normal",
+ style: "normal",
+ size: "150%"
+ }],
+ iconDefinitions: iconDefinitions,
+ // folder: "_folder",
+ file: "_default",
+ fileExtensions: ext2Def,
+ fileNames: fileName2Def,
+ light: {
+ file: "_default_light",
+ fileExtensions: getInvertSet(ext2Def),
+ fileNames: getInvertSet(fileName2Def)
+ },
+ version: 'https://github.com/jesseweed/seti-ui/commit/' + info.commitSha,
+ };
+ fs.writeFileSync('./icons/seti-icon-theme.json', JSON.stringify(res, null, '\t'));
+
+ }
+
+
+ var match;
+
+ return download(fontMappings).then(function (content) {
+ var regex = /@([\w-]+):\s*'(\\E[0-9A-F]+)';/g;
+ while ((match = regex.exec(content)) !== null) {
+ def2Content['_' + match[1]] = match[2];
+ }
+
+ var mappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/icons/mapping.less';
+ return download(mappings).then(function (content) {
+ var regex2 = /\.icon-(?:set|partial)\('([\w-\.]+)',\s*'([\w-]+)',\s*(@[\w-]+)\)/g;
+ while ((match = regex2.exec(content)) !== null) {
+ let pattern = match[1];
+ let def = '_' + match[2];
+ let colorId = match[3];
+ if (pattern[0] === '.') {
+ ext2Def[pattern.substr(1)] = def;
+ } else {
+ fileName2Def[pattern] = def;
+ }
+ def2ColorId[def] = colorId;
+ }
+ var colors = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/ui-variables.less';
+ return download(colors).then(function (content) {
+ var regex3 = /(@[\w-]+):\s*(#[0-9a-z]+)/g;
+ while ((match = regex3.exec(content)) !== null) {
+ colorId2Value[match[1]] = match[2];
+ }
+ return getCommitSha('jesseweed/seti-ui', 'styles/_fonts/seti.less').then(function (info) {
+ try {
+ writeFileIconContent(info);
+ if (info) {
+ console.log('Updated to jesseweed/seti-ui@' + info.commitSha.substr(0, 7) + ' (' + info.commitDate.substr(0, 10) + ')');
+ }
+ } catch (e) {
+ console.error(e);
+ }
+ });
+ });
+ });
+ }, console.error);
+}
+
+if (path.basename(process.argv[1]) === 'update-icon-theme.js') {
+ exports.update();
+}
+
+
+
diff --git a/extensions/theme-seti/icons/seti.woff b/extensions/theme-seti/icons/seti.woff
new file mode 100644
index 00000000000..d6446457fcb
Binary files /dev/null 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
new file mode 100644
index 00000000000..fbf3e22199c
--- /dev/null
+++ b/extensions/theme-seti/icons/vs-seti-icon-theme.json
@@ -0,0 +1,1036 @@
+{
+ "fonts": [
+ {
+ "id": "seti",
+ "src": [
+ {
+ "path": "./seti.woff",
+ "format": "woff"
+ }
+ ],
+ "weight": "normal",
+ "style": "normal",
+ "size": "150%"
+ }
+ ],
+ "iconDefinitions": {
+ "_apple": {
+ "fontCharacter": "\\E001"
+ },
+ "_audio_light": {
+ "fontCharacter": "\\E002",
+ "fontColor": "#5f8b3b"
+ },
+ "_audio": {
+ "fontCharacter": "\\E002",
+ "fontColor": "#a074c4"
+ },
+ "_bower_light": {
+ "fontCharacter": "\\E003",
+ "fontColor": "#1c86cc"
+ },
+ "_bower": {
+ "fontCharacter": "\\E003",
+ "fontColor": "#e37933"
+ },
+ "_c-sharp_light": {
+ "fontCharacter": "\\E004",
+ "fontColor": "#ae6545"
+ },
+ "_c-sharp": {
+ "fontCharacter": "\\E004",
+ "fontColor": "#519aba"
+ },
+ "_c_light": {
+ "fontCharacter": "\\E005",
+ "fontColor": "#3434be"
+ },
+ "_c": {
+ "fontCharacter": "\\E005",
+ "fontColor": "#cbcb41"
+ },
+ "_cake_php_light": {
+ "fontCharacter": "\\E006",
+ "fontColor": "#33c1bb"
+ },
+ "_cake_php": {
+ "fontCharacter": "\\E006",
+ "fontColor": "#cc3e44"
+ },
+ "_checkbox-unchecked": {
+ "fontCharacter": "\\E007"
+ },
+ "_checkbox": {
+ "fontCharacter": "\\E008"
+ },
+ "_cjsx": {
+ "fontCharacter": "\\E009"
+ },
+ "_clock_light": {
+ "fontCharacter": "\\E00A",
+ "fontColor": "#927f79"
+ },
+ "_clock": {
+ "fontCharacter": "\\E00A",
+ "fontColor": "#6d8086"
+ },
+ "_coffee_light": {
+ "fontCharacter": "\\E00B",
+ "fontColor": "#3434be"
+ },
+ "_coffee": {
+ "fontCharacter": "\\E00B",
+ "fontColor": "#cbcb41"
+ },
+ "_coffee_erb": {
+ "fontCharacter": "\\E00C"
+ },
+ "_coldfusion_light": {
+ "fontCharacter": "\\E00D",
+ "fontColor": "#ae6545"
+ },
+ "_coldfusion": {
+ "fontCharacter": "\\E00D",
+ "fontColor": "#519aba"
+ },
+ "_config_light": {
+ "fontCharacter": "\\E00E",
+ "fontColor": "#927f79"
+ },
+ "_config": {
+ "fontCharacter": "\\E00E",
+ "fontColor": "#6d8086"
+ },
+ "_cpp_light": {
+ "fontCharacter": "\\E00F",
+ "fontColor": "#ae6545"
+ },
+ "_cpp": {
+ "fontCharacter": "\\E00F",
+ "fontColor": "#519aba"
+ },
+ "_css_light": {
+ "fontCharacter": "\\E010",
+ "fontColor": "#ae6545"
+ },
+ "_css": {
+ "fontCharacter": "\\E010",
+ "fontColor": "#519aba"
+ },
+ "_csv_light": {
+ "fontCharacter": "\\E011",
+ "fontColor": "#723eb6"
+ },
+ "_csv": {
+ "fontCharacter": "\\E011",
+ "fontColor": "#8dc149"
+ },
+ "_default_light": {
+ "fontCharacter": "\\E012",
+ "fontColor": "#2b2829"
+ },
+ "_default": {
+ "fontCharacter": "\\E012",
+ "fontColor": "#d4d7d6"
+ },
+ "_deprecation-cop": {
+ "fontCharacter": "\\E013"
+ },
+ "_docker_light": {
+ "fontCharacter": "\\E014",
+ "fontColor": "#ae6545"
+ },
+ "_docker": {
+ "fontCharacter": "\\E014",
+ "fontColor": "#519aba"
+ },
+ "_editorconfig_light": {
+ "fontCharacter": "\\E015",
+ "fontColor": "#ae6545"
+ },
+ "_editorconfig": {
+ "fontCharacter": "\\E015",
+ "fontColor": "#519aba"
+ },
+ "_ejs_light": {
+ "fontCharacter": "\\E016",
+ "fontColor": "#3434be"
+ },
+ "_ejs": {
+ "fontCharacter": "\\E016",
+ "fontColor": "#cbcb41"
+ },
+ "_elm_light": {
+ "fontCharacter": "\\E017",
+ "fontColor": "#ae6545"
+ },
+ "_elm": {
+ "fontCharacter": "\\E017",
+ "fontColor": "#519aba"
+ },
+ "_error": {
+ "fontCharacter": "\\E018"
+ },
+ "_favicon_light": {
+ "fontCharacter": "\\E019",
+ "fontColor": "#3434be"
+ },
+ "_favicon": {
+ "fontCharacter": "\\E019",
+ "fontColor": "#cbcb41"
+ },
+ "_folder": {
+ "fontCharacter": "\\E01A"
+ },
+ "_font_light": {
+ "fontCharacter": "\\E01B",
+ "fontColor": "#33c1bb"
+ },
+ "_font": {
+ "fontCharacter": "\\E01B",
+ "fontColor": "#cc3e44"
+ },
+ "_git_folder": {
+ "fontCharacter": "\\E01C"
+ },
+ "_git_ignore": {
+ "fontCharacter": "\\E01D"
+ },
+ "_github_light": {
+ "fontCharacter": "\\E01E",
+ "fontColor": "#2b2829"
+ },
+ "_github": {
+ "fontCharacter": "\\E01E",
+ "fontColor": "#d4d7d6"
+ },
+ "_go_light": {
+ "fontCharacter": "\\E01F",
+ "fontColor": "#ae6545"
+ },
+ "_go": {
+ "fontCharacter": "\\E01F",
+ "fontColor": "#519aba"
+ },
+ "_go2_light": {
+ "fontCharacter": "\\E020",
+ "fontColor": "#ae6545"
+ },
+ "_go2": {
+ "fontCharacter": "\\E020",
+ "fontColor": "#519aba"
+ },
+ "_gradle_light": {
+ "fontCharacter": "\\E021",
+ "fontColor": "#723eb6"
+ },
+ "_gradle": {
+ "fontCharacter": "\\E021",
+ "fontColor": "#8dc149"
+ },
+ "_grails_light": {
+ "fontCharacter": "\\E022",
+ "fontColor": "#723eb6"
+ },
+ "_grails": {
+ "fontCharacter": "\\E022",
+ "fontColor": "#8dc149"
+ },
+ "_grunt_light": {
+ "fontCharacter": "\\E023",
+ "fontColor": "#1c86cc"
+ },
+ "_grunt": {
+ "fontCharacter": "\\E023",
+ "fontColor": "#e37933"
+ },
+ "_gulp_light": {
+ "fontCharacter": "\\E024",
+ "fontColor": "#33c1bb"
+ },
+ "_gulp": {
+ "fontCharacter": "\\E024",
+ "fontColor": "#cc3e44"
+ },
+ "_hacklang_light": {
+ "fontCharacter": "\\E025",
+ "fontColor": "#1c86cc"
+ },
+ "_hacklang": {
+ "fontCharacter": "\\E025",
+ "fontColor": "#e37933"
+ },
+ "_haml_light": {
+ "fontCharacter": "\\E026",
+ "fontColor": "#33c1bb"
+ },
+ "_haml": {
+ "fontCharacter": "\\E026",
+ "fontColor": "#cc3e44"
+ },
+ "_haskell_light": {
+ "fontCharacter": "\\E027",
+ "fontColor": "#5f8b3b"
+ },
+ "_haskell": {
+ "fontCharacter": "\\E027",
+ "fontColor": "#a074c4"
+ },
+ "_heroku_light": {
+ "fontCharacter": "\\E028",
+ "fontColor": "#5f8b3b"
+ },
+ "_heroku": {
+ "fontCharacter": "\\E028",
+ "fontColor": "#a074c4"
+ },
+ "_html_light": {
+ "fontCharacter": "\\E029",
+ "fontColor": "#1c86cc"
+ },
+ "_html": {
+ "fontCharacter": "\\E029",
+ "fontColor": "#e37933"
+ },
+ "_html_erb": {
+ "fontCharacter": "\\E02A"
+ },
+ "_ignored_light": {
+ "fontCharacter": "\\E02B",
+ "fontColor": "#beaca4"
+ },
+ "_ignored": {
+ "fontCharacter": "\\E02B",
+ "fontColor": "#41535b"
+ },
+ "_illustrator_light": {
+ "fontCharacter": "\\E02C",
+ "fontColor": "#3434be"
+ },
+ "_illustrator": {
+ "fontCharacter": "\\E02C",
+ "fontColor": "#cbcb41"
+ },
+ "_image_light": {
+ "fontCharacter": "\\E02D",
+ "fontColor": "#5f8b3b"
+ },
+ "_image": {
+ "fontCharacter": "\\E02D",
+ "fontColor": "#a074c4"
+ },
+ "_info": {
+ "fontCharacter": "\\E02E"
+ },
+ "_ionic_light": {
+ "fontCharacter": "\\E02F",
+ "fontColor": "#ae6545"
+ },
+ "_ionic": {
+ "fontCharacter": "\\E02F",
+ "fontColor": "#519aba"
+ },
+ "_jade_light": {
+ "fontCharacter": "\\E030",
+ "fontColor": "#33c1bb"
+ },
+ "_jade": {
+ "fontCharacter": "\\E030",
+ "fontColor": "#cc3e44"
+ },
+ "_java_light": {
+ "fontCharacter": "\\E031",
+ "fontColor": "#33c1bb"
+ },
+ "_java": {
+ "fontCharacter": "\\E031",
+ "fontColor": "#cc3e44"
+ },
+ "_javascript_light": {
+ "fontCharacter": "\\E032",
+ "fontColor": "#ae6545"
+ },
+ "_javascript": {
+ "fontCharacter": "\\E032",
+ "fontColor": "#519aba"
+ },
+ "_js_erb": {
+ "fontCharacter": "\\E033"
+ },
+ "_json_light": {
+ "fontCharacter": "\\E034",
+ "fontColor": "#3434be"
+ },
+ "_json": {
+ "fontCharacter": "\\E034",
+ "fontColor": "#cbcb41"
+ },
+ "_julia_light": {
+ "fontCharacter": "\\E035",
+ "fontColor": "#5f8b3b"
+ },
+ "_julia": {
+ "fontCharacter": "\\E035",
+ "fontColor": "#a074c4"
+ },
+ "_karma_light": {
+ "fontCharacter": "\\E036",
+ "fontColor": "#723eb6"
+ },
+ "_karma": {
+ "fontCharacter": "\\E036",
+ "fontColor": "#8dc149"
+ },
+ "_less_light": {
+ "fontCharacter": "\\E037",
+ "fontColor": "#ae6545"
+ },
+ "_less": {
+ "fontCharacter": "\\E037",
+ "fontColor": "#519aba"
+ },
+ "_license_light": {
+ "fontCharacter": "\\E038",
+ "fontColor": "#3434be"
+ },
+ "_license": {
+ "fontCharacter": "\\E038",
+ "fontColor": "#cbcb41"
+ },
+ "_liquid_light": {
+ "fontCharacter": "\\E039",
+ "fontColor": "#723eb6"
+ },
+ "_liquid": {
+ "fontCharacter": "\\E039",
+ "fontColor": "#8dc149"
+ },
+ "_livescript_light": {
+ "fontCharacter": "\\E03A",
+ "fontColor": "#ae6545"
+ },
+ "_livescript": {
+ "fontCharacter": "\\E03A",
+ "fontColor": "#519aba"
+ },
+ "_lua_light": {
+ "fontCharacter": "\\E03B",
+ "fontColor": "#ae6545"
+ },
+ "_lua": {
+ "fontCharacter": "\\E03B",
+ "fontColor": "#519aba"
+ },
+ "_markdown_light": {
+ "fontCharacter": "\\E03C",
+ "fontColor": "#ae6545"
+ },
+ "_markdown": {
+ "fontCharacter": "\\E03C",
+ "fontColor": "#519aba"
+ },
+ "_mustache_light": {
+ "fontCharacter": "\\E03D",
+ "fontColor": "#1c86cc"
+ },
+ "_mustache": {
+ "fontCharacter": "\\E03D",
+ "fontColor": "#e37933"
+ },
+ "_new-file": {
+ "fontCharacter": "\\E03E"
+ },
+ "_npm_light": {
+ "fontCharacter": "\\E03F",
+ "fontColor": "#33c1bb"
+ },
+ "_npm": {
+ "fontCharacter": "\\E03F",
+ "fontColor": "#cc3e44"
+ },
+ "_npm_ignored_light": {
+ "fontCharacter": "\\E040",
+ "fontColor": "#beaca4"
+ },
+ "_npm_ignored": {
+ "fontCharacter": "\\E040",
+ "fontColor": "#41535b"
+ },
+ "_ocaml_light": {
+ "fontCharacter": "\\E041",
+ "fontColor": "#1c86cc"
+ },
+ "_ocaml": {
+ "fontCharacter": "\\E041",
+ "fontColor": "#e37933"
+ },
+ "_pdf_light": {
+ "fontCharacter": "\\E042",
+ "fontColor": "#33c1bb"
+ },
+ "_pdf": {
+ "fontCharacter": "\\E042",
+ "fontColor": "#cc3e44"
+ },
+ "_perl_light": {
+ "fontCharacter": "\\E043",
+ "fontColor": "#ae6545"
+ },
+ "_perl": {
+ "fontCharacter": "\\E043",
+ "fontColor": "#519aba"
+ },
+ "_photoshop_light": {
+ "fontCharacter": "\\E044",
+ "fontColor": "#ae6545"
+ },
+ "_photoshop": {
+ "fontCharacter": "\\E044",
+ "fontColor": "#519aba"
+ },
+ "_php_light": {
+ "fontCharacter": "\\E045",
+ "fontColor": "#5f8b3b"
+ },
+ "_php": {
+ "fontCharacter": "\\E045",
+ "fontColor": "#a074c4"
+ },
+ "_project": {
+ "fontCharacter": "\\E046"
+ },
+ "_pug_light": {
+ "fontCharacter": "\\E047",
+ "fontColor": "#ae6545"
+ },
+ "_pug": {
+ "fontCharacter": "\\E047",
+ "fontColor": "#519aba"
+ },
+ "_puppet_light": {
+ "fontCharacter": "\\E048",
+ "fontColor": "#5f8b3b"
+ },
+ "_puppet": {
+ "fontCharacter": "\\E048",
+ "fontColor": "#a074c4"
+ },
+ "_python_light": {
+ "fontCharacter": "\\E049",
+ "fontColor": "#ae6545"
+ },
+ "_python": {
+ "fontCharacter": "\\E049",
+ "fontColor": "#519aba"
+ },
+ "_rails": {
+ "fontCharacter": "\\E04A"
+ },
+ "_react_light": {
+ "fontCharacter": "\\E04B",
+ "fontColor": "#ae6545"
+ },
+ "_react": {
+ "fontCharacter": "\\E04B",
+ "fontColor": "#519aba"
+ },
+ "_ruby_light": {
+ "fontCharacter": "\\E04C",
+ "fontColor": "#33c1bb"
+ },
+ "_ruby": {
+ "fontCharacter": "\\E04C",
+ "fontColor": "#cc3e44"
+ },
+ "_rust_light": {
+ "fontCharacter": "\\E04D",
+ "fontColor": "#927f79"
+ },
+ "_rust": {
+ "fontCharacter": "\\E04D",
+ "fontColor": "#6d8086"
+ },
+ "_sass_light": {
+ "fontCharacter": "\\E04E",
+ "fontColor": "#aac7a"
+ },
+ "_sass": {
+ "fontCharacter": "\\E04E",
+ "fontColor": "#f55385"
+ },
+ "_sbt_light": {
+ "fontCharacter": "\\E04F",
+ "fontColor": "#ae6545"
+ },
+ "_sbt": {
+ "fontCharacter": "\\E04F",
+ "fontColor": "#519aba"
+ },
+ "_scala_light": {
+ "fontCharacter": "\\E050",
+ "fontColor": "#33c1bb"
+ },
+ "_scala": {
+ "fontCharacter": "\\E050",
+ "fontColor": "#cc3e44"
+ },
+ "_search": {
+ "fontCharacter": "\\E051"
+ },
+ "_settings": {
+ "fontCharacter": "\\E052"
+ },
+ "_shell_light": {
+ "fontCharacter": "\\E053",
+ "fontColor": "#b2a5a1"
+ },
+ "_shell": {
+ "fontCharacter": "\\E053",
+ "fontColor": "#4d5a5e"
+ },
+ "_slim_light": {
+ "fontCharacter": "\\E054",
+ "fontColor": "#1c86cc"
+ },
+ "_slim": {
+ "fontCharacter": "\\E054",
+ "fontColor": "#e37933"
+ },
+ "_smarty_light": {
+ "fontCharacter": "\\E055",
+ "fontColor": "#3434be"
+ },
+ "_smarty": {
+ "fontCharacter": "\\E055",
+ "fontColor": "#cbcb41"
+ },
+ "_stylus_light": {
+ "fontCharacter": "\\E056",
+ "fontColor": "#723eb6"
+ },
+ "_stylus": {
+ "fontCharacter": "\\E056",
+ "fontColor": "#8dc149"
+ },
+ "_svg_light": {
+ "fontCharacter": "\\E057",
+ "fontColor": "#5f8b3b"
+ },
+ "_svg": {
+ "fontCharacter": "\\E057",
+ "fontColor": "#a074c4"
+ },
+ "_swift_light": {
+ "fontCharacter": "\\E058",
+ "fontColor": "#1c86cc"
+ },
+ "_swift": {
+ "fontCharacter": "\\E058",
+ "fontColor": "#e37933"
+ },
+ "_terraform_light": {
+ "fontCharacter": "\\E059",
+ "fontColor": "#5f8b3b"
+ },
+ "_terraform": {
+ "fontCharacter": "\\E059",
+ "fontColor": "#a074c4"
+ },
+ "_tex_light": {
+ "fontCharacter": "\\E05A",
+ "fontColor": "#2b2829"
+ },
+ "_tex": {
+ "fontCharacter": "\\E05A",
+ "fontColor": "#d4d7d6"
+ },
+ "_time-cop": {
+ "fontCharacter": "\\E05B"
+ },
+ "_todo": {
+ "fontCharacter": "\\E05C"
+ },
+ "_twig_light": {
+ "fontCharacter": "\\E05D",
+ "fontColor": "#723eb6"
+ },
+ "_twig": {
+ "fontCharacter": "\\E05D",
+ "fontColor": "#8dc149"
+ },
+ "_typescript_light": {
+ "fontCharacter": "\\E05E",
+ "fontColor": "#ae6545"
+ },
+ "_typescript": {
+ "fontCharacter": "\\E05E",
+ "fontColor": "#519aba"
+ },
+ "_vala_light": {
+ "fontCharacter": "\\E05F",
+ "fontColor": "#927f79"
+ },
+ "_vala": {
+ "fontCharacter": "\\E05F",
+ "fontColor": "#6d8086"
+ },
+ "_video_light": {
+ "fontCharacter": "\\E060",
+ "fontColor": "#aac7a"
+ },
+ "_video": {
+ "fontCharacter": "\\E060",
+ "fontColor": "#f55385"
+ },
+ "_xml_light": {
+ "fontCharacter": "\\E061",
+ "fontColor": "#1c86cc"
+ },
+ "_xml": {
+ "fontCharacter": "\\E061",
+ "fontColor": "#e37933"
+ },
+ "_yml_light": {
+ "fontCharacter": "\\E062",
+ "fontColor": "#5f8b3b"
+ },
+ "_yml": {
+ "fontCharacter": "\\E062",
+ "fontColor": "#a074c4"
+ }
+ },
+ "file": "_default",
+ "fileExtensions": {
+ "cpp": "_cpp",
+ "c": "_c",
+ "cs": "_c-sharp",
+ "cc": "_cpp",
+ "cfc": "_coldfusion",
+ "cfm": "_coldfusion",
+ "coffee": "_coffee",
+ "config": "_config",
+ "cson": "_json",
+ "css": "_css",
+ "css.map": "_css",
+ "sss": "_css",
+ "csv": "_csv",
+ "ctp": "_cake_php",
+ "ejs": "_ejs",
+ "elm": "_elm",
+ "ico": "_favicon",
+ "gitignore": "_github",
+ "gitconfig": "_github",
+ "gitkeep": "_github",
+ "gitattributes": "_github",
+ "go": "_go2",
+ "slide": "_go",
+ "article": "_go",
+ "gradle": "_gradle",
+ "groovy": "_grails",
+ "gsp": "_grails",
+ "hh": "_hacklang",
+ "haml": "_haml",
+ "handlebars": "_mustache",
+ "hbs": "_mustache",
+ "hjs": "_mustache",
+ "hs": "_haskell",
+ "lhs": "_haskell",
+ "html": "_html",
+ "jade": "_jade",
+ "java": "_java",
+ "class": "_java",
+ "classpath": "_java",
+ "js": "_javascript",
+ "js.map": "_javascript",
+ "es": "_javascript",
+ "es5": "_javascript",
+ "es6": "_javascript",
+ "es7": "_javascript",
+ "json": "_json",
+ "jl": "_julia",
+ "less": "_less",
+ "liquid": "_liquid",
+ "ls": "_livescript",
+ "lua": "_lua",
+ "markdown": "_markdown",
+ "md": "_markdown",
+ "mustache": "_mustache",
+ "stache": "_mustache",
+ "npm-debug.log": "_npm",
+ "npmignore": "_npm",
+ "h": "_c",
+ "m": "_c",
+ "ml": "_ocaml",
+ "mli": "_ocaml",
+ "cmx": "_ocaml",
+ "cmxa": "_ocaml",
+ "pl": "_perl",
+ "php": "_php",
+ "php.inc": "_php",
+ "pug": "_pug",
+ "pp": "_puppet",
+ "py": "_python",
+ "jsx": "_react",
+ "cjsx": "_react",
+ "tsx": "_react",
+ "rb": "_ruby",
+ "erb": "_ruby",
+ "erb.html": "_ruby",
+ "html.erb": "_ruby",
+ "rs": "_rust",
+ "sass": "_sass",
+ "scss": "_sass",
+ "slim": "_slim",
+ "smarty.tpl": "_smarty",
+ "sbt": "_sbt",
+ "scala": "_scala",
+ "styl": "_stylus",
+ "swift": "_swift",
+ "tf": "_terraform",
+ "tf.json": "_terraform",
+ "tex": "_tex",
+ "sty": "_tex",
+ "cls": "_tex",
+ "dtx": "_tex",
+ "ins": "_tex",
+ "txt": "_default",
+ "twig": "_twig",
+ "ts": "_typescript",
+ "vala": "_vala",
+ "vapi": "_vala",
+ "xml": "_xml",
+ "yml": "_yml",
+ "yaml": "_yml",
+ "ai": "_illustrator",
+ "psd": "_photoshop",
+ "pdf": "_pdf",
+ "eot": "_font",
+ "ttf": "_font",
+ "woff": "_font",
+ "woff2": "_font",
+ "png": "_image",
+ "gif": "_image",
+ "jpg": "_image",
+ "jpeg": "_image",
+ "svg": "_svg",
+ "svgx": "_image",
+ "cmd": "_shell",
+ "sh": "_shell",
+ "zsh": "_shell",
+ "fish": "_shell",
+ "zshrc": "_shell",
+ "mov": "_video",
+ "ogv": "_video",
+ "webm": "_video",
+ "avi": "_video",
+ "mpg": "_video",
+ "mp4": "_video",
+ "mp3": "_audio",
+ "ogg": "_audio",
+ "wav": "_audio",
+ "bowerrc": "_bower",
+ "jshintrc": "_javascript",
+ "jscsrc": "_javascript",
+ "direnv": "_config",
+ "env": "_config",
+ "static": "_config",
+ "editorconfig": "_editorconfig",
+ "slugignore": "_config",
+ "tmp": "_clock",
+ "DS_Store": "_ignored"
+ },
+ "fileNames": {
+ "karma.conf.js": "_karma",
+ "karma.conf.coffee": "_karma",
+ "bower.json": "_bower",
+ "Bower.json": "_bower",
+ "dockerfile": "_docker",
+ "Dockerfile": "_docker",
+ "DOCKERFILE": "_docker",
+ "Gruntfile.js": "_grunt",
+ "gruntfile.babel.js": "_grunt",
+ "Gruntfile.babel.js": "_grunt",
+ "gruntfile.js": "_grunt",
+ "Gruntfile.coffee": "_grunt",
+ "gruntfile.coffee": "_grunt",
+ "GULPFILE": "_gulp",
+ "Gulpfile": "_gulp",
+ "gulpfile": "_gulp",
+ "ionic.config.json": "_ionic",
+ "Ionic.config.json": "_ionic",
+ "ionic.project": "_ionic",
+ "Ionic.project": "_ionic",
+ "LICENSE": "_license",
+ "Procfile": "_heroku",
+ "TODO": "_todo",
+ "npm-debug.log": "_npm_ignored"
+ },
+ "light": {
+ "file": "_default_light",
+ "fileExtensions": {
+ "cpp": "_cpp_light",
+ "c": "_c_light",
+ "cs": "_c-sharp_light",
+ "cc": "_cpp_light",
+ "cfc": "_coldfusion_light",
+ "cfm": "_coldfusion_light",
+ "coffee": "_coffee_light",
+ "config": "_config_light",
+ "cson": "_json_light",
+ "css": "_css_light",
+ "css.map": "_css_light",
+ "sss": "_css_light",
+ "csv": "_csv_light",
+ "ctp": "_cake_php_light",
+ "ejs": "_ejs_light",
+ "elm": "_elm_light",
+ "ico": "_favicon_light",
+ "gitignore": "_github_light",
+ "gitconfig": "_github_light",
+ "gitkeep": "_github_light",
+ "gitattributes": "_github_light",
+ "go": "_go2_light",
+ "slide": "_go_light",
+ "article": "_go_light",
+ "gradle": "_gradle_light",
+ "groovy": "_grails_light",
+ "gsp": "_grails_light",
+ "hh": "_hacklang_light",
+ "haml": "_haml_light",
+ "handlebars": "_mustache_light",
+ "hbs": "_mustache_light",
+ "hjs": "_mustache_light",
+ "hs": "_haskell_light",
+ "lhs": "_haskell_light",
+ "html": "_html_light",
+ "jade": "_jade_light",
+ "java": "_java_light",
+ "class": "_java_light",
+ "classpath": "_java_light",
+ "js": "_javascript_light",
+ "js.map": "_javascript_light",
+ "es": "_javascript_light",
+ "es5": "_javascript_light",
+ "es6": "_javascript_light",
+ "es7": "_javascript_light",
+ "json": "_json_light",
+ "jl": "_julia_light",
+ "less": "_less_light",
+ "liquid": "_liquid_light",
+ "ls": "_livescript_light",
+ "lua": "_lua_light",
+ "markdown": "_markdown_light",
+ "md": "_markdown_light",
+ "mustache": "_mustache_light",
+ "stache": "_mustache_light",
+ "npm-debug.log": "_npm_light",
+ "npmignore": "_npm_light",
+ "h": "_c_light",
+ "m": "_c_light",
+ "ml": "_ocaml_light",
+ "mli": "_ocaml_light",
+ "cmx": "_ocaml_light",
+ "cmxa": "_ocaml_light",
+ "pl": "_perl_light",
+ "php": "_php_light",
+ "php.inc": "_php_light",
+ "pug": "_pug_light",
+ "pp": "_puppet_light",
+ "py": "_python_light",
+ "jsx": "_react_light",
+ "cjsx": "_react_light",
+ "tsx": "_react_light",
+ "rb": "_ruby_light",
+ "erb": "_ruby_light",
+ "erb.html": "_ruby_light",
+ "html.erb": "_ruby_light",
+ "rs": "_rust_light",
+ "sass": "_sass_light",
+ "scss": "_sass_light",
+ "slim": "_slim_light",
+ "smarty.tpl": "_smarty_light",
+ "sbt": "_sbt_light",
+ "scala": "_scala_light",
+ "styl": "_stylus_light",
+ "swift": "_swift_light",
+ "tf": "_terraform_light",
+ "tf.json": "_terraform_light",
+ "tex": "_tex_light",
+ "sty": "_tex_light",
+ "cls": "_tex_light",
+ "dtx": "_tex_light",
+ "ins": "_tex_light",
+ "txt": "_default_light",
+ "twig": "_twig_light",
+ "ts": "_typescript_light",
+ "vala": "_vala_light",
+ "vapi": "_vala_light",
+ "xml": "_xml_light",
+ "yml": "_yml_light",
+ "yaml": "_yml_light",
+ "ai": "_illustrator_light",
+ "psd": "_photoshop_light",
+ "pdf": "_pdf_light",
+ "eot": "_font_light",
+ "ttf": "_font_light",
+ "woff": "_font_light",
+ "woff2": "_font_light",
+ "png": "_image_light",
+ "gif": "_image_light",
+ "jpg": "_image_light",
+ "jpeg": "_image_light",
+ "svg": "_svg_light",
+ "svgx": "_image_light",
+ "cmd": "_shell_light",
+ "sh": "_shell_light",
+ "zsh": "_shell_light",
+ "fish": "_shell_light",
+ "zshrc": "_shell_light",
+ "mov": "_video_light",
+ "ogv": "_video_light",
+ "webm": "_video_light",
+ "avi": "_video_light",
+ "mpg": "_video_light",
+ "mp4": "_video_light",
+ "mp3": "_audio_light",
+ "ogg": "_audio_light",
+ "wav": "_audio_light",
+ "bowerrc": "_bower_light",
+ "jshintrc": "_javascript_light",
+ "jscsrc": "_javascript_light",
+ "direnv": "_config_light",
+ "env": "_config_light",
+ "static": "_config_light",
+ "editorconfig": "_editorconfig_light",
+ "slugignore": "_config_light",
+ "tmp": "_clock_light",
+ "DS_Store": "_ignored_light"
+ },
+ "fileNames": {
+ "karma.conf.js": "_karma_light",
+ "karma.conf.coffee": "_karma_light",
+ "bower.json": "_bower_light",
+ "Bower.json": "_bower_light",
+ "dockerfile": "_docker_light",
+ "Dockerfile": "_docker_light",
+ "DOCKERFILE": "_docker_light",
+ "Gruntfile.js": "_grunt_light",
+ "gruntfile.babel.js": "_grunt_light",
+ "Gruntfile.babel.js": "_grunt_light",
+ "gruntfile.js": "_grunt_light",
+ "Gruntfile.coffee": "_grunt_light",
+ "gruntfile.coffee": "_grunt_light",
+ "GULPFILE": "_gulp_light",
+ "Gulpfile": "_gulp_light",
+ "gulpfile": "_gulp_light",
+ "ionic.config.json": "_ionic_light",
+ "Ionic.config.json": "_ionic_light",
+ "ionic.project": "_ionic_light",
+ "Ionic.project": "_ionic_light",
+ "LICENSE": "_license_light",
+ "Procfile": "_heroku_light",
+ "npm-debug.log": "_npm_ignored_light"
+ }
+ },
+ "version": "https://github.com/jesseweed/seti-ui/commit/00ab2334531a5f91f9eb5cc49c584b2610682ba6"
+}
\ No newline at end of file
diff --git a/extensions/theme-seti/package.json b/extensions/theme-seti/package.json
new file mode 100644
index 00000000000..60bac73aa45
--- /dev/null
+++ b/extensions/theme-seti/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "vscode-theme-seti",
+ "private": true,
+ "version": "0.1.0",
+ "description": "A file icon theme made out of the Seti UI file idons",
+ "publisher": "vscode",
+ "scripts": {
+ "update": "node ./build/update-icon-theme.js"
+ },
+ "engines": { "vscode": "*" },
+ "contributes": {
+ "iconThemes": [
+ {
+ "id": "vs-seti",
+ "label": "Seti (Visual Studio Code)",
+ "path": "./icons/vs-seti-icon-theme.json"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/extensions/theme-seti/thirdpartynotices.txt b/extensions/theme-seti/thirdpartynotices.txt
new file mode 100644
index 00000000000..5faf4bb5a8f
--- /dev/null
+++ b/extensions/theme-seti/thirdpartynotices.txt
@@ -0,0 +1,32 @@
+
+THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
+For Microsoft vscode-theme-seti
+
+This file is based on or incorporates material from the projects listed below ("Third Party OSS"). The original copyright
+notice and the license under which Microsoft received such Third Party OSS, are set forth below. Such licenses and notice
+are provided for informational purposes only. Microsoft licenses the Third Party OSS to you under the licensing terms for
+the Microsoft product or service. Microsoft reserves all other rights not expressly granted under this agreement, whether
+by implication, estoppel or otherwise.†
+
+1. Seti UI - A subtle dark colored UI theme for Atom. (https://github.com/jesseweed/seti-ui)
+
+Copyright (c) 2014 Jesse Weed
+
+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.
\ No newline at end of file
diff --git a/extensions/typescript/OSSREADME.json b/extensions/typescript/OSSREADME.json
index 91e2030ce8e..a62224cfd5c 100644
--- a/extensions/typescript/OSSREADME.json
+++ b/extensions/typescript/OSSREADME.json
@@ -192,14 +192,15 @@
]
},
{
+ "isLicense": true, // We override the license since we need a coorect Copyright
"name": "typescript",
- "version": "1.8.2",
+ "version": "1.8.10",
"license": "Apache2",
"repositoryURL": "https://github.com/Microsoft/TypeScript",
"description": "The contents of the folder lib is from the TypeScript project https://github.com/Microsoft/TypeScript.",
// Reason: LICENSE file does not include Copyright statement
"licenseDetail": [
- "Copyright (c) Microsoft Corporation. All rights reserved. ",
+ "Copyright (c) Microsoft Corporation. All rights reserved.",
"",
"Apache License",
"",
diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json
index f6d2c907c08..d1ba19d4dbb 100644
--- a/extensions/typescript/package.json
+++ b/extensions/typescript/package.json
@@ -75,11 +75,6 @@
"default": null,
"description": "%typescript.tsdk.desc%"
},
- "typescript.tsdk_version": {
- "type": ["string", "null"],
- "default": null,
- "description": "%typescript.tsdk_version.desc%"
- },
"typescript.tsserver.trace": {
"type": "string",
"enum": ["off", "messages", "verbose"],
diff --git a/extensions/typescript/src/features/hoverProvider.ts b/extensions/typescript/src/features/hoverProvider.ts
index 32f7a5a5683..d0c56c80487 100644
--- a/extensions/typescript/src/features/hoverProvider.ts
+++ b/extensions/typescript/src/features/hoverProvider.ts
@@ -31,7 +31,7 @@ export default class TypeScriptHoverProvider implements HoverProvider {
let data = response.body;
if (data) {
return new Hover(
- [data.documentation, { language: 'typescript', value: data.displayString }],
+ [{ language: 'typescript', value: data.displayString }, data.documentation],
new Range(data.start.line - 1, data.start.offset - 1, data.end.line - 1, data.end.offset - 1));
}
}, (err) => {
diff --git a/extensions/typescript/src/features/workspaceSymbolProvider.ts b/extensions/typescript/src/features/workspaceSymbolProvider.ts
index 5b8dd5057da..1fced2f10fb 100644
--- a/extensions/typescript/src/features/workspaceSymbolProvider.ts
+++ b/extensions/typescript/src/features/workspaceSymbolProvider.ts
@@ -5,7 +5,7 @@
'use strict';
-import { workspace, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Range, Location, CancellationToken } from 'vscode';
+import { workspace, window, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Range, Location, CancellationToken } from 'vscode';
import * as Proto from '../protocol';
import { ITypescriptServiceClient } from '../typescriptService';
@@ -30,14 +30,23 @@ export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbo
public provideWorkspaceSymbols(search: string, token :CancellationToken): Promise {
// typescript wants to have a resource even when asking
- // general questions so we check all open documents for
- // one that is typescript'ish
+ // general questions so we check the active editor. If this
+ // doesn't match we take the first TS document.
let uri: Uri;
- let documents = workspace.textDocuments;
- for (let document of documents) {
- if (document.languageId === this.modeId) {
+ let editor = window.activeTextEditor;
+ if (editor) {
+ let document = editor.document;
+ if (document && document.languageId === this.modeId) {
uri = document.uri;
- break;
+ }
+ }
+ if (!uri) {
+ let documents = workspace.textDocuments;
+ for (let document of documents) {
+ if (document.languageId === this.modeId) {
+ uri = document.uri;
+ break;
+ }
}
}
diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts
index bb15cff7848..c57ddb02862 100644
--- a/extensions/typescript/src/typescriptMain.ts
+++ b/extensions/typescript/src/typescriptMain.ts
@@ -9,7 +9,7 @@
* ------------------------------------------------------------------------------------------ */
'use strict';
-import { env, languages, commands, workspace, window, Uri, ExtensionContext, IndentAction, Diagnostic, DiagnosticCollection, Range, DocumentFilter } from 'vscode';
+import { env, languages, commands, workspace, window, Uri, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, DocumentFilter } from 'vscode';
// This must be the first statement otherwise modules might got loaded with
// the wrong locale.
@@ -67,7 +67,7 @@ export function activate(context: ExtensionContext): void {
modeIds: [MODE_ID_JS, MODE_ID_JSX],
extensions: ['.js', '.jsx']
}
- ], context.storagePath);
+ ], context.storagePath, context.globalState);
let client = clientHost.serviceClient;
@@ -251,7 +251,6 @@ class LanguageProvider {
public syntaxDiagnosticsReceived(file: string, diagnostics: Diagnostic[]): void {
this.syntaxDiagnostics[file] = diagnostics;
- this.currentDiagnostics.set(Uri.file(file), diagnostics);
}
public semanticDiagnosticsReceived(file: string, diagnostics: Diagnostic[]): void {
@@ -273,7 +272,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost {
private languages: LanguageProvider[];
private languagePerId: Map;
- constructor(descriptions: LanguageDescription[], storagePath: string) {
+ constructor(descriptions: LanguageDescription[], storagePath: string, globalState: Memento) {
let handleProjectCreateOrDelete = () => {
this.client.execute('reloadProjects', null, false);
this.triggerAllDiagnostics();
@@ -288,7 +287,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost {
watcher.onDidDelete(handleProjectCreateOrDelete);
watcher.onDidChange(handleProjectChange);
- this.client = new TypeScriptServiceClient(this, storagePath);
+ this.client = new TypeScriptServiceClient(this, storagePath, globalState);
this.languages = [];
this.languagePerId = Object.create(null);
descriptions.forEach(description => {
diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts
index 4bd942836b8..8dbf00ccc23 100644
--- a/extensions/typescript/src/typescriptServiceClient.ts
+++ b/extensions/typescript/src/typescriptServiceClient.ts
@@ -12,7 +12,7 @@ import * as fs from 'fs';
import * as electron from './utils/electron';
import { Reader } from './utils/wireProtocol';
-import { workspace, window, Uri, CancellationToken, OutputChannel } from 'vscode';
+import { workspace, window, Uri, CancellationToken, OutputChannel, Memento, MessageItem } from 'vscode';
import * as Proto from './protocol';
import { ITypescriptServiceClient, ITypescriptServiceClientHost, APIVersion } from './typescriptService';
@@ -66,10 +66,39 @@ namespace Trace {
}
}
+enum MessageAction {
+ useLocal,
+ alwaysUseLocal,
+ useBundled,
+ doNotCheckAgain
+}
+
+interface MyMessageItem extends MessageItem {
+ id: MessageAction;
+}
+
+
+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);
+}
+
+
export default class TypeScriptServiceClient implements ITypescriptServiceClient {
private host: ITypescriptServiceClientHost;
private storagePath: string;
+ private globalState: Memento;
private pathSeparator: string;
private _onReady: { promise: Promise; resolve: () => void; reject: () => void; };
@@ -94,9 +123,10 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient
private _apiVersion: APIVersion;
private telemetryReporter: TelemetryReporter;
- constructor(host: ITypescriptServiceClientHost, storagePath: string) {
+ constructor(host: ITypescriptServiceClientHost, storagePath: string, globalState: Memento) {
this.host = host;
this.storagePath = storagePath;
+ this.globalState = globalState;
this.pathSeparator = path.sep;
let p = new Promise((resolve, reject) => {
@@ -250,74 +280,179 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient
private startService(resendModels: boolean = false): void {
let modulePath = path.join(__dirname, '..', 'server', 'typescript', 'lib', 'tsserver.js');
+ let checkGlobalVersion = true;
+ let showVersionStatusItem = false;
if (this.tsdk) {
+ checkGlobalVersion = false;
if ((path).isAbsolute(this.tsdk)) {
modulePath = path.join(this.tsdk, 'tsserver.js');
} else if (workspace.rootPath) {
modulePath = path.join(workspace.rootPath, this.tsdk, 'tsserver.js');
}
}
- this.info(`Using tsserver from location: ${modulePath}`);
- if (!fs.existsSync(modulePath)) {
- window.showErrorMessage(localize('noServerFound', 'The path {0} doesn\'t point to a valid tsserver install. TypeScript language features will be disabled.', path.dirname(modulePath)));
- return;
- }
+ let versionCheckPromise: Thenable = Promise.resolve(modulePath);
+ const doLocalVersionCheckKey: string = 'doLocalVersionCheck';
- let version = this.getTypeScriptVersion(modulePath);
- if (!version) {
- version = workspace.getConfiguration().get('typescript.tsdk_version', undefined);
- }
- if (version) {
- this._apiVersion = APIVersion.fromString(version);
- }
- const label = version || localize('versionNumber.custom' ,'custom');
- const tooltip = modulePath;
- VersionStatus.enable(!!this.tsdk);
- VersionStatus.setInfo(label, tooltip);
-
- this.servicePromise = new Promise((resolve, reject) => {
- try {
- let options: electron.IForkOptions = {
- execArgv: [] // [`--debug-brk=5859`]
- };
- 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 (!this.tsdk && workspace.rootPath && this.globalState.get(doLocalVersionCheckKey, true)) {
+ let localModulePath = path.join(workspace.rootPath, 'node_modules', 'typescript', 'lib', 'tsserver.js');
+ if (fs.existsSync(localModulePath)) {
+ let localVersion = this.getTypeScriptVersion(localModulePath);
+ let shippedVersion = this.getTypeScriptVersion(modulePath);
+ if (localVersion && localVersion !== shippedVersion) {
+ checkGlobalVersion = false;
+ versionCheckPromise = window.showInformationMessage(
+ localize(
+ 'localTSFound',
+ 'The workspace folder contains TypeScript version {0}. Do you want to use this version instead of the bundled version {1}?',
+ localVersion, shippedVersion
+ ),
+ ...[{
+ title: localize('use', 'Use {0}', localVersion),
+ id: MessageAction.useLocal
+ },
+ {
+ title: localize('useBundled', 'Use {0}', shippedVersion),
+ id: MessageAction.useBundled,
+ },
+ {
+ title: localize('useAlways', /*'Always use {0}'*/ 'More Information', localVersion),
+ id: MessageAction.alwaysUseLocal
+ },
+ {
+ title: localize('doNotCheckAgain', 'Don\'t Check Again'),
+ id: MessageAction.doNotCheckAgain,
+ isCloseAffordance: true
+ }].reverse()
+ ).then((selected) => {
+ if (!selected) {
+ return modulePath;
+ }
+ switch(selected.id) {
+ case MessageAction.useLocal:
+ showVersionStatusItem = true;
+ return localModulePath;
+ case MessageAction.alwaysUseLocal:
+ window.showInformationMessage(localize('continueWithVersion', 'Continuing with version {0}', shippedVersion));
+ openUrl('http://go.microsoft.com/fwlink/?LinkId=826239');
+ return modulePath;
+ case MessageAction.useBundled:
+ return modulePath;
+ case MessageAction.doNotCheckAgain:
+ this.globalState.update(doLocalVersionCheckKey, false);
+ return modulePath;
+ default:
+ return modulePath;
+ }
+ });
}
- electron.fork(modulePath, [], options, (err: any, childProcess: cp.ChildProcess) => {
- if (err) {
- this.lastError = err;
- this.error('Starting TSServer failed with error.', err);
- window.showErrorMessage(localize('serverCouldNotBeStarted', 'TypeScript language server couldn\'t be started. Error message is: {0}', err.message || err));
- this.logTelemetry('error', {message: err.message});
- return;
- }
- this.lastStart = Date.now();
- childProcess.on('error', (err: Error) => {
- this.lastError = err;
- this.error('TSServer errored with error.', err);
- this.serviceExited(false);
- });
- childProcess.on('exit', (code: any) => {
- this.error(`TSServer exited with code: ${code ? code : 'unknown'}`);
- this.serviceExited(true);
- });
- this.reader = new Reader(childProcess.stdout, (msg) => {
- this.dispatchMessage(msg);
- });
- this._onReady.resolve();
- resolve(childProcess);
- });
- } catch (error) {
- reject(error);
}
+ }
+ versionCheckPromise.then((modulePath) => {
+ this.info(`Using tsserver from location: ${modulePath}`);
+ if (!fs.existsSync(modulePath)) {
+ window.showErrorMessage(localize('noServerFound', 'The path {0} doesn\'t point to a valid tsserver install. TypeScript language features will be disabled.', path.dirname(modulePath)));
+ return;
+ }
+
+ let version = this.getTypeScriptVersion(modulePath);
+ if (!version) {
+ version = workspace.getConfiguration().get('typescript.tsdk_version', undefined);
+ }
+ if (version) {
+ this._apiVersion = APIVersion.fromString(version);
+ }
+
+
+ const label = version || localize('versionNumber.custom' ,'custom');
+ const tooltip = modulePath;
+ VersionStatus.enable(!!this.tsdk || showVersionStatusItem);
+ VersionStatus.setInfo(label, tooltip);
+
+ const doGlobalVersionCheckKey: string = 'doGlobalVersionCheck';
+ if (checkGlobalVersion && this.globalState.get(doGlobalVersionCheckKey, true)) {
+ let tscVersion: string = undefined;
+ try {
+ let out = cp.execSync('tsc --version', { encoding: 'utf8' });
+ if (out) {
+ let matches = out.trim().match(/Version\s*(.*)$/);
+ if (matches && matches.length === 2) {
+ tscVersion = matches[1];
+ }
+ }
+ } catch (error) {
+ }
+ if (tscVersion && tscVersion !== version) {
+ window.showInformationMessage(
+ localize('versionMismatch', 'A version mismatch between the globally installed tsc compiler ({0}) and VS Code\'s language service ({1}) has been detected. This might result in inconsistent compile errors.', tscVersion, version),
+ ...[{
+ title: localize('moreInformation', 'More Information'),
+ id: 1
+ },
+ {
+ title: localize('doNotCheckAgain', 'Don\'t Check Again'),
+ id: 2,
+ isCloseAffordance: true
+ }].reverse()
+ ).then((selected) => {
+ if (!selected) {
+ return;
+ }
+ switch (selected.id) {
+ case 1:
+ openUrl('http://go.microsoft.com/fwlink/?LinkId=826239');
+ break;
+ case 2:
+ this.globalState.update(doGlobalVersionCheckKey, false);
+ break;
+ }
+ });
+ }
+ }
+
+ this.servicePromise = new Promise((resolve, reject) => {
+ try {
+ let options: electron.IForkOptions = {
+ execArgv: [] // [`--debug-brk=5859`]
+ };
+ 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}`];
+ }
+ }
+ electron.fork(modulePath, [], options, (err: any, childProcess: cp.ChildProcess) => {
+ if (err) {
+ this.lastError = err;
+ this.error('Starting TSServer failed with error.', err);
+ window.showErrorMessage(localize('serverCouldNotBeStarted', 'TypeScript language server couldn\'t be started. Error message is: {0}', err.message || err));
+ this.logTelemetry('error', {message: err.message});
+ return;
+ }
+ this.lastStart = Date.now();
+ childProcess.on('error', (err: Error) => {
+ this.lastError = err;
+ this.error('TSServer errored with error.', err);
+ this.serviceExited(false);
+ });
+ childProcess.on('exit', (code: any) => {
+ this.error(`TSServer exited with code: ${code ? code : 'unknown'}`);
+ this.serviceExited(true);
+ });
+ this.reader = new Reader(childProcess.stdout, (msg) => {
+ this.dispatchMessage(msg);
+ });
+ this._onReady.resolve();
+ resolve(childProcess);
+ });
+ } catch (error) {
+ reject(error);
+ }
+ });
+ this.serviceStarted(resendModels);
});
- this.serviceStarted(resendModels);
}
private serviceStarted(resendModels: boolean): void {
diff --git a/extensions/vscode-api-tests/src/editor.test.ts b/extensions/vscode-api-tests/src/editor.test.ts
index 0dc0bf124e0..6cf498ee9c9 100644
--- a/extensions/vscode-api-tests/src/editor.test.ts
+++ b/extensions/vscode-api-tests/src/editor.test.ts
@@ -6,56 +6,96 @@
'use strict';
import * as assert from 'assert';
-import {workspace, window, Position, Range} from 'vscode';
+import {workspace, window, Position, Range, commands} from 'vscode';
import {createRandomFile, deleteFile, cleanUp} from './utils';
suite('editor tests', () => {
teardown(cleanUp);
- test('make edit', () => {
- return createRandomFile().then(file => {
+ function withRandomFileEditor(initialContents:string, run:(editor:vscode.TextEditor, doc:vscode.TextDocument)=>Thenable): Thenable {
+ return createRandomFile(initialContents).then(file => {
return workspace.openTextDocument(file).then(doc => {
return window.showTextDocument(doc).then((editor) => {
- return editor.edit((builder) => {
- builder.insert(new Position(0, 0), 'Hello World');
- }).then(applied => {
- assert.ok(applied);
- assert.equal(doc.getText(), 'Hello World');
- assert.ok(doc.isDirty);
-
- return doc.save().then(saved => {
- assert.ok(saved);
- assert.ok(!doc.isDirty);
-
+ return run(editor, doc).then(_ => {
+ if (doc.isDirty) {
+ return doc.save().then(saved => {
+ assert.ok(saved);
+ assert.ok(!doc.isDirty);
+ return deleteFile(file);
+ });
+ } else {
return deleteFile(file);
- });
+ }
});
});
});
});
+ }
+
+ test('make edit', () => {
+ return withRandomFileEditor('', (editor, doc) => {
+ return editor.edit((builder) => {
+ builder.insert(new Position(0, 0), 'Hello World');
+ }).then(applied => {
+ assert.ok(applied);
+ assert.equal(doc.getText(), 'Hello World');
+ assert.ok(doc.isDirty);
+ });
+ });
});
test('issue #6281: Edits fail to validate ranges correctly before applying', () => {
- return createRandomFile('Hello world!').then(file => {
- return workspace.openTextDocument(file).then(doc => {
- return window.showTextDocument(doc).then((editor) => {
- return editor.edit((builder) => {
- builder.replace(new Range(0, 0, Number.MAX_VALUE, Number.MAX_VALUE), 'new');
- }).then(applied => {
- assert.ok(applied);
- assert.equal(doc.getText(), 'new');
- assert.ok(doc.isDirty);
-
- return doc.save().then(saved => {
- assert.ok(saved);
- assert.ok(!doc.isDirty);
-
- return deleteFile(file);
- });
- });
- });
+ return withRandomFileEditor('Hello world!', (editor, doc) => {
+ return editor.edit((builder) => {
+ builder.replace(new Range(0, 0, Number.MAX_VALUE, Number.MAX_VALUE), 'new');
+ }).then(applied => {
+ assert.ok(applied);
+ assert.equal(doc.getText(), 'new');
+ assert.ok(doc.isDirty);
});
});
});
-});
\ No newline at end of file
+
+ function executeReplace(editor:vscode.TextEditor, range:Range, text:string, undoStopBefore:boolean, undoStopAfter: boolean): Thenable {
+ return editor.edit((builder) => {
+ builder.replace(range, text);
+ }, { undoStopBefore: undoStopBefore, undoStopAfter: undoStopAfter });
+ }
+
+ test('TextEditor.edit can control undo/redo stack 1', () => {
+ return withRandomFileEditor('Hello world!', (editor, doc) => {
+ return executeReplace(editor, new Range(0, 0, 0, 1), 'h', false, false).then(applied => {
+ assert.ok(applied);
+ assert.equal(doc.getText(), 'hello world!');
+ assert.ok(doc.isDirty);
+ return executeReplace(editor, new Range(0, 1, 0, 5), 'ELLO', false, false);
+ }).then(applied => {
+ assert.ok(applied);
+ assert.equal(doc.getText(), 'hELLO world!');
+ assert.ok(doc.isDirty);
+ return commands.executeCommand('undo');
+ }).then(_ => {
+ assert.equal(doc.getText(), 'Hello world!');
+ });
+ });
+ });
+
+ test('TextEditor.edit can control undo/redo stack 2', () => {
+ return withRandomFileEditor('Hello world!', (editor, doc) => {
+ return executeReplace(editor, new Range(0, 0, 0, 1), 'h', false, false).then(applied => {
+ assert.ok(applied);
+ assert.equal(doc.getText(), 'hello world!');
+ assert.ok(doc.isDirty);
+ return executeReplace(editor, new Range(0, 1, 0, 5), 'ELLO', true, false);
+ }).then(applied => {
+ assert.ok(applied);
+ assert.equal(doc.getText(), 'hELLO world!');
+ assert.ok(doc.isDirty);
+ return commands.executeCommand('undo');
+ }).then(_ => {
+ assert.equal(doc.getText(), 'hello world!');
+ });
+ });
+ });
+});
diff --git a/extensions/vscode-api-tests/src/window.test.ts b/extensions/vscode-api-tests/src/window.test.ts
index df4b7d080f6..2ac8d8add8e 100644
--- a/extensions/vscode-api-tests/src/window.test.ts
+++ b/extensions/vscode-api-tests/src/window.test.ts
@@ -206,6 +206,32 @@ suite('window namespace tests', () => {
});
});
+ test('showQuickPick, canceled by another picker', function () {
+
+ const result = window.showQuickPick(['eins', 'zwei', 'drei'], { ignoreFocusOut: true }).then(result => {
+ assert.equal(result, undefined);
+ });
+
+ const source = new CancellationTokenSource();
+ source.cancel();
+ window.showQuickPick(['eins', 'zwei', 'drei'], undefined, source.token);
+
+ return result;
+ });
+
+ test('showQuickPick, canceled by input', function () {
+
+ const result = window.showQuickPick(['eins', 'zwei', 'drei'], { ignoreFocusOut: true }).then(result => {
+ assert.equal(result, undefined);
+ });
+
+ const source = new CancellationTokenSource();
+ source.cancel();
+ window.showInputBox(undefined, source.token);
+
+ return result;
+ });
+
test('editor, selection change kind', () => {
return workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => window.showTextDocument(doc)).then(editor => {
@@ -225,4 +251,19 @@ suite('window namespace tests', () => {
});
});
+
+ test('createTerminal, Terminal.name', () => {
+ var terminal = window.createTerminal('foo');
+ assert.equal(terminal.name, 'foo');
+
+ assert.throws(() => {
+ terminal.name = 'bar';
+ }, 'Terminal.name should be readonly');
+ });
+
+ test('createTerminal, immediate Terminal.sendText', () => {
+ var terminal = window.createTerminal();
+ // This should not throw an exception
+ terminal.sendText('echo "foo"');
+ });
});
diff --git a/extensions/vscode-api-tests/src/workspace.test.ts b/extensions/vscode-api-tests/src/workspace.test.ts
index e3682d20f90..3ec3b3d5046 100644
--- a/extensions/vscode-api-tests/src/workspace.test.ts
+++ b/extensions/vscode-api-tests/src/workspace.test.ts
@@ -41,10 +41,10 @@ suite('workspace-namespace', () => {
assert.throws(() => config['get'] = 'get-prop');
});
- test('configuration, getConfig/value', () => {
- const value = workspace.getConfiguration('farboo.config0');
- assert.equal(Object.keys(value).length, 3);
- });
+ // 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));
diff --git a/gulpfile.js b/gulpfile.js
index 204ac7b60c0..3a90599b4fd 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -29,6 +29,7 @@ const assign = require('object-assign');
const monacodts = require('./build/monaco/api');
const fs = require('fs');
const glob = require('glob');
+const pkg = require('./package.json');
const rootDir = path.join(__dirname, 'src');
const options = require('./src/tsconfig.json').compilerOptions;
@@ -215,7 +216,7 @@ gulp.task('mixin', function () {
return;
}
- const url = 'https://github.com/' + repo + '/archive/master.zip';
+ const url = `https://github.com/${ repo }/archive/${ pkg.distro }.zip`;
const opts = { base: '' };
const username = process.env['VSCODE_MIXIN_USERNAME'];
const password = process.env['VSCODE_MIXIN_PASSWORD'];
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 5825ce03550..76a1e213008 100644
--- a/i18n/chs/src/vs/code/electron-main/menus.i18n.json
+++ b/i18n/chs/src/vs/code/electron-main/menus.i18n.json
@@ -79,7 +79,7 @@
"miSaveAll": "全部保存(&&L)",
"miSaveAs": "另存为(&&A)...",
"miSelectAll": "全选(&&S)",
- "miSelectTheme": "颜色主题(&&C)",
+ "miSelectColorTheme": "颜色主题(&&C)",
"miSplitEditor": "拆分编辑器(&&E)",
"miSwitchEditor": "切换编辑器(&&E)",
"miSwitchGroup": "切换组(&&G)",
diff --git a/i18n/chs/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/chs/src/vs/editor/common/services/modelServiceImpl.i18n.json
index 97b24135282..e6fb5879262 100644
--- a/i18n/chs/src/vs/editor/common/services/modelServiceImpl.i18n.json
+++ b/i18n/chs/src/vs/editor/common/services/modelServiceImpl.i18n.json
@@ -4,5 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "indentAutoMigrate": "请更新设置: \"editor.detectIndentation\" 替换 \"editor.tabSize\": \"auto\" 或 \"editor.insertSpaces\": \"auto\""
+ "indentAutoMigrate": "请更新设置: \"editor.detectIndentation\" 替换 \"editor.tabSize\": \"auto\" 或 \"editor.insertSpaces\": \"auto\"",
+ "sourceAndDiagMessage": "[{0}] {1}"
}
\ 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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestController.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/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/chs/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
index 8b6ad71cd4e..454901a7673 100644
--- a/i18n/chs/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
+++ b/i18n/chs/src/vs/platform/extensionManagement/node/extensionGalleryService.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
+{
+ "noCompatible": "找不到可与此代码版本兼容的 {0} 版本。"
+}
\ No newline at end of file
diff --git a/i18n/chs/src/vs/platform/request/common/request.i18n.json b/i18n/chs/src/vs/platform/request/common/request.i18n.json
index 8b6ad71cd4e..c5c8524e89f 100644
--- a/i18n/chs/src/vs/platform/request/common/request.i18n.json
+++ b/i18n/chs/src/vs/platform/request/common/request.i18n.json
@@ -3,4 +3,8 @@
* 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
+{
+ "httpConfigurationTitle": "HTTP",
+ "proxy": "要使用的代理设置。如果尚未设置,则将从 http_proxy 和 https_proxy 环境变量获取",
+ "strictSSL": "是否应根据提供的 CA 列表验证代理服务器证书。"
+}
\ No newline at end of file
diff --git a/i18n/chs/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/chs/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.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/electron-browser/integration.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/integration.i18n.json
index cf90c4eca98..77ca69f9d12 100644
--- a/i18n/chs/src/vs/workbench/electron-browser/integration.i18n.json
+++ b/i18n/chs/src/vs/workbench/electron-browser/integration.i18n.json
@@ -6,6 +6,10 @@
{
"copy": "复制",
"cut": "剪切",
+ "files": "文件",
+ "folders": "文件夹",
+ "openRecentPlaceHolder": "选择要打开的路径(在新窗口中按住 Ctrl 键打开)",
+ "openRecentPlaceHolderMac": "选择路径(在新窗口中按住 Cmd 键打开)",
"paste": "粘贴",
"redo": "恢复",
"selectAll": "全选",
diff --git a/i18n/chs/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
index 8b6ad71cd4e..481448137ef 100644
--- a/i18n/chs/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
+++ b/i18n/chs/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
@@ -3,4 +3,24 @@
* 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
+{
+ "aborted": "已中止",
+ "again": "在继续操作之前,请先从“{1}”中删除“{0}”。",
+ "cancel": "取消",
+ "cancel2": "取消",
+ "cantCreateBinFolder": "无法创建 \"/usr/local/bin\"。",
+ "changeNow": "立即更改",
+ "continue": "继续",
+ "editFile": "编辑“{0}”",
+ "exists": "请删除“{1}”(行 {2})中的别名引用“{0}”,然后重试此操作。",
+ "install": "在 PATH 中安装“{0}”命令",
+ "later": "稍后",
+ "laterInfo": "请记住,你始终可以从命令面板运行“{0}”操作。",
+ "ok": "确定",
+ "shellCommand": "Shell 命令",
+ "successFrom": "已成功从 PATH 卸载 Shell 命令“{0}”。",
+ "successIn": "已成功在 PATH 中安装了 Shell 命令“{0}”。",
+ "uninstall": "从 PATH 中卸载“{0}”命令",
+ "update": "代码需要更改“{0}”shell 命令。是否要立即执行此操作?",
+ "warnEscalation": "代码将通过 \"osascript\" 提示需要管理员权限才可安装 shell 命令。"
+}
\ 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 8da8023963d..78cc59d4185 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
@@ -14,6 +14,7 @@
"continueDebug": "继续",
"deactivateBreakpoints": "停用断点",
"debugActionLabelAndKeybinding": "{0} ({1})",
+ "debugAddToWatch": "调试: 添加到监视",
"debugConsoleAction": "调试控制台",
"debugEvaluate": "调试: 评估",
"disableAllBreakpoints": "禁用所有断点",
diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.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/extensions/electron-browser/extensionEditor.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
index 8d9049730df..c947c47244e 100644
--- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
+++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
@@ -4,6 +4,14 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "command name": "名称",
+ "debugger name": "名称",
+ "description": "描述",
+ "details": "详细信息",
+ "keyboard shortcuts": "键盘快捷方式(&&K)",
"license": "许可证",
- "noReadme": "无可用自述文件。"
+ "noReadme": "无可用自述文件。",
+ "runtime": "运行时",
+ "setting name": "名称",
+ "snippets": "代码片段"
}
\ No newline at end of file
diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
index c4d5594f60a..d150fc50177 100644
--- a/i18n/chs/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
+++ b/i18n/chs/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "acceptLocalChanges": "覆盖",
+ "acceptLocalChanges": "使用本地更改并覆盖磁盘内容",
"compareChanges": "比较",
"conflictingFileHasChanged": "磁盘上的文件内容已更改,比较编辑器的左侧已刷新。请再次审查和解析。",
"discard": "放弃",
@@ -13,8 +13,8 @@
"readonlySaveError": "无法保存“{0}”: 文件写保护。选择“覆盖”以删除保护。 ",
"resolveSaveConflict": "{0} - 解析保存冲突",
"retry": "重试",
- "revertLocalChanges": "还原",
+ "revertLocalChanges": "放弃本地更改,还原为磁盘上的内容",
"saveConflictDiffLabel": "{0} - 磁盘上 ↔ {1} 中",
"staleSaveError": "无法保存“{0}”: 磁盘上的内容较新。单击 **比较** 以比较你的版本和磁盘上的版本。",
- "userGuide": "选择**还原**以放弃所做的更改或使用**覆盖**以将磁盘上的内容替换为所做的更改"
+ "userGuide": "使用编辑器工具栏中的操作 **撤消** 更改或用更改 **覆盖** 磁盘上的内容"
}
\ 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 d100e66927c..b5572fc8659 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
@@ -5,6 +5,7 @@
// Do not edit this file. It is machine generated.
{
"findMore": "在应用商店中查找更多信息...",
+ "noIconThemeLabel": "无",
"preferences": "首选项",
"problemChangingTheme": "加载主题时出现问题: {0}",
"selectTheme.label": "颜色主题",
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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.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/services/themes/electron-browser/themeService.i18n.json b/i18n/chs/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
index 7a26089460e..f1c6a031f22 100644
--- a/i18n/chs/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
+++ b/i18n/chs/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "error.cannotloadicontheme": "无法加载 {0}",
"error.cannotloadtheme": "无法加载 {0}",
"error.cannotparse": "分析 plist 文件 {0} 时出现问题",
"error.cannotparsejson": "分析 JSON 主题文件 {0} 时出现问题",
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 f38ecd5493a..86d5efd8bc2 100644
--- a/i18n/cht/src/vs/code/electron-main/menus.i18n.json
+++ b/i18n/cht/src/vs/code/electron-main/menus.i18n.json
@@ -79,7 +79,7 @@
"miSaveAll": "全部儲存(&&L)",
"miSaveAs": "另存新檔(&&A)...",
"miSelectAll": "全選(&&S)",
- "miSelectTheme": "色彩佈景主題(&&C)",
+ "miSelectColorTheme": "色彩佈景主題(&&C)",
"miSplitEditor": "分割編輯器(&&E)",
"miSwitchEditor": "切換編輯器(&&E)",
"miSwitchGroup": "切換群組(&&G)",
diff --git a/i18n/cht/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/cht/src/vs/editor/common/services/modelServiceImpl.i18n.json
index dec878c9c73..804fc567db9 100644
--- a/i18n/cht/src/vs/editor/common/services/modelServiceImpl.i18n.json
+++ b/i18n/cht/src/vs/editor/common/services/modelServiceImpl.i18n.json
@@ -4,5 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "indentAutoMigrate": "請更新您的設定: `editor.detect Indentation` 會取代 `editor.tabSize`: \"auto\" 或 `editor.insertSpaces`: \"auto\""
+ "indentAutoMigrate": "請更新您的設定: `editor.detect Indentation` 會取代 `editor.tabSize`: \"auto\" 或 `editor.insertSpaces`: \"auto\"",
+ "sourceAndDiagMessage": "[{0}] {1}"
}
\ 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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestController.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/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/cht/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
index 8b6ad71cd4e..68257c60f40 100644
--- a/i18n/cht/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
+++ b/i18n/cht/src/vs/platform/extensionManagement/node/extensionGalleryService.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
+{
+ "noCompatible": "找不到與此 Code 版本相容的 {0} 版本。"
+}
\ No newline at end of file
diff --git a/i18n/cht/src/vs/platform/request/common/request.i18n.json b/i18n/cht/src/vs/platform/request/common/request.i18n.json
index 8b6ad71cd4e..0eb2e358110 100644
--- a/i18n/cht/src/vs/platform/request/common/request.i18n.json
+++ b/i18n/cht/src/vs/platform/request/common/request.i18n.json
@@ -3,4 +3,8 @@
* 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
+{
+ "httpConfigurationTitle": "HTTP",
+ "proxy": "要使用的 Proxy 設定。如果未設定,會從 http_proxy 與 https_proxy 環境變數取得設定。",
+ "strictSSL": "是否應該針對提供的 CA 清單驗證 Proxy 伺服器憑證。"
+}
\ No newline at end of file
diff --git a/i18n/cht/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/cht/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.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/electron-browser/integration.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/integration.i18n.json
index 87b2094e5d6..9e8cdf97d57 100644
--- a/i18n/cht/src/vs/workbench/electron-browser/integration.i18n.json
+++ b/i18n/cht/src/vs/workbench/electron-browser/integration.i18n.json
@@ -6,6 +6,10 @@
{
"copy": "複製",
"cut": "剪下",
+ "files": "檔案",
+ "folders": "資料夾",
+ "openRecentPlaceHolder": "選取要開啟的路徑 (按住 Ctrl 鍵以在新視窗開啟)",
+ "openRecentPlaceHolderMac": "選取路徑 (按住 Cmd 鍵以在新視窗開啟)",
"paste": "貼上",
"redo": "取消復原",
"selectAll": "全選",
diff --git a/i18n/cht/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
index 8b6ad71cd4e..6f2ae9d5277 100644
--- a/i18n/cht/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
+++ b/i18n/cht/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
@@ -3,4 +3,24 @@
* 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
+{
+ "aborted": "已中止",
+ "again": "請從 '{1}' 移除 '{0}' 別名後再繼續。",
+ "cancel": "取消",
+ "cancel2": "取消",
+ "cantCreateBinFolder": "無法建立 '/usr/local/bin'。",
+ "changeNow": "立即變更",
+ "continue": "繼續",
+ "editFile": "編輯 '{0}'",
+ "exists": "請移除參考 '{1}' (第 {2} 行) 中之 '{0}' 的別名,然後重試此動作。",
+ "install": "在 PATH 中安裝 '{0}' 命令",
+ "later": "稍後",
+ "laterInfo": "請記住,您一律可以從命令選擇區執行 '{0}' 動作。",
+ "ok": "確定",
+ "shellCommand": "殼層命令",
+ "successFrom": "已成功從 PATH 解除安裝殼層命令 '{0}'。",
+ "successIn": "已成功在 PATH 中安裝殼層命令 '{0}'。",
+ "uninstall": "從 PATH 將 '{0}' 命令解除安裝 ",
+ "update": "Code 必須變更 '{0}' 殼層命令。要立即執行此作業嗎?",
+ "warnEscalation": "Code 現在會提示輸入 'osascript' 取得系統管理員權限,以便安裝殼層命令。"
+}
\ 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 a2d6b004445..548cd2b719a 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
@@ -14,6 +14,7 @@
"continueDebug": "繼續",
"deactivateBreakpoints": "停用中斷點",
"debugActionLabelAndKeybinding": "{0} ({1})",
+ "debugAddToWatch": "偵錯: 加入監看",
"debugConsoleAction": "偵錯主控台",
"debugEvaluate": "偵錯: 評估",
"disableAllBreakpoints": "停用所有中斷點",
diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.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/extensions/electron-browser/extensionEditor.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
index ef768511e9c..7c391984b8e 100644
--- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
+++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
@@ -4,6 +4,14 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "command name": "名稱",
+ "debugger name": "名稱",
+ "description": "描述",
+ "details": "詳細資料",
+ "keyboard shortcuts": "鍵盤快速鍵(&&K)",
"license": "授權",
- "noReadme": "沒有可用的讀我檔案。"
+ "noReadme": "沒有可用的讀我檔案。",
+ "runtime": "執行階段",
+ "setting name": "名稱",
+ "snippets": "程式碼片段"
}
\ No newline at end of file
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 6a34d3ff696..291ec2e34e6 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
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "acceptLocalChanges": "覆寫",
+ "acceptLocalChanges": "使用本機變更並覆寫磁碟內容",
"compareChanges": "比較",
"conflictingFileHasChanged": "磁碟上的檔案內容已變更,而且已重新整理比較編輯器左側。請重新檢閱並加以解決。",
"discard": "捨棄",
@@ -13,8 +13,8 @@
"readonlySaveError": "無法儲存 '{0}': 檔案有防寫保護。請選取 [覆寫] 以移除保護。",
"resolveSaveConflict": "{0} - 解決儲存衝突",
"retry": "重試",
- "revertLocalChanges": "還原",
+ "revertLocalChanges": "捨棄本機變更並還原成磁碟上的內容",
"saveConflictDiffLabel": "{0} - 磁碟上 ↔ {1} 中",
"staleSaveError": "無法儲存 '{0}': 磁碟上的內容較新。請按一下 [比較],比較您的版本與磁碟上的版本。",
- "userGuide": "請選取 [還原] 捨棄您的變更;或選取 [覆寫],以您的變更取代磁碟上的內容"
+ "userGuide": "使用編輯器工具列中的動作來「復原」您的變更,或以您的變更「覆寫」磁碟上的內容"
}
\ 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 0ea2bc28e56..f2367c6e915 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
@@ -5,6 +5,7 @@
// Do not edit this file. It is machine generated.
{
"findMore": "在 Marketplace 可找到更多...",
+ "noIconThemeLabel": "無",
"preferences": "喜好設定",
"problemChangingTheme": "載入佈景主題時發生問題: {0}",
"selectTheme.label": "色彩佈景主題",
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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.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/services/themes/electron-browser/themeService.i18n.json b/i18n/cht/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
index 1396e605d25..4e72bf40b9c 100644
--- a/i18n/cht/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
+++ b/i18n/cht/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "error.cannotloadicontheme": "無法載入 {0}",
"error.cannotloadtheme": "無法載入 {0}",
"error.cannotparse": "剖析 plist 檔案時發生問題: {0}",
"error.cannotparsejson": "剖析 JSON 佈景主題檔案時發生問題: {0}",
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 3239583aa6f..5f079d08e2c 100644
--- a/i18n/deu/src/vs/code/electron-main/menus.i18n.json
+++ b/i18n/deu/src/vs/code/electron-main/menus.i18n.json
@@ -79,7 +79,7 @@
"miSaveAll": "A&&lles speichern",
"miSaveAs": "Speichern &&unter...",
"miSelectAll": "&&Alles auswählen",
- "miSelectTheme": "&&Farbdesign",
+ "miSelectColorTheme": "&&Farbdesign",
"miSplitEditor": "&&Editor teilen",
"miSwitchEditor": "&&Editor wechseln",
"miSwitchGroup": "&&Gruppe wechseln",
diff --git a/i18n/deu/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/deu/src/vs/editor/common/services/modelServiceImpl.i18n.json
index 62b9ce82a50..da8500b1afd 100644
--- a/i18n/deu/src/vs/editor/common/services/modelServiceImpl.i18n.json
+++ b/i18n/deu/src/vs/editor/common/services/modelServiceImpl.i18n.json
@@ -4,5 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "indentAutoMigrate": "Bitte aktualisieren Sie Ihre Einstellungen: \"editor.detectIndentation\" ersetzt \"editor.tabSize\": \"auto\" oder \"editor.insertSpaces\": \"auto\""
+ "indentAutoMigrate": "Bitte aktualisieren Sie Ihre Einstellungen: \"editor.detectIndentation\" ersetzt \"editor.tabSize\": \"auto\" oder \"editor.insertSpaces\": \"auto\"",
+ "sourceAndDiagMessage": "[{0}] {1}"
}
\ 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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestController.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/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/deu/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
index 8b6ad71cd4e..f99598fc253 100644
--- a/i18n/deu/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
+++ b/i18n/deu/src/vs/platform/extensionManagement/node/extensionGalleryService.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
+{
+ "noCompatible": "Eine kompatible Version von {0} mit dieser Version des Codes wurde nicht gefunden."
+}
\ No newline at end of file
diff --git a/i18n/deu/src/vs/platform/request/common/request.i18n.json b/i18n/deu/src/vs/platform/request/common/request.i18n.json
index 8b6ad71cd4e..be52abf7e99 100644
--- a/i18n/deu/src/vs/platform/request/common/request.i18n.json
+++ b/i18n/deu/src/vs/platform/request/common/request.i18n.json
@@ -3,4 +3,8 @@
* 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
+{
+ "httpConfigurationTitle": "HTTP",
+ "proxy": "Die zu verwendende Proxyeinstellung. Wenn diese Option nicht festgelegt wird, wird der Wert aus den Umgebungsvariablen \"http_proxy\" und \"https_proxy\" übernommen.",
+ "strictSSL": "Gibt an, ob das Proxyserverzertifikat anhand der Liste der bereitgestellten Zertifizierungsstellen überprüft werden soll."
+}
\ No newline at end of file
diff --git a/i18n/deu/src/vs/workbench/browser/actions/openSettings.i18n.json b/i18n/deu/src/vs/workbench/browser/actions/openSettings.i18n.json
index 108a20338b2..5fede61d547 100644
--- a/i18n/deu/src/vs/workbench/browser/actions/openSettings.i18n.json
+++ b/i18n/deu/src/vs/workbench/browser/actions/openSettings.i18n.json
@@ -5,11 +5,11 @@
// Do not edit this file. It is machine generated.
{
"defaultKeybindings": "Standard-Tastaturkurzbefehle",
- "defaultKeybindingsHeader": "Überschreiben Sie Tastenbindungen, indem Sie sie in die Tastenbindungsdatei einfügen.",
+ "defaultKeybindingsHeader": "Überschreiben Sie Tastenzuordnungen, indem Sie sie in die Tastenzuordnungsdatei einfügen.",
"defaultName": "Standardeinstellungen",
"defaultSettingsHeader": "Überschreiben Sie Einstellungen, indem Sie sie in die Einstellungsdatei einfügen.",
"defaultSettingsHeader2": "Unter http://go.microsoft.com/fwlink/?LinkId=808995 finden Sie die am häufigsten verwendeten Einstellungen.",
- "emptyKeybindingsHeader": "Platzieren Sie Ihre Tastenbindungen in dieser Datei, um die Standardwerte zu überschreiben.",
+ "emptyKeybindingsHeader": "Platzieren Sie Ihre Tastenzuordnungen in dieser Datei, um die Standardwerte zu überschreiben.",
"emptySettingsHeader": "Platzieren Sie Ihre Einstellungen in dieser Datei, um die Standardeinstellungen zu überschreiben.",
"emptySettingsHeader1": "Platzieren Sie Ihre Einstellungen in dieser Datei, um Standard- und Benutzereinstellungen zu überschreiben.",
"fail.createSettings": "{0} ({1}) kann nicht erstellt werden.",
diff --git a/i18n/deu/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/deu/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.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/electron-browser/integration.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/integration.i18n.json
index cd66a933e56..3aff4d86d2f 100644
--- a/i18n/deu/src/vs/workbench/electron-browser/integration.i18n.json
+++ b/i18n/deu/src/vs/workbench/electron-browser/integration.i18n.json
@@ -6,6 +6,10 @@
{
"copy": "Kopieren",
"cut": "Ausschneiden",
+ "files": "Dateien",
+ "folders": "Ordner",
+ "openRecentPlaceHolder": "Wählen Sie einen zu öffnenden Pfad aus (halten Sie STRG gedrückt, um ein neues Fenster zu öffnen).",
+ "openRecentPlaceHolderMac": "Wählen Sie einen Pfad aus (halten Sie die BEFEHLSTASTE gedrückt, um ein neues Fenster zu öffnen).",
"paste": "Einfügen",
"redo": "Wiederholen",
"selectAll": "Alles auswählen",
diff --git a/i18n/deu/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
index 8b6ad71cd4e..f0a7e810cd3 100644
--- a/i18n/deu/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
+++ b/i18n/deu/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
@@ -3,4 +3,24 @@
* 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
+{
+ "aborted": "Abgebrochen",
+ "again": "Bitte entfernen Sie den {0}-Alias aus \"{1}\", bevor Sie fortfahren.",
+ "cancel": "Abbrechen",
+ "cancel2": "Abbrechen",
+ "cantCreateBinFolder": "/usr/local/bin kann nicht erstellt werden.",
+ "changeNow": "Jetzt ändern",
+ "continue": "Weiter",
+ "editFile": "{0} bearbeiten",
+ "exists": "Bitte entfernen Sie den Alias in \"{1}\" (Zeile {2}), der auf \"{0}\" verweist, und wiederholen Sie diese Aktion.",
+ "install": "Befehl \"{0}\" in \"PATH\" installieren",
+ "later": "Später",
+ "laterInfo": "Denken Sie daran, dass Sie die Aktion \"{0}\" immer über die Befehlspalette ausführen können.",
+ "ok": "OK",
+ "shellCommand": "Shellbefehl",
+ "successFrom": "Der Shellbefehl \"{0}\" wurde erfolgreich aus \"PATH\" deinstalliert.",
+ "successIn": "Der Shellbefehl \"{0}\" wurde erfolgreich in \"PATH\" installiert.",
+ "uninstall": "Befehl \"{0}\" aus \"PATH\" deinstallieren",
+ "update": "Der Code muss den Shellbefehl \"{0}\" ändern. Möchten Sie diesen Vorgang jetzt ausführen?",
+ "warnEscalation": "Der Code fordert nun mit \"osascript\" zur Eingabe von Administratorberechtigungen auf, um den Shellbefehl zu installieren."
+}
\ 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 118bd2d2638..744c0143a77 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
@@ -14,6 +14,7 @@
"continueDebug": "Weiter",
"deactivateBreakpoints": "Haltepunkte deaktivieren",
"debugActionLabelAndKeybinding": "{0} ({1})",
+ "debugAddToWatch": "Debuggen: Zur Überwachung hinzufügen",
"debugConsoleAction": "Debugkonsole",
"debugEvaluate": "Debuggen: Auswerten",
"disableAllBreakpoints": "Alle Haltepunkte deaktivieren",
diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.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/extensions/electron-browser/extensionEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
index f2b16eea542..970c53c49bf 100644
--- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
+++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
@@ -4,6 +4,14 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "command name": "Name",
+ "debugger name": "Name",
+ "description": "Beschreibung",
+ "details": "Details",
+ "keyboard shortcuts": "&&Tastenkombinationen",
"license": "Lizenz",
- "noReadme": "Keine INFODATEI verfügbar."
+ "noReadme": "Keine INFODATEI verfügbar.",
+ "runtime": "Laufzeit",
+ "setting name": "Name",
+ "snippets": "Codeausschnitte"
}
\ No newline at end of file
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 9bf3939a661..ff1e037629e 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
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "acceptLocalChanges": "Überschreiben",
+ "acceptLocalChanges": "Lokale Änderungen verwenden und Datenträgerinhalte überschreiben",
"compareChanges": "Vergleichen",
"conflictingFileHasChanged": "Der Inhalt der Datei auf dem Datenträger hat sich geändert, und die linke Seite des Vergleichs-Editors wurde aktualisiert. Bitte überprüfen Sie die Datei, und lösen Sie Konflikte erneut auf.",
"discard": "Verwerfen",
@@ -13,8 +13,8 @@
"readonlySaveError": "Fehler beim Speichern von \"{0}\": Die Datei ist schreibgeschützt. Wählen Sie 'Überschreiben' aus, um den Schutz aufzuheben.",
"resolveSaveConflict": "{0} – Speicherkonflikt auflösen",
"retry": "Wiederholen",
- "revertLocalChanges": "Wiederherstellen",
+ "revertLocalChanges": "Lokale Änderungen verwerfen und Inhalt auf dem Datenträger wiederherstellen",
"saveConflictDiffLabel": "{0}– auf Datenträger ↔ in{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.",
- "userGuide": "Wählen Sie **Wiederherstellen** aus, um Ihre Änderungen zu verwerfen, oder **Überschreiben**, um den Inhalt auf dem Datenträger durch Ihre Änderungen zu ersetzen."
+ "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/themes/electron-browser/themes.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json
index 49a04d1fac9..07edb010ee5 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
@@ -5,6 +5,7 @@
// Do not edit this file. It is machine generated.
{
"findMore": "Weitere in Marketplace suchen...",
+ "noIconThemeLabel": "Keine",
"preferences": "Einstellungen",
"problemChangingTheme": "Problem beim Laden des Designs: {0}",
"selectTheme.label": "Farbdesign",
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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.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/services/themes/electron-browser/themeService.i18n.json b/i18n/deu/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
index fd082a541af..d5e42f094a0 100644
--- a/i18n/deu/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
+++ b/i18n/deu/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "error.cannotloadicontheme": "\"{0}\" kann nicht geladen werden.",
"error.cannotloadtheme": "\"{0}\" kann nicht geladen werden.",
"error.cannotparse": "Probleme beim Analysieren der PLIST-Datei: {0}",
"error.cannotparsejson": "Probleme beim Analysieren der JSON-Designdatei: {0}",
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 7abd214d37e..9f8635608db 100644
--- a/i18n/esn/src/vs/code/electron-main/menus.i18n.json
+++ b/i18n/esn/src/vs/code/electron-main/menus.i18n.json
@@ -79,7 +79,7 @@
"miSaveAll": "Guardar t&&odo",
"miSaveAs": "Guardar &&como...",
"miSelectAll": "&&Seleccionar todo",
- "miSelectTheme": "&&Tema de color",
+ "miSelectColorTheme": "&&Tema de color",
"miSplitEditor": "Dividir &&editor",
"miSwitchEditor": "Cambiar &&editor",
"miSwitchGroup": "Cambiar &&grupo",
diff --git a/i18n/esn/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/esn/src/vs/editor/common/services/modelServiceImpl.i18n.json
index 14d769e98dd..90e7452fd91 100644
--- a/i18n/esn/src/vs/editor/common/services/modelServiceImpl.i18n.json
+++ b/i18n/esn/src/vs/editor/common/services/modelServiceImpl.i18n.json
@@ -4,5 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "indentAutoMigrate": "Actualice la configuración: `editor.detectIndentation` reemplaza a `editor.tabSize`: \"auto\" o `editor.insertSpaces`: \"auto\""
+ "indentAutoMigrate": "Actualice la configuración: `editor.detectIndentation` reemplaza a `editor.tabSize`: \"auto\" o `editor.insertSpaces`: \"auto\"",
+ "sourceAndDiagMessage": "[{0}] {1}"
}
\ No newline at end of file
diff --git a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestController.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/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/esn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
index 8b6ad71cd4e..a46b51d7b92 100644
--- a/i18n/esn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
+++ b/i18n/esn/src/vs/platform/extensionManagement/node/extensionGalleryService.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
+{
+ "noCompatible": "No se encontró una versión de {0} compatible con esta versión de Code."
+}
\ No newline at end of file
diff --git a/i18n/esn/src/vs/platform/request/common/request.i18n.json b/i18n/esn/src/vs/platform/request/common/request.i18n.json
index 8b6ad71cd4e..c0ae03c5855 100644
--- a/i18n/esn/src/vs/platform/request/common/request.i18n.json
+++ b/i18n/esn/src/vs/platform/request/common/request.i18n.json
@@ -3,4 +3,8 @@
* 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
+{
+ "httpConfigurationTitle": "HTTP",
+ "proxy": "El valor del proxy que se debe utilizar. Si no se establece, se tomará de las variables de entorno http_proxy y https_proxy",
+ "strictSSL": "Indica si el certificado del servidor proxy debe comprobarse en la lista de entidades de certificación proporcionada."
+}
\ No newline at end of file
diff --git a/i18n/esn/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/esn/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.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/electron-browser/integration.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/integration.i18n.json
index a21c29a98d2..c38b4747f37 100644
--- a/i18n/esn/src/vs/workbench/electron-browser/integration.i18n.json
+++ b/i18n/esn/src/vs/workbench/electron-browser/integration.i18n.json
@@ -6,6 +6,10 @@
{
"copy": "Copiar",
"cut": "Cortar",
+ "files": "archivos",
+ "folders": "carpetas",
+ "openRecentPlaceHolder": "Seleccione una ruta de acceso para abrir (mantenga presionada la tecla Ctrl para abrirla en una nueva ventana)",
+ "openRecentPlaceHolderMac": "Seleccione una ruta de acceso (mantenga presionada la tecla Cmd para abrirla en una nueva ventana)",
"paste": "Pegar",
"redo": "Rehacer",
"selectAll": "Seleccionar todo",
diff --git a/i18n/esn/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
index 8b6ad71cd4e..b274cef029d 100644
--- a/i18n/esn/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
+++ b/i18n/esn/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
@@ -3,4 +3,24 @@
* 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
+{
+ "aborted": "Anulado",
+ "again": "Quite el alias '{0}' de '{1}' antes de continuar.",
+ "cancel": "Cancelar",
+ "cancel2": "Cancelar",
+ "cantCreateBinFolder": "No se puede crear \"/usr/local/bin\".",
+ "changeNow": "Cambiar ahora",
+ "continue": "Continuar",
+ "editFile": "Editar '{0}'",
+ "exists": "Quite el alias que hace referencia a '{0}' en '{1}' (línea {2}) y pruebe a realizar esta acción de nuevo.",
+ "install": "Instalar el comando '{0}' en PATH",
+ "later": "Más tarde",
+ "laterInfo": "Recuerde que siempre puede ejecutar la acción '{0}' desde la paleta de comandos.",
+ "ok": "Aceptar",
+ "shellCommand": "Comando shell",
+ "successFrom": "El comando shell '{0}' se desinstaló correctamente de PATH.",
+ "successIn": "El comando shell '{0}' se instaló correctamente en PATH.",
+ "uninstall": "Desinstalar el comando '{0}' de PATH",
+ "update": "El código debe cambiar el comando shell '{0}'. ¿Quiere hacerlo ahora?",
+ "warnEscalation": "Ahora el código solicitará privilegios de administrador con \"osascript\" para instalar el comando shell."
+}
\ 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 fa7d0c319ec..dc74d9d05e2 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
@@ -14,6 +14,7 @@
"continueDebug": "Continuar",
"deactivateBreakpoints": "Desactivar puntos de interrupción",
"debugActionLabelAndKeybinding": "{0} ({1})",
+ "debugAddToWatch": "Depuración: Agregar a inspección",
"debugConsoleAction": "Consola de depuración",
"debugEvaluate": "Depuración: Evaluar",
"disableAllBreakpoints": "Deshabilitar todos los puntos de interrupción",
diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.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/extensions/electron-browser/extensionEditor.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
index 7cdbceed429..4f80b96f8c1 100644
--- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
+++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
@@ -4,6 +4,14 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "command name": "Nombre",
+ "debugger name": "Nombre",
+ "description": "Descripción",
+ "details": "Detalles",
+ "keyboard shortcuts": "&&Métodos abreviados de teclado",
"license": "Licencia",
- "noReadme": "No hay ningún archivo LÉAME disponible."
+ "noReadme": "No hay ningún archivo LÉAME disponible.",
+ "runtime": "Motor en tiempo de ejecución",
+ "setting name": "Nombre",
+ "snippets": "Fragmentos"
}
\ No newline at end of file
diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
index fe5275dfdd6..2ce0e31f5be 100644
--- a/i18n/esn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
+++ b/i18n/esn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "acceptLocalChanges": "Sobrescribir",
+ "acceptLocalChanges": "Usar cambios locales y sobrescribir contenido del disco",
"compareChanges": "Comparar",
"conflictingFileHasChanged": "El contenido del archivo en el disco ha cambiado y se ha actualizado la parte izquierda del editor de comparación. Revíselo y resuelva de nuevo.",
"discard": "Descartar",
@@ -13,8 +13,8 @@
"readonlySaveError": "No se pudo guardar '{0}': El archivo está protegido contra escritura. Seleccione \"Sobrescribir\" para quitar la protección.",
"resolveSaveConflict": "{0} - Resolver conflicto al guardar",
"retry": "Reintentar",
- "revertLocalChanges": "Revertir",
+ "revertLocalChanges": "Descartar cambios locales y revertir al contenido del disco",
"saveConflictDiffLabel": "{0} - en el disco ↔ en {1}",
"staleSaveError": "No se pudo guardar '{0}': El contenido del disco es más reciente. Haga clic en **Comparar** para comparar su versión con la que hay en el disco.",
- "userGuide": "Seleccione **Revertir** para descartar los cambios o **Sobrescribir** para reemplazar el contenido del disco por los cambios"
+ "userGuide": "Use las acciones de la barra de herramientas del editor para **deshacer** los cambios o **sobrescribir** el contenido del disco con sus cambios."
}
\ 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 bae20cc903e..38bf37ee3c1 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
@@ -5,6 +5,7 @@
// Do not edit this file. It is machine generated.
{
"findMore": "Encontrará más en Marketplace...",
+ "noIconThemeLabel": "Ninguno",
"preferences": "Preferencias",
"problemChangingTheme": "Problema al cargar el tema: {0}",
"selectTheme.label": "Tema de color",
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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.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/services/themes/electron-browser/themeService.i18n.json b/i18n/esn/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
index db8cf6d47a6..d1bd63bc307 100644
--- a/i18n/esn/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
+++ b/i18n/esn/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "error.cannotloadicontheme": "No se puede cargar {0}",
"error.cannotloadtheme": "No se puede cargar {0}",
"error.cannotparse": "Problemas al analizar el archivo plist: {0}",
"error.cannotparsejson": "Problemas al analizar el archivo de tema JSON: {0}",
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 652af2869cc..7aeea0178fb 100644
--- a/i18n/fra/src/vs/code/electron-main/menus.i18n.json
+++ b/i18n/fra/src/vs/code/electron-main/menus.i18n.json
@@ -79,7 +79,7 @@
"miSaveAll": "Enregistrer to&&ut",
"miSaveAs": "Enregistrer &&sous...",
"miSelectAll": "&&Sélectionner tout",
- "miSelectTheme": "Thème de &&couleur",
+ "miSelectColorTheme": "Thème de &&couleur",
"miSplitEditor": "Fractionner l'édit&&eur",
"miSwitchEditor": "Changer d'é&&diteur",
"miSwitchGroup": "Changer de gr&&oupe",
diff --git a/i18n/fra/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/fra/src/vs/editor/common/services/modelServiceImpl.i18n.json
index 594e0ba1a7b..9d083658185 100644
--- a/i18n/fra/src/vs/editor/common/services/modelServiceImpl.i18n.json
+++ b/i18n/fra/src/vs/editor/common/services/modelServiceImpl.i18n.json
@@ -4,5 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "indentAutoMigrate": "Mettez à jour vos paramètres : 'editor.detectIndentation' remplace 'editor.tabSize': \"auto\" ou 'editor.insertSpaces': \"auto\""
+ "indentAutoMigrate": "Mettez à jour vos paramètres : 'editor.detectIndentation' remplace 'editor.tabSize': \"auto\" ou 'editor.insertSpaces': \"auto\"",
+ "sourceAndDiagMessage": "[{0}] {1}"
}
\ 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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestController.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/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/fra/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
index 8b6ad71cd4e..461f8c836b4 100644
--- a/i18n/fra/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
+++ b/i18n/fra/src/vs/platform/extensionManagement/node/extensionGalleryService.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
+{
+ "noCompatible": "Version compatible de {0} introuvable avec cette version de Code."
+}
\ No newline at end of file
diff --git a/i18n/fra/src/vs/platform/request/common/request.i18n.json b/i18n/fra/src/vs/platform/request/common/request.i18n.json
index 8b6ad71cd4e..d5d7b323840 100644
--- a/i18n/fra/src/vs/platform/request/common/request.i18n.json
+++ b/i18n/fra/src/vs/platform/request/common/request.i18n.json
@@ -3,4 +3,8 @@
* 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
+{
+ "httpConfigurationTitle": "HTTP",
+ "proxy": "Paramètre de proxy à utiliser. S'il n'est pas défini, il est récupéré à partir des variables d'environnement http_proxy et https_proxy",
+ "strictSSL": "Spécifie si le certificat de serveur proxy doit être vérifié par rapport à la liste des autorités de certification fournies."
+}
\ No newline at end of file
diff --git a/i18n/fra/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/fra/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.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/electron-browser/integration.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/integration.i18n.json
index 479f7c25f15..0b62855b485 100644
--- a/i18n/fra/src/vs/workbench/electron-browser/integration.i18n.json
+++ b/i18n/fra/src/vs/workbench/electron-browser/integration.i18n.json
@@ -6,6 +6,10 @@
{
"copy": "Copier",
"cut": "Couper",
+ "files": "fichiers",
+ "folders": "dossiers",
+ "openRecentPlaceHolder": "Sélectionner un chemin à ouvrir (maintenir la touche Ctrl enfoncée pour l'ouvrir dans une nouvelle fenêtre)",
+ "openRecentPlaceHolderMac": "Sélectionner un chemin (maintenir la touche Cmd enfoncée pour l'ouvrir dans une nouvelle fenêtre)",
"paste": "Coller",
"redo": "Rétablir",
"selectAll": "Tout Sélectionner",
diff --git a/i18n/fra/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
index 8b6ad71cd4e..b15b85c3e20 100644
--- a/i18n/fra/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
+++ b/i18n/fra/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
@@ -3,4 +3,24 @@
* 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
+{
+ "aborted": "Abandonné",
+ "again": "Supprimez l'alias '{0}' dans '{1}' avant de continuer.",
+ "cancel": "Annuler",
+ "cancel2": "Annuler",
+ "cantCreateBinFolder": "Impossible de créer '/usr/local/bin'.",
+ "changeNow": "Changer maintenant",
+ "continue": "Continuer",
+ "editFile": "Modifier '{0}'",
+ "exists": "Supprimez l'alias faisant référence à '{0}' dans '{1}' (ligne {2}), puis réessayez cette action.",
+ "install": "Installer la commande '{0}' dans PATH",
+ "later": "Plus tard",
+ "laterInfo": "N'oubliez pas que vous pouvez toujours exécuter l'action '{0}' à partir de la palette de commandes.",
+ "ok": "OK",
+ "shellCommand": "Commande d'interpréteur de commandes",
+ "successFrom": "La commande d'interpréteur de commandes '{0}' a été correctement désinstallée à partir de PATH.",
+ "successIn": "La commande d'interpréteur de commandes '{0}' a été correctement installée dans PATH.",
+ "uninstall": "Désinstaller la commande '{0}' de PATH",
+ "update": "Code doit changer la commande d'interpréteur de commandes '{0}'. Voulez-vous le faire maintenant ?",
+ "warnEscalation": "Code va maintenant demander avec 'osascript' des privilèges d'administrateur pour installer la commande d'interpréteur de commandes."
+}
\ 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 b80fb434271..4f584f44d27 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
@@ -14,6 +14,7 @@
"continueDebug": "Continuer",
"deactivateBreakpoints": "Désactiver les points d'arrêt",
"debugActionLabelAndKeybinding": "{0} ({1})",
+ "debugAddToWatch": "Déboguer : ajouter à la fenêtre Espion",
"debugConsoleAction": "Console de débogage",
"debugEvaluate": "Déboguer : évaluer",
"disableAllBreakpoints": "Désactiver tous les points d'arrêt",
diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.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/extensions/electron-browser/extensionEditor.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
index 67c43681a72..f8f264019e3 100644
--- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
+++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
@@ -4,6 +4,14 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "command name": "Nom",
+ "debugger name": "Nom",
+ "description": "Description",
+ "details": "Détails",
+ "keyboard shortcuts": "Racco&&urcis clavier",
"license": "Licence",
- "noReadme": "Aucun fichier README disponible."
+ "noReadme": "Aucun fichier README disponible.",
+ "runtime": "Runtime",
+ "setting name": "Nom",
+ "snippets": "Extraits"
}
\ No newline at end of file
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 88f96521ca5..811f66dd719 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
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "acceptLocalChanges": "Remplacer",
+ "acceptLocalChanges": "Utiliser les modifications locales et remplacer le contenu du disque",
"compareChanges": "Comparer",
"conflictingFileHasChanged": "Le contenu du fichier sur disque a changé. Le côté gauche de l'éditeur de comparaison a été actualisé. Passez le contenu en revue, puis résolvez à nouveau les conflits.",
"discard": "Abandonner",
@@ -13,8 +13,8 @@
"readonlySaveError": "Échec de l'enregistrement de '{0}' : le fichier est protégé en écriture. Sélectionnez 'Remplacer' pour supprimer la protection.",
"resolveSaveConflict": "{0} - Résoudre le conflit d'enregistrement",
"retry": "Réessayer",
- "revertLocalChanges": "Rétablir",
+ "revertLocalChanges": "Ignorer les modifications locales et restaurer le contenu sur disque",
"saveConflictDiffLabel": "{0} - sur disque ↔ dans {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.",
- "userGuide": "Sélectionnez **Rétablir** pour abandonner vos modifications ou **Remplacer** pour remplacer le contenu sur disque par vos modifications"
+ "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/themes/electron-browser/themes.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json
index ea3f46af8a9..aa227d11f0f 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
@@ -5,6 +5,7 @@
// Do not edit this file. It is machine generated.
{
"findMore": "En trouver davantage sur Marketplace...",
+ "noIconThemeLabel": "Aucun",
"preferences": "Préférences",
"problemChangingTheme": "Problème de chargement du thème : {0}",
"selectTheme.label": "Thème de couleur",
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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.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/services/themes/electron-browser/themeService.i18n.json b/i18n/fra/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
index 302396e2087..dfc37060f25 100644
--- a/i18n/fra/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
+++ b/i18n/fra/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "error.cannotloadicontheme": "Impossible de charger {0}",
"error.cannotloadtheme": "Impossible de charger {0}",
"error.cannotparse": "Problèmes durant l'analyse du fichier plist : {0}",
"error.cannotparsejson": "Problèmes durant l'analyse du fichier de thème JSON : {0}",
diff --git a/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json
index 062ddc904bc..02f5c883500 100644
--- a/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json
+++ b/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json
@@ -6,7 +6,7 @@
{
"channelName": "TypeScript",
"noServerFound": "Il percorso {0} non punta a un'installazione valida di tsserver. Le funzionalità del linguaggio TypeScript verranno disabilitate.",
- "serverCouldNotBeStarted": "Non è stato possibile avviare il linguaggio TypeScript. Messaggio di errore: {0}",
+ "serverCouldNotBeStarted": "Non è stato possibile avviare il server di linguaggio TypeScript. Messaggio di errore: {0}",
"serverDied": "Il servizio di linguaggio Typescript è stato arrestato in modo imprevisto per cinque volte negli ultimi cinque minuti. Provare ad aprire una segnalazione bug.",
"serverDiedAfterStart": "Il servizio di linguaggio TypeScript è stato arrestato in modo imprevisto per cinque volte dopo che è stato avviato e non verrà riavviato. Aprire una segnalazione bug.",
"versionNumber.custom": "personalizzato"
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 c285f811783..5e60b17a6b2 100644
--- a/i18n/ita/src/vs/code/electron-main/menus.i18n.json
+++ b/i18n/ita/src/vs/code/electron-main/menus.i18n.json
@@ -79,7 +79,7 @@
"miSaveAll": "Salva &&tutto",
"miSaveAs": "Salva &&con nome...",
"miSelectAll": "&&Seleziona tutto",
- "miSelectTheme": "&&Tema colori",
+ "miSelectColorTheme": "&&Tema colori",
"miSplitEditor": "Dividi &&editor",
"miSwitchEditor": "Cambia &&editor",
"miSwitchGroup": "Cambia &&gruppo",
diff --git a/i18n/ita/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/ita/src/vs/editor/common/services/modelServiceImpl.i18n.json
index 381cc0574a8..d44cf96f046 100644
--- a/i18n/ita/src/vs/editor/common/services/modelServiceImpl.i18n.json
+++ b/i18n/ita/src/vs/editor/common/services/modelServiceImpl.i18n.json
@@ -4,5 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "indentAutoMigrate": "Aggiornare le impostazioni: `editor.detectIndentation` sostituisce `editor.tabSize`: \"auto\" o `editor.insertSpaces`: \"auto\""
+ "indentAutoMigrate": "Aggiornare le impostazioni: `editor.detectIndentation` sostituisce `editor.tabSize`: \"auto\" o `editor.insertSpaces`: \"auto\"",
+ "sourceAndDiagMessage": "[{0}] {1}"
}
\ 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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestController.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/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/ita/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
index 8b6ad71cd4e..dd36704e339 100644
--- a/i18n/ita/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
+++ b/i18n/ita/src/vs/platform/extensionManagement/node/extensionGalleryService.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
+{
+ "noCompatible": "Non è stata trovata una versione di {0} compatibile con questa versione di Visual Studio Code."
+}
\ No newline at end of file
diff --git a/i18n/ita/src/vs/platform/request/common/request.i18n.json b/i18n/ita/src/vs/platform/request/common/request.i18n.json
index 8b6ad71cd4e..98d4a8ba4f3 100644
--- a/i18n/ita/src/vs/platform/request/common/request.i18n.json
+++ b/i18n/ita/src/vs/platform/request/common/request.i18n.json
@@ -3,4 +3,8 @@
* 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
+{
+ "httpConfigurationTitle": "HTTP",
+ "proxy": "Impostazione proxy da usare. Se non è impostata, verrà ottenuta dalle variabili di ambiente http_proxy e https_proxy",
+ "strictSSL": "Indica se il certificato del server proxy deve essere verificato in base all'elenco di CA specificate."
+}
\ No newline at end of file
diff --git a/i18n/ita/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/ita/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.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/electron-browser/integration.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/integration.i18n.json
index 0232551c4b3..f2f7a72a924 100644
--- a/i18n/ita/src/vs/workbench/electron-browser/integration.i18n.json
+++ b/i18n/ita/src/vs/workbench/electron-browser/integration.i18n.json
@@ -6,6 +6,10 @@
{
"copy": "Copia",
"cut": "Taglia",
+ "files": "file",
+ "folders": "cartelle",
+ "openRecentPlaceHolder": "Selezionare un percorso da aprire (tenere premuto CTRL per aprirlo in una nuova finestra)",
+ "openRecentPlaceHolderMac": "Selezionare un percorso (tenere premuto CMD per aprirlo in una nuova finestra)",
"paste": "Incolla",
"redo": "Ripristina",
"selectAll": "Seleziona tutto",
diff --git a/i18n/ita/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
index 8b6ad71cd4e..757130c5260 100644
--- a/i18n/ita/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
+++ b/i18n/ita/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
@@ -3,4 +3,24 @@
* 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
+{
+ "aborted": "Operazione interrotta",
+ "again": "Rimuovere l'alias '{0}' da '{1}' prima di continuare.",
+ "cancel": "Annulla",
+ "cancel2": "Annulla",
+ "cantCreateBinFolder": "Non è possibile creare '/usr/local/bin'.",
+ "changeNow": "Cambia ora",
+ "continue": "Continua",
+ "editFile": "Modifica '{0}'",
+ "exists": "Rimuovere l'alias che fa riferimento a '{0}' in '{1}' (riga {2}) e ripetere l'azione.",
+ "install": "Installa il comando '{0}' in PATH",
+ "later": "In seguito",
+ "laterInfo": "Nota: è sempre possibile eseguire l'azione '{0}' dal riquadro comandi.",
+ "ok": "OK",
+ "shellCommand": "Comando della shell",
+ "successFrom": "Il comando della shell '{0}' è stato disinstallato da PATH.",
+ "successIn": "Il comando della shell '{0}' è stato installato in PATH.",
+ "uninstall": "Disinstalla il comando '{0}' da PATH",
+ "update": "Visual Studio Code deve modificare il comando della shell '{0}'. Eseguire questa operazione?",
+ "warnEscalation": "Visual Studio Code eseguirà 'osascript' per richiedere i privilegi di amministratore per installare il comando della shell."
+}
\ 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 71a3f1fbe4c..3c87f5fd44d 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
@@ -14,6 +14,7 @@
"continueDebug": "Continua",
"deactivateBreakpoints": "Disattiva punti di interruzione",
"debugActionLabelAndKeybinding": "{0} ({1})",
+ "debugAddToWatch": "Debug: Aggiungi a espressione di controllo",
"debugConsoleAction": "Console di debug",
"debugEvaluate": "Debug: Valuta",
"disableAllBreakpoints": "Disabilita tutti i punti di interruzione",
diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.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/extensions/electron-browser/extensionEditor.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
index 2f5a03dac06..b10f440d58b 100644
--- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
+++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
@@ -4,6 +4,14 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "command name": "Nome",
+ "debugger name": "Nome",
+ "description": "Descrizione",
+ "details": "Dettagli",
+ "keyboard shortcuts": "&&Tasti di scelta rapida",
"license": "Licenza",
- "noReadme": "File LEGGIMI non disponibile."
+ "noReadme": "File LEGGIMI non disponibile.",
+ "runtime": "Runtime",
+ "setting name": "Nome",
+ "snippets": "Frammenti"
}
\ No newline at end of file
diff --git a/i18n/ita/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/ita/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
index 514ad175c8f..fa8ea10d96f 100644
--- a/i18n/ita/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
+++ b/i18n/ita/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "acceptLocalChanges": "Sovrascrivi",
+ "acceptLocalChanges": "Usa modifiche locali e sovrascrivi contenuto del disco",
"compareChanges": "Confronta",
"conflictingFileHasChanged": "Il contenuto del file su disco è cambiato e il lato sinistro dell'editor di confronto è stato aggiornato. Rivedere e risolvere di nuovo.",
"discard": "Rimuovi",
@@ -13,8 +13,8 @@
"readonlySaveError": "Non è stato possibile salvare '{0}': il file è protetto da scrittura. Selezionare 'Sovrascrivi' per rimuovere la protezione.",
"resolveSaveConflict": "{0} - Risolvi conflitto di salvataggio",
"retry": "Riprova",
- "revertLocalChanges": "Ripristina",
+ "revertLocalChanges": "Rimuovi modifiche locali e ripristina contenuto su disco",
"saveConflictDiffLabel": "{0} - su disco ↔ in {1}",
"staleSaveError": "Non è stato possibile salvare '{0}': il contenuto sul disco è più recente. Fare clic su **Confronta** per confrontare la versione corrente con quella sul disco.",
- "userGuide": "Selezionare **Ripristina** per annullare le modifiche oppure **Sovrascrivi** per sostituire il contenuto su disco con le modifiche"
+ "userGuide": "Usare le azioni della barra degli strumenti dell'editor per **annullare** le modifiche oppure **sovrascrivere** il contenuto su disco con le modifiche"
}
\ 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 865f9be77b3..f3df83e8b00 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
@@ -5,6 +5,7 @@
// Do not edit this file. It is machine generated.
{
"findMore": "Cerca altro nel Marketplace...",
+ "noIconThemeLabel": "Nessuno",
"preferences": "Preferenze",
"problemChangingTheme": "Problema durante il caricamento del tema: {0}",
"selectTheme.label": "Tema colori",
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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.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/services/themes/electron-browser/themeService.i18n.json b/i18n/ita/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
index 260f15efa46..f5942d67f45 100644
--- a/i18n/ita/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
+++ b/i18n/ita/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "error.cannotloadicontheme": "Non è possibile caricare {0}",
"error.cannotloadtheme": "Non è possibile caricare {0}",
"error.cannotparse": "Problemi durante l'analisi del file plist: {0}",
"error.cannotparsejson": "Problemi durante l'analisi del file di tema di JSON: {0}",
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 08cfb2a87ec..3526a096dff 100644
--- a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json
+++ b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json
@@ -79,7 +79,7 @@
"miSaveAll": "すべて保存(&&L)",
"miSaveAs": "名前を付けて保存(&&A)...",
"miSelectAll": "すべて選択(&&S)",
- "miSelectTheme": "配色テーマ(&&C)",
+ "miSelectColorTheme": "配色テーマ(&&C)",
"miSplitEditor": "エディターを分割(&&E)",
"miSwitchEditor": "エディターの切り替え(&&E)",
"miSwitchGroup": "グループの切り替え(&&G)",
diff --git a/i18n/jpn/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/jpn/src/vs/editor/common/services/modelServiceImpl.i18n.json
index 3ca695feb23..409151d5796 100644
--- a/i18n/jpn/src/vs/editor/common/services/modelServiceImpl.i18n.json
+++ b/i18n/jpn/src/vs/editor/common/services/modelServiceImpl.i18n.json
@@ -4,5 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "indentAutoMigrate": "設定を更新してください: `editor.detectIndentation` は `editor.tabSize`: \"auto\" または `editor.insertSpaces`: \"auto\" を置き換えます"
+ "indentAutoMigrate": "設定を更新してください: `editor.detectIndentation` は `editor.tabSize`: \"auto\" または `editor.insertSpaces`: \"auto\" を置き換えます",
+ "sourceAndDiagMessage": "[{0}] {1}"
}
\ No newline at end of file
diff --git a/i18n/jpn/src/vs/editor/contrib/format/common/formatActions.i18n.json b/i18n/jpn/src/vs/editor/contrib/format/common/formatActions.i18n.json
index ab3299baa08..1774a740981 100644
--- a/i18n/jpn/src/vs/editor/contrib/format/common/formatActions.i18n.json
+++ b/i18n/jpn/src/vs/editor/contrib/format/common/formatActions.i18n.json
@@ -4,5 +4,5 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "formatAction.label": "コードの書式設定"
+ "formatAction.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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestController.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/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/jpn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
index 8b6ad71cd4e..d46cd1d5c0e 100644
--- a/i18n/jpn/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
+++ b/i18n/jpn/src/vs/platform/extensionManagement/node/extensionGalleryService.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
+{
+ "noCompatible": "Code のこのバージョンと互換性のある {0} のバージョンが見つかりませんでした。"
+}
\ No newline at end of file
diff --git a/i18n/jpn/src/vs/platform/request/common/request.i18n.json b/i18n/jpn/src/vs/platform/request/common/request.i18n.json
index 8b6ad71cd4e..ff5ad3f02ae 100644
--- a/i18n/jpn/src/vs/platform/request/common/request.i18n.json
+++ b/i18n/jpn/src/vs/platform/request/common/request.i18n.json
@@ -3,4 +3,8 @@
* 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
+{
+ "httpConfigurationTitle": "HTTP",
+ "proxy": "使用するプロキシ設定。設定されていない場合、環境変数 http_proxy および https_proxy から取得されます。",
+ "strictSSL": "提供された CA の一覧と照らしてプロキシ サーバーの証明書を確認するかどうか。"
+}
\ No newline at end of file
diff --git a/i18n/jpn/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/jpn/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.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/electron-browser/integration.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/integration.i18n.json
index 18a8dcaced3..7a5e0a25566 100644
--- a/i18n/jpn/src/vs/workbench/electron-browser/integration.i18n.json
+++ b/i18n/jpn/src/vs/workbench/electron-browser/integration.i18n.json
@@ -6,6 +6,10 @@
{
"copy": "コピー",
"cut": "切り取り",
+ "files": "ファイル",
+ "folders": "フォルダー",
+ "openRecentPlaceHolder": "パスを選択して開く (Ctrl キーを押しながら新しいウィンドウで開く)",
+ "openRecentPlaceHolderMac": "パスを選択 (Cmd キーを押しながら新しいウィンドウで開く)",
"paste": "貼り付け",
"redo": "やり直し",
"selectAll": "すべて選択",
diff --git a/i18n/jpn/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
index 8b6ad71cd4e..1d730282563 100644
--- a/i18n/jpn/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
+++ b/i18n/jpn/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
@@ -3,4 +3,24 @@
* 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
+{
+ "aborted": "中止されました",
+ "again": "別名 {0}' を '{1}' から削除してから続行してください。",
+ "cancel": "キャンセル",
+ "cancel2": "キャンセル",
+ "cantCreateBinFolder": "'/usr/local/bin' を作成できません。",
+ "changeNow": "今すぐ変更",
+ "continue": "続行",
+ "editFile": "'{0}' の編集",
+ "exists": "'{1}' 内の '{0}' (行 {2}) を参照する別名を削除してから、この操作をやり直してください。",
+ "install": "PATH 内に '{0}' コマンドをインストールします",
+ "later": "後で",
+ "laterInfo": "いつでもコマンド パレットから '{0}' アクションを実行できることに留意してください。",
+ "ok": "OK",
+ "shellCommand": "シェル コマンド",
+ "successFrom": "シェル コマンド '{0}' が PATH から正常にアンインストールされました。",
+ "successIn": "シェル コマンド '{0}' が PATH に正常にインストールされました。",
+ "uninstall": "'{0}' コマンドを PATH からアンインストールします",
+ "update": "Code '{0}' シェル コマンドを変更する必要があります。今すぐ実行してもよろしいですか?",
+ "warnEscalation": "管理者特権でシェル コマンドをインストールできるように、Code が 'osascript' のプロンプトを出します"
+}
\ 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 9880d658f30..b22db929734 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
@@ -14,6 +14,7 @@
"continueDebug": "続行",
"deactivateBreakpoints": "ブレークポイントの非アクティブ化",
"debugActionLabelAndKeybinding": "{0} ({1})",
+ "debugAddToWatch": "デバッグ: ウォッチに追加",
"debugConsoleAction": "デバッグ コンソール",
"debugEvaluate": "デバッグ: 評価",
"disableAllBreakpoints": "すべてのブレークポイントを無効にする",
diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.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/extensions/electron-browser/extensionEditor.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
index 11080c99e23..c01445b815d 100644
--- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
+++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
@@ -4,6 +4,14 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "command name": "名前",
+ "debugger name": "名前",
+ "description": "説明",
+ "details": "詳細",
+ "keyboard shortcuts": "キーボード ショートカット(&&K)",
"license": "ライセンス",
- "noReadme": "利用できる README はありません。"
+ "noReadme": "利用できる README はありません。",
+ "runtime": "ランタイム",
+ "setting name": "名前",
+ "snippets": "スニペット"
}
\ No newline at end of file
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 af7c8691e92..43096b4b661 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
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "acceptLocalChanges": "上書き",
+ "acceptLocalChanges": "ローカルでの変更を使ってディスクの内容を上書きします",
"compareChanges": "比較",
"conflictingFileHasChanged": "ディスク上のファイルの内容が変更され、比較エディターの左側が最新の情報に更新されました。確認して再度解決してください。",
"discard": "破棄",
@@ -13,8 +13,8 @@
"readonlySaveError": "'{0}' の保存に失敗しました。ファイルが書き込み禁止になっています。[上書き] を選択して保護を解除してください。",
"resolveSaveConflict": "{0} - 保存時の競合の解決",
"retry": "再試行",
- "revertLocalChanges": "元に戻す",
+ "revertLocalChanges": "ローカルでの変更を破棄してディスクの内容に戻します",
"saveConflictDiffLabel": "{0} - ディスク上 ↔ {1} 内",
"staleSaveError": "'{0} の保存に失敗しました。ディスクの内容の方が新しくなっています。[比較] をクリックしてご使用のバージョンをディスク上のバージョンと比較してください。",
- "userGuide": "[元に戻す] を選択して変更を破棄するか、または [上書き] を選択してディスクの内容を変更内容に置き換えてください"
+ "userGuide": "エディター ツール バーの操作で、変更を [元に戻す] か、ディスクの内容を変更内容で [上書き] します"
}
\ 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 33344074333..2311c64a3c3 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,6 +5,7 @@
// Do not edit this file. It is machine generated.
{
"findMore": "Marketplace でさらに探す...",
+ "noIconThemeLabel": "なし",
"preferences": "基本設定",
"problemChangingTheme": "テーマの読み込み中に問題が発生しました: {0}",
"selectTheme.label": "配色テーマ",
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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.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/services/themes/electron-browser/themeService.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
index b92525cd606..20973e40913 100644
--- a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
+++ b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "error.cannotloadicontheme": "{0} を読み込めません",
"error.cannotloadtheme": "{0} を読み込めません",
"error.cannotparse": "plist ファイルの解析中に問題が発生しました: {0}",
"error.cannotparsejson": "JSON テーマ ファイルの解析中に問題が発生しました: {0}",
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 601c2073d78..a763667ae92 100644
--- a/i18n/kor/src/vs/code/electron-main/menus.i18n.json
+++ b/i18n/kor/src/vs/code/electron-main/menus.i18n.json
@@ -79,7 +79,7 @@
"miSaveAll": "모두 저장(&&L)",
"miSaveAs": "다른 이름으로 저장(&&A)...",
"miSelectAll": "모두 선택(&&S)",
- "miSelectTheme": "색 테마(&&C)",
+ "miSelectColorTheme": "색 테마(&&C)",
"miSplitEditor": "편집기 분할(&&E)",
"miSwitchEditor": "편집기 전환(&&E)",
"miSwitchGroup": "그룹 전환(&&G)",
diff --git a/i18n/kor/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/kor/src/vs/editor/common/services/modelServiceImpl.i18n.json
index 2848d3e2c10..9665e78488b 100644
--- a/i18n/kor/src/vs/editor/common/services/modelServiceImpl.i18n.json
+++ b/i18n/kor/src/vs/editor/common/services/modelServiceImpl.i18n.json
@@ -4,5 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "indentAutoMigrate": "설정 업데이트 필요: `editor.detectIndentation`은 `editor.tabSize`를 바꿈: \"auto\" 또는 `editor.insertSpaces`: \"auto\""
+ "indentAutoMigrate": "설정 업데이트 필요: `editor.detectIndentation`은 `editor.tabSize`를 바꿈: \"auto\" 또는 `editor.insertSpaces`: \"auto\"",
+ "sourceAndDiagMessage": "[{0}] {1}"
}
\ 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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestController.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/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/kor/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
index 8b6ad71cd4e..6486bf096b4 100644
--- a/i18n/kor/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
+++ b/i18n/kor/src/vs/platform/extensionManagement/node/extensionGalleryService.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
+{
+ "noCompatible": "이 버전의 코드에서 {0}의 호환 버전을 찾을 수 없습니다."
+}
\ No newline at end of file
diff --git a/i18n/kor/src/vs/platform/request/common/request.i18n.json b/i18n/kor/src/vs/platform/request/common/request.i18n.json
index 8b6ad71cd4e..81c4be2abc5 100644
--- a/i18n/kor/src/vs/platform/request/common/request.i18n.json
+++ b/i18n/kor/src/vs/platform/request/common/request.i18n.json
@@ -3,4 +3,8 @@
* 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
+{
+ "httpConfigurationTitle": "HTTP",
+ "proxy": "사용할 프록시 설정입니다. 설정되지 않으면 http_proxy 및 https_proxy 환경 변수에서 가져옵니다.",
+ "strictSSL": "제공된 CA 목록에 대해 프록시 서버 인증서를 확인해야 하는지 여부를 나타냅니다."
+}
\ No newline at end of file
diff --git a/i18n/kor/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/kor/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.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/electron-browser/integration.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/integration.i18n.json
index 51d7fa7ff91..e04a1f39d8f 100644
--- a/i18n/kor/src/vs/workbench/electron-browser/integration.i18n.json
+++ b/i18n/kor/src/vs/workbench/electron-browser/integration.i18n.json
@@ -6,6 +6,10 @@
{
"copy": "복사",
"cut": "잘라내기",
+ "files": "파일",
+ "folders": "폴더",
+ "openRecentPlaceHolder": "열기 경로 선택(새 창에서 열려면 Ctrl 키를 길게 누름)",
+ "openRecentPlaceHolderMac": "경로 선택(새 창에서 열려면 Cmd 키를 길게 누름)",
"paste": "붙여넣기",
"redo": "다시 실행",
"selectAll": "모두 선택",
diff --git a/i18n/kor/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
index 8b6ad71cd4e..5e7629158ff 100644
--- a/i18n/kor/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
+++ b/i18n/kor/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
@@ -3,4 +3,24 @@
* 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
+{
+ "aborted": "중단됨",
+ "again": "계속하려면 '{1}'에서 '{0}' 별칭을 제거하세요.",
+ "cancel": "취소",
+ "cancel2": "취소",
+ "cantCreateBinFolder": "'/usr/local/bin'을 만들 수 없습니다.",
+ "changeNow": "지금 변경",
+ "continue": "계속",
+ "editFile": "'{0}' 편집",
+ "exists": "'{1}'(줄 {2})에서 '{0}'을(를) 참조하는 별칭을 제거하고 이 작업을 다시 시도하세요.",
+ "install": "PATH에 '{0}' 명령 설치",
+ "later": "나중에",
+ "laterInfo": "명령 팔레트에서 '{0}' 작업을 항상 실행할 수 있습니다.",
+ "ok": "확인",
+ "shellCommand": "셸 명령",
+ "successFrom": "셸 명령 '{0}'이(가) PATH에서 제거되었습니다.",
+ "successIn": "셸 명령 '{0}'이(가) PATH에 설치되었습니다.",
+ "uninstall": "PATH에서 '{0}' 명령 제거",
+ "update": "코드에서 '{0}' 셸 명령을 변경해야 합니다. 지금 변경할까요?",
+ "warnEscalation": "이제 코드에서 'osascript'를 사용하여 관리자에게 셸 명령을 설치할 권한이 있는지를 묻습니다."
+}
\ 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 338871e15b5..093f3284257 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
@@ -14,6 +14,7 @@
"continueDebug": "계속",
"deactivateBreakpoints": "중단점 비활성화",
"debugActionLabelAndKeybinding": "{0}({1})",
+ "debugAddToWatch": "디버그: 조사식에 추가",
"debugConsoleAction": "디버그 콘솔",
"debugEvaluate": "디버그: 평가",
"disableAllBreakpoints": "모든 중단점 해제",
diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.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/extensions/electron-browser/extensionEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
index 756508d34fd..33409bab6b2 100644
--- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
+++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
@@ -4,6 +4,14 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "command name": "이름",
+ "debugger name": "이름",
+ "description": "설명",
+ "details": "세부 정보",
+ "keyboard shortcuts": "바로 가기 키(&&K)",
"license": "라이선스",
- "noReadme": "사용 가능한 추가 정보가 없습니다."
+ "noReadme": "사용 가능한 추가 정보가 없습니다.",
+ "runtime": "런타임",
+ "setting name": "이름",
+ "snippets": "코드 조각"
}
\ No newline at end of file
diff --git a/i18n/kor/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/kor/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
index 396d9b89b19..dea8a739f68 100644
--- a/i18n/kor/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
+++ b/i18n/kor/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "acceptLocalChanges": "덮어쓰기",
+ "acceptLocalChanges": "로컬 변경 사용 및 디스크 콘텐츠 덮어쓰기",
"compareChanges": "비교",
"conflictingFileHasChanged": "디스크에 있는 파일의 내용이 변경되고 비교 편집기의 왼쪽이 새로 고쳐졌습니다. 검토하고 다시 확인하세요.",
"discard": "삭제",
@@ -13,8 +13,8 @@
"readonlySaveError": "'{0}'을(를) 저장하지 못했습니다. 파일이 쓰기 보호되어 있습니다. 보호를 제거하려면 '덮어쓰기'를 선택하세요.",
"resolveSaveConflict": "{0} - 저장 충돌 해결",
"retry": "다시 시도",
- "revertLocalChanges": "되돌리기",
+ "revertLocalChanges": "로컬 변경을 취소하고 디스크의 콘텐츠로 되돌리기",
"saveConflictDiffLabel": "{0} - 디스크 ↔ {1}에 있음",
"staleSaveError": "'{0}'을(를) 저장하지 못했습니다. 디스크의 내용이 최신 버전입니다. 버전을 디스크에 있는 버전과 비교하려면 **비교**를 클릭하세요.",
- "userGuide": "변경 내용을 취소하려면 **되돌리기**를 선택하고, 디스크의 콘텐츠를 변경 내용으로 바꾸려면 **덮어쓰기**를 선택하세요."
+ "userGuide": "편집기 도구 모음의 작업을 사용하여 변경 내용을 **실행 취소**하거나 디스크의 콘텐츠를 변경 내용으로 **덮어쓰기**"
}
\ 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 7b0038766cc..a359ed136c8 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
@@ -5,6 +5,7 @@
// Do not edit this file. It is machine generated.
{
"findMore": "마켓플레이스에서 더 찾기...",
+ "noIconThemeLabel": "없음",
"preferences": "기본 설정",
"problemChangingTheme": "테마를 로드하는 중 문제가 발생했습니다. {0}",
"selectTheme.label": "색 테마",
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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.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/services/themes/electron-browser/themeService.i18n.json b/i18n/kor/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
index 611b581b6dd..305d317f88e 100644
--- a/i18n/kor/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
+++ b/i18n/kor/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "error.cannotloadicontheme": "{0}을(를) 로드할 수 없습니다.",
"error.cannotloadtheme": "{0}을(를) 로드할 수 없습니다.",
"error.cannotparse": "plist 파일을 구문 분석하는 중 문제 발생: {0}",
"error.cannotparsejson": "JSON 테마 파일을 구문 분석하는 중 문제 발생: {0}",
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 2f532a5ce63..1e0af1ba1dd 100644
--- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json
+++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json
@@ -79,7 +79,7 @@
"miSaveAll": "Сохранить &&все",
"miSaveAs": "Сохранить &&как...",
"miSelectAll": "&&Выделить все",
- "miSelectTheme": "Цветовая &&тема",
+ "miSelectColorTheme": "Цветовая &&тема",
"miSplitEditor": "Разделить &&редактор",
"miSwitchEditor": "Переключить р&&едактор",
"miSwitchGroup": "Переключить &&группу",
diff --git a/i18n/rus/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/rus/src/vs/editor/common/services/modelServiceImpl.i18n.json
index 20df22f9fb6..0800b64b655 100644
--- a/i18n/rus/src/vs/editor/common/services/modelServiceImpl.i18n.json
+++ b/i18n/rus/src/vs/editor/common/services/modelServiceImpl.i18n.json
@@ -4,5 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "indentAutoMigrate": "Измените параметры: editor.detectIndentation заменяет editor.tabSize: auto или editor.insertSpaces: auto"
+ "indentAutoMigrate": "Измените параметры: editor.detectIndentation заменяет editor.tabSize: auto или editor.insertSpaces: auto",
+ "sourceAndDiagMessage": "[{0}] {1}"
}
\ 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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestController.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/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/rus/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
index 8b6ad71cd4e..06bdba7a55d 100644
--- a/i18n/rus/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json
+++ b/i18n/rus/src/vs/platform/extensionManagement/node/extensionGalleryService.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
+{
+ "noCompatible": "Не удалось найти версию {0}, совместимую с этой версией кода."
+}
\ No newline at end of file
diff --git a/i18n/rus/src/vs/platform/request/common/request.i18n.json b/i18n/rus/src/vs/platform/request/common/request.i18n.json
index 8b6ad71cd4e..689a2b7ba15 100644
--- a/i18n/rus/src/vs/platform/request/common/request.i18n.json
+++ b/i18n/rus/src/vs/platform/request/common/request.i18n.json
@@ -3,4 +3,8 @@
* 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
+{
+ "httpConfigurationTitle": "HTTP",
+ "proxy": "Используемый параметр прокси. Если он не задан, он будет взят из переменных среды http_proxy и https_proxy.",
+ "strictSSL": "Должен ли сертификат прокси-сервера проверяться по списку предоставленных ЦС."
+}
\ No newline at end of file
diff --git a/i18n/rus/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/rus/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.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/electron-browser/integration.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/integration.i18n.json
index 7e9ce1cb2bd..13a4385b5fb 100644
--- a/i18n/rus/src/vs/workbench/electron-browser/integration.i18n.json
+++ b/i18n/rus/src/vs/workbench/electron-browser/integration.i18n.json
@@ -6,6 +6,10 @@
{
"copy": "Копировать",
"cut": "Вырезать",
+ "files": "файлы",
+ "folders": "папки",
+ "openRecentPlaceHolder": "Выбрать папку для открытия (удерживайте клавишу CTRL, чтобы открыть ее в новом окне)",
+ "openRecentPlaceHolderMac": "Выбрать путь (удерживайте клавишу CMD, чтобы открыть в новом окне)",
"paste": "Вставить",
"redo": "Вернуть",
"selectAll": "Выбрать все",
diff --git a/i18n/rus/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
index 8b6ad71cd4e..505f04c2774 100644
--- a/i18n/rus/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
+++ b/i18n/rus/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json
@@ -3,4 +3,24 @@
* 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
+{
+ "aborted": "Прервано",
+ "again": "Перед тем как продолжить, удалите псевдоним \"{0}\" из \"{1}\".",
+ "cancel": "Отмена",
+ "cancel2": "Отмена",
+ "cantCreateBinFolder": "Не удается создать папку \"/usr/local/bin\".",
+ "changeNow": "Изменить сейчас",
+ "continue": "Продолжить",
+ "editFile": "Изменить \"{0}\"",
+ "exists": "Удалите псевдоним, содержащий ссылку на \"{0}\", из \"{1}\" (строка {2}) и повторите это действие.",
+ "install": "Установить путь к команде \"{0}\" в PATH",
+ "later": "Позже",
+ "laterInfo": "Помните, что вы всегда можете выполнить действие \"{0}\" из палитры команд.",
+ "ok": "ОК",
+ "shellCommand": "Команда оболочки",
+ "successFrom": "Путь к команде оболочки \"{0}\" успешно удален из PATH.",
+ "successIn": "Путь к команде оболочки \"{0}\" успешно установлен в PATH.",
+ "uninstall": "Удалить путь к команде \"{0}\" из PATH",
+ "update": "Редактору Code необходимо изменить команду оболочки \"{0}\". Сделать это сейчас?",
+ "warnEscalation": "Редактор Code запросит права администратора для установки команды оболочки с помощью osascript."
+}
\ 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 9c7301c4032..b2e54ba4c7f 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
@@ -14,6 +14,7 @@
"continueDebug": "Продолжить",
"deactivateBreakpoints": "Отключить точки останова",
"debugActionLabelAndKeybinding": "{0} ({1})",
+ "debugAddToWatch": "Отладка: добавить контрольное значение",
"debugConsoleAction": "Консоль отладки",
"debugEvaluate": "Отладка: вычисление",
"disableAllBreakpoints": "Отключить все точки останова",
diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.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/extensions/electron-browser/extensionEditor.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
index e237b5ffd4a..ed547a0fbfc 100644
--- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
+++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.i18n.json
@@ -4,6 +4,14 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "command name": "Имя",
+ "debugger name": "Имя",
+ "description": "Описание",
+ "details": "Подробности",
+ "keyboard shortcuts": "&&Сочетания клавиш",
"license": "Лицензия",
- "noReadme": "Файл сведений недоступен."
+ "noReadme": "Файл сведений недоступен.",
+ "runtime": "Среда выполнения",
+ "setting name": "Имя",
+ "snippets": "Фрагменты"
}
\ No newline at end of file
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 a12825b2476..438d12c0f06 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
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
- "acceptLocalChanges": "Перезаписать",
+ "acceptLocalChanges": "Использовать локальные изменения и перезаписать содержимое на диске",
"compareChanges": "Сравнить",
"conflictingFileHasChanged": "Содержимое файла на диске изменилось, и левая часть редактора сравнения обновилась. Проверьте данные и устраните проблему.",
"discard": "Отмена",
@@ -13,8 +13,8 @@
"readonlySaveError": "Не удалось сохранить \"{0}\": файл защищен от записи. Чтобы снять защиту, нажмите \"Перезаписать\".",
"resolveSaveConflict": "{0} — разрешение конфликта сохранения",
"retry": "Повторить попытку",
- "revertLocalChanges": "Отменить",
+ "revertLocalChanges": "Отменить локальные изменения и вернуться к содержимому на диске",
"saveConflictDiffLabel": "{0} — на диске ↔ в {1}",
"staleSaveError": "Не удалось сохранить \"{0}\": содержимое на диске более новое. Чтобы сравнить свою версию с версией на диске, нажмите **Сравнить**.",
- "userGuide": "Используйте команду **Отменить** для отмены изменений или **Перезаписать** для замены содержимого на диске"
+ "userGuide": "Используйте команды на панели инструментов для **отмены** изменений или **перезаписи** содержимого на диске"
}
\ 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 65fd75e3d90..7a237c9f15d 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
@@ -5,6 +5,7 @@
// Do not edit this file. It is machine generated.
{
"findMore": "Подробнее на Marketplace...",
+ "noIconThemeLabel": "Нет",
"preferences": "Параметры",
"problemChangingTheme": "Проблема с загрузкой темы: {0}",
"selectTheme.label": "Цветовая тема",
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
new file mode 100644
index 00000000000..8b6ad71cd4e
--- /dev/null
+++ b/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.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/services/themes/electron-browser/themeService.i18n.json b/i18n/rus/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
index 9979cd23e25..27243d0ceea 100644
--- a/i18n/rus/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
+++ b/i18n/rus/src/vs/workbench/services/themes/electron-browser/themeService.i18n.json
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
+ "error.cannotloadicontheme": "Не удается загрузить {0}.",
"error.cannotloadtheme": "Не удается загрузить {0}.",
"error.cannotparse": "Проблемы при анализе файла PLIST: {0}.",
"error.cannotparsejson": "Возникли проблемы при анализе файла JSON THEME: {0}.",
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 9c8eac28e70..4266bd833e9 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -1,6 +1,6 @@
{
"name": "code-oss-dev",
- "version": "1.4.0",
+ "version": "1.6.0",
"dependencies": {
"agent-base": {
"version": "1.0.2",
@@ -9,7 +9,7 @@
},
"anymatch": {
"version": "1.3.0",
- "from": "anymatch@>=1.1.0 <2.0.0",
+ "from": "anymatch@>=1.3.0 <2.0.0",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz"
},
"applicationinsights": {
@@ -38,29 +38,44 @@
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz"
},
"async-each": {
- "version": "0.1.6",
- "from": "async-each@>=0.1.5 <0.2.0",
- "resolved": "https://registry.npmjs.org/async-each/-/async-each-0.1.6.tgz"
+ "version": "1.0.1",
+ "from": "async-each@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz"
+ },
+ "balanced-match": {
+ "version": "0.4.2",
+ "from": "balanced-match@>=0.4.1 <0.5.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz"
},
"binary-extensions": {
- "version": "1.4.0",
+ "version": "1.6.0",
"from": "binary-extensions@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.4.0.tgz"
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.6.0.tgz"
},
- "bindings": {
- "version": "1.2.1",
- "from": "bindings@>=1.2.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz"
+ "brace-expansion": {
+ "version": "1.1.6",
+ "from": "brace-expansion@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz"
},
"braces": {
- "version": "1.8.3",
+ "version": "1.8.5",
"from": "braces@>=1.8.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.3.tgz"
+ "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz"
+ },
+ "buffer-shims": {
+ "version": "1.0.0",
+ "from": "buffer-shims@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz"
},
"chokidar": {
- "version": "1.0.5",
- "from": "chokidar@1.0.5",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.0.5.tgz"
+ "version": "1.6.0",
+ "from": "bpasero/chokidar#vscode",
+ "resolved": "git://github.com/bpasero/chokidar.git#8b64fda5a22cc9850f1346d12302051c5ba65b10"
+ },
+ "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"
},
"core-util-is": {
"version": "1.0.2",
@@ -83,9 +98,9 @@
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz"
},
"expand-range": {
- "version": "1.8.1",
+ "version": "1.8.2",
"from": "expand-range@>=1.8.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.1.tgz"
+ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz"
},
"extend": {
"version": "3.0.0",
@@ -134,8 +149,13 @@
},
"fsevents": {
"version": "0.3.8",
- "from": "fsevents@>=0.3.1 <0.4.0",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-0.3.8.tgz"
+ "from": "bpasero/fsevents#vscode",
+ "resolved": "git://github.com/bpasero/fsevents.git#fe2aaccaaffbd69a23374cf46a8c6bafe8e51b01"
+ },
+ "gc-signals": {
+ "version": "0.0.1",
+ "from": "gc-signals@0.0.1",
+ "resolved": "https://registry.npmjs.org/gc-signals/-/gc-signals-0.0.1.tgz"
},
"getmac": {
"version": "1.0.7",
@@ -145,31 +165,12 @@
"glob-base": {
"version": "0.3.0",
"from": "glob-base@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
- "dependencies": {
- "glob-parent": {
- "version": "2.0.0",
- "from": "glob-parent@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz"
- },
- "is-glob": {
- "version": "2.0.1",
- "from": "is-glob@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz"
- }
- }
+ "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz"
},
"glob-parent": {
- "version": "1.3.0",
- "from": "glob-parent@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-1.3.0.tgz",
- "dependencies": {
- "is-glob": {
- "version": "2.0.1",
- "from": "is-glob@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz"
- }
- }
+ "version": "2.0.0",
+ "from": "glob-parent@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz"
},
"graceful-fs": {
"version": "4.1.2",
@@ -193,7 +194,7 @@
},
"inherits": {
"version": "2.0.1",
- "from": "inherits@>=2.0.1 <2.1.0",
+ "from": "inherits@>=2.0.1 <3.0.0",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
},
"is-binary-path": {
@@ -202,9 +203,9 @@
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz"
},
"is-buffer": {
- "version": "1.1.3",
+ "version": "1.1.4",
"from": "is-buffer@>=1.0.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.3.tgz"
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz"
},
"is-dotfile": {
"version": "1.0.2",
@@ -227,9 +228,9 @@
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz"
},
"is-glob": {
- "version": "1.1.3",
- "from": "is-glob@>=1.1.3 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-1.1.3.tgz"
+ "version": "2.0.1",
+ "from": "is-glob@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz"
},
"is-number": {
"version": "2.1.0",
@@ -247,45 +248,33 @@
"resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz"
},
"isarray": {
- "version": "0.0.1",
- "from": "isarray@0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
+ "version": "1.0.0",
+ "from": "isarray@1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
},
"isobject": {
- "version": "2.0.0",
+ "version": "2.1.0",
"from": "isobject@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.0.0.tgz"
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz"
},
"kind-of": {
- "version": "3.0.2",
+ "version": "3.0.4",
"from": "kind-of@>=3.0.2 <4.0.0",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.2.tgz"
- },
- "lru-cache": {
- "version": "2.7.3",
- "from": "lru-cache@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz"
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz"
},
"micromatch": {
- "version": "2.3.7",
+ "version": "2.3.11",
"from": "micromatch@>=2.1.5 <3.0.0",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.7.tgz",
- "dependencies": {
- "is-glob": {
- "version": "2.0.1",
- "from": "is-glob@>=2.0.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz"
- }
- }
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz"
},
"minimatch": {
- "version": "0.2.14",
- "from": "minimatch@>=0.2.12 <0.3.0",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz"
+ "version": "3.0.3",
+ "from": "minimatch@>=3.0.2 <4.0.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz"
},
"minimist": {
"version": "1.2.0",
- "from": "minimist@latest",
+ "from": "minimist@1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz"
},
"ms": {
@@ -294,9 +283,9 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
},
"nan": {
- "version": "2.2.1",
- "from": "nan@>=2.0.2 <3.0.0",
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.2.1.tgz"
+ "version": "2.4.0",
+ "from": "nan@>=2.3.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.4.0.tgz"
},
"native-keymap": {
"version": "0.1.2",
@@ -314,21 +303,14 @@
"resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz"
},
"oniguruma": {
- "version": "6.0.1",
+ "version": "6.1.0",
"from": "oniguruma@>=6.0.1 <7.0.0",
- "resolved": "https://registry.npmjs.org/oniguruma/-/oniguruma-6.0.1.tgz"
+ "resolved": "https://registry.npmjs.org/oniguruma/-/oniguruma-6.1.0.tgz"
},
"parse-glob": {
"version": "3.0.4",
"from": "parse-glob@>=3.0.4 <4.0.0",
- "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
- "dependencies": {
- "is-glob": {
- "version": "2.0.1",
- "from": "is-glob@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz"
- }
- }
+ "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz"
},
"path-is-absolute": {
"version": "1.0.0",
@@ -345,6 +327,11 @@
"from": "preserve@>=0.2.0 <0.3.0",
"resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz"
},
+ "process-nextick-args": {
+ "version": "1.0.7",
+ "from": "process-nextick-args@>=1.0.6 <1.1.0",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz"
+ },
"pty.js": {
"version": "0.3.0",
"from": "https://github.com/Tyriar/pty.js/tarball/fffbf86eb9e8051b5b2be4ba9c7b07faa018ce8d",
@@ -354,6 +341,11 @@
"version": "1.2.1",
"from": "extend@>=1.2.1 <1.3.0",
"resolved": "https://registry.npmjs.org/extend/-/extend-1.2.1.tgz"
+ },
+ "nan": {
+ "version": "2.2.1",
+ "from": "nan@2.2.1",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.2.1.tgz"
}
}
},
@@ -363,14 +355,14 @@
"resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz"
},
"readable-stream": {
- "version": "1.0.34",
- "from": "readable-stream@>=1.0.26-2 <1.1.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz"
+ "version": "2.1.5",
+ "from": "readable-stream@>=2.0.2 <3.0.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz"
},
"readdirp": {
- "version": "1.4.0",
- "from": "readdirp@>=1.3.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-1.4.0.tgz"
+ "version": "2.1.0",
+ "from": "readdirp@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz"
},
"regex-cache": {
"version": "0.4.3",
@@ -392,10 +384,10 @@
"from": "semver@4.3.6",
"resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz"
},
- "sigmund": {
+ "set-immediate-shim": {
"version": "1.0.1",
- "from": "sigmund@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz"
+ "from": "set-immediate-shim@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz"
},
"string_decoder": {
"version": "0.10.31",
@@ -407,10 +399,15 @@
"from": "typechecker@>=2.0.1 <2.1.0",
"resolved": "https://registry.npmjs.org/typechecker/-/typechecker-2.0.8.tgz"
},
+ "util-deprecate": {
+ "version": "1.0.2",
+ "from": "util-deprecate@>=1.0.1 <1.1.0",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
+ },
"vscode-debugprotocol": {
- "version": "1.11.0",
- "from": "vscode-debugprotocol@1.11.0",
- "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.11.0.tgz"
+ "version": "1.13.0-pre.3",
+ "from": "vscode-debugprotocol@1.13.0",
+ "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.13.0-pre.3.tgz"
},
"vscode-textmate": {
"version": "2.1.1",
@@ -428,7 +425,7 @@
"resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.0.tgz"
},
"xterm": {
- "version": "1.0.0",
+ "version": "1.1.3",
"from": "git+https://github.com/sourcelair/xterm.js.git#220828f",
"resolved": "git+https://github.com/sourcelair/xterm.js.git#220828f7db9932acbd3198be5b97d81f5a7b6880"
},
diff --git a/package.json b/package.json
index 5db0f8f31d8..bc346f0683d 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,8 @@
{
"name": "code-oss-dev",
- "version": "1.5.0",
+ "version": "1.6.0",
"electronVersion": "0.37.6",
+ "distro": "221e07c30a60acb4752cc6ba35e5ac4481d8b9d5",
"author": {
"name": "Microsoft Corporation"
},
@@ -15,8 +16,9 @@
},
"dependencies": {
"applicationinsights": "0.15.6",
- "chokidar": "1.0.5",
+ "chokidar": "bpasero/chokidar#vscode",
"emmet": "1.3.1",
+ "gc-signals": "^0.0.1",
"getmac": "1.0.7",
"graceful-fs": "4.1.2",
"http-proxy-agent": "0.2.7",
@@ -27,7 +29,7 @@
"pty.js": "https://github.com/Tyriar/pty.js/tarball/fffbf86eb9e8051b5b2be4ba9c7b07faa018ce8d",
"fast-plist": "0.1.1",
"semver": "4.3.6",
- "vscode-debugprotocol": "1.11.0",
+ "vscode-debugprotocol": "1.13.0-pre.3",
"vscode-textmate": "2.1.1",
"winreg": "1.2.0",
"xterm": "git+https://github.com/sourcelair/xterm.js.git#220828f",
@@ -42,6 +44,7 @@
"cson-parser": "^1.3.3",
"debounce": "^1.0.0",
"documentdb": "^1.5.1",
+ "eslint": "^3.4.0",
"event-stream": "^3.1.7",
"express": "^4.13.1",
"ghooks": "1.0.3",
@@ -61,7 +64,6 @@
"gulp-replace": "^0.5.4",
"gulp-shell": "^0.5.2",
"gulp-sourcemaps": "^1.6.0",
- "gulp-symdest": "^1.0.0",
"gulp-tsb": "^1.10.1",
"gulp-tslint": "^4.3.0",
"gulp-uglify": "^1.4.1",
@@ -89,6 +91,7 @@
"uglify-js": "2.4.8",
"underscore": "^1.8.2",
"vinyl": "^0.4.5",
+ "vinyl-fs": "^2.4.3",
"vscode-nls-dev": "^1.0.0"
},
"repository": {
diff --git a/scripts/test.bat b/scripts/test.bat
index 7b580cbeac1..e55af32e6c0 100644
--- a/scripts/test.bat
+++ b/scripts/test.bat
@@ -8,6 +8,11 @@ if not "%BUILD_BUILDID%" == "" (
set ELECTRON_NO_ATTACH_CONSOLE=1
)
+rem APPVEYOR Builds
+if not "%APPVEYOR%" == "" (
+ set ELECTRON_NO_ATTACH_CONSOLE=1
+)
+
pushd %~dp0\..
for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a
diff --git a/src/main.js b/src/main.js
index fa36b95f26c..0f05e631398 100644
--- a/src/main.js
+++ b/src/main.js
@@ -12,6 +12,10 @@ var path = require('path');
var minimist = require('minimist');
var paths = require('./paths');
+var args = minimist(process.argv, {
+ string: ['user-data-dir', 'locale']
+});
+
function stripComments(content) {
var regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g;
var result = content.replace(regexp, function (match, m1, m2, m3, m4) {
@@ -39,16 +43,7 @@ function stripComments(content) {
}
function getNLSConfiguration() {
- var locale = undefined;
- var localeOpts = '--locale';
- for (var i = 0; i < process.argv.length; i++) {
- var arg = process.argv[i];
- if (arg.slice(0, localeOpts.length) == localeOpts) {
- var segments = arg.split('=');
- locale = segments[1];
- break;
- }
- }
+ var locale = args['locale'];
if (!locale) {
var userData = app.getPath('userData');
@@ -127,8 +122,7 @@ try {
}
// Set userData path before app 'ready' event
-var argv = minimist(process.argv, { string: ['user-data-dir'] });
-var userData = argv['user-data-dir'] || paths.getDefaultUserDataPath(process.platform);
+var userData = args['user-data-dir'] || paths.getDefaultUserDataPath(process.platform);
app.setPath('userData', userData);
// Mac: when someone drops a file to the not-yet running VSCode, the open-file event fires even before
diff --git a/src/paths.js b/src/paths.js
index 8373cde04d5..693547888ab 100644
--- a/src/paths.js
+++ b/src/paths.js
@@ -9,7 +9,7 @@ var pkg = require('../package.json');
function getAppDataPath(platform) {
switch (platform) {
- case 'win32': return process.env['APPDATA'];
+ case 'win32': return process.env['APPDATA'] || path.join(process.env['USERPROFILE'], 'AppData', 'Roaming');
case 'darwin': return path.join(os.homedir(), 'Library', 'Application Support');
case 'linux': return process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config');
default: throw new Error('Platform not supported');
diff --git a/src/typings/gc-signals.d.ts b/src/typings/gc-signals.d.ts
new file mode 100644
index 00000000000..cc982d1260c
--- /dev/null
+++ b/src/typings/gc-signals.d.ts
@@ -0,0 +1,19 @@
+declare module 'gc-signals' {
+ export interface GCSignal {
+ }
+ /**
+ * Create a new GC signal. When being garbage collected the passed
+ * value is stored for later consumption.
+ */
+ export const GCSignal: {
+ new (id: number): GCSignal;
+ };
+ /**
+ * Consume ids of garbage collected signals.
+ */
+ export function consumeSignals(): number[];
+ export function onDidGarbageCollectSignals(callback: (ids: number[]) => any): {
+ dispose(): void;
+ };
+ export function trackGarbageCollection(obj: any, id: number): number;
+}
\ No newline at end of file
diff --git a/src/vs/base/browser/htmlContentRenderer.ts b/src/vs/base/browser/htmlContentRenderer.ts
index 6443eb85e99..de6c34c290e 100644
--- a/src/vs/base/browser/htmlContentRenderer.ts
+++ b/src/vs/base/browser/htmlContentRenderer.ts
@@ -20,15 +20,9 @@ export interface RenderOptions {
codeBlockRenderer?: (modeId: string, value: string) => string | TPromise;
}
-export function renderMarkedString(markedStrings: MarkedString[], options: RenderOptions = {}): Node {
- let htmlContentElements = markedStrings.map(value => {
- if (typeof value === 'string') {
- return { markdown: value };
- } else if (typeof value === 'object') {
- return { code: value };
- };
- });
- return renderHtml(htmlContentElements, options);
+export function renderMarkedString(markedString: MarkedString, options: RenderOptions = {}): Node {
+ const htmlContentElement = typeof markedString === 'string' ? { markdown: markedString } : { code: markedString };
+ return renderHtml(htmlContentElement, options);
}
/**
diff --git a/src/vs/base/browser/ui/button/button.css b/src/vs/base/browser/ui/button/button.css
index 61e35cbdd56..e77131c5f4d 100644
--- a/src/vs/base/browser/ui/button/button.css
+++ b/src/vs/base/browser/ui/button/button.css
@@ -26,23 +26,26 @@
}
/*Theming support*/
-.vs .monaco-button:not(.disabled):hover {
+
+.monaco-button:not(.disabled):hover {
background-color: #DDD
}
-.monaco-text-button:not(.disabled):hover {
- background: #006BB3;
-}
-
-.monaco-text-button:not(.disabled):active {
- background: #005F9E;
-}
-
-.vs-dark .monaco-text-button {
- background: #0E639C;
-}
-
.vs-dark .monaco-button:not(.disabled):hover,
.hc-black .monaco-button:not(.disabled):hover {
background-color: #2f3334;
+}
+
+.monaco-button.monaco-text-button:not(.disabled):hover,
+.vs-dark .monaco-button.monaco-text-button:not(.disabled):hover,
+.hc-black .monaco-button.monaco-text-button:not(.disabled):hover {
+ background: #006BB3;
+}
+
+.monaco-button.monaco-text-button:not(.disabled):active {
+ background: #005F9E;
+}
+
+.vs-dark .monaco-button.monaco-text-button {
+ background: #0E639C;
}
\ No newline at end of file
diff --git a/src/vs/base/browser/ui/list/listView.ts b/src/vs/base/browser/ui/list/listView.ts
index 3a04a40662c..c3e56260d46 100644
--- a/src/vs/base/browser/ui/list/listView.ts
+++ b/src/vs/base/browser/ui/list/listView.ts
@@ -87,6 +87,7 @@ export class ListView implements IDisposable {
this.scrollableElement = new ScrollableElement(this.rowsContainer, {
canUseTranslate3d: false,
+ alwaysConsumeMouseWheel: true,
horizontal: ScrollbarVisibility.Hidden,
vertical: ScrollbarVisibility.Auto,
useShadows: getOrDefault(options, o => o.useShadows, DefaultOptions.useShadows),
diff --git a/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts b/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts
index d4340ec2c4b..787bb9570d0 100644
--- a/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts
+++ b/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts
@@ -13,6 +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';
// Known media mimes that we can handle
const mapExtToMediaMimes = {
@@ -67,6 +68,29 @@ export interface IResourceDescriptor {
resource: URI;
name: string;
size: number;
+ etag: string;
+}
+
+// Chrome is caching images very aggressively and so we use the ETag information to find out if
+// 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);
+function imageSrc(descriptor: IResourceDescriptor): string {
+ const src = descriptor.resource.toString();
+
+ let cached = IMAGE_RESOURCE_ETAG_CACHE.get(src);
+ if (!cached) {
+ cached = { etag: descriptor.etag, src };
+ IMAGE_RESOURCE_ETAG_CACHE.set(src, cached);
+ }
+
+ if (cached.etag !== descriptor.etag) {
+ cached.etag = descriptor.etag;
+ cached.src = `${src}?${Date.now()}`; // bypass cache with this trick
+ }
+
+ return cached.src;
}
/**
@@ -98,9 +122,8 @@ export class ResourceViewer {
$(container)
.empty()
.addClass('image')
- .img({
- src: descriptor.resource.toString() // disabled due to https://github.com/electron/electron/issues/6275 + '?' + Date.now() // We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
- }).on(DOM.EventType.LOAD, (e, img) => {
+ .img({ src: imageSrc(descriptor) })
+ .on(DOM.EventType.LOAD, (e, img) => {
const imgElement = img.getHTMLElement();
if (imgElement.naturalWidth > imgElement.width || imgElement.naturalHeight > imgElement.height) {
$(container).addClass('oversized');
@@ -119,47 +142,6 @@ export class ResourceViewer {
});
}
- // Embed Object (only PDF for now)
- else if (false /* PDF is currently not supported in Electron it seems */ && mime.indexOf('pdf') >= 0) {
- $(container)
- .empty()
- .element('object')
- .attr({
- data: descriptor.resource.toString(), // disabled due to https://github.com/electron/electron/issues/6275 + '?' + Date.now(), // We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
- width: '100%',
- height: '100%',
- type: mime
- });
- }
-
- // Embed Audio (if supported in browser)
- else if (false /* disabled due to unknown impact on memory usage */ && mime.indexOf('audio/') >= 0) {
- $(container)
- .empty()
- .element('audio')
- .attr({
- src: descriptor.resource.toString(), // disabled due to https://github.com/electron/electron/issues/6275 + '?' + Date.now(), // We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
- text: nls.localize('missingAudioSupport', "Sorry but playback of audio files is not supported."),
- controls: 'controls'
- }).on(DOM.EventType.LOAD, () => {
- scrollbar.scanDomNode();
- });
- }
-
- // Embed Video (if supported in browser)
- else if (false /* disabled due to unknown impact on memory usage */ && mime.indexOf('video/') >= 0) {
- $(container)
- .empty()
- .element('video')
- .attr({
- src: descriptor.resource.toString(), // disabled due to https://github.com/electron/electron/issues/6275 + '?' + Date.now(), // We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
- text: nls.localize('missingVideoSupport', "Sorry but playback of video files is not supported."),
- controls: 'controls'
- }).on(DOM.EventType.LOAD, () => {
- scrollbar.scanDomNode();
- });
- }
-
// Handle generic Binary Files
else {
$(container)
diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
index 6677ae3a6c4..f42246f9cf5 100644
--- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
+++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
@@ -285,8 +285,10 @@ export class ScrollableElement extends Widget {
}
}
- e.preventDefault();
- e.stopPropagation();
+ if (this._options.alwaysConsumeMouseWheel || this._shouldRender) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
}
private _onDidScroll(e:ScrollEvent): void {
@@ -416,6 +418,7 @@ function resolveOptions(opts: ScrollableElementCreationOptions): ScrollableEleme
useShadows: (typeof opts.useShadows !== 'undefined' ? opts.useShadows : true),
handleMouseWheel: (typeof opts.handleMouseWheel !== 'undefined' ? opts.handleMouseWheel : true),
flipAxes: (typeof opts.flipAxes !== 'undefined' ? opts.flipAxes : false),
+ alwaysConsumeMouseWheel: (typeof opts.alwaysConsumeMouseWheel !== 'undefined' ? opts.alwaysConsumeMouseWheel : false),
scrollYToX: (typeof opts.scrollYToX !== 'undefined' ? opts.scrollYToX : false),
mouseWheelScrollSensitivity: (typeof opts.mouseWheelScrollSensitivity !== 'undefined' ? opts.mouseWheelScrollSensitivity : 1),
arrowSize: (typeof opts.arrowSize !== 'undefined' ? opts.arrowSize : 11),
diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts b/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts
index 72f519e48ad..1db0602cde2 100644
--- a/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts
+++ b/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts
@@ -40,6 +40,11 @@ export interface ScrollableElementCreationOptions {
* Defaults to false.
*/
scrollYToX?: boolean;
+ /**
+ * Always consume mouse wheel events, even when scrolling is no longer possible.
+ * Defaults to false.
+ */
+ alwaysConsumeMouseWheel?: boolean;
/**
* A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.
* Defaults to 1.
@@ -117,6 +122,7 @@ export interface ScrollableElementResolvedOptions {
handleMouseWheel: boolean;
flipAxes: boolean;
scrollYToX: boolean;
+ alwaysConsumeMouseWheel: boolean;
mouseWheelScrollSensitivity: number;
arrowSize: number;
listenOnDomNode: HTMLElement;
diff --git a/src/vs/base/browser/ui/splitview/splitview.css b/src/vs/base/browser/ui/splitview/splitview.css
index 822a28f78ae..353a927c87f 100644
--- a/src/vs/base/browser/ui/splitview/splitview.css
+++ b/src/vs/base/browser/ui/splitview/splitview.css
@@ -87,7 +87,7 @@
}
/* High Contrast Theming */
-.hc-black .monaco-split-view > .split-view-view > .header {
+.hc-black .monaco-split-view > .split-view-view:not(:first-child) > .header {
border-top: 1px solid #6FC3DF;
}
diff --git a/src/vs/base/common/async.ts b/src/vs/base/common/async.ts
index 41c8cf24a8d..eca09a7988e 100644
--- a/src/vs/base/common/async.ts
+++ b/src/vs/base/common/async.ts
@@ -23,11 +23,13 @@ export function toThenable(arg: T | Thenable): Thenable {
}
}
-export function asWinJsPromise(callback: (token: CancellationToken) => T | Thenable): TPromise {
+export function asWinJsPromise(callback: (token: CancellationToken) => T | TPromise | Thenable): TPromise {
let source = new CancellationTokenSource();
- return new TPromise((resolve, reject) => {
+ return new TPromise((resolve, reject, progress) => {
let item = callback(source.token);
- if (isThenable(item)) {
+ if (TPromise.is(item)) {
+ item.then(resolve, reject, progress);
+ } else if (isThenable(item)) {
item.then(resolve, reject);
} else {
resolve(item);
@@ -41,15 +43,15 @@ export function asWinJsPromise(callback: (token: CancellationToken) => T | Th
* Hook a cancellation token to a WinJS Promise
*/
export function wireCancellationToken(token: CancellationToken, promise: TPromise, resolveAsUndefinedWhenCancelled?: boolean): Thenable {
- token.onCancellationRequested(() => promise.cancel());
+ const subscription = token.onCancellationRequested(() => promise.cancel());
if (resolveAsUndefinedWhenCancelled) {
- return promise.then(undefined, err => {
+ promise = promise.then(undefined, err => {
if (!errors.isPromiseCanceledError(err)) {
return TPromise.wrapError(err);
}
});
}
- return promise;
+ return always(promise, () => subscription.dispose());
}
export interface ITask {
diff --git a/src/vs/base/common/color.ts b/src/vs/base/common/color.ts
new file mode 100644
index 00000000000..a532c64cc86
--- /dev/null
+++ b/src/vs/base/common/color.ts
@@ -0,0 +1,245 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import * as Object from 'vs/base/common/objects';
+
+export interface RGBA { r: number; g: number; b: number; a: number; }
+export interface HSLA { h: number; s: number; l: number; a: number; }
+
+/**
+ * Converts an Hex color value to RGB.
+ * returns r, g, and b are contained in the set [0, 255]
+ */
+function hex2rgba(hex: string): RGBA {
+ function parseHex(str: string) {
+ return parseInt('0x' + str);
+ }
+ if (hex.charAt(0) === '#' && hex.length >= 7) {
+ let r = parseHex(hex.substr(1, 2));
+ let g = parseHex(hex.substr(3, 2));
+ let b = parseHex(hex.substr(5, 2));
+ let a = hex.length === 9 ? parseHex(hex.substr(7, 2)) / 0xff : 1;
+ return { r, g, b, a };
+ }
+ return { r: 255, g: 0, b: 0, a: 1 };
+}
+
+/**
+ * Converts an RGB color value to HSL. Conversion formula
+ * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
+ * Assumes r, g, and b are contained in the set [0, 255] and
+ * returns h in the set [0, 360], s, and l in the set [0, 1].
+ */
+function rgba2hsla(rgba: RGBA): HSLA {
+ let r = rgba.r / 255;
+ let g = rgba.g / 255;
+ let b = rgba.b / 255;
+ let a = rgba.a === void 0 ? rgba.a : 1;
+
+ let max = Math.max(r, g, b), min = Math.min(r, g, b);
+ let h = 0, s = 0, l = Math.round(((min + max) / 2) * 1000) / 1000, chroma = max - min;
+
+ if (chroma > 0) {
+ s = Math.min(Math.round((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))) * 1000) / 1000, 1);
+ switch (max) {
+ case r: h = (g - b) / chroma + (g < b ? 6 : 0); break;
+ case g: h = (b - r) / chroma + 2; break;
+ case b: h = (r - g) / chroma + 4; break;
+ }
+ h *= 60;
+ h = Math.round(h);
+ }
+ return { h, s, l, a };
+}
+
+/**
+ * Converts an HSL color value to RGB. Conversion formula
+ * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
+ * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and
+ * returns r, g, and b in the set [0, 255].
+ */
+function hsla2rgba(hsla: HSLA): RGBA {
+ let h = hsla.h / 360;
+ let s = Math.min(hsla.s, 1);
+ let l = Math.min(hsla.l, 1);
+ let a = hsla.a === void 0 ? hsla.a : 1;
+ let r, g, b;
+
+ if (s === 0) {
+ r = g = b = l; // achromatic
+ } else {
+ let hue2rgb = function hue2rgb(p, q, t) {
+ if (t < 0) {
+ t += 1;
+ }
+ if (t > 1) {
+ t -= 1;
+ }
+ if (t < 1 / 6) {
+ return p + (q - p) * 6 * t;
+ }
+ if (t < 1 / 2) {
+ return q;
+ }
+ if (t < 2 / 3) {
+ return p + (q - p) * (2 / 3 - t) * 6;
+ }
+ return p;
+ };
+
+ let q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+ let p = 2 * l - q;
+ r = hue2rgb(p, q, h + 1 / 3);
+ g = hue2rgb(p, q, h);
+ b = hue2rgb(p, q, h - 1 / 3);
+ }
+
+ return { r: Math.round(r * 255), g: Math.round(g * 255), b: Math.round(b * 255), a };
+}
+
+export class Color {
+
+ private rgba: RGBA;
+ private hsla: HSLA;
+ private str: string;
+
+ constructor(arg: string | RGBA) {
+ this.rgba = typeof arg === 'string' ? hex2rgba(arg) : arg;
+ this.str = null;
+ }
+
+ /**
+ * http://www.w3.org/TR/WCAG20/#relativeluminancedef
+ * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white.
+ */
+ public getLuminosity(): number {
+ let luminosityFor = function (color): number {
+ let c = color / 255;
+ return (c <= 0.03928) ? c / 12.92 : Math.pow(((c + 0.055) / 1.055), 2.4);
+ };
+ let R = luminosityFor(this.rgba.r);
+ let G = luminosityFor(this.rgba.g);
+ let B = luminosityFor(this.rgba.b);
+ let luminosity = 0.2126 * R + 0.7152 * G + 0.0722 * B;
+ return Math.round(luminosity * 10000) / 10000;
+ }
+
+ /**
+ * http://www.w3.org/TR/WCAG20/#contrast-ratiodef
+ * Returns the contrast ration number in the set [1, 21].
+ */
+ public getContrast(another: Color): number {
+ let lum1 = this.getLuminosity();
+ let lum2 = another.getLuminosity();
+ return lum1 > lum2 ? (lum1 + 0.05) / (lum2 + 0.05) : (lum2 + 0.05) / (lum1 + 0.05);
+ }
+
+ /**
+ * http://24ways.org/2010/calculating-color-contrast
+ * Return 'true' if darker color otherwise 'false'
+ */
+ public isDarker(): boolean {
+ var yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000;
+ return yiq < 128;
+ }
+
+ /**
+ * http://24ways.org/2010/calculating-color-contrast
+ * Return 'true' if lighter color otherwise 'false'
+ */
+ public isLighter(): boolean {
+ var yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000;
+ return yiq >= 128;
+ }
+
+ public isLighterThan(another: Color): boolean {
+ let lum1 = this.getLuminosity();
+ let lum2 = another.getLuminosity();
+ return lum1 > lum2;
+ }
+
+ public isDarkerThan(another: Color): boolean {
+ let lum1 = this.getLuminosity();
+ let lum2 = another.getLuminosity();
+ return lum1 < lum2;
+ }
+
+ public lighten(factor: number): Color {
+ let hsl = this.toHSLA();
+ hsl.l += hsl.l * factor;
+ return new Color(hsla2rgba(hsl));
+ }
+
+ public darken(factor: number): Color {
+ let hsl = this.toHSLA();
+ hsl.l -= hsl.l * factor;
+ return new Color(hsla2rgba(hsl));
+ }
+
+ public transparent(factor: number): Color {
+ let p = this.rgba;
+ return new Color({ r: p.r, g: p.g, b: p.b, a: p.a * factor });
+ }
+
+ public opposite(): Color {
+ return new Color({
+ r: 255 - this.rgba.r,
+ g: 255 - this.rgba.g,
+ b: 255 - this.rgba.b,
+ a: this.rgba.a
+ });
+ }
+
+ public toString(): string {
+ if (!this.str) {
+ let p = this.rgba;
+ this.str = `rgba(${p.r}, ${p.g}, ${p.b}, ${+p.a.toFixed(2)})`;
+ }
+ return this.str;
+ }
+
+ public toHSLA(): HSLA {
+ if (!this.hsla) {
+ this.hsla = rgba2hsla(this.rgba);
+ }
+ return Object.clone(this.hsla);
+ }
+
+ public toRGBA(): RGBA {
+ return Object.clone(this.rgba);
+ }
+
+ public static fromRGBA(rgba: RGBA): Color {
+ return new Color(rgba);
+ }
+
+ public static fromHex(hex: string): Color {
+ return new Color(hex);
+ }
+
+ public static fromHSLA(hsla: HSLA): Color {
+ return new Color(hsla2rgba(hsla));
+ }
+
+ public static getLighterColor(of: Color, relative: Color, factor?: number): Color {
+ if (of.isLighterThan(relative)) {
+ return of;
+ }
+ factor = factor ? factor : 0.5;
+ let lum1 = of.getLuminosity(), lum2 = relative.getLuminosity();
+ factor = factor * (lum2 - lum1) / lum2;
+ return of.lighten(factor);
+ }
+
+ public static getDarkerColor(of: Color, relative: Color, factor?: number): Color {
+ if (of.isDarkerThan(relative)) {
+ return of;
+ }
+ factor = factor ? factor : 0.5;
+ let lum1 = of.getLuminosity(), lum2 = relative.getLuminosity();
+ factor = factor * (lum1 - lum2) / lum1;
+ return of.darken(factor);
+ }
+}
\ No newline at end of file
diff --git a/src/vs/base/common/errorMessage.ts b/src/vs/base/common/errorMessage.ts
new file mode 100644
index 00000000000..98080b8e980
--- /dev/null
+++ b/src/vs/base/common/errorMessage.ts
@@ -0,0 +1,242 @@
+/*---------------------------------------------------------------------------------------------
+ * 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 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 IConnectionErrorData {
+ status: number;
+ statusText?: string;
+ responseText?: string;
+}
+
+/**
+ * The base class for all connection errors originating from XHR requests.
+ */
+export class ConnectionError implements Error {
+ public status: number;
+ public statusText: string;
+ public responseText: string;
+ public errorMessage: string;
+ public errorCode: string;
+ public errorObject: any;
+ public name: string;
+
+ constructor(mixin: IConnectionErrorData);
+ constructor(request: IXHRResponse);
+ constructor(arg: any) {
+ this.status = arg.status;
+ this.statusText = arg.statusText;
+ this.name = 'ConnectionError';
+
+ try {
+ this.responseText = arg.responseText;
+ } catch (e) {
+ this.responseText = '';
+ }
+
+ this.errorMessage = null;
+ this.errorCode = null;
+ this.errorObject = null;
+
+ if (this.responseText) {
+ try {
+ let errorObj = JSON.parse(this.responseText);
+ this.errorMessage = errorObj.message;
+ this.errorCode = errorObj.code;
+ this.errorObject = errorObj;
+ } catch (error) {
+ // Ignore
+ }
+ }
+ }
+
+ public get message(): string {
+ return this.connectionErrorToMessage(this, false);
+ }
+
+ public get verboseMessage(): string {
+ return this.connectionErrorToMessage(this, true);
+ }
+
+ private connectionErrorDetailsToMessage(error: ConnectionError, verbose: boolean): string {
+ let errorCode = error.errorCode;
+ let errorMessage = error.errorMessage;
+
+ if (errorCode !== null && errorMessage !== null) {
+ return nls.localize(
+ {
+ key: 'message',
+ comment: [
+ '{0} represents the error message',
+ '{1} represents the error code'
+ ]
+ },
+ "{0}. Error code: {1}",
+ strings.rtrim(errorMessage, '.'), errorCode);
+ }
+
+ if (errorMessage !== null) {
+ return errorMessage;
+ }
+
+ if (verbose && error.responseText !== null) {
+ return error.responseText;
+ }
+
+ return null;
+ }
+
+ private connectionErrorToMessage(error: ConnectionError, verbose: boolean): string {
+ let details = this.connectionErrorDetailsToMessage(error, verbose);
+
+ // Status Code based Error
+ if (error.status === 401) {
+ if (details !== null) {
+ return nls.localize(
+ {
+ key: 'error.permission.verbose',
+ comment: [
+ '{0} represents detailed information why the permission got denied'
+ ]
+ },
+ "Permission Denied (HTTP {0})",
+ details);
+ }
+
+ return nls.localize('error.permission', "Permission Denied");
+ }
+
+ // Return error details if present
+ if (details) {
+ return details;
+ }
+
+ // Fallback to HTTP Status and Code
+ if (error.status > 0 && error.statusText !== null) {
+ if (verbose && error.responseText !== null && error.responseText.length > 0) {
+ return nls.localize('error.http.verbose', "{0} (HTTP {1}: {2})", error.statusText, error.status, error.responseText);
+ }
+
+ return nls.localize('error.http', "{0} (HTTP {1})", error.statusText, error.status);
+ }
+
+ // Finally its an Unknown Connection Error
+ if (verbose && error.responseText !== null && error.responseText.length > 0) {
+ return nls.localize('error.connection.unknown.verbose', "Unknown Connection Error ({0})", error.responseText);
+ }
+
+ return nls.localize('error.connection.unknown', "An unknown connection error occurred. Either you are no longer connected to the internet or the server you are connected to is offline.");
+ }
+}
+
+// Bug: Can not subclass a JS Type. Do it manually (as done in WinJS.Class.derive)
+objects.derive(Error, ConnectionError);
+
+function xhrToErrorMessage(xhr: IConnectionErrorData, verbose: boolean): string {
+ let ce = new ConnectionError(xhr);
+ if (verbose) {
+ return ce.verboseMessage;
+ } else {
+ return ce.message;
+ }
+}
+
+function exceptionToErrorMessage(exception: any, verbose: boolean): string {
+ if (exception.message) {
+ if (verbose && (exception.stack || exception.stacktrace)) {
+ return nls.localize('stackTrace.format', "{0}: {1}", detectSystemErrorMessage(exception), exception.stack || exception.stacktrace);
+ }
+
+ return detectSystemErrorMessage(exception);
+ }
+
+ return nls.localize('error.defaultMessage', "An unknown error occurred. Please consult the log for more details.");
+}
+
+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 exception.message;
+}
+
+/**
+ * Tries to generate a human readable error message out of the error. If the verbose parameter
+ * is set to true, the error message will include stacktrace details if provided.
+ * @returns A string containing the error message.
+ */
+export function toErrorMessage(error: any = null, verbose: boolean = false): string {
+ if (!error) {
+ return nls.localize('error.defaultMessage', "An unknown error occurred. Please consult the log for more details.");
+ }
+
+ if (Array.isArray(error)) {
+ let errors: any[] = arrays.coalesce(error);
+ let msg = toErrorMessage(errors[0], verbose);
+
+ if (errors.length > 1) {
+ return nls.localize('error.moreErrors', "{0} ({1} errors in total)", msg, errors.length);
+ }
+
+ return msg;
+ }
+
+ if (types.isString(error)) {
+ return error;
+ }
+
+ if (!types.isUndefinedOrNull(error.status)) {
+ return xhrToErrorMessage(error, verbose);
+ }
+
+ if (error.detail) {
+ let detail = error.detail;
+
+ if (detail.error) {
+ if (detail.error && !types.isUndefinedOrNull(detail.error.status)) {
+ return xhrToErrorMessage(detail.error, verbose);
+ }
+
+ if (types.isArray(detail.error)) {
+ for (let i = 0; i < detail.error.length; i++) {
+ if (detail.error[i] && !types.isUndefinedOrNull(detail.error[i].status)) {
+ return xhrToErrorMessage(detail.error[i], verbose);
+ }
+ }
+ }
+
+ else {
+ return exceptionToErrorMessage(detail.error, verbose);
+ }
+ }
+
+ if (detail.exception) {
+ if (!types.isUndefinedOrNull(detail.exception.status)) {
+ return xhrToErrorMessage(detail.exception, verbose);
+ }
+
+ return exceptionToErrorMessage(detail.exception, verbose);
+ }
+ }
+
+ if (error.stack) {
+ return exceptionToErrorMessage(error, verbose);
+ }
+
+ if (error.message) {
+ return error.message;
+ }
+
+ return nls.localize('error.defaultMessage', "An unknown error occurred. Please consult the log for more details.");
+}
diff --git a/src/vs/base/common/errors.ts b/src/vs/base/common/errors.ts
index 24ac4ae2794..ee0a4c84e79 100644
--- a/src/vs/base/common/errors.ts
+++ b/src/vs/base/common/errors.ts
@@ -4,14 +4,9 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
-import nls = require('vs/nls');
-import objects = require('vs/base/common/objects');
import platform = require('vs/base/common/platform');
import types = require('vs/base/common/types');
-import arrays = require('vs/base/common/arrays');
-import strings = require('vs/base/common/strings');
import {IAction} from 'vs/base/common/actions';
-import {IXHRResponse} from 'vs/base/common/http';
import Severity from 'vs/base/common/severity';
import { TPromise } from 'vs/base/common/winjs.base';
@@ -93,12 +88,6 @@ export function onUnexpectedPromiseError(promise: TPromise): TPromise {
return promise.then(null, onUnexpectedError);
}
-export interface IConnectionErrorData {
- status: number;
- statusText?: string;
- responseText?: string;
-}
-
export function transformErrorForSerialization(error: any): any {
if (error instanceof Error) {
let {name, message} = error;
@@ -115,230 +104,6 @@ export function transformErrorForSerialization(error: any): any {
return error;
}
-/**
- * The base class for all connection errors originating from XHR requests.
- */
-export class ConnectionError implements Error {
- public status: number;
- public statusText: string;
- public responseText: string;
- public errorMessage: string;
- public errorCode: string;
- public errorObject: any;
- public name: string;
-
- constructor(mixin: IConnectionErrorData);
- constructor(request: IXHRResponse);
- constructor(arg: any) {
- this.status = arg.status;
- this.statusText = arg.statusText;
- this.name = 'ConnectionError';
-
- try {
- this.responseText = arg.responseText;
- } catch (e) {
- this.responseText = '';
- }
-
- this.errorMessage = null;
- this.errorCode = null;
- this.errorObject = null;
-
- if (this.responseText) {
- try {
- let errorObj = JSON.parse(this.responseText);
- this.errorMessage = errorObj.message;
- this.errorCode = errorObj.code;
- this.errorObject = errorObj;
- } catch (error) {
- // Ignore
- }
- }
- }
-
- public get message(): string {
- return this.connectionErrorToMessage(this, false);
- }
-
- public get verboseMessage(): string {
- return this.connectionErrorToMessage(this, true);
- }
-
- private connectionErrorDetailsToMessage(error: ConnectionError, verbose: boolean): string {
- let errorCode = error.errorCode;
- let errorMessage = error.errorMessage;
-
- if (errorCode !== null && errorMessage !== null) {
- return nls.localize(
- {
- key: 'message',
- comment: [
- '{0} represents the error message',
- '{1} represents the error code'
- ]
- },
- "{0}. Error code: {1}",
- strings.rtrim(errorMessage, '.'), errorCode);
- }
-
- if (errorMessage !== null) {
- return errorMessage;
- }
-
- if (verbose && error.responseText !== null) {
- return error.responseText;
- }
-
- return null;
- }
-
- private connectionErrorToMessage(error: ConnectionError, verbose: boolean): string {
- let details = this.connectionErrorDetailsToMessage(error, verbose);
-
- // Status Code based Error
- if (error.status === 401) {
- if (details !== null) {
- return nls.localize(
- {
- key: 'error.permission.verbose',
- comment: [
- '{0} represents detailed information why the permission got denied'
- ]
- },
- "Permission Denied (HTTP {0})",
- details);
- }
-
- return nls.localize('error.permission', "Permission Denied");
- }
-
- // Return error details if present
- if (details) {
- return details;
- }
-
- // Fallback to HTTP Status and Code
- if (error.status > 0 && error.statusText !== null) {
- if (verbose && error.responseText !== null && error.responseText.length > 0) {
- return nls.localize('error.http.verbose', "{0} (HTTP {1}: {2})", error.statusText, error.status, error.responseText);
- }
-
- return nls.localize('error.http', "{0} (HTTP {1})", error.statusText, error.status);
- }
-
- // Finally its an Unknown Connection Error
- if (verbose && error.responseText !== null && error.responseText.length > 0) {
- return nls.localize('error.connection.unknown.verbose', "Unknown Connection Error ({0})", error.responseText);
- }
-
- return nls.localize('error.connection.unknown', "An unknown connection error occurred. Either you are no longer connected to the internet or the server you are connected to is offline.");
- }
-}
-
-// Bug: Can not subclass a JS Type. Do it manually (as done in WinJS.Class.derive)
-objects.derive(Error, ConnectionError);
-
-function xhrToErrorMessage(xhr: IConnectionErrorData, verbose: boolean): string {
- let ce = new ConnectionError(xhr);
- if (verbose) {
- return ce.verboseMessage;
- } else {
- return ce.message;
- }
-}
-
-function exceptionToErrorMessage(exception: any, verbose: boolean): string {
- if (exception.message) {
- if (verbose && (exception.stack || exception.stacktrace)) {
- return nls.localize('stackTrace.format', "{0}: {1}", detectSystemErrorMessage(exception), exception.stack || exception.stacktrace);
- }
-
- return detectSystemErrorMessage(exception);
- }
-
- return nls.localize('error.defaultMessage', "An unknown error occurred. Please consult the log for more details.");
-}
-
-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 exception.message;
-}
-
-/**
- * Tries to generate a human readable error message out of the error. If the verbose parameter
- * is set to true, the error message will include stacktrace details if provided.
- * @returns A string containing the error message.
- */
-export function toErrorMessage(error: any = null, verbose: boolean = false): string {
- if (!error) {
- return nls.localize('error.defaultMessage', "An unknown error occurred. Please consult the log for more details.");
- }
-
- if (Array.isArray(error)) {
- let errors: any[] = arrays.coalesce(error);
- let msg = toErrorMessage(errors[0], verbose);
-
- if (errors.length > 1) {
- return nls.localize('error.moreErrors', "{0} ({1} errors in total)", msg, errors.length);
- }
-
- return msg;
- }
-
- if (types.isString(error)) {
- return error;
- }
-
- if (!types.isUndefinedOrNull(error.status)) {
- return xhrToErrorMessage(error, verbose);
- }
-
- if (error.detail) {
- let detail = error.detail;
-
- if (detail.error) {
- if (detail.error && !types.isUndefinedOrNull(detail.error.status)) {
- return xhrToErrorMessage(detail.error, verbose);
- }
-
- if (types.isArray(detail.error)) {
- for (let i = 0; i < detail.error.length; i++) {
- if (detail.error[i] && !types.isUndefinedOrNull(detail.error[i].status)) {
- return xhrToErrorMessage(detail.error[i], verbose);
- }
- }
- }
-
- else {
- return exceptionToErrorMessage(detail.error, verbose);
- }
- }
-
- if (detail.exception) {
- if (!types.isUndefinedOrNull(detail.exception.status)) {
- return xhrToErrorMessage(detail.exception, verbose);
- }
-
- return exceptionToErrorMessage(detail.exception, verbose);
- }
- }
-
- if (error.stack) {
- return exceptionToErrorMessage(error, verbose);
- }
-
- if (error.message) {
- return error.message;
- }
-
- return nls.localize('error.defaultMessage', "An unknown error occurred. Please consult the log for more details.");
-}
-
const canceledName = 'Canceled';
/**
@@ -361,22 +126,22 @@ export function canceled(): Error {
* Returns an error that signals something is not implemented.
*/
export function notImplemented(): Error {
- return new Error(nls.localize('notImplementedError', "Not Implemented"));
+ return new Error('Not Implemented');
}
export function illegalArgument(name?: string): Error {
if (name) {
- return new Error(nls.localize('illegalArgumentError', "Illegal argument: {0}", name));
+ return new Error(`Illegal argument: ${name}`);
} else {
- return new Error(nls.localize('illegalArgumentError2', "Illegal argument"));
+ return new Error('Illegal argument');
}
}
export function illegalState(name?: string): Error {
if (name) {
- return new Error(nls.localize('illegalStateError', "Illegal state: {0}", name));
+ return new Error(`Illegal state: ${name}`);
} else {
- return new Error(nls.localize('illegalStateError2', "Illegal state"));
+ return new Error('Illegal state');
}
}
@@ -386,14 +151,6 @@ export function readonly(name?: string): Error {
: new Error('readonly property cannot be changed');
}
-export function loaderError(err: Error): Error {
- if (platform.isWeb) {
- return new Error(nls.localize('loaderError', "Failed to load a required file. Either you are no longer connected to the internet or the server you are connected to is offline. Please refresh the browser to try again."));
- }
-
- return new Error(nls.localize('loaderErrorNative', "Failed to load a required file. Please restart the application to try again. Details: {0}", JSON.stringify(err)));
-}
-
export interface IErrorOptions {
severity?: Severity;
actions?: IAction[];
diff --git a/src/vs/base/common/htmlContent.ts b/src/vs/base/common/htmlContent.ts
index 3943f6f8114..24d3d8dbbde 100644
--- a/src/vs/base/common/htmlContent.ts
+++ b/src/vs/base/common/htmlContent.ts
@@ -67,8 +67,8 @@ function markedStringEqual(a:MarkedString, b:MarkedString): boolean {
);
}
-export function textAsCodeBlock(text: string) : MarkedString {
- return { language: 'string', value: text };
+export function textToMarkedString(text: string) : MarkedString {
+ return text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
}
diff --git a/src/vs/base/common/mime.ts b/src/vs/base/common/mime.ts
index 650a2c99e28..272e14bd738 100644
--- a/src/vs/base/common/mime.ts
+++ b/src/vs/base/common/mime.ts
@@ -252,5 +252,5 @@ export function suggestFilename(theMime: string, prefix: string): string {
}
}
- return null;
+ return prefix; // without any known extension, just return the prefix
}
\ No newline at end of file
diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts
index 9b392e32010..c20ff1172a8 100644
--- a/src/vs/base/common/strings.ts
+++ b/src/vs/base/common/strings.ts
@@ -174,14 +174,21 @@ export function endsWith(haystack: string, needle: string): boolean {
}
}
-export function createRegExp(searchString: string, isRegex: boolean, matchCase: boolean, wholeWord: boolean, global:boolean): RegExp {
+export interface RegExpOptions {
+ matchCase?: boolean;
+ wholeWord?: boolean;
+ multiline?: boolean;
+ global?: boolean;
+}
+
+export function createRegExp(searchString: string, isRegex: boolean, options: RegExpOptions = {}): RegExp {
if (searchString === '') {
throw new Error('Cannot create regex from empty string');
}
if (!isRegex) {
searchString = searchString.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&');
}
- if (wholeWord) {
+ if (options.wholeWord) {
if (!/\B/.test(searchString.charAt(0))) {
searchString = '\\b' + searchString;
}
@@ -190,12 +197,15 @@ export function createRegExp(searchString: string, isRegex: boolean, matchCase:
}
}
let modifiers = '';
- if (global) {
+ if (options.global) {
modifiers += 'g';
}
- if (!matchCase) {
+ if (!options.matchCase) {
modifiers += 'i';
}
+ if (options.multiline) {
+ modifiers += 'm';
+ }
return new RegExp(searchString, modifiers);
}
diff --git a/src/vs/base/common/uuid.ts b/src/vs/base/common/uuid.ts
index 9ff483760c2..675167c31e8 100644
--- a/src/vs/base/common/uuid.ts
+++ b/src/vs/base/common/uuid.ts
@@ -39,8 +39,7 @@ class V4UUID extends ValueUUID {
private static _timeHighBits = ['8', '9', 'a', 'b'];
private static _oneOf(array:string[]):string {
- var idx = Math.floor(array.length * Math.random());
- return array[idx];
+ return array[Math.floor(array.length * Math.random())];
}
private static _randomHex():string {
@@ -92,22 +91,27 @@ class V4UUID extends ValueUUID {
/**
* An empty UUID that contains only zeros.
*/
-export var empty:UUID = new ValueUUID('00000000-0000-0000-0000-000000000000');
+export const empty:UUID = new ValueUUID('00000000-0000-0000-0000-000000000000');
export function v4():UUID {
return new V4UUID();
}
-var _UUIDPattern = /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/;
+const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
+
+export function isUUID(value: string): boolean {
+ return _UUIDPattern.test(value);
+}
/**
* Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
* @param value A uuid string.
*/
export function parse(value:string):UUID {
- if(!_UUIDPattern.test(value)) {
+ if(!isUUID(value)) {
throw new Error('invalid uuid');
}
+
return new ValueUUID(value);
}
diff --git a/src/vs/base/common/worker/workerClient.ts b/src/vs/base/common/worker/workerClient.ts
index 61fef76290d..86a5676b330 100644
--- a/src/vs/base/common/worker/workerClient.ts
+++ b/src/vs/base/common/worker/workerClient.ts
@@ -227,7 +227,9 @@ export class WorkerClient {
}
private _postMessage(msg:any): void {
- this._worker.postMessage(stringify(msg));
+ if (this._worker) {
+ this._worker.postMessage(stringify(msg));
+ }
}
private _onSerializedMessage(msg:string): void {
diff --git a/src/vs/base/node/stdFork.ts b/src/vs/base/node/stdFork.ts
index 030a884e889..3f5a4a3f7f3 100644
--- a/src/vs/base/node/stdFork.ts
+++ b/src/vs/base/node/stdFork.ts
@@ -109,7 +109,9 @@ export function fork(modulePath: string, args: string[], options: IForkOpts, cal
if (serverClosed) {
return;
}
+
serverClosed = true;
+ process.removeListener('exit', closeServer);
stdOutServer.close();
stdErrServer.close();
};
diff --git a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts
index ad55b7551fb..f0873cc1ba6 100644
--- a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts
+++ b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts
@@ -269,6 +269,10 @@ export class QuickOpenEntry {
return { labelHighlights, descriptionHighlights };
}
+
+ public isFile(): boolean {
+ return false; // TODO@Ben debt with editor history merging
+ }
}
export class QuickOpenEntryItem extends QuickOpenEntry {
diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
index d5d7a26817d..fa86665bc95 100644
--- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
+++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
@@ -12,7 +12,6 @@ import browser = require('vs/base/browser/browser');
import {EventType} from 'vs/base/common/events';
import types = require('vs/base/common/types');
import errors = require('vs/base/common/errors');
-import uuid = require('vs/base/common/uuid');
import {IQuickNavigateConfiguration, IAutoFocus, IEntryRunContext, IModel, Mode} from 'vs/base/parts/quickopen/common/quickOpen';
import {Filter, Renderer, DataSource, IModelProvider, AccessibilityProvider} from 'vs/base/parts/quickopen/browser/quickOpenViewer';
import {Dimension, Builder, $} from 'vs/base/browser/builder';
@@ -44,7 +43,6 @@ export interface IQuickOpenOptions {
inputPlaceHolder: string;
inputAriaLabel?: string;
actionProvider?: IActionProvider;
- enableAnimations?: boolean;
}
export interface IShowOptions {
@@ -92,7 +90,6 @@ export class QuickOpenWidget implements IModelProvider {
private isLoosingFocus: boolean;
private callbacks: IQuickOpenCallbacks;
private toUnbind: IDisposable[];
- private currentInputToken: string;
private quickNavigateConfiguration: IQuickNavigateConfiguration;
private container: HTMLElement;
private treeElement: HTMLElement;
@@ -100,6 +97,7 @@ export class QuickOpenWidget implements IModelProvider {
private usageLogger: IQuickOpenUsageLogger;
private layoutDimensions: Dimension;
private model: IModel;
+ private inputChangingTimeoutHandle: number;
constructor(container: HTMLElement, callbacks: IQuickOpenCallbacks, options: IQuickOpenOptions, usageLogger?: IQuickOpenUsageLogger) {
this.toUnbind = [];
@@ -444,9 +442,6 @@ export class QuickOpenWidget implements IModelProvider {
// Adjust UI for quick navigate mode
if (this.quickNavigateConfiguration) {
this.inputContainer.hide();
- if (this.options.enableAnimations) {
- this.treeContainer.removeClass('transition');
- }
this.builder.show();
this.tree.DOMFocus();
}
@@ -454,9 +449,6 @@ export class QuickOpenWidget implements IModelProvider {
// Otherwise use normal UI
else {
this.inputContainer.show();
- if (this.options.enableAnimations) {
- this.treeContainer.addClass('transition');
- }
this.builder.show();
this.inputBox.focus();
}
@@ -492,32 +484,25 @@ export class QuickOpenWidget implements IModelProvider {
}
private setInputAndLayout(input: IModel, autoFocus: IAutoFocus): void {
+ this.treeContainer.style({ height: `${this.getHeight(input)}px` });
- // Use a generated token to avoid race conditions from setting input
- let currentInputToken = uuid.generateUuid();
- this.currentInputToken = currentInputToken;
+ this.tree.setInput(null).then(() => {
+ this.model = input;
- // setInput and Layout
- this.setTreeHeightForInput(input).then(() => {
- if (this.currentInputToken === currentInputToken) {
- this.tree.setInput(null).then(() => {
- this.model = input;
+ // ARIA
+ this.inputElement.setAttribute('aria-haspopup', String(input && input.entries && input.entries.length > 0));
- // ARIA
- this.inputElement.setAttribute('aria-haspopup', String(input && input.entries && input.entries.length > 0));
+ return this.tree.setInput(input);
+ }).done(() => {
- return this.tree.setInput(input);
- }).done(() => {
- // Indicate entries to tree
- this.tree.layout();
+ // Indicate entries to tree
+ this.tree.layout();
- // Handle auto focus
- if (input && input.entries.some(e => this.isElementVisible(input, e))) {
- this.autoFocus(input, autoFocus);
- }
- }, errors.onUnexpectedError);
+ // Handle auto focus
+ if (input && input.entries.some(e => this.isElementVisible(input, e))) {
+ this.autoFocus(input, autoFocus);
}
- });
+ }, errors.onUnexpectedError);
}
private isElementVisible(input: IModel, e: T): boolean {
@@ -596,54 +581,22 @@ export class QuickOpenWidget implements IModelProvider {
}
// Apply height & Refresh
- this.setTreeHeightForInput(input).then(() => {
- this.tree.refresh().done(() => {
+ this.treeContainer.style({ height: `${this.getHeight(input)}px` });
+ this.tree.refresh().done(() => {
- // Indicate entries to tree
- this.tree.layout();
+ // Indicate entries to tree
+ this.tree.layout();
- let doAutoFocus = autoFocus && input && input.entries.some(e => this.isElementVisible(input, e));
- if (doAutoFocus && !autoFocus.autoFocusPrefixMatch) {
- doAutoFocus = !this.tree.getFocus(); // if auto focus is not for prefix matches, we do not want to change what the user has focussed already
- }
+ let doAutoFocus = autoFocus && input && input.entries.some(e => this.isElementVisible(input, e));
+ if (doAutoFocus && !autoFocus.autoFocusPrefixMatch) {
+ doAutoFocus = !this.tree.getFocus(); // if auto focus is not for prefix matches, we do not want to change what the user has focussed already
+ }
- // Handle auto focus
- if (doAutoFocus) {
- this.autoFocus(input, autoFocus);
- }
- }, errors.onUnexpectedError);
- });
- }
-
- private setTreeHeightForInput(input: IModel): TPromise {
- let newHeight = this.getHeight(input) + 'px';
- let oldHeight = this.treeContainer.style('height');
-
- // Apply
- this.treeContainer.style({ height: newHeight });
-
- // Return instantly if we don't CSS transition or the height is the same as old
- if (!this.treeContainer.hasClass('transition') || oldHeight === newHeight) {
- return TPromise.as(null);
- }
-
- // Otherwise return promise that only fulfills when the CSS transition has ended
- return new TPromise((c, e) => {
- let unbind: IDisposable[] = [];
- let complete = false;
- let completeHandler = () => {
- if (!complete) {
- complete = true;
-
- unbind = dispose(unbind);
-
- c(null);
- }
- };
-
- this.treeContainer.once('webkitTransitionEnd', completeHandler, unbind);
- this.treeContainer.once('transitionend', completeHandler, unbind);
- });
+ // Handle auto focus
+ if (doAutoFocus) {
+ this.autoFocus(input, autoFocus);
+ }
+ }, errors.onUnexpectedError);
}
private getHeight(input: IModel): number {
@@ -761,6 +714,11 @@ export class QuickOpenWidget implements IModelProvider {
return;
}
+ // If the input changes, indicate this to the tree
+ if (!!this.getInput()) {
+ this.onInputChanging();
+ }
+
// Adapt tree height to entries and apply input
this.setInputAndLayout(input, autoFocus);
@@ -770,6 +728,20 @@ export class QuickOpenWidget implements IModelProvider {
}
}
+ private onInputChanging(): void {
+ if (this.inputChangingTimeoutHandle) {
+ clearTimeout(this.inputChangingTimeoutHandle);
+ this.inputChangingTimeoutHandle = null;
+ }
+
+ // when the input is changing in quick open, we indicate this as CSS class to the widget
+ // for a certain timeout. this helps reducing some hectic UI updates when input changes quickly
+ this.builder.addClass('content-changing');
+ this.inputChangingTimeoutHandle = setTimeout(() => {
+ this.builder.removeClass('content-changing');
+ }, 500);
+ }
+
public getInput(): IModel {
return this.tree.getInput();
}
diff --git a/src/vs/base/parts/quickopen/browser/quickopen.css b/src/vs/base/parts/quickopen/browser/quickopen.css
index ddd5fe0dd44..92e2e617f4d 100644
--- a/src/vs/base/parts/quickopen/browser/quickopen.css
+++ b/src/vs/base/parts/quickopen/browser/quickopen.css
@@ -37,16 +37,10 @@
.quick-open-widget .quick-open-tree {
line-height: 1.8em;
- height: 0; /* need an initial height to trigger transition on first open */
}
-.quick-open-widget .quick-open-tree.transition {
- -webkit-transition: height 100ms ease-in;
- -ms-transition: height 100ms ease-in;
- -moz-transition: height 100ms ease-in;
- -khtml-transition: height 100ms ease-in;
- -o-transition: height 100ms ease-in;
- transition: height 100ms ease-in;
+.quick-open-widget.content-changing .quick-open-tree .monaco-scrollable-element .slider {
+ display: none; /* scrollbar slider causes some hectic updates when input changes quickly, so hide it while quick open changes */
}
.quick-open-widget .quick-open-tree .quick-open-entry {
diff --git a/src/vs/base/parts/tree/browser/collapsed-dark.svg b/src/vs/base/parts/tree/browser/collapsed-dark.svg
new file mode 100755
index 00000000000..cf5c3641aa7
--- /dev/null
+++ b/src/vs/base/parts/tree/browser/collapsed-dark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/vs/base/parts/tree/browser/collapsed-hc.svg b/src/vs/base/parts/tree/browser/collapsed-hc.svg
new file mode 100644
index 00000000000..145c763338f
--- /dev/null
+++ b/src/vs/base/parts/tree/browser/collapsed-hc.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/vs/base/parts/tree/browser/collapsed.svg b/src/vs/base/parts/tree/browser/collapsed.svg
new file mode 100755
index 00000000000..3a63808c358
--- /dev/null
+++ b/src/vs/base/parts/tree/browser/collapsed.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/vs/base/parts/tree/browser/expanded-dark.svg b/src/vs/base/parts/tree/browser/expanded-dark.svg
new file mode 100755
index 00000000000..73d41e63990
--- /dev/null
+++ b/src/vs/base/parts/tree/browser/expanded-dark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/vs/base/parts/tree/browser/expanded-hc.svg b/src/vs/base/parts/tree/browser/expanded-hc.svg
new file mode 100644
index 00000000000..d38d4abc89e
--- /dev/null
+++ b/src/vs/base/parts/tree/browser/expanded-hc.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/vs/base/parts/tree/browser/expanded.svg b/src/vs/base/parts/tree/browser/expanded.svg
new file mode 100755
index 00000000000..75f73adbb02
--- /dev/null
+++ b/src/vs/base/parts/tree/browser/expanded.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/vs/base/parts/tree/browser/loading-hc.svg b/src/vs/base/parts/tree/browser/loading-hc.svg
new file mode 100644
index 00000000000..9d4fa14a907
--- /dev/null
+++ b/src/vs/base/parts/tree/browser/loading-hc.svg
@@ -0,0 +1,29 @@
+
+
diff --git a/src/vs/base/parts/tree/browser/tree.css b/src/vs/base/parts/tree/browser/tree.css
index 3f029712b7f..56377a213e5 100644
--- a/src/vs/base/parts/tree/browser/tree.css
+++ b/src/vs/base/parts/tree/browser/tree.css
@@ -44,11 +44,7 @@
.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content {
position: relative;
- -moz-transition: opacity 0.15s ease-out;
- -webkit-transition: opacity 0.15s ease-out;
- -ms-transition: opacity 0.15s ease-out;
- -o-transition: opacity 0.15s ease-out;
- transition: opacity 0.15s ease-out;
+ height: 100%;
}
.monaco-tree-drag-image {
@@ -70,76 +66,23 @@
/* Expansion */
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:before,
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:after {
+.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:before {
+ content: ' ';
position: absolute;
display: block;
- content: "";
- width: 0;
- height: 0;
- border-style: solid;
-}
-
-/* Expansion: collapsed */
-
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:before {
- border-width: 4px;
- border-left-width: 5px;
- top: 8px;
- left: -10px;
-}
-
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:after {
- border-width: 2px;
- border-left-width: 2px;
- top: 10px;
- left: -9px;
-}
-
-.monaco-tree.no-row-padding .monaco-tree-rows > .monaco-tree-row.has-children > .content:before {
- left: 10px;
-}
-
-.monaco-tree.no-row-padding .monaco-tree-rows > .monaco-tree-row.has-children > .content:after {
- left: 11px;
-}
-
-/* Expansion: expanded */
-
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.expanded > .content:before {
- border-width: 6px 6px 0 5px;
- top: 9px;
+ background: url('collapsed.svg') 50% 50% no-repeat;
+ width: 16px;
+ height: 100%;
+ top: 0;
left: -16px;
}
-.monaco-tree.no-row-padding .monaco-tree-rows > .monaco-tree-row.expanded > .content:before {
- left: 4px;
+.monaco-tree .monaco-tree-rows > .monaco-tree-row.expanded > .content:before {
+ background-image: url('expanded.svg');
}
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.expanded > .content:after {
- border-width: 0;
-}
-
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.selected.expanded > .content:before {
- border-left-width: 5px;
-}
-
-.monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected.expanded > .content:before {
- border-left-width: 5px;
-}
-
-/* Refreshing */
.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {
- background: url('loading.svg') 50% 50% no-repeat;
- width: 10px;
- height: 10px;
- border: none;
- top: 7px;
- left: -12px;
-}
-
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:after {
- background: none;
+ background-image: url('loading.svg');
}
/* Highlighted */
@@ -148,8 +91,8 @@
opacity: 0.3;
}
-
/* Bare row */
+
.monaco-tree.bare .monaco-tree-wrapper.drop-target,
.monaco-tree.bare .monaco-tree-row {
color: inherit !important;
@@ -157,6 +100,7 @@
}
/* Default style */
+
.monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: #DCEBFC; }
.monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: #4FA7FF; color: white; }
.monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: #3399FF; color: white; }
@@ -165,20 +109,8 @@
.monaco-tree .monaco-tree-wrapper.drop-target,
.monaco-tree .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: #DDECFF !important; color: inherit !important; }
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:before { border-color: transparent; border-left-color: #A6A6A6; }
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:after { border-color: transparent; border-left-color: #F6F6F6; }
-.monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected.has-children > .content:before { border-left-color: white; }
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.selected.has-children > .content:before { border-left-color: #646465; }
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children:hover:not(.selected):not(.focused) > .content:after { border-left-color: #f0f0f0; }
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.selected.has-children > .content:after { border-left-color: #CCCEDB; }
-.monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected.has-children > .content:after { border-left-color: #3399FF; }
-
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.expanded > .content:before { border-color: transparent; border-right-color: #646465; }
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.expanded > .content:after { border-color: transparent; }
-.monaco-tree .monaco-tree-rows > .monaco-tree-row.selected.expanded > .content:before { border-left-color: transparent; }
-.monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected.expanded > .content:before { border-right-color: white; border-left-color: transparent; }
-
/* VS Dark */
+
.vs-dark .monaco-tree.focused .monaco-tree-row.focused:not(.highlighted) { background-color: #073655; }
.vs-dark .monaco-tree.focused .monaco-tree-row.selected:not(.highlighted) { background-color: #0E639C; color: white; }
.vs-dark .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: #094771; color: white; }
@@ -187,17 +119,20 @@
.vs-dark .monaco-tree-wrapper.drop-target,
.vs-dark .monaco-tree .monaco-tree-row.drop-target { background-color: #383B3D !important; color: inherit !important; }
-/* VS Dark twistie */
-.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:before { border-left-color: #D4D4D4; }
-.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:after { border-left-color: #252526; }
-.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row.expanded > .content:before { border-left-color: transparent; border-right-color: #D4D4D4; }
-.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children:hover:not(.selected):not(.focused) > .content:after { border-left-color: #2A2D2E; }
+.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:before {
+ background-image: url('collapsed-dark.svg');
+}
+
+.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row.expanded > .content:before {
+ background-image: url('expanded-dark.svg');
+}
.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {
background-image: url('loading-dark.svg');
}
/* High Contrast Theming */
+
.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row { background: none !important; border: 1px solid transparent; }
.hc-black .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { border: 1px dotted #f38518; }
.hc-black .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { border: 1px solid #f38518; }
@@ -207,20 +142,15 @@
.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row.drop-target { background: none !important; border: 1px dashed #f38518; }
.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:before {
- border: none;
- content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRsMS41ODYgMS41ODYtMS41ODYgMS41ODZ2LTMuMTcyeiIvPjwvc3ZnPg==");
- top: 2px;
- left: -16px;
-}
-
-.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children > .content:after {
- border: none;
+ background-image: url('collapsed-hc.svg');
}
.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row.expanded > .content:before {
- border: none;
- content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTExIDEwLjA3aC01LjY1Nmw1LjY1Ni01LjY1NnY1LjY1NnoiLz48L3N2Zz4=");
- top: 3px;
+ background-image: url('expanded-hc.svg');
+}
+
+.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {
+ background-image: url('loading-hc.svg');
}
.monaco-tree-action.collapse-all {
diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts
index eec80162bf2..3a830ba9c78 100644
--- a/src/vs/base/parts/tree/browser/treeView.ts
+++ b/src/vs/base/parts/tree/browser/treeView.ts
@@ -489,6 +489,7 @@ export class TreeView extends HeightMap {
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),
useShadows: context.options.useShadows,
diff --git a/src/vs/base/test/common/color.test.ts b/src/vs/base/test/common/color.test.ts
new file mode 100644
index 00000000000..67d2469f11e
--- /dev/null
+++ b/src/vs/base/test/common/color.test.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.
+ *--------------------------------------------------------------------------------------------*/
+
+'use strict';
+
+import {Color} from 'vs/base/common/color';
+import * as assert from 'assert';
+
+suite('Color', () => {
+
+ test('rgba2hsla', function () {
+ assert.deepEqual({ h: 0, s: 0, l: 0, a: 1 }, Color.fromRGBA({ r: 0, g: 0, b: 0, a: 1 }).toHSLA());
+ assert.deepEqual({ h: 0, s: 0, l: 1, a: 1 }, Color.fromRGBA({ r: 255, g: 255, b: 255, a: 1 }).toHSLA());
+
+ assert.deepEqual({ h: 0, s: 1, l: 0.5, a: 1 }, Color.fromRGBA({ r: 255, g: 0, b: 0, a: 1 }).toHSLA());
+ assert.deepEqual({ h: 120, s: 1, l: 0.5, a: 1 }, Color.fromRGBA({ r: 0, g: 255, b: 0, a: 1 }).toHSLA());
+ assert.deepEqual({ h: 240, s: 1, l: 0.5, a: 1 }, Color.fromRGBA({ r: 0, g: 0, b: 255, a: 1 }).toHSLA());
+
+ assert.deepEqual({ h: 60, s: 1, l: 0.5, a: 1 }, Color.fromRGBA({ r: 255, g: 255, b: 0, a: 1 }).toHSLA());
+ assert.deepEqual({ h: 180, s: 1, l: 0.5, a: 1 }, Color.fromRGBA({ r: 0, g: 255, b: 255, a: 1 }).toHSLA());
+ assert.deepEqual({ h: 300, s: 1, l: 0.5, a: 1 }, Color.fromRGBA({ r: 255, g: 0, b: 255, a: 1 }).toHSLA());
+
+ assert.deepEqual({ h: 0, s: 0, l: 0.753, a: 1 }, Color.fromRGBA({ r: 192, g: 192, b: 192, a: 1 }).toHSLA());
+
+ assert.deepEqual({ h: 0, s: 0, l: 0.502, a: 1 }, Color.fromRGBA({ r: 128, g: 128, b: 128, a: 1 }).toHSLA());
+ assert.deepEqual({ h: 0, s: 1, l: 0.251, a: 1 }, Color.fromRGBA({ r: 128, g: 0, b: 0, a: 1 }).toHSLA());
+ assert.deepEqual({ h: 60, s: 1, l: 0.251, a: 1 }, Color.fromRGBA({ r: 128, g: 128, b: 0, a: 1 }).toHSLA());
+ assert.deepEqual({ h: 120, s: 1, l: 0.251, a: 1 }, Color.fromRGBA({ r: 0, g: 128, b: 0, a: 1 }).toHSLA());
+ assert.deepEqual({ h: 300, s: 1, l: 0.251, a: 1 }, Color.fromRGBA({ r: 128, g: 0, b: 128, a: 1 }).toHSLA());
+ assert.deepEqual({ h: 180, s: 1, l: 0.251, a: 1 }, Color.fromRGBA({ r: 0, g: 128, b: 128, a: 1 }).toHSLA());
+ assert.deepEqual({ h: 240, s: 1, l: 0.251, a: 1 }, Color.fromRGBA({ r: 0, g: 0, b: 128, a: 1 }).toHSLA());
+ });
+
+ test('hsla2rgba', function () {
+ assert.deepEqual({ r: 0, g: 0, b: 0, a: 1 }, Color.fromHSLA({ h: 0, s: 0, l: 0, a: 1 }).toRGBA());
+ assert.deepEqual({ r: 255, g: 255, b: 255, a: 1 }, Color.fromHSLA({ h: 0, s: 0, l: 1, a: 1 }).toRGBA());
+
+ assert.deepEqual({ r: 255, g: 0, b: 0, a: 1 }, Color.fromHSLA({ h: 0, s: 1, l: 0.5, a: 1 }).toRGBA());
+ assert.deepEqual({ r: 0, g: 255, b: 0, a: 1 }, Color.fromHSLA({ h: 120, s: 1, l: 0.5, a: 1 }).toRGBA());
+ assert.deepEqual({ r: 0, g: 0, b: 255, a: 1 }, Color.fromHSLA({ h: 240, s: 1, l: 0.5, a: 1 }).toRGBA());
+
+ assert.deepEqual({ r: 255, g: 255, b: 0, a: 1 }, Color.fromHSLA({ h: 60, s: 1, l: 0.5, a: 1 }).toRGBA());
+ assert.deepEqual({ r: 0, g: 255, b: 255, a: 1 }, Color.fromHSLA({ h: 180, s: 1, l: 0.5, a: 1 }).toRGBA());
+ assert.deepEqual({ r: 255, g: 0, b: 255, a: 1 }, Color.fromHSLA({ h: 300, s: 1, l: 0.5, a: 1 }).toRGBA());
+
+ assert.deepEqual({ r: 192, g: 192, b: 192, a: 1 }, Color.fromHSLA({ h: 0, s: 0, l: 0.753, a: 1 }).toRGBA());
+
+ assert.deepEqual({ r: 128, g: 128, b: 128, a: 1 }, Color.fromHSLA({ h: 0, s: 0, l: 0.502, a: 1 }).toRGBA());
+ assert.deepEqual({ r: 128, g: 0, b: 0, a: 1 }, Color.fromHSLA({ h: 0, s: 1, l: 0.251, a: 1 }).toRGBA());
+ assert.deepEqual({ r: 128, g: 128, b: 0, a: 1 }, Color.fromHSLA({ h: 60, s: 1, l: 0.251, a: 1 }).toRGBA());
+ assert.deepEqual({ r: 0, g: 128, b: 0, a: 1 }, Color.fromHSLA({ h: 120, s: 1, l: 0.251, a: 1 }).toRGBA());
+ assert.deepEqual({ r: 128, g: 0, b: 128, a: 1 }, Color.fromHSLA({ h: 300, s: 1, l: 0.251, a: 1 }).toRGBA());
+ assert.deepEqual({ r: 0, g: 128, b: 128, a: 1 }, Color.fromHSLA({ h: 180, s: 1, l: 0.251, a: 1 }).toRGBA());
+ assert.deepEqual({ r: 0, g: 0, b: 128, a: 1 }, Color.fromHSLA({ h: 240, s: 1, l: 0.251, a: 1 }).toRGBA());
+ });
+
+ test('hex2rgba', function () {
+ assert.deepEqual({ r: 0, g: 0, b: 0, a: 1 }, Color.fromHex('#000000').toRGBA());
+ assert.deepEqual({ r: 255, g: 255, b: 255, a: 1 }, Color.fromHex('#FFFFFF').toRGBA());
+
+ assert.deepEqual({ r: 255, g: 0, b: 0, a: 1 }, Color.fromHex('#FF0000').toRGBA());
+ assert.deepEqual({ r: 0, g: 255, b: 0, a: 1 }, Color.fromHex('#00FF00').toRGBA());
+ assert.deepEqual({ r: 0, g: 0, b: 255, a: 1 }, Color.fromHex('#0000FF').toRGBA());
+
+ assert.deepEqual({ r: 255, g: 255, b: 0, a: 1 }, Color.fromHex('#FFFF00').toRGBA());
+ assert.deepEqual({ r: 0, g: 255, b: 255, a: 1 }, Color.fromHex('#00FFFF').toRGBA());
+ assert.deepEqual({ r: 255, g: 0, b: 255, a: 1 }, Color.fromHex('#FF00FF').toRGBA());
+
+ assert.deepEqual({ r: 192, g: 192, b: 192, a: 1 }, Color.fromHex('#C0C0C0').toRGBA());
+
+ assert.deepEqual({ r: 128, g: 128, b: 128, a: 1 }, Color.fromHex('#808080').toRGBA());
+ assert.deepEqual({ r: 128, g: 0, b: 0, a: 1 }, Color.fromHex('#800000').toRGBA());
+ assert.deepEqual({ r: 128, g: 128, b: 0, a: 1 }, Color.fromHex('#808000').toRGBA());
+ assert.deepEqual({ r: 0, g: 128, b: 0, a: 1 }, Color.fromHex('#008000').toRGBA());
+ assert.deepEqual({ r: 128, g: 0, b: 128, a: 1 }, Color.fromHex('#800080').toRGBA());
+ assert.deepEqual({ r: 0, g: 128, b: 128, a: 1 }, Color.fromHex('#008080').toRGBA());
+ assert.deepEqual({ r: 0, g: 0, b: 128, a: 1 }, Color.fromHex('#000080').toRGBA());
+ });
+
+ test('isLighterColor', function () {
+ let color1 = Color.fromHSLA({ h: 60, s: 1, l: 0.5, a: 1 }), color2 = Color.fromHSLA({ h: 0, s: 0, l: 0.753, a: 1 });
+
+ assert.ok(color1.isLighterThan(color2));
+
+ // Abyss theme
+ assert.ok(Color.fromHex('#770811').isLighterThan(Color.fromHex('#000c18')));
+ });
+
+ test('getLighterColor', function () {
+ let color1 = Color.fromHSLA({ h: 60, s: 1, l: 0.5, a: 1 }), color2 = Color.fromHSLA({ h: 0, s: 0, l: 0.753, a: 1 });
+
+ assert.deepEqual(color1.toHSLA(), Color.getLighterColor(color1, color2).toHSLA());
+ assert.deepEqual({ h: 0, s: 0, l: 0.914, a: 1 }, Color.getLighterColor(color2, color1).toHSLA());
+ assert.deepEqual({ h: 0, s: 0, l: 0.851, a: 1 }, Color.getLighterColor(color2, color1, 0.3).toHSLA());
+ assert.deepEqual({ h: 0, s: 0, l: 0.98, a: 1 }, Color.getLighterColor(color2, color1, 0.7).toHSLA());
+ assert.deepEqual({ h: 0, s: 0, l: 1, a: 1 }, Color.getLighterColor(color2, color1, 1).toHSLA());
+
+ });
+
+ test('isDarkerColor', function () {
+ let color1 = Color.fromHSLA({ h: 60, s: 1, l: 0.5, a: 1 }), color2 = Color.fromHSLA({ h: 0, s: 0, l: 0.753, a: 1 });
+
+ assert.ok(color2.isDarkerThan(color1));
+
+ });
+
+ test('getDarkerColor', function () {
+ let color1 = Color.fromHSLA({ h: 60, s: 1, l: 0.5, a: 1 }), color2 = Color.fromHSLA({ h: 0, s: 0, l: 0.753, a: 1 });
+
+ assert.deepEqual(color2.toHSLA(), Color.getDarkerColor(color2, color1).toHSLA());
+ assert.deepEqual({ h: 60, s: 1, l: 0.392, a: 1 }, Color.getDarkerColor(color1, color2).toHSLA());
+ assert.deepEqual({ h: 60, s: 1, l: 0.435, a: 1 }, Color.getDarkerColor(color1, color2, 0.3).toHSLA());
+ assert.deepEqual({ h: 60, s: 1, l: 0.349, a: 1 }, Color.getDarkerColor(color1, color2, 0.7).toHSLA());
+ assert.deepEqual({ h: 60, s: 1, l: 0.284, a: 1 }, Color.getDarkerColor(color1, color2, 1).toHSLA());
+
+ // Abyss theme
+ assert.deepEqual({ h: 355, s: 0.874, l: 0.157, a: 1 }, Color.getDarkerColor(Color.fromHex('#770811'), Color.fromHex('#000c18'), 0.4).toHSLA());
+ });
+
+ test('luminosity', function () {
+ assert.deepEqual(0, Color.fromRGBA({ r: 0, g: 0, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(1, Color.fromRGBA({ r: 255, g: 255, b: 255, a: 1 }).getLuminosity());
+
+ assert.deepEqual(0.2126, Color.fromRGBA({ r: 255, g: 0, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.7152, Color.fromRGBA({ r: 0, g: 255, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.0722, Color.fromRGBA({ r: 0, g: 0, b: 255, a: 1 }).getLuminosity());
+
+ assert.deepEqual(0.9278, Color.fromRGBA({ r: 255, g: 255, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.7874, Color.fromRGBA({ r: 0, g: 255, b: 255, a: 1 }).getLuminosity());
+ assert.deepEqual(0.2848, Color.fromRGBA({ r: 255, g: 0, b: 255, a: 1 }).getLuminosity());
+
+ assert.deepEqual(0.5271, Color.fromRGBA({ r: 192, g: 192, b: 192, a: 1 }).getLuminosity());
+
+ assert.deepEqual(0.2159, Color.fromRGBA({ r: 128, g: 128, b: 128, a: 1 }).getLuminosity());
+ assert.deepEqual(0.0459, Color.fromRGBA({ r: 128, g: 0, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.2003, Color.fromRGBA({ r: 128, g: 128, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.1544, Color.fromRGBA({ r: 0, g: 128, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.0615, Color.fromRGBA({ r: 128, g: 0, b: 128, a: 1 }).getLuminosity());
+ assert.deepEqual(0.17, Color.fromRGBA({ r: 0, g: 128, b: 128, a: 1 }).getLuminosity());
+ assert.deepEqual(0.0156, Color.fromRGBA({ r: 0, g: 0, b: 128, a: 1 }).getLuminosity());
+ });
+
+ test('contrast', function () {
+ assert.deepEqual(0, Color.fromRGBA({ r: 0, g: 0, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(1, Color.fromRGBA({ r: 255, g: 255, b: 255, a: 1 }).getLuminosity());
+
+ assert.deepEqual(0.2126, Color.fromRGBA({ r: 255, g: 0, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.7152, Color.fromRGBA({ r: 0, g: 255, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.0722, Color.fromRGBA({ r: 0, g: 0, b: 255, a: 1 }).getLuminosity());
+
+ assert.deepEqual(0.9278, Color.fromRGBA({ r: 255, g: 255, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.7874, Color.fromRGBA({ r: 0, g: 255, b: 255, a: 1 }).getLuminosity());
+ assert.deepEqual(0.2848, Color.fromRGBA({ r: 255, g: 0, b: 255, a: 1 }).getLuminosity());
+
+ assert.deepEqual(0.5271, Color.fromRGBA({ r: 192, g: 192, b: 192, a: 1 }).getLuminosity());
+
+ assert.deepEqual(0.2159, Color.fromRGBA({ r: 128, g: 128, b: 128, a: 1 }).getLuminosity());
+ assert.deepEqual(0.0459, Color.fromRGBA({ r: 128, g: 0, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.2003, Color.fromRGBA({ r: 128, g: 128, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.1544, Color.fromRGBA({ r: 0, g: 128, b: 0, a: 1 }).getLuminosity());
+ assert.deepEqual(0.0615, Color.fromRGBA({ r: 128, g: 0, b: 128, a: 1 }).getLuminosity());
+ assert.deepEqual(0.17, Color.fromRGBA({ r: 0, g: 128, b: 128, a: 1 }).getLuminosity());
+ assert.deepEqual(0.0156, Color.fromRGBA({ r: 0, g: 0, b: 128, a: 1 }).getLuminosity());
+ });
+
+});
diff --git a/src/vs/base/test/common/errors.test.ts b/src/vs/base/test/common/errors.test.ts
index 1e7f7200559..22472c8d745 100644
--- a/src/vs/base/test/common/errors.test.ts
+++ b/src/vs/base/test/common/errors.test.ts
@@ -5,7 +5,7 @@
'use strict';
import * as assert from 'assert';
-import { toErrorMessage } from 'vs/base/common/errors';
+import { toErrorMessage } from 'vs/base/common/errorMessage';
suite('Errors', () => {
test('Get Error Message', function () {
diff --git a/src/vs/base/worker/defaultWorkerFactory.ts b/src/vs/base/worker/defaultWorkerFactory.ts
index abfa5b9935c..87d36ddc78b 100644
--- a/src/vs/base/worker/defaultWorkerFactory.ts
+++ b/src/vs/base/worker/defaultWorkerFactory.ts
@@ -10,7 +10,7 @@ import {logOnceWebWorkerWarning, IWorker, IWorkerCallback, IWorkerFactory} from
import * as dom from 'vs/base/browser/dom';
function defaultGetWorkerUrl(workerId:string, label:string): string {
- return require.toUrl('./' + workerId);
+ return require.toUrl('./' + workerId) + '#' + label;
}
var getWorkerUrl = flags.getCrossOriginWorkerScriptUrl || defaultGetWorkerUrl;
@@ -41,7 +41,9 @@ class WebWorker implements IWorker {
}
public postMessage(msg:string): void {
- this.worker.postMessage(msg);
+ if (this.worker) {
+ this.worker.postMessage(msg);
+ }
}
public dispose(): void {
@@ -128,10 +130,12 @@ export class DefaultWorkerFactory implements IWorkerFactory {
private static LAST_WORKER_ID = 0;
+ private _label: string;
private _fallbackToIframe:boolean;
private _webWorkerFailedBeforeError:any;
- constructor(fallbackToIframe:boolean) {
+ constructor(label:string, fallbackToIframe:boolean) {
+ this._label = label;
this._fallbackToIframe = fallbackToIframe;
this._webWorkerFailedBeforeError = false;
}
@@ -145,7 +149,7 @@ export class DefaultWorkerFactory implements IWorkerFactory {
}
try {
- return new WebWorker(moduleId, workerId, 'service' + workerId, onMessageCallback, (err) => {
+ return new WebWorker(moduleId, workerId, this._label || 'anonymous' + workerId, onMessageCallback, (err) => {
logOnceWebWorkerWarning(err);
this._webWorkerFailedBeforeError = err;
onErrorCallback(err);
@@ -159,7 +163,7 @@ export class DefaultWorkerFactory implements IWorkerFactory {
if (this._webWorkerFailedBeforeError) {
throw this._webWorkerFailedBeforeError;
}
- return new WebWorker(moduleId, workerId, 'service' + workerId, onMessageCallback, (err) => {
+ return new WebWorker(moduleId, workerId, this._label || 'anonymous' + workerId, onMessageCallback, (err) => {
logOnceWebWorkerWarning(err);
this._webWorkerFailedBeforeError = err;
onErrorCallback(err);
diff --git a/src/vs/base/worker/workerMain.ts b/src/vs/base/worker/workerMain.ts
index 717ca10fdf7..461c9a52374 100644
--- a/src/vs/base/worker/workerMain.ts
+++ b/src/vs/base/worker/workerMain.ts
@@ -18,14 +18,16 @@
let loadCode = function(moduleId) {
require([moduleId], function(ws) {
- let messageHandler = ws.create((msg:any) => {
- (self).postMessage(msg);
- }, null);
+ setTimeout(function() {
+ let messageHandler = ws.create((msg:any) => {
+ (self).postMessage(msg);
+ }, null);
- self.onmessage = (e) => messageHandler.onmessage(e.data);
- while(beforeReadyMessages.length > 0) {
- self.onmessage(beforeReadyMessages.shift());
- }
+ self.onmessage = (e) => messageHandler.onmessage(e.data);
+ while(beforeReadyMessages.length > 0) {
+ self.onmessage(beforeReadyMessages.shift());
+ }
+ }, 0);
});
};
diff --git a/src/vs/code/electron-main/auto-updater.win32.ts b/src/vs/code/electron-main/auto-updater.win32.ts
index c5613d59b7f..a32e78e0504 100644
--- a/src/vs/code/electron-main/auto-updater.win32.ts
+++ b/src/vs/code/electron-main/auto-updater.win32.ts
@@ -44,7 +44,7 @@ export class Win32AutoUpdaterImpl extends EventEmitter {
}
get cachePath(): TPromise {
- let result = path.join(tmpdir(), 'vscode-update');
+ const result = path.join(tmpdir(), 'vscode-update');
return new TPromise((c, e) => mkdirp(result, null, err => err ? e(err) : c(result)));
}
diff --git a/src/vs/code/electron-main/env.ts b/src/vs/code/electron-main/env.ts
index 57f83264419..43bd79b713e 100644
--- a/src/vs/code/electron-main/env.ts
+++ b/src/vs/code/electron-main/env.ts
@@ -17,7 +17,7 @@ import URI from 'vs/base/common/uri';
import * as types from 'vs/base/common/types';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import product, { IProductConfiguration } from 'vs/platform/product';
-import { parseArgs, ParsedArgs } from 'vs/code/node/argv';
+import { parseArgs, ParsedArgs } from 'vs/platform/environment/node/argv';
export interface IProcessEnvironment {
[key: string]: string;
@@ -91,7 +91,7 @@ export class EnvService implements IEnvService {
this._appKeybindingsPath = path.join(this._appSettingsHome, 'keybindings.json');
// Remove the Electron executable
- let [, ...args] = process.argv;
+ const [, ...args] = process.argv;
// If dev, remove the first non-option argument: it's the app location
if (!this.isBuilt) {
@@ -205,14 +205,14 @@ export interface IParsedPath {
}
export function parseLineAndColumnAware(rawPath: string): IParsedPath {
- let segments = rawPath.split(':'); // C:\file.txt::
+ const segments = rawPath.split(':'); // C:\file.txt::
let path: string;
let line: number = null;
let column: number = null;
segments.forEach(segment => {
- let segmentAsNumber = Number(segment);
+ const segmentAsNumber = Number(segment);
if (!types.isNumber(segmentAsNumber)) {
path = !!path ? [path, segment].join(':') : segment; // a colon can well be part of a path (e.g. C:\...)
} else if (line === null) {
@@ -234,7 +234,7 @@ export function parseLineAndColumnAware(rawPath: string): IParsedPath {
}
function toLineAndColumnPath(parsedPath: IParsedPath): string {
- let segments = [parsedPath.path];
+ const segments = [parsedPath.path];
if (types.isNumber(parsedPath.line)) {
segments.push(String(parsedPath.line));
diff --git a/src/vs/code/electron-main/lifecycle.ts b/src/vs/code/electron-main/lifecycle.ts
index 7c4c9880856..66f3e5aae83 100644
--- a/src/vs/code/electron-main/lifecycle.ts
+++ b/src/vs/code/electron-main/lifecycle.ts
@@ -119,7 +119,7 @@ export class LifecycleService implements ILifecycleService {
// Window Before Closing: Main -> Renderer
vscodeWindow.win.on('close', (e) => {
- let windowId = vscodeWindow.id;
+ const windowId = vscodeWindow.id;
this.logService.log('Lifecycle#window-before-close', windowId);
// The window already acknowledged to be closed
@@ -155,9 +155,9 @@ export class LifecycleService implements ILifecycleService {
this.logService.log('Lifecycle#unload()', vscodeWindow.id);
return new TPromise((c) => {
- let oneTimeEventToken = this.oneTimeListenerTokenGenerator++;
- let oneTimeOkEvent = 'vscode:ok' + oneTimeEventToken;
- let oneTimeCancelEvent = 'vscode:cancel' + oneTimeEventToken;
+ const oneTimeEventToken = this.oneTimeListenerTokenGenerator++;
+ const oneTimeOkEvent = 'vscode:ok' + oneTimeEventToken;
+ const oneTimeCancelEvent = 'vscode:cancel' + oneTimeEventToken;
ipc.once(oneTimeOkEvent, () => {
c(false); // no veto
diff --git a/src/vs/code/electron-main/log.ts b/src/vs/code/electron-main/log.ts
index e7e0667f986..c281e1a8e38 100644
--- a/src/vs/code/electron-main/log.ts
+++ b/src/vs/code/electron-main/log.ts
@@ -19,7 +19,7 @@ export class MainLogService implements ILogService {
_serviceBrand: any;
- constructor( @IEnvService private envService: IEnvService) {
+ constructor(@IEnvService private envService: IEnvService) {
}
log(...args: any[]): void {
diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts
index 9140ae96f97..0d0b3e365f0 100644
--- a/src/vs/code/electron-main/main.ts
+++ b/src/vs/code/electron-main/main.ts
@@ -10,7 +10,7 @@ import * as fs from 'original-fs';
import { app, ipcMain as ipc } from 'electron';
import { assign } from 'vs/base/common/objects';
import * as platform from 'vs/base/common/platform';
-import { parseMainProcessArgv, ParsedArgs } from 'vs/code/node/argv';
+import { parseMainProcessArgv, ParsedArgs } from 'vs/platform/environment/node/argv';
import { mkdirp } from 'vs/base/node/pfs';
import { IProcessEnvironment, IEnvService, EnvService } from 'vs/code/electron-main/env';
import { IWindowsService, WindowsManager } from 'vs/code/electron-main/windows';
@@ -69,14 +69,14 @@ function main(accessor: ServicesAccessor, mainIpcServer: Server, userEnv: IProce
const windowsService = accessor.get(IWindowsService);
const lifecycleService = accessor.get(ILifecycleService);
const updateService = accessor.get(IUpdateService);
- const configurationService = >accessor.get(IConfigurationService);
+ const configurationService = accessor.get(IConfigurationService) as ConfigurationService;
// We handle uncaught exceptions here to prevent electron from opening a dialog to the user
process.on('uncaughtException', (err: any) => {
if (err) {
// take only the message and stack property
- let friendlyError = {
+ const friendlyError = {
message: err.message,
stack: err.stack
};
diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts
index 535de3080b5..6ab11aa7c2e 100644
--- a/src/vs/code/electron-main/menus.ts
+++ b/src/vs/code/electron-main/menus.ts
@@ -11,7 +11,7 @@ import * as platform from 'vs/base/common/platform';
import * as arrays from 'vs/base/common/arrays';
import * as env from 'vs/code/electron-main/env';
import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem } from 'electron';
-import { IWindowsService, WindowsManager, IOpenedPathsList } from 'vs/code/electron-main/windows';
+import { IWindowsService } from 'vs/code/electron-main/windows';
import { IPath, VSCodeWindow } from 'vs/code/electron-main/window';
import { IStorageService } from 'vs/code/electron-main/storage';
import { IUpdateService, State as UpdateState } from 'vs/code/electron-main/update-manager';
@@ -20,10 +20,10 @@ import product from 'vs/platform/product';
import pkg from 'vs/platform/package';
export function generateNewIssueUrl(baseUrl: string, name: string, version: string, commit: string, date: string): string {
- const osVersion = `${ os.type() } ${ os.arch() } ${ os.release() }`;
+ const osVersion = `${os.type()} ${os.arch()} ${os.release()}`;
const queryStringPrefix = baseUrl.indexOf('?') === -1 ? '?' : '&';
const body = encodeURIComponent(
-`- VSCode Version: ${name} ${version} (${product.commit || 'Commit unknown'}, ${product.date || 'Date unknown'})
+ `- VSCode Version: ${name} ${version} (${product.commit || 'Commit unknown'}, ${product.date || 'Date unknown'})
- OS Version: ${osVersion}
Steps to Reproduce:
@@ -32,7 +32,7 @@ Steps to Reproduce:
2.`
);
- return `${ baseUrl }${queryStringPrefix}body=${body}`;
+ return `${baseUrl}${queryStringPrefix}body=${body}`;
}
interface IResolvedKeybinding {
@@ -44,7 +44,7 @@ export class VSCodeMenu {
private static lastKnownKeybindingsMapStorageKey = 'lastKnownKeybindings';
- private static MAX_RECENT_ENTRIES = 10;
+ private static MAX_MENU_RECENT_ENTRIES = 10;
private isQuitting: boolean;
private appMenuInstalled: boolean;
@@ -97,7 +97,7 @@ export class VSCodeMenu {
// Fill hash map of resolved keybindings
let needsMenuUpdate = false;
keybindings.forEach((keybinding) => {
- let accelerator = new Keybinding(keybinding.binding)._toElectronAccelerator();
+ const accelerator = new Keybinding(keybinding.binding)._toElectronAccelerator();
if (accelerator) {
this.mapResolvedKeybindingToActionId[keybinding.id] = accelerator;
if (this.mapLastKnownKeybindingToActionId[keybinding.id] !== accelerator) {
@@ -153,7 +153,6 @@ export class VSCodeMenu {
}
private onOpen(path: IPath): void {
- this.addToOpenedPathsList(path.filePath || path.workspacePath, !!path.filePath);
this.updateMenu();
}
@@ -166,47 +165,47 @@ export class VSCodeMenu {
private install(): void {
// Menus
- let menubar = new Menu();
+ const menubar = new Menu();
// Mac: Application
let macApplicationMenuItem: Electron.MenuItem;
if (platform.isMacintosh) {
- let applicationMenu = new Menu();
+ const applicationMenu = new Menu();
macApplicationMenuItem = new MenuItem({ label: this.envService.product.nameShort, submenu: applicationMenu });
this.setMacApplicationMenu(applicationMenu);
}
// File
- let fileMenu = new Menu();
- let fileMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mFile', comment: ['&& denotes a mnemonic'] }, "&&File")), submenu: fileMenu });
+ const fileMenu = new Menu();
+ const fileMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mFile', comment: ['&& denotes a mnemonic'] }, "&&File")), submenu: fileMenu });
this.setFileMenu(fileMenu);
// Edit
- let editMenu = new Menu();
- let editMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mEdit', comment: ['&& denotes a mnemonic'] }, "&&Edit")), submenu: editMenu });
+ const editMenu = new Menu();
+ const editMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mEdit', comment: ['&& denotes a mnemonic'] }, "&&Edit")), submenu: editMenu });
this.setEditMenu(editMenu);
// View
- let viewMenu = new Menu();
- let viewMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mView', comment: ['&& denotes a mnemonic'] }, "&&View")), submenu: viewMenu });
+ const viewMenu = new Menu();
+ const viewMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mView', comment: ['&& denotes a mnemonic'] }, "&&View")), submenu: viewMenu });
this.setViewMenu(viewMenu);
// Goto
- let gotoMenu = new Menu();
- let gotoMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mGoto', comment: ['&& denotes a mnemonic'] }, "&&Go")), submenu: gotoMenu });
+ const gotoMenu = new Menu();
+ const gotoMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mGoto', comment: ['&& denotes a mnemonic'] }, "&&Go")), submenu: gotoMenu });
this.setGotoMenu(gotoMenu);
// Mac: Window
let macWindowMenuItem: Electron.MenuItem;
if (platform.isMacintosh) {
- let windowMenu = new Menu();
+ const windowMenu = new Menu();
macWindowMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize('mWindow', "Window")), submenu: windowMenu, role: 'window' });
this.setMacWindowMenu(windowMenu);
}
// Help
- let helpMenu = new Menu();
- let helpMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mHelp', comment: ['&& denotes a mnemonic'] }, "&&Help")), submenu: helpMenu, role: 'help' });
+ const helpMenu = new Menu();
+ const helpMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mHelp', comment: ['&& denotes a mnemonic'] }, "&&Help")), submenu: helpMenu, role: 'help' });
this.setHelpMenu(helpMenu);
// Menu Structure
@@ -231,76 +230,23 @@ export class VSCodeMenu {
if (platform.isMacintosh && !this.appMenuInstalled) {
this.appMenuInstalled = true;
- let dockMenu = new Menu();
+ const dockMenu = new Menu();
dockMenu.append(new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "&&New Window")), click: () => this.windowsService.openNewWindow() }));
app.dock.setMenu(dockMenu);
}
}
- private addToOpenedPathsList(path?: string, isFile?: boolean): void {
- if (!path) {
- return;
- }
-
- let mru = this.getOpenedPathsList();
- 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());
- }
-
- // Make sure its bounded
- mru.folders = mru.folders.slice(0, VSCodeMenu.MAX_RECENT_ENTRIES);
- mru.files = mru.files.slice(0, VSCodeMenu.MAX_RECENT_ENTRIES);
-
- this.storageService.setItem(WindowsManager.openedPathsListStorageKey, mru);
- }
-
- private removeFromOpenedPathsList(path: string): void {
- let mru = this.getOpenedPathsList();
-
- let index = mru.files.indexOf(path);
- if (index >= 0) {
- mru.files.splice(index, 1);
- }
-
- index = mru.folders.indexOf(path);
- if (index >= 0) {
- mru.folders.splice(index, 1);
- }
-
- this.storageService.setItem(WindowsManager.openedPathsListStorageKey, mru);
- }
-
- private clearOpenedPathsList(): void {
- this.storageService.setItem(WindowsManager.openedPathsListStorageKey, { folders: [], files: [] });
- app.clearRecentDocuments();
-
- this.updateMenu();
- }
-
- private getOpenedPathsList(): IOpenedPathsList {
- let mru = this.storageService.getItem(WindowsManager.openedPathsListStorageKey);
- if (!mru) {
- mru = { folders: [], files: [] };
- }
-
- return mru;
- }
-
private setMacApplicationMenu(macApplicationMenu: Electron.Menu): void {
- let about = new MenuItem({ label: nls.localize('mAbout', "About {0}", this.envService.product.nameLong), role: 'about' });
- let checkForUpdates = this.getUpdateMenuItems();
- let preferences = this.getPreferencesMenu();
- let hide = new MenuItem({ label: nls.localize('mHide', "Hide {0}", this.envService.product.nameLong), role: 'hide', accelerator: 'Command+H' });
- let hideOthers = new MenuItem({ label: nls.localize('mHideOthers', "Hide Others"), role: 'hideothers', accelerator: 'Command+Alt+H' });
- let showAll = new MenuItem({ label: nls.localize('mShowAll', "Show All"), role: 'unhide' });
- let quit = new MenuItem({ label: nls.localize('miQuit', "Quit {0}", this.envService.product.nameLong), click: () => this.quit(), accelerator: 'Command+Q' });
+ const about = new MenuItem({ label: nls.localize('mAbout', "About {0}", this.envService.product.nameLong), role: 'about' });
+ const checkForUpdates = this.getUpdateMenuItems();
+ const preferences = this.getPreferencesMenu();
+ const hide = new MenuItem({ label: nls.localize('mHide', "Hide {0}", this.envService.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' });
+ const quit = new MenuItem({ label: nls.localize('miQuit', "Quit {0}", this.envService.product.nameLong), click: () => this.quit(), accelerator: 'Command+Q' });
- let actions = [about];
+ const actions = [about];
actions.push(...checkForUpdates);
actions.push(...[
__separator__(),
@@ -317,7 +263,7 @@ export class VSCodeMenu {
}
private setFileMenu(fileMenu: Electron.Menu): void {
- let hasNoWindows = (this.windowsService.getWindowCount() === 0);
+ const hasNoWindows = (this.windowsService.getWindowCount() === 0);
let newFile: Electron.MenuItem;
if (hasNoWindows) {
@@ -326,8 +272,8 @@ export class VSCodeMenu {
newFile = this.createMenuItem(nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "&&New File"), 'workbench.action.files.newUntitledFile');
}
- let open = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miOpen', comment: ['&& denotes a mnemonic'] }, "&&Open...")), accelerator: this.getAccelerator('workbench.action.files.openFileFolder'), click: () => this.windowsService.openFileFolderPicker() });
- let openFolder = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miOpenFolder', comment: ['&& denotes a mnemonic'] }, "Open &&Folder...")), accelerator: this.getAccelerator('workbench.action.files.openFolder'), click: () => this.windowsService.openFolderPicker() });
+ const open = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miOpen', comment: ['&& denotes a mnemonic'] }, "&&Open...")), accelerator: this.getAccelerator('workbench.action.files.openFileFolder'), click: () => this.windowsService.openFileFolderPicker() });
+ const openFolder = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miOpenFolder', comment: ['&& denotes a mnemonic'] }, "Open &&Folder...")), accelerator: this.getAccelerator('workbench.action.files.openFolder'), click: () => this.windowsService.openFolderPicker() });
let openFile: Electron.MenuItem;
if (hasNoWindows) {
@@ -336,24 +282,24 @@ export class VSCodeMenu {
openFile = this.createMenuItem(nls.localize({ key: 'miOpenFile', comment: ['&& denotes a mnemonic'] }, "&&Open File..."), 'workbench.action.files.openFile');
}
- let openRecentMenu = new Menu();
+ const openRecentMenu = new Menu();
this.setOpenRecentMenu(openRecentMenu);
- let 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: mnemonicLabel(nls.localize({ key: 'miOpenRecent', comment: ['&& denotes a mnemonic'] }, "Open &&Recent")), submenu: openRecentMenu, enabled: openRecentMenu.items.length > 0 });
- let saveFile = this.createMenuItem(nls.localize({ key: 'miSave', comment: ['&& denotes a mnemonic'] }, "&&Save"), 'workbench.action.files.save', this.windowsService.getWindowCount() > 0);
- let saveFileAs = this.createMenuItem(nls.localize({ key: 'miSaveAs', comment: ['&& denotes a mnemonic'] }, "Save &&As..."), 'workbench.action.files.saveAs', this.windowsService.getWindowCount() > 0);
- let saveAllFiles = this.createMenuItem(nls.localize({ key: 'miSaveAll', comment: ['&& denotes a mnemonic'] }, "Save A&&ll"), 'workbench.action.files.saveAll', 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);
- let preferences = this.getPreferencesMenu();
+ const preferences = this.getPreferencesMenu();
- let newWindow = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "&&New Window")), accelerator: this.getAccelerator('workbench.action.newWindow'), click: () => this.windowsService.openNewWindow() });
- let revertFile = this.createMenuItem(nls.localize({ key: 'miRevert', comment: ['&& denotes a mnemonic'] }, "Revert F&&ile"), 'workbench.action.files.revert', this.windowsService.getWindowCount() > 0);
- let closeWindow = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miCloseWindow', comment: ['&& denotes a mnemonic'] }, "Close &&Window")), accelerator: this.getAccelerator('workbench.action.closeWindow'), click: () => this.windowsService.getLastActiveWindow().win.close(), enabled: this.windowsService.getWindowCount() > 0 });
+ const newWindow = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "&&New Window")), accelerator: this.getAccelerator('workbench.action.newWindow'), click: () => this.windowsService.openNewWindow() });
+ const revertFile = this.createMenuItem(nls.localize({ key: 'miRevert', comment: ['&& denotes a mnemonic'] }, "Revert F&&ile"), 'workbench.action.files.revert', this.windowsService.getWindowCount() > 0);
+ const closeWindow = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miCloseWindow', comment: ['&& denotes a mnemonic'] }, "Close &&Window")), accelerator: this.getAccelerator('workbench.action.closeWindow'), click: () => this.windowsService.getLastActiveWindow().win.close(), enabled: this.windowsService.getWindowCount() > 0 });
- let closeFolder = this.createMenuItem(nls.localize({ key: 'miCloseFolder', comment: ['&& denotes a mnemonic'] }, "Close &&Folder"), 'workbench.action.closeFolder');
- let closeEditor = this.createMenuItem(nls.localize({ key: 'miCloseEditor', comment: ['&& denotes a mnemonic'] }, "Close &&Editor"), 'workbench.action.closeActiveEditor');
+ 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');
- let exit = this.createMenuItem(nls.localize({ key: 'miExit', comment: ['&& denotes a mnemonic'] }, "E&&xit"), () => this.quit());
+ const exit = this.createMenuItem(nls.localize({ key: 'miExit', comment: ['&& denotes a mnemonic'] }, "E&&xit"), () => this.quit());
arrays.coalesce([
newFile,
@@ -380,14 +326,14 @@ export class VSCodeMenu {
}
private getPreferencesMenu(): Electron.MenuItem {
- let userSettings = this.createMenuItem(nls.localize({ key: 'miOpenSettings', comment: ['&& denotes a mnemonic'] }, "&&User Settings"), 'workbench.action.openGlobalSettings');
- let workspaceSettings = this.createMenuItem(nls.localize({ key: 'miOpenWorkspaceSettings', comment: ['&& denotes a mnemonic'] }, "&&Workspace Settings"), 'workbench.action.openWorkspaceSettings');
- let kebindingSettings = this.createMenuItem(nls.localize({ key: 'miOpenKeymap', comment: ['&& denotes a mnemonic'] }, "&&Keyboard Shortcuts"), 'workbench.action.openGlobalKeybindings');
- let snippetsSettings = this.createMenuItem(nls.localize({ key: 'miOpenSnippets', comment: ['&& denotes a mnemonic'] }, "User &&Snippets"), 'workbench.action.openSnippets');
- let colorThemeSelection = this.createMenuItem(nls.localize({ key: 'miSelectColorTheme', comment: ['&& denotes a mnemonic'] }, "&&Color Theme"), 'workbench.action.selectTheme');
- let iconThemeSelection = this.createMenuItem(nls.localize({ key: 'miSelectIconTheme', comment: ['&& denotes a mnemonic'] }, "File &&Icon Theme"), 'workbench.action.selectIconTheme');
+ const userSettings = this.createMenuItem(nls.localize({ key: 'miOpenSettings', comment: ['&& denotes a mnemonic'] }, "&&User Settings"), 'workbench.action.openGlobalSettings');
+ const workspaceSettings = this.createMenuItem(nls.localize({ key: 'miOpenWorkspaceSettings', comment: ['&& denotes a mnemonic'] }, "&&Workspace Settings"), 'workbench.action.openWorkspaceSettings');
+ const kebindingSettings = this.createMenuItem(nls.localize({ key: 'miOpenKeymap', comment: ['&& denotes a mnemonic'] }, "&&Keyboard Shortcuts"), 'workbench.action.openGlobalKeybindings');
+ const snippetsSettings = this.createMenuItem(nls.localize({ key: 'miOpenSnippets', comment: ['&& denotes a mnemonic'] }, "User &&Snippets"), 'workbench.action.openSnippets');
+ const colorThemeSelection = this.createMenuItem(nls.localize({ key: 'miSelectColorTheme', comment: ['&& denotes a mnemonic'] }, "&&Color Theme"), 'workbench.action.selectTheme');
+ const iconThemeSelection = this.createMenuItem(nls.localize({ key: 'miSelectIconTheme', comment: ['&& denotes a mnemonic'] }, "File &&Icon Theme"), 'workbench.action.selectIconTheme');
- let preferencesMenu = new Menu();
+ const preferencesMenu = new Menu();
preferencesMenu.append(userSettings);
preferencesMenu.append(workspaceSettings);
preferencesMenu.append(__separator__());
@@ -405,7 +351,7 @@ export class VSCodeMenu {
// 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.
- let vscodeWindow = this.windowsService.getFocusedWindow();
+ const vscodeWindow = this.windowsService.getFocusedWindow();
if (vscodeWindow && vscodeWindow.isPluginDevelopmentHost && this.windowsService.getWindowCount() > 1) {
vscodeWindow.win.close();
}
@@ -423,42 +369,38 @@ export class VSCodeMenu {
private setOpenRecentMenu(openRecentMenu: Electron.Menu): void {
openRecentMenu.append(this.createMenuItem(nls.localize({ key: 'miReopenClosedEditor', comment: ['&& denotes a mnemonic'] }, "&&Reopen Closed Editor"), 'workbench.action.reopenClosedEditor'));
- let recentList = this.getOpenedPathsList();
+ const {folders, files} = this.windowsService.getRecentPathsList();
// Folders
- if (recentList.folders.length > 0) {
+ if (folders.length > 0) {
openRecentMenu.append(__separator__());
- recentList.folders.forEach((folder, index) => {
- if (index < VSCodeMenu.MAX_RECENT_ENTRIES) {
- openRecentMenu.append(this.createOpenRecentMenuItem(folder));
- }
- });
+
+ for (let i = 0; i < VSCodeMenu.MAX_MENU_RECENT_ENTRIES && i < folders.length; i++) {
+ openRecentMenu.append(this.createOpenRecentMenuItem(folders[i]));
+ }
}
// Files
- let files = recentList.files;
if (files.length > 0) {
openRecentMenu.append(__separator__());
- files.forEach((file, index) => {
- if (index < VSCodeMenu.MAX_RECENT_ENTRIES) {
- openRecentMenu.append(this.createOpenRecentMenuItem(file));
- }
- });
+ for (let i = 0; i < VSCodeMenu.MAX_MENU_RECENT_ENTRIES && i < files.length; i++) {
+ openRecentMenu.append(this.createOpenRecentMenuItem(files[i]));
+ }
}
- if (recentList.folders.length || files.length) {
+ if (folders.length || files.length) {
openRecentMenu.append(__separator__());
- openRecentMenu.append(new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miClearItems', comment: ['&& denotes a mnemonic'] }, "&&Clear Items")), click: () => this.clearOpenedPathsList() }));
+ openRecentMenu.append(new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miClearItems', comment: ['&& denotes a mnemonic'] }, "&&Clear Items")), click: () => { this.windowsService.clearRecentPathsList(); this.updateMenu(); } }));
}
}
private createOpenRecentMenuItem(path: string): Electron.MenuItem {
return new MenuItem({
label: unMnemonicLabel(path), click: () => {
- let success = !!this.windowsService.open({ cli: this.envService.cliArgs, pathsToOpen: [path] });
+ const success = !!this.windowsService.open({ cli: this.envService.cliArgs, pathsToOpen: [path] });
if (!success) {
- this.removeFromOpenedPathsList(path);
+ this.windowsService.removeFromRecentPathsList(path);
this.updateMenu();
}
}
@@ -466,7 +408,7 @@ export class VSCodeMenu {
}
private createRoleMenuItem(label: string, actionId: string, role: Electron.MenuItemRole): Electron.MenuItem {
- let options: Electron.MenuItemOptions = {
+ const options: Electron.MenuItemOptions = {
label: mnemonicLabel(label),
accelerator: this.getAccelerator(actionId),
role,
@@ -500,10 +442,10 @@ export class VSCodeMenu {
selectAll = this.createMenuItem(nls.localize({ key: 'miSelectAll', comment: ['&& denotes a mnemonic'] }, "&&Select All"), 'editor.action.selectAll');
}
- let find = this.createMenuItem(nls.localize({ key: 'miFind', comment: ['&& denotes a mnemonic'] }, "&&Find"), 'actions.find');
- let replace = this.createMenuItem(nls.localize({ key: 'miReplace', comment: ['&& denotes a mnemonic'] }, "&&Replace"), 'editor.action.startFindReplaceAction');
- let findInFiles = this.createMenuItem(nls.localize({ key: 'miFindInFiles', comment: ['&& denotes a mnemonic'] }, "Find &&in Files"), 'workbench.view.search');
- let replaceInFiles = this.createMenuItem(nls.localize({ key: 'miReplaceInFiles', comment: ['&& denotes a mnemonic'] }, "Replace &&in Files"), 'workbench.action.replaceInFiles');
+ const find = this.createMenuItem(nls.localize({ key: 'miFind', comment: ['&& denotes a mnemonic'] }, "&&Find"), 'actions.find');
+ const replace = this.createMenuItem(nls.localize({ key: 'miReplace', comment: ['&& denotes a mnemonic'] }, "&&Replace"), 'editor.action.startFindReplaceAction');
+ const findInFiles = this.createMenuItem(nls.localize({ key: 'miFindInFiles', comment: ['&& denotes a mnemonic'] }, "Find &&in Files"), 'workbench.view.search');
+ const replaceInFiles = this.createMenuItem(nls.localize({ key: 'miReplaceInFiles', comment: ['&& denotes a mnemonic'] }, "Replace &&in Files"), 'workbench.action.replaceInFiles');
[
undo,
@@ -523,34 +465,34 @@ export class VSCodeMenu {
}
private setViewMenu(viewMenu: Electron.Menu): void {
- let explorer = this.createMenuItem(nls.localize({ key: 'miViewExplorer', comment: ['&& denotes a mnemonic'] }, "&&Explorer"), 'workbench.view.explorer');
- let search = this.createMenuItem(nls.localize({ key: 'miViewSearch', comment: ['&& denotes a mnemonic'] }, "&&Search"), 'workbench.view.search');
- let git = this.createMenuItem(nls.localize({ key: 'miViewGit', comment: ['&& denotes a mnemonic'] }, "&&Git"), 'workbench.view.git');
- let debug = this.createMenuItem(nls.localize({ key: 'miViewDebug', comment: ['&& denotes a mnemonic'] }, "&&Debug"), 'workbench.view.debug');
- let extensions = this.createMenuItem(nls.localize({ key: 'miViewExtensions', comment: ['&& denotes a mnemonic'] }, "E&&xtensions"), 'workbench.view.extensions');
- let output = this.createMenuItem(nls.localize({ key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] }, "&&Output"), 'workbench.action.output.toggleOutput');
- let debugConsole = this.createMenuItem(nls.localize({ key: 'miToggleDebugConsole', comment: ['&& denotes a mnemonic'] }, "De&&bug Console"), 'workbench.debug.action.toggleRepl');
- let integratedTerminal = this.createMenuItem(nls.localize({ key: 'miToggleIntegratedTerminal', comment: ['&& denotes a mnemonic'] }, "&&Integrated Terminal"), 'workbench.action.terminal.toggleTerminal');
- let problems = this.createMenuItem(nls.localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"), 'workbench.actions.view.problems');
+ 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 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');
+ const debugConsole = this.createMenuItem(nls.localize({ key: 'miToggleDebugConsole', comment: ['&& denotes a mnemonic'] }, "De&&bug Console"), 'workbench.debug.action.toggleRepl');
+ const integratedTerminal = this.createMenuItem(nls.localize({ key: 'miToggleIntegratedTerminal', comment: ['&& denotes a mnemonic'] }, "&&Integrated Terminal"), 'workbench.action.terminal.toggleTerminal');
+ const problems = this.createMenuItem(nls.localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"), 'workbench.actions.view.problems');
- let commands = this.createMenuItem(nls.localize({ key: 'miCommandPalette', comment: ['&& denotes a mnemonic'] }, "&&Command Palette..."), 'workbench.action.showCommands');
+ const commands = this.createMenuItem(nls.localize({ key: 'miCommandPalette', comment: ['&& denotes a mnemonic'] }, "&&Command Palette..."), 'workbench.action.showCommands');
- let fullscreen = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miToggleFullScreen', comment: ['&& denotes a mnemonic'] }, "Toggle &&Full Screen")), accelerator: this.getAccelerator('workbench.action.toggleFullScreen'), click: () => this.windowsService.getLastActiveWindow().toggleFullScreen(), enabled: this.windowsService.getWindowCount() > 0 });
- let toggleMenuBar = this.createMenuItem(nls.localize({ key: 'miToggleMenuBar', comment: ['&& denotes a mnemonic'] }, "Toggle Menu &&Bar"), 'workbench.action.toggleMenuBar');
- let splitEditor = this.createMenuItem(nls.localize({ key: 'miSplitEditor', comment: ['&& denotes a mnemonic'] }, "Split &&Editor"), 'workbench.action.splitEditor');
- let toggleSidebar = this.createMenuItem(nls.localize({ key: 'miToggleSidebar', comment: ['&& denotes a mnemonic'] }, "&&Toggle Side Bar"), 'workbench.action.toggleSidebarVisibility');
- let moveSidebar = this.createMenuItem(nls.localize({ key: 'miMoveSidebar', comment: ['&& denotes a mnemonic'] }, "&&Move Side Bar"), 'workbench.action.toggleSidebarPosition');
- let togglePanel = this.createMenuItem(nls.localize({ key: 'miTogglePanel', comment: ['&& denotes a mnemonic'] }, "Toggle &&Panel"), 'workbench.action.togglePanel');
- let toggleStatusbar = this.createMenuItem(nls.localize({ key: 'miToggleStatusbar', comment: ['&& denotes a mnemonic'] }, "&&Toggle Status Bar"), 'workbench.action.toggleStatusbarVisibility');
+ const fullscreen = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miToggleFullScreen', comment: ['&& denotes a mnemonic'] }, "Toggle &&Full Screen")), accelerator: this.getAccelerator('workbench.action.toggleFullScreen'), click: () => this.windowsService.getLastActiveWindow().toggleFullScreen(), enabled: 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');
+ const toggleSidebar = this.createMenuItem(nls.localize({ key: 'miToggleSidebar', comment: ['&& denotes a mnemonic'] }, "&&Toggle Side Bar"), 'workbench.action.toggleSidebarVisibility');
+ const moveSidebar = this.createMenuItem(nls.localize({ key: 'miMoveSidebar', comment: ['&& denotes a mnemonic'] }, "&&Move Side Bar"), 'workbench.action.toggleSidebarPosition');
+ const togglePanel = this.createMenuItem(nls.localize({ key: 'miTogglePanel', comment: ['&& denotes a mnemonic'] }, "Toggle &&Panel"), 'workbench.action.togglePanel');
+ const toggleStatusbar = this.createMenuItem(nls.localize({ key: 'miToggleStatusbar', comment: ['&& denotes a mnemonic'] }, "&&Toggle Status Bar"), 'workbench.action.toggleStatusbarVisibility');
const toggleWordWrap = this.createMenuItem(nls.localize({ key: 'miToggleWordWrap', comment: ['&& denotes a mnemonic'] }, "Toggle &&Word Wrap"), 'editor.action.toggleWordWrap');
const toggleRenderWhitespace = this.createMenuItem(nls.localize({ key: 'miToggleRenderWhitespace', comment: ['&& denotes a mnemonic'] }, "Toggle &&Render Whitespace"), 'editor.action.toggleRenderWhitespace');
const toggleRenderControlCharacters = this.createMenuItem(nls.localize({ key: 'miToggleRenderControlCharacters', comment: ['&& denotes a mnemonic'] }, "Toggle &&Control Characters"), 'editor.action.toggleRenderControlCharacter');
- let zoomIn = this.createMenuItem(nls.localize({ key: 'miZoomIn', comment: ['&& denotes a mnemonic'] }, "&&Zoom In"), 'workbench.action.zoomIn');
- let zoomOut = this.createMenuItem(nls.localize({ key: 'miZoomOut', comment: ['&& denotes a mnemonic'] }, "Zoom O&&ut"), 'workbench.action.zoomOut');
- let resetZoom = this.createMenuItem(nls.localize({ key: 'miZoomReset', comment: ['&& denotes a mnemonic'] }, "&&Reset Zoom"), 'workbench.action.zoomReset');
+ const zoomIn = this.createMenuItem(nls.localize({ key: 'miZoomIn', comment: ['&& denotes a mnemonic'] }, "&&Zoom In"), 'workbench.action.zoomIn');
+ const zoomOut = this.createMenuItem(nls.localize({ key: 'miZoomOut', comment: ['&& denotes a mnemonic'] }, "Zoom O&&ut"), 'workbench.action.zoomOut');
+ const resetZoom = this.createMenuItem(nls.localize({ key: 'miZoomReset', comment: ['&& denotes a mnemonic'] }, "&&Reset Zoom"), 'workbench.action.zoomReset');
arrays.coalesce([
commands,
@@ -586,15 +528,15 @@ export class VSCodeMenu {
}
private setGotoMenu(gotoMenu: Electron.Menu): void {
- let back = this.createMenuItem(nls.localize({ key: 'miBack', comment: ['&& denotes a mnemonic'] }, "&&Back"), 'workbench.action.navigateBack');
- let forward = this.createMenuItem(nls.localize({ key: 'miForward', comment: ['&& denotes a mnemonic'] }, "&&Forward"), 'workbench.action.navigateForward');
+ const back = this.createMenuItem(nls.localize({ key: 'miBack', comment: ['&& denotes a mnemonic'] }, "&&Back"), 'workbench.action.navigateBack');
+ const forward = this.createMenuItem(nls.localize({ key: 'miForward', comment: ['&& denotes a mnemonic'] }, "&&Forward"), 'workbench.action.navigateForward');
- let switchEditorMenu = new Menu();
+ const switchEditorMenu = new Menu();
- let nextEditor = this.createMenuItem(nls.localize({ key: 'miNextEditor', comment: ['&& denotes a mnemonic'] }, "&&Next Editor"), 'workbench.action.nextEditor');
- let previousEditor = this.createMenuItem(nls.localize({ key: 'miPreviousEditor', comment: ['&& denotes a mnemonic'] }, "&&Previous Editor"), 'workbench.action.previousEditor');
- let nextEditorInGroup = this.createMenuItem(nls.localize({ key: 'miNextEditorInGroup', comment: ['&& denotes a mnemonic'] }, "&&Next Used Editor in Group"), 'workbench.action.openNextRecentlyUsedEditorInGroup');
- let previousEditorInGroup = this.createMenuItem(nls.localize({ key: 'miPreviousEditorInGroup', comment: ['&& denotes a mnemonic'] }, "&&Previous Used Editor in Group"), 'workbench.action.openPreviousRecentlyUsedEditorInGroup');
+ const nextEditor = this.createMenuItem(nls.localize({ key: 'miNextEditor', comment: ['&& denotes a mnemonic'] }, "&&Next Editor"), 'workbench.action.nextEditor');
+ const previousEditor = this.createMenuItem(nls.localize({ key: 'miPreviousEditor', comment: ['&& denotes a mnemonic'] }, "&&Previous Editor"), 'workbench.action.previousEditor');
+ const nextEditorInGroup = this.createMenuItem(nls.localize({ key: 'miNextEditorInGroup', comment: ['&& denotes a mnemonic'] }, "&&Next Used Editor in Group"), 'workbench.action.openNextRecentlyUsedEditorInGroup');
+ const previousEditorInGroup = this.createMenuItem(nls.localize({ key: 'miPreviousEditorInGroup', comment: ['&& denotes a mnemonic'] }, "&&Previous Used Editor in Group"), 'workbench.action.openPreviousRecentlyUsedEditorInGroup');
[
nextEditor,
@@ -604,15 +546,15 @@ export class VSCodeMenu {
previousEditorInGroup
].forEach(item => switchEditorMenu.append(item));
- let switchEditor = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miSwitchEditor', comment: ['&& denotes a mnemonic'] }, "Switch &&Editor")), submenu: switchEditorMenu, enabled: true });
+ const switchEditor = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miSwitchEditor', comment: ['&& denotes a mnemonic'] }, "Switch &&Editor")), submenu: switchEditorMenu, enabled: true });
- let switchGroupMenu = new Menu();
+ const switchGroupMenu = new Menu();
- let focusFirstGroup = this.createMenuItem(nls.localize({ key: 'miFocusFirstGroup', comment: ['&& denotes a mnemonic'] }, "&&Left Group"), 'workbench.action.focusFirstEditorGroup');
- let focusSecondGroup = this.createMenuItem(nls.localize({ key: 'miFocusSecondGroup', comment: ['&& denotes a mnemonic'] }, "&&Center Group"), 'workbench.action.focusSecondEditorGroup');
- let focusThirdGroup = this.createMenuItem(nls.localize({ key: 'miFocusThirdGroup', comment: ['&& denotes a mnemonic'] }, "&&Right Group"), 'workbench.action.focusThirdEditorGroup');
- let nextGroup = this.createMenuItem(nls.localize({ key: 'miNextGroup', comment: ['&& denotes a mnemonic'] }, "&&Next Group"), 'workbench.action.focusNextGroup');
- let previousGroup = this.createMenuItem(nls.localize({ key: 'miPreviousGroup', comment: ['&& denotes a mnemonic'] }, "&&Previous Group"), 'workbench.action.focusPreviousGroup');
+ const focusFirstGroup = this.createMenuItem(nls.localize({ key: 'miFocusFirstGroup', comment: ['&& denotes a mnemonic'] }, "&&Left Group"), 'workbench.action.focusFirstEditorGroup');
+ const focusSecondGroup = this.createMenuItem(nls.localize({ key: 'miFocusSecondGroup', comment: ['&& denotes a mnemonic'] }, "&&Center Group"), 'workbench.action.focusSecondEditorGroup');
+ const focusThirdGroup = this.createMenuItem(nls.localize({ key: 'miFocusThirdGroup', comment: ['&& denotes a mnemonic'] }, "&&Right Group"), 'workbench.action.focusThirdEditorGroup');
+ const nextGroup = this.createMenuItem(nls.localize({ key: 'miNextGroup', comment: ['&& denotes a mnemonic'] }, "&&Next Group"), 'workbench.action.focusNextGroup');
+ const previousGroup = this.createMenuItem(nls.localize({ key: 'miPreviousGroup', comment: ['&& denotes a mnemonic'] }, "&&Previous Group"), 'workbench.action.focusPreviousGroup');
[
focusFirstGroup,
@@ -623,12 +565,13 @@ export class VSCodeMenu {
previousGroup
].forEach(item => switchGroupMenu.append(item));
- let switchGroup = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miSwitchGroup', comment: ['&& denotes a mnemonic'] }, "Switch &&Group")), submenu: switchGroupMenu, enabled: true });
+ const switchGroup = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miSwitchGroup', comment: ['&& denotes a mnemonic'] }, "Switch &&Group")), submenu: switchGroupMenu, enabled: true });
- let gotoFile = this.createMenuItem(nls.localize({ key: 'miGotoFile', comment: ['&& denotes a mnemonic'] }, "Go to &&File..."), 'workbench.action.quickOpen');
- let gotoSymbol = this.createMenuItem(nls.localize({ key: 'miGotoSymbol', comment: ['&& denotes a mnemonic'] }, "Go to &&Symbol..."), 'workbench.action.gotoSymbol');
- let gotoDefinition = this.createMenuItem(nls.localize({ key: 'miGotoDefinition', comment: ['&& denotes a mnemonic'] }, "Go to &&Definition"), 'editor.action.goToDeclaration');
- let gotoLine = this.createMenuItem(nls.localize({ key: 'miGotoLine', comment: ['&& denotes a mnemonic'] }, "Go to &&Line..."), 'workbench.action.gotoLine');
+ 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 gotoLine = this.createMenuItem(nls.localize({ key: 'miGotoLine', comment: ['&& denotes a mnemonic'] }, "Go to &&Line..."), 'workbench.action.gotoLine');
[
back,
@@ -638,16 +581,17 @@ export class VSCodeMenu {
switchGroup,
__separator__(),
gotoFile,
- gotoSymbol,
+ gotoSymbolInFile,
+ gotoSymbolInWorkspace,
gotoDefinition,
gotoLine
].forEach(item => gotoMenu.append(item));
}
private setMacWindowMenu(macWindowMenu: Electron.Menu): void {
- let minimize = new MenuItem({ label: nls.localize('mMinimize', "Minimize"), role: 'minimize', accelerator: 'Command+M', enabled: this.windowsService.getWindowCount() > 0 });
- let close = new MenuItem({ label: nls.localize('mClose', "Close"), role: 'close', accelerator: 'Command+W', enabled: this.windowsService.getWindowCount() > 0 });
- let bringAllToFront = new MenuItem({ label: nls.localize('mBringToFront', "Bring All to Front"), role: 'front', enabled: this.windowsService.getWindowCount() > 0 });
+ 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 bringAllToFront = new MenuItem({ label: nls.localize('mBringToFront', "Bring All to Front"), role: 'front', enabled: this.windowsService.getWindowCount() > 0 });
[
minimize,
@@ -658,14 +602,14 @@ export class VSCodeMenu {
}
private toggleDevTools(): void {
- let w = this.windowsService.getFocusedWindow();
+ const w = this.windowsService.getFocusedWindow();
if (w && w.win) {
w.win.webContents.toggleDevTools();
}
}
private setHelpMenu(helpMenu: Electron.Menu): void {
- let toggleDevToolsItem = new MenuItem({
+ const toggleDevToolsItem = new MenuItem({
label: mnemonicLabel(nls.localize({ key: 'miToggleDevTools', comment: ['&& denotes a mnemonic'] }, "&&Toggle Developer Tools")),
accelerator: this.getAccelerator('workbench.action.toggleDevTools'),
click: () => this.toggleDevTools(),
@@ -685,7 +629,7 @@ export class VSCodeMenu {
this.envService.product.licenseUrl ? new MenuItem({
label: mnemonicLabel(nls.localize({ key: 'miLicense', comment: ['&& denotes a mnemonic'] }, "&&View License")), click: () => {
if (platform.language) {
- let queryArgChar = this.envService.product.licenseUrl.indexOf('?') > 0 ? '&' : '?';
+ const queryArgChar = this.envService.product.licenseUrl.indexOf('?') > 0 ? '&' : '?';
this.openUrl(`${this.envService.product.licenseUrl}${queryArgChar}lang=${platform.language}`, 'openLicenseUrl');
} else {
this.openUrl(this.envService.product.licenseUrl, 'openLicenseUrl');
@@ -695,7 +639,7 @@ export class VSCodeMenu {
this.envService.product.privacyStatementUrl ? new MenuItem({
label: mnemonicLabel(nls.localize({ key: 'miPrivacyStatement', comment: ['&& denotes a mnemonic'] }, "&&Privacy Statement")), click: () => {
if (platform.language) {
- let queryArgChar = this.envService.product.licenseUrl.indexOf('?') > 0 ? '&' : '?';
+ const queryArgChar = this.envService.product.licenseUrl.indexOf('?') > 0 ? '&' : '?';
this.openUrl(`${this.envService.product.privacyStatementUrl}${queryArgChar}lang=${platform.language}`, 'openPrivacyStatement');
} else {
this.openUrl(this.envService.product.privacyStatementUrl, 'openPrivacyStatement');
@@ -724,7 +668,7 @@ export class VSCodeMenu {
return [];
case UpdateState.UpdateDownloaded:
- let update = this.updateService.availableUpdate;
+ const update = this.updateService.availableUpdate;
return [new MenuItem({
label: nls.localize('miRestartToUpdate', "Restart To Update..."), click: () => {
this.reportMenuActionTelemetry('RestartToUpdate');
@@ -745,14 +689,14 @@ export class VSCodeMenu {
})];
}
- let updateAvailableLabel = platform.isWindows
+ const updateAvailableLabel = platform.isWindows
? nls.localize('miDownloadingUpdate', "Downloading Update...")
: nls.localize('miInstallingUpdate', "Installing Update...");
return [new MenuItem({ label: updateAvailableLabel, enabled: false })];
default:
- let result = [new MenuItem({
+ const result = [new MenuItem({
label: nls.localize('miCheckForUpdates', "Check For Updates..."), click: () => setTimeout(() => {
this.reportMenuActionTelemetry('CheckForUpdate');
this.updateService.checkForUpdates(true);
@@ -766,16 +710,16 @@ export class VSCodeMenu {
private createMenuItem(label: string, actionId: string, enabled?: boolean): Electron.MenuItem;
private createMenuItem(label: string, click: () => void, enabled?: boolean): Electron.MenuItem;
private createMenuItem(arg1: string, arg2: any, arg3?: boolean): Electron.MenuItem {
- let label = mnemonicLabel(arg1);
- let click: () => void = (typeof arg2 === 'function') ? arg2 : () => this.windowsService.sendToFocused('vscode:runAction', arg2);
- let enabled = typeof arg3 === 'boolean' ? arg3 : this.windowsService.getWindowCount() > 0;
+ const label = mnemonicLabel(arg1);
+ const click: () => void = (typeof arg2 === 'function') ? arg2 : () => this.windowsService.sendToFocused('vscode:runAction', arg2);
+ const enabled = typeof arg3 === 'boolean' ? arg3 : this.windowsService.getWindowCount() > 0;
let actionId: string;
if (typeof arg2 === 'string') {
actionId = arg2;
}
- let options: Electron.MenuItemOptions = {
+ const options: Electron.MenuItemOptions = {
label: label,
accelerator: this.getAccelerator(actionId),
click: click,
@@ -791,7 +735,7 @@ export class VSCodeMenu {
accelerator: this.getAccelerator(actionId),
enabled: this.windowsService.getWindowCount() > 0,
click: () => {
- let windowInFocus = this.windowsService.getFocusedWindow();
+ const windowInFocus = this.windowsService.getFocusedWindow();
if (!windowInFocus) {
return;
}
@@ -807,7 +751,7 @@ export class VSCodeMenu {
private getAccelerator(actionId: string): string {
if (actionId) {
- let resolvedKeybinding = this.mapResolvedKeybindingToActionId[actionId];
+ const resolvedKeybinding = this.mapResolvedKeybindingToActionId[actionId];
if (resolvedKeybinding) {
return resolvedKeybinding; // keybinding is fully resolved
}
@@ -816,7 +760,7 @@ export class VSCodeMenu {
this.actionIdKeybindingRequests.push(actionId); // keybinding needs to be resolved
}
- let lastKnownKeybinding = this.mapLastKnownKeybindingToActionId[actionId];
+ const lastKnownKeybinding = this.mapLastKnownKeybindingToActionId[actionId];
return lastKnownKeybinding; // return the last known keybining (chance of mismatch is very low unless it changed)
}
@@ -825,7 +769,7 @@ export class VSCodeMenu {
}
private openAboutDialog(): void {
- let lastActiveWindow = this.windowsService.getFocusedWindow() || this.windowsService.getLastActiveWindow();
+ const lastActiveWindow = this.windowsService.getFocusedWindow() || this.windowsService.getLastActiveWindow();
dialog.showMessageBox(lastActiveWindow && lastActiveWindow.win, {
title: this.envService.product.nameLong,
diff --git a/src/vs/code/electron-main/sharedProcess.ts b/src/vs/code/electron-main/sharedProcess.ts
index 89b7557932c..3348239f100 100644
--- a/src/vs/code/electron-main/sharedProcess.ts
+++ b/src/vs/code/electron-main/sharedProcess.ts
@@ -26,7 +26,7 @@ function _spawnSharedProcess(options: ISharedProcessOptions): cp.ChildProcess {
}
if (options.debugPort) {
- execArgv.push(`--debug=${ options.debugPort }`);
+ execArgv.push(`--debug=${options.debugPort}`);
}
const result = cp.fork(boostrapPath, ['--type=SharedProcess'], { env, execArgv });
diff --git a/src/vs/code/electron-main/storage.ts b/src/vs/code/electron-main/storage.ts
index 943d4a93679..decedc16d3a 100644
--- a/src/vs/code/electron-main/storage.ts
+++ b/src/vs/code/electron-main/storage.ts
@@ -7,19 +7,13 @@
import * as path from 'path';
import * as fs from 'original-fs';
-import { EventEmitter } from 'events';
import { IEnvService } from 'vs/code/electron-main/env';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
-const EventTypes = {
- STORE: 'store'
-};
-
export const IStorageService = createDecorator('storageService');
export interface IStorageService {
_serviceBrand: any;
- onStore(clb: (key: string, oldValue: T, newValue: T) => void): () => void;
getItem(key: string, defaultValue?: T): T;
setItem(key: string, data: any): void;
removeItem(key: string): void;
@@ -31,18 +25,11 @@ export class StorageService implements IStorageService {
private dbPath: string;
private database: any = null;
- private eventEmitter = new EventEmitter();
constructor(@IEnvService private envService: IEnvService) {
this.dbPath = path.join(envService.appHome, 'storage.json');
}
- onStore(clb: (key: string, oldValue: T, newValue: T) => void): () => void {
- this.eventEmitter.addListener(EventTypes.STORE, clb);
-
- return () => this.eventEmitter.removeListener(EventTypes.STORE, clb);
- }
-
getItem(key: string, defaultValue?: T): T {
if (!this.database) {
this.database = this.load();
@@ -68,11 +55,8 @@ export class StorageService implements IStorageService {
}
}
- let oldValue = this.database[key];
this.database[key] = data;
this.save();
-
- this.eventEmitter.emit(EventTypes.STORE, key, oldValue, data);
}
removeItem(key: string): void {
@@ -81,11 +65,8 @@ export class StorageService implements IStorageService {
}
if (this.database[key]) {
- let oldValue = this.database[key];
delete this.database[key];
this.save();
-
- this.eventEmitter.emit(EventTypes.STORE, key, oldValue, null);
}
}
diff --git a/src/vs/code/electron-main/update-manager.ts b/src/vs/code/electron-main/update-manager.ts
index c82e6191e7e..c065b832d31 100644
--- a/src/vs/code/electron-main/update-manager.ts
+++ b/src/vs/code/electron-main/update-manager.ts
@@ -131,7 +131,7 @@ export class UpdateManager extends EventEmitter implements IUpdateService {
});
this.raw.on('update-downloaded', (event: any, releaseNotes: string, version: string, date: Date, url: string, rawQuitAndUpdate: () => void) => {
- let data: IUpdate = {
+ const data: IUpdate = {
releaseNotes: releaseNotes,
version: version,
date: date,
@@ -231,7 +231,9 @@ export class UpdateManager extends EventEmitter implements IUpdateService {
}
private getUpdateChannel(): string {
- const channel = this.configurationService.getConfiguration('update.channel') || 'default';
+ const config = this.configurationService.getConfiguration<{ channel: string; }>('update');
+ const channel = config && config.channel;
+
return channel === 'none' ? null : this.envService.quality;
}
diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts
index 66ac054e468..74cf9590d8b 100644
--- a/src/vs/code/electron-main/window.ts
+++ b/src/vs/code/electron-main/window.ts
@@ -14,7 +14,7 @@ import { TPromise, TValueCallback } from 'vs/base/common/winjs.base';
import { ICommandLineArguments, IEnvService, IProcessEnvironment } from 'vs/code/electron-main/env';
import { ILogService } from 'vs/code/electron-main/log';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
-import { parseArgs } from 'vs/code/node/argv';
+import { parseArgs } from 'vs/platform/environment/node/argv';
export interface IWindowState {
width?: number;
@@ -361,6 +361,11 @@ export class VSCodeWindow {
this._readyState = ReadyState.NAVIGATING;
}
+ // Make sure to clear any previous edited state
+ if (platform.isMacintosh && this._win.isDocumentEdited()) {
+ this._win.setDocumentEdited(false);
+ }
+
// Load URL
this._win.loadURL(this.getUrl(config));
diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts
index 719a82bbe90..3e814a2a0b3 100644
--- a/src/vs/code/electron-main/windows.ts
+++ b/src/vs/code/electron-main/windows.ts
@@ -10,6 +10,7 @@ import * as fs from 'original-fs';
import * as platform from 'vs/base/common/platform';
import * as nls from 'vs/nls';
import * as paths from 'vs/base/common/paths';
+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 { EventEmitter } from 'events';
@@ -56,7 +57,7 @@ interface IWindowsState {
openedFolders: IWindowState[];
}
-export interface IOpenedPathsList {
+export interface IRecentPathsList {
folders: string[];
files: string[];
}
@@ -108,14 +109,18 @@ export interface IWindowsService {
getWindowById(windowId: number): VSCodeWindow;
getWindows(): VSCodeWindow[];
getWindowCount(): number;
+ getRecentPathsList(): IRecentPathsList;
+ removeFromRecentPathsList(path: string);
+ clearRecentPathsList(): void;
}
export class WindowsManager implements IWindowsService {
_serviceBrand: any;
- public static openedPathsListStorageKey = 'openedPathsList';
+ private static MAX_TOTAL_RECENT_ENTRIES = 100;
+ private static recentPathsListStorageKey = 'openedPathsList';
private static workingDirPickerStorageKey = 'pickerWorkingDir';
private static windowsStateStorageKey = 'windowsState';
@@ -210,7 +215,7 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:workbenchLoaded', (event, windowId: number) => {
this.logService.log('IPC#vscode-workbenchLoaded');
- let win = this.getWindowById(windowId);
+ const win = this.getWindowById(windowId);
if (win) {
win.setReady();
@@ -240,7 +245,7 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:closeFolder', (event, windowId: number) => {
this.logService.log('IPC#vscode-closeFolder');
- let win = this.getWindowById(windowId);
+ const win = this.getWindowById(windowId);
if (win) {
this.open({ cli: this.envService.cliArgs, forceEmpty: true, windowToUse: win });
}
@@ -255,7 +260,7 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:reloadWindow', (event, windowId: number) => {
this.logService.log('IPC#vscode:reloadWindow');
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow) {
this.reload(vscodeWindow);
}
@@ -264,7 +269,7 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:toggleFullScreen', (event, windowId: number) => {
this.logService.log('IPC#vscode:toggleFullScreen');
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow) {
vscodeWindow.toggleFullScreen();
}
@@ -273,7 +278,7 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:setFullScreen', (event, windowId: number, fullscreen: boolean) => {
this.logService.log('IPC#vscode:setFullScreen');
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow) {
vscodeWindow.win.setFullScreen(fullscreen);
}
@@ -282,7 +287,7 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:toggleDevTools', (event, windowId: number) => {
this.logService.log('IPC#vscode:toggleDevTools');
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow) {
vscodeWindow.win.webContents.toggleDevTools();
}
@@ -291,7 +296,7 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:openDevTools', (event, windowId: number) => {
this.logService.log('IPC#vscode:openDevTools');
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow) {
vscodeWindow.win.webContents.openDevTools();
vscodeWindow.win.show();
@@ -301,7 +306,7 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:setRepresentedFilename', (event, windowId: number, fileName: string) => {
this.logService.log('IPC#vscode:setRepresentedFilename');
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow) {
vscodeWindow.win.setRepresentedFilename(fileName);
}
@@ -310,7 +315,7 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:setMenuBarVisibility', (event, windowId: number, visibility: boolean) => {
this.logService.log('IPC#vscode:setMenuBarVisibility');
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow) {
vscodeWindow.win.setMenuBarVisibility(visibility);
}
@@ -319,7 +324,7 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:flashFrame', (event, windowId: number) => {
this.logService.log('IPC#vscode:flashFrame');
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow) {
vscodeWindow.win.flashFrame(!vscodeWindow.win.isFocused());
}
@@ -328,9 +333,9 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:openRecent', (event, windowId: number) => {
this.logService.log('IPC#vscode:openRecent');
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow) {
- const recents = this.getRecentlyOpenedPaths(vscodeWindow.config.workspacePath, vscodeWindow.config.filesToOpen);
+ const recents = this.getRecentPathsList(vscodeWindow.config.workspacePath, vscodeWindow.config.filesToOpen);
vscodeWindow.send('vscode:openRecent', recents.files, recents.folders);
}
@@ -339,16 +344,25 @@ export class WindowsManager implements IWindowsService {
ipc.on('vscode:focusWindow', (event, windowId: number) => {
this.logService.log('IPC#vscode:focusWindow');
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow) {
vscodeWindow.win.focus();
}
});
+ ipc.on('vscode:showWindow', (event, windowId: number) => {
+ this.logService.log('IPC#vscode:showWindow');
+
+ let vscodeWindow = this.getWindowById(windowId);
+ if (vscodeWindow) {
+ vscodeWindow.win.show();
+ }
+ });
+
ipc.on('vscode:setDocumentEdited', (event, windowId: number, edited: boolean) => {
this.logService.log('IPC#vscode:setDocumentEdited');
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow && vscodeWindow.win.isDocumentEdited() !== edited) {
vscodeWindow.win.setDocumentEdited(edited);
}
@@ -358,8 +372,8 @@ export class WindowsManager implements IWindowsService {
this.logService.log('IPC#vscode:toggleMenuBar');
// Update in settings
- let menuBarHidden = this.storageService.getItem(VSCodeWindow.menuBarHiddenKey, false);
- let newMenuBarHidden = !menuBarHidden;
+ const menuBarHidden = this.storageService.getItem(VSCodeWindow.menuBarHiddenKey, false);
+ const newMenuBarHidden = !menuBarHidden;
this.storageService.setItem(VSCodeWindow.menuBarHiddenKey, newMenuBarHidden);
// Update across windows
@@ -367,7 +381,7 @@ export class WindowsManager implements IWindowsService {
// Inform user if menu bar is now hidden
if (newMenuBarHidden) {
- let vscodeWindow = this.getWindowById(windowId);
+ const vscodeWindow = this.getWindowById(windowId);
if (vscodeWindow) {
vscodeWindow.send('vscode:showInfoMessage', nls.localize('hiddenMenuBar', "You can still access the menu bar by pressing the **Alt** key."));
}
@@ -375,7 +389,7 @@ export class WindowsManager implements IWindowsService {
});
ipc.on('vscode:broadcast', (event, windowId: number, target: string, broadcast: { channel: string; payload: any; }) => {
- if (broadcast.channel && broadcast.payload) {
+ if (broadcast.channel && !types.isUndefinedOrNull(broadcast.payload)) {
this.logService.log('IPC#vscode:broadcast', target, broadcast.channel, broadcast.payload);
// Handle specific events on main side
@@ -398,9 +412,9 @@ export class WindowsManager implements IWindowsService {
});
ipc.on('vscode:log', (event, logEntry: ILogEntry) => {
- let args = [];
+ const args = [];
try {
- let parsed = JSON.parse(logEntry.arguments);
+ const parsed = JSON.parse(logEntry.arguments);
args.push(...Object.getOwnPropertyNames(parsed).map(o => parsed[o]));
} catch (error) {
args.push(logEntry.arguments);
@@ -418,6 +432,14 @@ export class WindowsManager implements IWindowsService {
}
});
+ ipc.on('vscode:switchWindow', (event, windowId: number) => {
+ const windows = this.getWindows();
+ const window = this.getWindowById(windowId);
+ window.send('vscode:switchWindow', windows.map(w => {
+ return {path: w.openedWorkspacePath, title: w.win.getTitle(), id: w.id};
+ }));
+ });
+
this.updateService.on('update-downloaded', (update: IUpdate) => {
this.sendToFocused('vscode:telemetry', { eventName: 'update:downloaded', data: { version: update.version } });
@@ -494,7 +516,7 @@ export class WindowsManager implements IWindowsService {
public reload(win: VSCodeWindow, cli?: ICommandLineArguments): void {
// Only reload when the window has not vetoed this
- this.lifecycleService.unload(win).done((veto) => {
+ this.lifecycleService.unload(win).done(veto => {
if (!veto) {
win.reload(cli);
}
@@ -503,16 +525,16 @@ export class WindowsManager implements IWindowsService {
public open(openConfig: IOpenConfiguration): VSCodeWindow[] {
let iPathsToOpen: IPath[];
- let usedWindows: VSCodeWindow[] = [];
+ const usedWindows: VSCodeWindow[] = [];
// Find paths from provided paths if any
if (openConfig.pathsToOpen && openConfig.pathsToOpen.length > 0) {
- iPathsToOpen = openConfig.pathsToOpen.map((pathToOpen) => {
- let iPath = this.toIPath(pathToOpen, false, openConfig.cli && openConfig.cli.goto);
+ 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) {
- let options: Electron.ShowMessageBoxOptions = {
+ const options: Electron.ShowMessageBoxOptions = {
title: this.envService.product.nameLong,
type: 'info',
buttons: [nls.localize('ok', "OK")],
@@ -521,7 +543,7 @@ export class WindowsManager implements IWindowsService {
noLink: true
};
- let activeWindow = BrowserWindow.getFocusedWindow();
+ const activeWindow = BrowserWindow.getFocusedWindow();
if (activeWindow) {
dialog.showMessageBox(activeWindow, options);
} else {
@@ -547,19 +569,19 @@ export class WindowsManager implements IWindowsService {
// Otherwise infer from command line arguments
else {
- let ignoreFileNotFound = openConfig.cli.paths.length > 0; // we assume the user wants to create this file from command line
+ const ignoreFileNotFound = openConfig.cli.paths.length > 0; // we assume the user wants to create this file from command line
iPathsToOpen = this.cliToPaths(openConfig.cli, ignoreFileNotFound);
}
let filesToOpen: IPath[] = [];
let filesToDiff: IPath[] = [];
- let foldersToOpen = iPathsToOpen.filter((iPath) => iPath.workspacePath && !iPath.filePath && !iPath.installExtensionPath);
- let emptyToOpen = iPathsToOpen.filter((iPath) => !iPath.workspacePath && !iPath.filePath && !iPath.installExtensionPath);
- let extensionsToInstall = iPathsToOpen.filter((iPath) => iPath.installExtensionPath).map(ipath => ipath.filePath);
- let filesToCreate = iPathsToOpen.filter((iPath) => !!iPath.filePath && iPath.createFilePath && !iPath.installExtensionPath);
+ let foldersToOpen = iPathsToOpen.filter(iPath => iPath.workspacePath && !iPath.filePath && !iPath.installExtensionPath);
+ let emptyToOpen = iPathsToOpen.filter(iPath => !iPath.workspacePath && !iPath.filePath && !iPath.installExtensionPath);
+ let extensionsToInstall = iPathsToOpen.filter(iPath => iPath.installExtensionPath).map(ipath => ipath.filePath);
+ let filesToCreate = iPathsToOpen.filter(iPath => !!iPath.filePath && iPath.createFilePath && !iPath.installExtensionPath);
// Diff mode needs special care
- let candidates = iPathsToOpen.filter((iPath) => !!iPath.filePath && !iPath.createFilePath && !iPath.installExtensionPath);
+ const candidates = iPathsToOpen.filter(iPath => !!iPath.filePath && !iPath.createFilePath && !iPath.installExtensionPath);
if (openConfig.diffMode) {
if (candidates.length === 2) {
filesToDiff = candidates;
@@ -578,7 +600,7 @@ export class WindowsManager implements IWindowsService {
// Handle files to open/diff or to create when we dont open a folder
if (!foldersToOpen.length && (filesToOpen.length > 0 || filesToCreate.length > 0 || filesToDiff.length > 0 || extensionsToInstall.length > 0)) {
- // Let the user settings override how files are open in a new window or same window unless we are forced
+ // const the user settings override how files are open in a new window or same window unless we are forced
let openFilesInNewWindow: boolean;
if (openConfig.forceNewWindow) {
openFilesInNewWindow = true;
@@ -593,15 +615,11 @@ export class WindowsManager implements IWindowsService {
}
// Open Files in last instance if any and flag tells us so
- let lastActiveWindow = this.getLastActiveWindow();
+ const lastActiveWindow = this.getLastActiveWindow();
if (!openFilesInNewWindow && lastActiveWindow) {
lastActiveWindow.focus();
- lastActiveWindow.ready().then((readyWindow) => {
- readyWindow.send('vscode:openFiles', {
- filesToOpen: filesToOpen,
- filesToCreate: filesToCreate,
- filesToDiff: filesToDiff
- });
+ lastActiveWindow.ready().then(readyWindow => {
+ readyWindow.send('vscode:openFiles', { filesToOpen, filesToCreate, filesToDiff });
if (extensionsToInstall.length) {
readyWindow.send('vscode:installExtensions', { extensionsToInstall });
@@ -614,7 +632,7 @@ export class WindowsManager implements IWindowsService {
// Otherwise open instance with files
else {
configuration = this.toConfiguration(this.getWindowUserEnv(openConfig), openConfig.cli, null, filesToOpen, filesToCreate, filesToDiff, extensionsToInstall);
- let browserWindow = this.openInBrowserWindow(configuration, true /* new window */);
+ const browserWindow = this.openInBrowserWindow(configuration, true /* new window */);
usedWindows.push(browserWindow);
openConfig.forceNewWindow = true; // any other folders to open must open in new window then
@@ -626,16 +644,12 @@ export class WindowsManager implements IWindowsService {
if (foldersToOpen.length > 0) {
// Check for existing instances
- let windowsOnWorkspacePath = arrays.coalesce(foldersToOpen.map((iPath) => this.findWindow(iPath.workspacePath)));
+ const windowsOnWorkspacePath = arrays.coalesce(foldersToOpen.map(iPath => this.findWindow(iPath.workspacePath)));
if (windowsOnWorkspacePath.length > 0) {
- let browserWindow = windowsOnWorkspacePath[0];
+ const browserWindow = windowsOnWorkspacePath[0];
browserWindow.focus(); // just focus one of them
- browserWindow.ready().then((readyWindow) => {
- readyWindow.send('vscode:openFiles', {
- filesToOpen: filesToOpen,
- filesToCreate: filesToCreate,
- filesToDiff: filesToDiff
- });
+ browserWindow.ready().then(readyWindow => {
+ readyWindow.send('vscode:openFiles', { filesToOpen, filesToCreate, filesToDiff });
if (extensionsToInstall.length) {
readyWindow.send('vscode:installExtensions', { extensionsToInstall });
@@ -654,13 +668,13 @@ export class WindowsManager implements IWindowsService {
}
// Open remaining ones
- foldersToOpen.forEach((folderToOpen) => {
- if (windowsOnWorkspacePath.some((win) => this.isPathEqual(win.openedWorkspacePath, folderToOpen.workspacePath))) {
+ foldersToOpen.forEach(folderToOpen => {
+ if (windowsOnWorkspacePath.some(win => this.isPathEqual(win.openedWorkspacePath, folderToOpen.workspacePath))) {
return; // ignore folders that are already open
}
configuration = this.toConfiguration(this.getWindowUserEnv(openConfig), openConfig.cli, folderToOpen.workspacePath, filesToOpen, filesToCreate, filesToDiff, extensionsToInstall);
- let browserWindow = this.openInBrowserWindow(configuration, openInNewWindow, openInNewWindow ? void 0 : openConfig.windowToUse);
+ const browserWindow = this.openInBrowserWindow(configuration, openInNewWindow, openInNewWindow ? void 0 : openConfig.windowToUse);
usedWindows.push(browserWindow);
// Reset these because we handled them
@@ -676,84 +690,78 @@ export class WindowsManager implements IWindowsService {
// Handle empty
if (emptyToOpen.length > 0) {
emptyToOpen.forEach(() => {
- let configuration = this.toConfiguration(this.getWindowUserEnv(openConfig), openConfig.cli);
- let browserWindow = this.openInBrowserWindow(configuration, openInNewWindow, openInNewWindow ? void 0 : openConfig.windowToUse);
+ const configuration = this.toConfiguration(this.getWindowUserEnv(openConfig), openConfig.cli);
+ const browserWindow = this.openInBrowserWindow(configuration, openInNewWindow, openInNewWindow ? void 0 : openConfig.windowToUse);
usedWindows.push(browserWindow);
openInNewWindow = true; // any other folders to open must open in new window then
});
}
- // Remember in recent document list
- iPathsToOpen.forEach((iPath) => {
- if (iPath.filePath || iPath.workspacePath) {
- app.addRecentDocument(iPath.filePath || iPath.workspacePath);
- }
- });
+ // Remember in recent document list (unless this opens for extension development)
+ if (!openConfig.cli.extensionDevelopmentPath) {
+ iPathsToOpen.forEach(iPath => {
+ if (iPath.filePath || iPath.workspacePath) {
+ app.addRecentDocument(iPath.filePath || iPath.workspacePath);
+ this.addToRecentPathsList(iPath.filePath || iPath.workspacePath, !!iPath.filePath);
+ }
+ });
+ }
// Emit events
- iPathsToOpen.forEach((iPath) => this.eventEmitter.emit(EventTypes.OPEN, iPath));
+ iPathsToOpen.forEach(iPath => this.eventEmitter.emit(EventTypes.OPEN, iPath));
return arrays.distinct(usedWindows);
}
- private getWindowUserEnv(openConfig: IOpenConfiguration): IProcessEnvironment {
- return assign({}, this.initialUserEnv, openConfig.userEnv || {});
- }
-
- public openPluginDevelopmentHostWindow(openConfig: IOpenConfiguration): void {
-
- // Reload an existing plugin development host window on the same path
- // We currently do not allow more than one extension development window
- // on the same plugin path.
- let res = WindowsManager.WINDOWS.filter((w) => w.config && this.isPathEqual(w.config.extensionDevelopmentPath, openConfig.cli.extensionDevelopmentPath));
- if (res && res.length === 1) {
- this.reload(res[0], openConfig.cli);
- res[0].focus(); // make sure it gets focus and is restored
-
+ private addToRecentPathsList(path?: string, isFile?: boolean): void {
+ if (!path) {
return;
}
- // Fill in previously opened workspace unless an explicit path is provided and we are not unit testing
- if (openConfig.cli.paths.length === 0 && !openConfig.cli.extensionTestsPath) {
- let workspaceToOpen = this.windowsState.lastPluginDevelopmentHostWindow && this.windowsState.lastPluginDevelopmentHostWindow.workspacePath;
- if (workspaceToOpen) {
- openConfig.cli.paths = [workspaceToOpen];
- }
+ const mru = this.getRecentPathsList();
+ 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());
}
- // Make sure we are not asked to open a path that is already opened
- if (openConfig.cli.paths.length > 0) {
- res = WindowsManager.WINDOWS.filter((w) => w.openedWorkspacePath && openConfig.cli.paths.indexOf(w.openedWorkspacePath) >= 0);
- if (res.length) {
- openConfig.cli.paths = [];
- }
+ // 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);
+
+ this.storageService.setItem(WindowsManager.recentPathsListStorageKey, mru);
+ }
+
+ public removeFromRecentPathsList(path: string): void {
+ const mru = this.getRecentPathsList();
+
+ let index = mru.files.indexOf(path);
+ if (index >= 0) {
+ mru.files.splice(index, 1);
}
- // Open it
- this.open({ cli: openConfig.cli, forceNewWindow: true, forceEmpty: openConfig.cli.paths.length === 0 });
+ index = mru.folders.indexOf(path);
+ if (index >= 0) {
+ mru.folders.splice(index, 1);
+ }
+
+ this.storageService.setItem(WindowsManager.recentPathsListStorageKey, mru);
}
- private toConfiguration(userEnv: IProcessEnvironment, cli: ICommandLineArguments, workspacePath?: string, filesToOpen?: IPath[], filesToCreate?: IPath[], filesToDiff?: IPath[], extensionsToInstall?: string[]): IWindowConfiguration {
- let configuration: IWindowConfiguration = mixin({}, cli); // inherit all properties from CLI
- configuration.appRoot = this.envService.appRoot;
- configuration.execPath = process.execPath;
- configuration.userEnv = userEnv;
- configuration.workspacePath = workspacePath;
- configuration.filesToOpen = filesToOpen;
- configuration.filesToCreate = filesToCreate;
- configuration.filesToDiff = filesToDiff;
- configuration.extensionsToInstall = extensionsToInstall;
-
- return configuration;
+ public clearRecentPathsList(): void {
+ this.storageService.setItem(WindowsManager.recentPathsListStorageKey, { folders: [], files: [] });
+ app.clearRecentDocuments();
}
- private getRecentlyOpenedPaths(workspacePath?: string, filesToOpen?: IPath[]): IOpenedPathsList {
+ public getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList {
let files: string[];
let folders: string[];
// Get from storage
- let storedRecents = this.storageService.getItem(WindowsManager.openedPathsListStorageKey);
+ const storedRecents = this.storageService.getItem(WindowsManager.recentPathsListStorageKey);
if (storedRecents) {
files = storedRecents.files || [];
folders = storedRecents.folders || [];
@@ -776,13 +784,60 @@ export class WindowsManager implements IWindowsService {
files = arrays.distinct(files);
folders = arrays.distinct(folders);
- // Make sure it is bounded
- files = files.slice(0, 10);
- folders = folders.slice(0, 10);
-
return { files, folders };
}
+ private getWindowUserEnv(openConfig: IOpenConfiguration): IProcessEnvironment {
+ return assign({}, this.initialUserEnv, openConfig.userEnv || {});
+ }
+
+ public openPluginDevelopmentHostWindow(openConfig: IOpenConfiguration): void {
+
+ // Reload an existing plugin development host window on the same path
+ // We currently do not allow more than one extension development window
+ // on the same plugin path.
+ let res = WindowsManager.WINDOWS.filter(w => w.config && this.isPathEqual(w.config.extensionDevelopmentPath, openConfig.cli.extensionDevelopmentPath));
+ if (res && res.length === 1) {
+ this.reload(res[0], openConfig.cli);
+ res[0].focus(); // make sure it gets focus and is restored
+
+ return;
+ }
+
+ // Fill in previously opened workspace unless an explicit path is provided and we are not unit testing
+ if (openConfig.cli.paths.length === 0 && !openConfig.cli.extensionTestsPath) {
+ const workspaceToOpen = this.windowsState.lastPluginDevelopmentHostWindow && this.windowsState.lastPluginDevelopmentHostWindow.workspacePath;
+ if (workspaceToOpen) {
+ openConfig.cli.paths = [workspaceToOpen];
+ }
+ }
+
+ // Make sure we are not asked to open a path that is already opened
+ if (openConfig.cli.paths.length > 0) {
+ res = WindowsManager.WINDOWS.filter(w => w.openedWorkspacePath && openConfig.cli.paths.indexOf(w.openedWorkspacePath) >= 0);
+ if (res.length) {
+ openConfig.cli.paths = [];
+ }
+ }
+
+ // Open it
+ this.open({ cli: openConfig.cli, forceNewWindow: true, forceEmpty: openConfig.cli.paths.length === 0 });
+ }
+
+ private toConfiguration(userEnv: IProcessEnvironment, cli: ICommandLineArguments, workspacePath?: string, filesToOpen?: IPath[], filesToCreate?: IPath[], filesToDiff?: IPath[], extensionsToInstall?: string[]): IWindowConfiguration {
+ const configuration: IWindowConfiguration = mixin({}, cli); // inherit all properties from CLI
+ configuration.appRoot = this.envService.appRoot;
+ configuration.execPath = process.execPath;
+ configuration.userEnv = userEnv;
+ configuration.workspacePath = workspacePath;
+ configuration.filesToOpen = filesToOpen;
+ configuration.filesToCreate = filesToCreate;
+ configuration.filesToDiff = filesToDiff;
+ configuration.extensionsToInstall = extensionsToInstall;
+
+ return configuration;
+ }
+
private toIPath(anyPath: string, ignoreFileNotFound?: boolean, gotoLineMode?: boolean): IPath {
if (!anyPath) {
return null;
@@ -794,9 +849,9 @@ export class WindowsManager implements IWindowsService {
anyPath = parsedPath.path;
}
- let candidate = path.normalize(anyPath);
+ const candidate = path.normalize(anyPath);
try {
- let candidateStat = fs.statSync(candidate);
+ const candidateStat = fs.statSync(candidate);
if (candidateStat) {
return candidateStat.isFile() ?
{
@@ -834,11 +889,11 @@ export class WindowsManager implements IWindowsService {
reopenFolders = (windowConfig && windowConfig.reopenFolders) || ReopenFoldersSetting.ONE;
}
- let lastActiveFolder = this.windowsState.lastActiveWindow && this.windowsState.lastActiveWindow.workspacePath;
+ const lastActiveFolder = this.windowsState.lastActiveWindow && this.windowsState.lastActiveWindow.workspacePath;
// Restore all
if (reopenFolders === ReopenFoldersSetting.ALL) {
- let lastOpenedFolders = this.windowsState.openedFolders.map(o => o.workspacePath);
+ const lastOpenedFolders = this.windowsState.openedFolders.map(o => o.workspacePath);
// If we have a last active folder, move it to the end
if (lastActiveFolder) {
@@ -855,7 +910,7 @@ export class WindowsManager implements IWindowsService {
}
}
- let iPaths = candidates.map((candidate) => this.toIPath(candidate, ignoreFileNotFound, cli.goto)).filter((path) => !!path);
+ const iPaths = candidates.map(candidate => this.toIPath(candidate, ignoreFileNotFound, cli.goto)).filter(path => !!path);
if (iPaths.length > 0) {
return iPaths;
}
@@ -904,7 +959,7 @@ export class WindowsManager implements IWindowsService {
// Some configuration things get inherited if the window is being reused and we are
// in plugin development host mode. These options are all development related.
- let currentWindowConfig = vscodeWindow.config;
+ const currentWindowConfig = vscodeWindow.config;
if (!configuration.extensionDevelopmentPath && currentWindowConfig && !!currentWindowConfig.extensionDevelopmentPath) {
configuration.extensionDevelopmentPath = currentWindowConfig.extensionDevelopmentPath;
configuration.verbose = currentWindowConfig.verbose;
@@ -915,7 +970,7 @@ export class WindowsManager implements IWindowsService {
}
// Only load when the window has not vetoed this
- this.lifecycleService.unload(vscodeWindow).done((veto) => {
+ this.lifecycleService.unload(vscodeWindow).done(veto => {
if (!veto) {
// Load it
@@ -935,14 +990,14 @@ export class WindowsManager implements IWindowsService {
// Known Folder - load from stored settings if any
if (configuration.workspacePath) {
- let stateForWorkspace = this.windowsState.openedFolders.filter(o => this.isPathEqual(o.workspacePath, configuration.workspacePath)).map(o => o.uiState);
+ const stateForWorkspace = this.windowsState.openedFolders.filter(o => this.isPathEqual(o.workspacePath, configuration.workspacePath)).map(o => o.uiState);
if (stateForWorkspace.length) {
return stateForWorkspace[0];
}
}
// First Window
- let lastActive = this.getLastActiveWindow();
+ const lastActive = this.getLastActiveWindow();
if (!lastActive && this.windowsState.lastActiveWindow) {
return this.windowsState.lastActiveWindow.uiState;
}
@@ -953,7 +1008,7 @@ export class WindowsManager implements IWindowsService {
// We want the new window to open on the same display that the last active one is in
let displayToUse: Electron.Display;
- let displays = screen.getAllDisplays();
+ const displays = screen.getAllDisplays();
// Single Display
if (displays.length === 1) {
@@ -965,7 +1020,7 @@ export class WindowsManager implements IWindowsService {
// on mac there is 1 menu per window so we need to use the monitor where the cursor currently is
if (platform.isMacintosh) {
- let cursorPoint = screen.getCursorScreenPoint();
+ const cursorPoint = screen.getCursorScreenPoint();
displayToUse = screen.getDisplayNearestPoint(cursorPoint);
}
@@ -980,7 +1035,7 @@ export class WindowsManager implements IWindowsService {
}
}
- let defaultState = defaultWindowState();
+ const defaultState = defaultWindowState();
defaultState.x = displayToUse.bounds.x + (displayToUse.bounds.width / 2) - (defaultState.width / 2);
defaultState.y = displayToUse.bounds.y + (displayToUse.bounds.height / 2) - (defaultState.height / 2);
@@ -992,8 +1047,8 @@ export class WindowsManager implements IWindowsService {
return state;
}
- let existingWindowBounds = WindowsManager.WINDOWS.map((win) => win.getBounds());
- while (existingWindowBounds.some((b) => b.x === state.x || b.y === state.y)) {
+ const existingWindowBounds = WindowsManager.WINDOWS.map(win => win.getBounds());
+ while (existingWindowBounds.some(b => b.x === state.x || b.y === state.y)) {
state.x += 30;
state.y += 30;
}
@@ -1022,8 +1077,8 @@ export class WindowsManager implements IWindowsService {
}
private getFileOrFolderPaths(options: INativeOpenDialogOptions, clb: (paths: string[]) => void): void {
- let workingDir = options.path || this.storageService.getItem(WindowsManager.workingDirPickerStorageKey);
- let focussedWindow = this.getFocusedWindow();
+ const workingDir = options.path || this.storageService.getItem(WindowsManager.workingDirPickerStorageKey);
+ const focussedWindow = this.getFocusedWindow();
let pickerProperties: ('openFile' | 'openDirectory' | 'multiSelections' | 'createDirectory')[];
if (options.pickFiles && options.pickFolders) {
@@ -1035,7 +1090,7 @@ export class WindowsManager implements IWindowsService {
dialog.showOpenDialog(focussedWindow && focussedWindow.win, {
defaultPath: workingDir,
properties: pickerProperties
- }, (paths) => {
+ }, paths => {
if (paths && paths.length > 0) {
// Remember path in storage for next time
@@ -1050,7 +1105,7 @@ export class WindowsManager implements IWindowsService {
}
public focusLastActive(cli: ICommandLineArguments): VSCodeWindow {
- let lastActive = this.getLastActiveWindow();
+ const lastActive = this.getLastActiveWindow();
if (lastActive) {
lastActive.focus();
@@ -1066,8 +1121,8 @@ export class WindowsManager implements IWindowsService {
public getLastActiveWindow(): VSCodeWindow {
if (WindowsManager.WINDOWS.length) {
- let lastFocussedDate = Math.max.apply(Math, WindowsManager.WINDOWS.map((w) => w.lastFocusTime));
- let res = WindowsManager.WINDOWS.filter((w) => w.lastFocusTime === lastFocussedDate);
+ const lastFocussedDate = Math.max.apply(Math, WindowsManager.WINDOWS.map(w => w.lastFocusTime));
+ const res = WindowsManager.WINDOWS.filter(w => w.lastFocusTime === lastFocussedDate);
if (res && res.length) {
return res[0];
}
@@ -1080,15 +1135,15 @@ export class WindowsManager implements IWindowsService {
if (WindowsManager.WINDOWS.length) {
// Sort the last active window to the front of the array of windows to test
- let windowsToTest = WindowsManager.WINDOWS.slice(0);
- let lastActiveWindow = this.getLastActiveWindow();
+ const windowsToTest = WindowsManager.WINDOWS.slice(0);
+ const lastActiveWindow = this.getLastActiveWindow();
if (lastActiveWindow) {
windowsToTest.splice(windowsToTest.indexOf(lastActiveWindow), 1);
windowsToTest.unshift(lastActiveWindow);
}
// Find it
- let res = windowsToTest.filter((w) => {
+ const res = windowsToTest.filter(w => {
// match on workspace
if (typeof w.openedWorkspacePath === 'string' && (this.isPathEqual(w.openedWorkspacePath, workspacePath))) {
@@ -1134,7 +1189,7 @@ export class WindowsManager implements IWindowsService {
}
public sendToAll(channel: string, payload: any, windowIdsToIgnore?: number[]): void {
- WindowsManager.WINDOWS.forEach((w) => {
+ WindowsManager.WINDOWS.forEach(w => {
if (windowIdsToIgnore && windowIdsToIgnore.indexOf(w.id) >= 0) {
return; // do not send if we are instructed to ignore it
}
@@ -1144,7 +1199,7 @@ export class WindowsManager implements IWindowsService {
}
public getFocusedWindow(): VSCodeWindow {
- let win = BrowserWindow.getFocusedWindow();
+ const win = BrowserWindow.getFocusedWindow();
if (win) {
return this.getWindowById(win.id);
}
@@ -1153,7 +1208,7 @@ export class WindowsManager implements IWindowsService {
}
public getWindowById(windowId: number): VSCodeWindow {
- let res = WindowsManager.WINDOWS.filter((w) => w.id === windowId);
+ const res = WindowsManager.WINDOWS.filter(w => w.id === windowId);
if (res && res.length === 1) {
return res[0];
}
@@ -1181,7 +1236,7 @@ export class WindowsManager implements IWindowsService {
message: nls.localize('appStalled', "The window is no longer responding"),
detail: nls.localize('appStalledDetail', "You can reopen or close the window or keep waiting."),
noLink: true
- }, (result) => {
+ }, result => {
if (result === 0) {
vscodeWindow.reload();
} else if (result === 2) {
@@ -1200,7 +1255,7 @@ export class WindowsManager implements IWindowsService {
message: nls.localize('appCrashed', "The window has crashed"),
detail: nls.localize('appCrashedDetail', "We are sorry for the inconvenience! You can reopen the window to continue where you left off."),
noLink: true
- }, (result) => {
+ }, result => {
if (result === 0) {
vscodeWindow.reload();
} else if (result === 1) {
@@ -1217,7 +1272,7 @@ export class WindowsManager implements IWindowsService {
}
// On Window close, update our stored state of this window
- let state: IWindowState = { workspacePath: win.openedWorkspacePath, uiState: win.serializeWindowState() };
+ const state: IWindowState = { workspacePath: win.openedWorkspacePath, uiState: win.serializeWindowState() };
if (win.isPluginDevelopmentHost) {
this.windowsState.lastPluginDevelopmentHostWindow = state;
} else {
@@ -1237,7 +1292,7 @@ export class WindowsManager implements IWindowsService {
win.dispose();
// Remove from our list so that Electron can clean it up
- let index = WindowsManager.WINDOWS.indexOf(win);
+ const index = WindowsManager.WINDOWS.indexOf(win);
WindowsManager.WINDOWS.splice(index, 1);
// Emit
@@ -1267,4 +1322,4 @@ export class WindowsManager implements IWindowsService {
return pathA === pathB;
}
-}
\ No newline at end of file
+}
diff --git a/src/vs/code/node/cli.ts b/src/vs/code/node/cli.ts
index 33dcb46bb57..3a506b9d96a 100644
--- a/src/vs/code/node/cli.ts
+++ b/src/vs/code/node/cli.ts
@@ -6,7 +6,8 @@
import { spawn } from 'child_process';
import { TPromise } from 'vs/base/common/winjs.base';
import { assign } from 'vs/base/common/objects';
-import { parseCLIProcessArgv, buildHelpMessage, ParsedArgs } from 'vs/code/node/argv';
+import { parseCLIProcessArgv, buildHelpMessage, ParsedArgs } from 'vs/platform/environment/node/argv';
+import product from 'vs/platform/product';
import pkg from 'vs/platform/package';
function shouldSpawnCliProcess(argv: ParsedArgs): boolean {
@@ -28,9 +29,9 @@ export function main(argv: string[]): TPromise {
}
if (args.help) {
- console.log(buildHelpMessage(pkg.version));
+ console.log(buildHelpMessage(product.nameLong, product.applicationName, pkg.version));
} else if (args.version) {
- console.log(pkg.version);
+ console.log(`${ pkg.version } (${ product.commit })`);
} else if (shouldSpawnCliProcess(args)) {
const mainCli = new TPromise(c => require(['vs/code/node/cliProcessMain'], c));
return mainCli.then(cli => cli.main(args));
diff --git a/src/vs/code/node/cliProcessMain.ts b/src/vs/code/node/cliProcessMain.ts
index 1ad830e39fe..c6aba650b72 100644
--- a/src/vs/code/node/cliProcessMain.ts
+++ b/src/vs/code/node/cliProcessMain.ts
@@ -7,7 +7,7 @@ import { localize } from 'vs/nls';
import product from 'vs/platform/product';
import pkg from 'vs/platform/package';
import * as path from 'path';
-import { ParsedArgs } from 'vs/code/node/argv';
+import { ParsedArgs } from 'vs/platform/environment/node/argv';
import { TPromise } from 'vs/base/common/winjs.base';
import { sequence } from 'vs/base/common/async';
import { IPager } from 'vs/base/common/paging';
diff --git a/src/vs/code/node/sharedProcessMain.ts b/src/vs/code/node/sharedProcessMain.ts
index 9f4069163ea..d7ede781b9b 100644
--- a/src/vs/code/node/sharedProcessMain.ts
+++ b/src/vs/code/node/sharedProcessMain.ts
@@ -14,7 +14,7 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { EnvironmentService } from 'vs/platform/environment/node/environmentService';
-import { parseArgs } from 'vs/code/node/argv';
+import { parseArgs } from 'vs/platform/environment/node/argv';
import { IEventService } from 'vs/platform/event/common/event';
import { EventService } from 'vs/platform/event/common/eventService';
import { ExtensionManagementChannel } from 'vs/platform/extensionManagement/common/extensionManagementIpc';
@@ -108,7 +108,7 @@ function main(server: Server): void {
server.registerChannel('extensions', channel);
// eventually clean up old extensions
- setTimeout(() => (extensionManagementService as ExtensionManagementService).removeDeprecatedExtensions(), 5000);
+ setTimeout(() => (extensionManagementService as ExtensionManagementService).removeDeprecatedExtensions(), 100);
});
});
}
diff --git a/src/vs/code/test/node/argv.test.ts b/src/vs/code/test/node/argv.test.ts
index 685ca737cf9..dec7e806bdd 100644
--- a/src/vs/code/test/node/argv.test.ts
+++ b/src/vs/code/test/node/argv.test.ts
@@ -5,7 +5,7 @@
'use strict';
import assert = require('assert');
-import {formatOptions} from 'vs/code/node/argv';
+import {formatOptions} from 'vs/platform/environment/node/argv';
suite('formatOptions', () => {
test('Text should display small columns correctly', () => {
diff --git a/src/vs/css.js b/src/vs/css.js
index 45d7eb7bb59..4e1ad32966e 100644
--- a/src/vs/css.js
+++ b/src/vs/css.js
@@ -236,9 +236,7 @@ var CSSLoaderPlugin;
CSSPlugin.prototype.load = function (name, req, load, config) {
config = config || {};
var myConfig = config['vs/css'] || {};
- if (myConfig.inlineResources) {
- global.inlineResources = true;
- }
+ global.inlineResources = myConfig.inlineResources;
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
@@ -277,7 +275,7 @@ var CSSLoaderPlugin;
], 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));
+ contents.push(Utilities.rewriteOrInlineUrls(entries[i].fsPath, entries[i].moduleName, moduleName, entries[i].contents, global.inlineResources === 'base64'));
}
else {
contents.push(Utilities.rewriteUrls(entries[i].moduleName, moduleName, entries[i].contents));
@@ -428,7 +426,7 @@ var CSSLoaderPlugin;
return Utilities.relativePath(newFile, absoluteUrl);
});
};
- Utilities.rewriteOrInlineUrls = function (originalFileFSPath, originalFile, newFile, contents) {
+ Utilities.rewriteOrInlineUrls = function (originalFileFSPath, originalFile, newFile, contents, forceBase64) {
var fs = require.nodeRequire('fs');
var path = require.nodeRequire('path');
return this._replaceURL(contents, function (url) {
@@ -444,7 +442,7 @@ var CSSLoaderPlugin;
global.cssInlinedResources.push(normalizedFSPath);
var MIME = /\.svg$/.test(url) ? 'image/svg+xml' : 'image/png';
var DATA = ';base64,' + fileContents.toString('base64');
- if (/\.svg$/.test(url)) {
+ 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, '\'')
diff --git a/src/vs/editor/browser/codeEditor.ts b/src/vs/editor/browser/codeEditor.ts
index daec7c89ee4..9374587ae6c 100644
--- a/src/vs/editor/browser/codeEditor.ts
+++ b/src/vs/editor/browser/codeEditor.ts
@@ -7,15 +7,18 @@
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
import {ICommandService} from 'vs/platform/commands/common/commands';
import {IContextKeyService} from 'vs/platform/contextkey/common/contextkey';
-import * as editorCommon from 'vs/editor/common/editorCommon';
+import {IEditorOptions} from 'vs/editor/common/editorCommon';
+import {IEditorContributionCtor} from 'vs/editor/browser/editorBrowser';
import {ICodeEditorService} from 'vs/editor/common/services/codeEditorService';
import {CodeEditorWidget} from 'vs/editor/browser/widget/codeEditorWidget';
+import {EditorAction, CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
+import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
export class CodeEditor extends CodeEditorWidget {
constructor(
domElement:HTMLElement,
- options:editorCommon.IEditorOptions,
+ options:IEditorOptions,
@IInstantiationService instantiationService: IInstantiationService,
@ICodeEditorService codeEditorService: ICodeEditorService,
@ICommandService commandService: ICommandService,
@@ -24,4 +27,11 @@ export class CodeEditor extends CodeEditorWidget {
super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService);
}
+ protected _getContributions(): IEditorContributionCtor[] {
+ return [].concat(EditorBrowserRegistry.getEditorContributions()).concat(CommonEditorRegistry.getEditorContributions());
+ }
+
+ protected _getActions(): EditorAction[] {
+ return CommonEditorRegistry.getEditorActions();
+ }
}
diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts
index f5f82b4ff4d..56cbb755aa4 100644
--- a/src/vs/editor/browser/config/configuration.ts
+++ b/src/vs/editor/browser/config/configuration.ts
@@ -271,6 +271,8 @@ export class Configuration extends CommonEditorConfiguration {
extra += 'ie ';
} else if (browser.isFirefox) {
extra += 'ff ';
+ } else if (browser.isEdge) {
+ extra += 'edge ';
}
if (browser.isIE9) {
extra += 'ie9 ';
diff --git a/src/vs/editor/browser/controller/keyboardHandler.ts b/src/vs/editor/browser/controller/keyboardHandler.ts
index 6341ee3386a..a8040a835af 100644
--- a/src/vs/editor/browser/controller/keyboardHandler.ts
+++ b/src/vs/editor/browser/controller/keyboardHandler.ts
@@ -109,12 +109,14 @@ export class KeyboardHandler extends ViewEventHandler implements IDisposable {
let cs = dom.getComputedStyle(this.textArea.actual);
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}'`;
+ context.font = `${cs.fontStyle} ${cs.fontVariant} ${cs.fontWeight} ${cs.fontStretch} ${cs.fontSize} / ${cs.lineHeight} ${cs.fontFamily}`;
+ let metrics = context.measureText(e.data);
+ StyleMutator.setWidth(this.textArea.actual, metrics.width + 2); // +2 for Japanese...
} else {
context.font = cs.font;
+ let metrics = context.measureText(e.data);
+ StyleMutator.setWidth(this.textArea.actual, metrics.width);
}
- let metrics = context.measureText(e.data);
- StyleMutator.setWidth(this.textArea.actual, metrics.width);
}
}));
diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts
index c136eee58ef..e4a42059522 100644
--- a/src/vs/editor/browser/controller/mouseHandler.ts
+++ b/src/vs/editor/browser/controller/mouseHandler.ts
@@ -14,7 +14,7 @@ import * as editorCommon from 'vs/editor/common/editorCommon';
import {ViewEventHandler} from 'vs/editor/common/viewModel/viewEventHandler';
import {MouseTargetFactory} from 'vs/editor/browser/controller/mouseTarget';
import * as editorBrowser from 'vs/editor/browser/editorBrowser';
-import {TimeoutTimer} from 'vs/base/common/async';
+import {TimeoutTimer, RunOnceScheduler} from 'vs/base/common/async';
import {ViewContext} from 'vs/editor/common/view/viewContext';
import {VisibleRange} from 'vs/editor/common/view/renderingContext';
import {EditorMouseEventFactory, GlobalEditorMouseMoveMonitor, EditorMouseEvent} from 'vs/editor/browser/editorDom';
@@ -131,6 +131,7 @@ export class MouseHandler extends ViewEventHandler implements IDisposable {
protected mouseTargetFactory: MouseTargetFactory;
protected listenersToRemove:IDisposable[];
private toDispose:IDisposable[];
+ private _asyncFocus: RunOnceScheduler;
private _mouseDownOperation: MouseDownOperation;
private lastMouseLeaveTime:number;
@@ -155,6 +156,8 @@ export class MouseHandler extends ViewEventHandler implements IDisposable {
);
this.toDispose = [];
+ this._asyncFocus = new RunOnceScheduler(() => this.viewHelper.focusTextArea(), 0);
+ this.toDispose.push(this._asyncFocus);
this.lastMouseLeaveTime = -1;
@@ -214,6 +217,11 @@ export class MouseHandler extends ViewEventHandler implements IDisposable {
this._mouseDownOperation.onCursorSelectionChanged(e);
return false;
}
+ private _isFocused = false;
+ public onViewFocusChanged(isFocused:boolean): boolean {
+ this._isFocused = isFocused;
+ return false;
+ }
// --- end event handlers
protected _createMouseTarget(e:EditorMouseEvent, testEventTarget:boolean): editorBrowser.IMouseTarget {
@@ -280,17 +288,11 @@ export class MouseHandler extends ViewEventHandler implements IDisposable {
}
var focus = () => {
- if (browser.isIE11orEarlier) {
- // IE does not want to focus when coming in from the browser's address bar
- if ((e.browserEvent).fromElement) {
- e.preventDefault();
- this.viewHelper.focusTextArea();
- } else {
- // TODO@Alex -> cancel this if focus is lost
- setTimeout(() => {
- this.viewHelper.focusTextArea();
- });
- }
+ // In IE11, if the focus is in the browser's address bar and
+ // then you click in the editor, calling preventDefault()
+ // will not move focus properly (focus remains the address bar)
+ if (browser.isIE11orEarlier && !this._isFocused) {
+ this._asyncFocus.schedule();
} else {
e.preventDefault();
this.viewHelper.focusTextArea();
diff --git a/src/vs/editor/browser/controller/mouseTarget.ts b/src/vs/editor/browser/controller/mouseTarget.ts
index 4059b8e9a9c..6a0cc8f5be3 100644
--- a/src/vs/editor/browser/controller/mouseTarget.ts
+++ b/src/vs/editor/browser/controller/mouseTarget.ts
@@ -294,6 +294,11 @@ export class MouseTargetFactory {
if (lineNumberAttribute && columnAttribute) {
return this.createMouseTargetFromViewCursor(t, parseInt(lineNumberAttribute, 10), parseInt(columnAttribute, 10), mouseColumn);
}
+ } else {
+ // Hit testing completely failed...
+ let possibleLineNumber = this._viewHelper.getLineNumberAtVerticalOffset(mouseVerticalOffset);
+ let maxColumn = this._context.model.getLineMaxColumn(possibleLineNumber);
+ return new MouseTarget(t, MouseTargetType.CONTENT_EMPTY, mouseColumn, new Position(possibleLineNumber, maxColumn));
}
}
diff --git a/src/vs/editor/browser/editor.all.ts b/src/vs/editor/browser/editor.all.ts
index c7b54af660a..0ae86cff88c 100644
--- a/src/vs/editor/browser/editor.all.ts
+++ b/src/vs/editor/browser/editor.all.ts
@@ -8,7 +8,6 @@
import 'vs/editor/browser/widget/codeEditorWidget';
import 'vs/editor/browser/widget/diffEditorWidget';
-import 'vs/editor/contrib/accessibility/browser/accessibility';
import 'vs/editor/contrib/clipboard/browser/clipboard';
import 'vs/editor/contrib/codelens/browser/codelens';
import 'vs/editor/contrib/comment/common/comment';
@@ -41,7 +40,6 @@ import 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode';
import 'vs/editor/contrib/toggleWordWrap/common/toggleWordWrap';
import 'vs/css!vs/editor/contrib/wordHighlighter/browser/wordHighlighter';
import 'vs/editor/contrib/wordHighlighter/common/wordHighlighter';
-import 'vs/editor/contrib/defineKeybinding/browser/defineKeybinding';
import 'vs/editor/contrib/folding/browser/folding';
import 'vs/editor/contrib/indentation/common/indentation';
diff --git a/src/vs/editor/browser/editorBrowser.ts b/src/vs/editor/browser/editorBrowser.ts
index be1811a72f5..00448c5ba4e 100644
--- a/src/vs/editor/browser/editorBrowser.ts
+++ b/src/vs/editor/browser/editorBrowser.ts
@@ -8,7 +8,7 @@ import {IEventEmitter} from 'vs/base/common/eventEmitter';
import {IDisposable} from 'vs/base/common/lifecycle';
import {IKeyboardEvent} from 'vs/base/browser/keyboardEvent';
import {IMouseEvent} from 'vs/base/browser/mouseEvent';
-import {IInstantiationService, IConstructorSignature1} from 'vs/platform/instantiation/common/instantiation';
+import {IConstructorSignature1} from 'vs/platform/instantiation/common/instantiation';
import * as editorCommon from 'vs/editor/common/editorCommon';
import {Position} from 'vs/editor/common/core/position';
import {Range} from 'vs/editor/common/core/range';
@@ -385,19 +385,7 @@ export interface IEditorMouseEvent {
/**
* @internal
*/
-export type ISimpleEditorContributionCtor = IConstructorSignature1;
-
-/**
- * An editor contribution descriptor that will be used to construct editor contributions
- * @internal
- */
-export interface IEditorContributionDescriptor {
- /**
- * Create an instance of the contribution
- */
- createInstance(instantiationService:IInstantiationService, editor:ICodeEditor): editorCommon.IEditorContribution;
-}
-
+export type IEditorContributionCtor = IConstructorSignature1;
/**
* An overview ruler
diff --git a/src/vs/editor/browser/editorBrowserExtensions.ts b/src/vs/editor/browser/editorBrowserExtensions.ts
index b4df735ec27..6e07a20e005 100644
--- a/src/vs/editor/browser/editorBrowserExtensions.ts
+++ b/src/vs/editor/browser/editorBrowserExtensions.ts
@@ -4,54 +4,40 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
-import {IInstantiationService, IConstructorSignature1} from 'vs/platform/instantiation/common/instantiation';
import {Registry} from 'vs/platform/platform';
-import {IEditorContribution} from 'vs/editor/common/editorCommon';
-import {ICodeEditor, IEditorContributionDescriptor, ISimpleEditorContributionCtor} from 'vs/editor/browser/editorBrowser';
+import {IEditorContributionCtor} from 'vs/editor/browser/editorBrowser';
+
+export function editorContribution(ctor:IEditorContributionCtor): void {
+ EditorContributionRegistry.INSTANCE.registerEditorBrowserContribution(ctor);
+}
export namespace EditorBrowserRegistry {
- // --- Editor Contributions
- export function registerEditorContribution(ctor:ISimpleEditorContributionCtor): void {
- (Registry.as(Extensions.EditorContributions)).registerEditorBrowserContribution(ctor);
- }
- export function getEditorContributions(): IEditorContributionDescriptor[] {
- return (Registry.as(Extensions.EditorContributions)).getEditorBrowserContributions();
+ export function getEditorContributions(): IEditorContributionCtor[] {
+ return EditorContributionRegistry.INSTANCE.getEditorBrowserContributions();
}
}
-class SimpleEditorContributionDescriptor implements IEditorContributionDescriptor {
- private _ctor:ISimpleEditorContributionCtor;
-
- constructor(ctor:ISimpleEditorContributionCtor) {
- this._ctor = ctor;
- }
-
- public createInstance(instantiationService:IInstantiationService, editor:ICodeEditor): IEditorContribution {
- // cast added to help the compiler, can remove once IConstructorSignature1 has been removed
- return instantiationService.createInstance(> this._ctor, editor);
- }
-}
-
-// Editor extension points
-var Extensions = {
+const Extensions = {
EditorContributions: 'editor.contributions'
};
class EditorContributionRegistry {
- private editorContributions: IEditorContributionDescriptor[];
+ public static INSTANCE = new EditorContributionRegistry();
+
+ private editorContributions: IEditorContributionCtor[];
constructor() {
this.editorContributions = [];
}
- public registerEditorBrowserContribution(ctor:ISimpleEditorContributionCtor): void {
- this.editorContributions.push(new SimpleEditorContributionDescriptor(ctor));
+ public registerEditorBrowserContribution(ctor:IEditorContributionCtor): void {
+ this.editorContributions.push(ctor);
}
- public getEditorBrowserContributions(): IEditorContributionDescriptor[] {
+ public getEditorBrowserContributions(): IEditorContributionCtor[] {
return this.editorContributions.slice(0);
}
}
-Registry.add(Extensions.EditorContributions, new EditorContributionRegistry());
+Registry.add(Extensions.EditorContributions, EditorContributionRegistry.INSTANCE);
diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts
index 0bd26ac4387..070a393c7ee 100644
--- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts
+++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts
@@ -302,7 +302,7 @@ class DecorationRenderHelper {
if (typeof opts !== 'undefined') {
DecorationRenderHelper.collectBorderSettingsCSSText(opts, cssTextArr);
if (typeof opts.contentIconPath !== 'undefined') {
- cssTextArr.push(strings.format(this._CSS_MAP.contentIconPath, URI.file(opts.contentIconPath).toString()));
+ cssTextArr.push(strings.format(this._CSS_MAP.contentIconPath, URI.parse(opts.contentIconPath).toString()));
}
if (typeof opts.contentText !== 'undefined') {
let escaped = opts.contentText.replace(/\"/g, '\\\"');
diff --git a/src/vs/editor/browser/standalone/colorizer.ts b/src/vs/editor/browser/standalone/colorizer.ts
index a4ce6633487..3101d2c672c 100644
--- a/src/vs/editor/browser/standalone/colorizer.ts
+++ b/src/vs/editor/browser/standalone/colorizer.ts
@@ -5,6 +5,7 @@
'use strict';
import {RunOnceScheduler} from 'vs/base/common/async';
+import {IDisposable} from 'vs/base/common/lifecycle';
import {TPromise} from 'vs/base/common/winjs.base';
import {IModel} from 'vs/editor/common/editorCommon';
import {ILineTokens, IMode} from 'vs/editor/common/modes';
@@ -25,46 +26,65 @@ export class Colorizer {
public static colorizeElement(modeService:IModeService, domNode:HTMLElement, options:IColorizerElementOptions): TPromise {
options = options || {};
- var theme = options.theme || 'vs';
- var mimeType = options.mimeType || domNode.getAttribute('lang') || domNode.getAttribute('data-lang');
+ let theme = options.theme || 'vs';
+ let mimeType = options.mimeType || domNode.getAttribute('lang') || domNode.getAttribute('data-lang');
if (!mimeType) {
console.error('Mode not detected');
return;
}
- var text = domNode.firstChild.nodeValue;
+ let text = domNode.firstChild.nodeValue;
domNode.className += 'monaco-editor ' + theme;
- var render = (str:string) => {
+ let render = (str:string) => {
domNode.innerHTML = str;
};
return this.colorize(modeService, text, mimeType, options).then(render, (err) => console.error(err), render);
}
+ private static _tokenizationSupportChangedPromise(target:IMode): TPromise {
+ let listener: IDisposable = null;
+ let stopListening = () => {
+ if (listener) {
+ listener.dispose();
+ listener = null;
+ }
+ };
+
+ return new TPromise((c, e, p) => {
+ listener = target.addSupportChangedListener((e) => {
+ if (e.tokenizationSupport) {
+ stopListening();
+ c(void 0);
+ }
+ });
+ }, stopListening);
+ }
+
public static colorize(modeService:IModeService, text:string, mimeType:string, options:IColorizerOptions): TPromise {
options = options || {};
if (typeof options.tabSize === 'undefined') {
options.tabSize = 4;
}
- var lines = text.split('\n'),
- c: (v:string)=>void,
- e: (err:any)=>void,
- p: (v:string)=>void,
- isCancelled = false,
- mode: IMode;
+ let lines = text.split('\n');
+ let c: (v:string)=>void;
+ let e: (err:any)=>void;
+ let p: (v:string)=>void;
+ let isCanceled = false;
+ let mode: IMode;
- var result = new TPromise((_c, _e, _p) => {
+ let result = new TPromise((_c, _e, _p) => {
c = _c;
e = _e;
p = _p;
}, () => {
- isCancelled = true;
+ isCanceled = true;
});
- var colorize = new RunOnceScheduler(() => {
- if (isCancelled) {
+ let colorize = new RunOnceScheduler(() => {
+ if (isCanceled) {
return;
}
- var r = actualColorize(lines, mode, options.tabSize);
+ let r = actualColorize(lines, mode, options.tabSize);
if (r.retokenize.length > 0) {
// There are retokenization requests
r.retokenize.forEach((p) => p.then(scheduleColorize));
@@ -74,7 +94,7 @@ export class Colorizer {
c(r.result);
}
}, 0);
- var scheduleColorize = () => colorize.schedule();
+ let scheduleColorize = () => colorize.schedule();
modeService.getOrCreateMode(mimeType).then((_mode) => {
if (!_mode) {
@@ -82,7 +102,15 @@ export class Colorizer {
return;
}
if (!_mode.tokenizationSupport) {
- e('Mode found ("' + _mode.getId() + '"), but does not support tokenization.');
+ // wait 500ms for mode to load, then give up
+ TPromise.any([this._tokenizationSupportChangedPromise(_mode), TPromise.timeout(500)]).then(_ => {
+ if (!_mode.tokenizationSupport) {
+ e('Mode found ("' + _mode.getId() + '"), but does not support tokenization.');
+ return;
+ }
+ mode = _mode;
+ scheduleColorize();
+ });
return;
}
mode = _mode;
@@ -93,7 +121,7 @@ export class Colorizer {
}
public static colorizeLine(line:string, tokens:ViewLineToken[], tabSize:number = 4): string {
- var renderResult = renderLine(new RenderLineInput(
+ let renderResult = renderLine(new RenderLineInput(
line,
tabSize,
0,
@@ -106,9 +134,9 @@ export class Colorizer {
}
public static colorizeModelLine(model:IModel, lineNumber:number, tabSize:number = 4): string {
- var content = model.getLineContent(lineNumber);
- var tokens = model.getLineTokens(lineNumber, false);
- var inflatedTokens = tokens.inflate();
+ let content = model.getLineContent(lineNumber);
+ let tokens = model.getLineTokens(lineNumber, false);
+ let inflatedTokens = tokens.inflate();
return this.colorizeLine(content, inflatedTokens, tabSize);
}
}
@@ -120,7 +148,7 @@ interface IActualColorizeResult {
}
function actualColorize(lines:string[], mode:IMode, tabSize:number): IActualColorizeResult {
- var tokenization = mode.tokenizationSupport,
+ let tokenization = mode.tokenizationSupport,
html:string[] = [],
state = tokenization.getInitialState(),
i:number,
diff --git a/src/vs/editor/browser/standalone/media/standalone-tokens.css b/src/vs/editor/browser/standalone/media/standalone-tokens.css
index de100c8b704..98b56b06771 100644
--- a/src/vs/editor/browser/standalone/media/standalone-tokens.css
+++ b/src/vs/editor/browser/standalone/media/standalone-tokens.css
@@ -14,6 +14,10 @@
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;
diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts
index a7cd30e3c4e..5c68fb3292e 100644
--- a/src/vs/editor/browser/standalone/simpleServices.ts
+++ b/src/vs/editor/browser/standalone/simpleServices.ts
@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
-import {toErrorMessage} from 'vs/base/common/errors';
import {EventEmitter} from 'vs/base/common/eventEmitter';
import {Schemas} from 'vs/base/common/network';
import Severity from 'vs/base/common/severity';
@@ -12,8 +11,8 @@ import {TPromise} from 'vs/base/common/winjs.base';
import {IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue} from 'vs/platform/configuration/common/configuration';
import {IEditor, IEditorInput, IEditorOptions, IEditorService, IResourceInput, ITextEditorModel, Position} from 'vs/platform/editor/common/editor';
import {AbstractExtensionService, ActivatedExtension} from 'vs/platform/extensions/common/abstractExtensionService';
-import {IExtensionDescription} from 'vs/platform/extensions/common/extensions';
-import {ICommandService, ICommandHandler} from 'vs/platform/commands/common/commands';
+import {IExtensionDescription, IExtensionService} from 'vs/platform/extensions/common/extensions';
+import {ICommandService, ICommand, ICommandHandler} from 'vs/platform/commands/common/commands';
import {KeybindingService} from 'vs/platform/keybinding/browser/keybindingServiceImpl';
import {IOSupport} from 'vs/platform/keybinding/common/keybindingResolver';
import {IKeybindingItem} from 'vs/platform/keybinding/common/keybinding';
@@ -24,6 +23,9 @@ 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 {CommandService} from 'vs/platform/commands/common/commandService';
+import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
+import {IProgressService, IProgressRunner} from 'vs/platform/progress/common/progress';
export class SimpleEditor implements IEditor {
@@ -41,6 +43,7 @@ export class SimpleEditor implements IEditor {
public getControl():editorCommon.IEditor { return this._widget; }
public getSelection():Selection { return this._widget.getSelection(); }
public focus():void { this._widget.focus(); }
+ public isVisible():boolean { return true; }
public withTypedEditor(codeEditorCallback:(editor:ICodeEditor)=>T, diffEditorCallback:(editor:IDiffEditor)=>T): T {
if (this._widget.getEditorType() === editorCommon.EditorType.ICodeEditor) {
@@ -62,6 +65,10 @@ export class SimpleModel extends EventEmitter implements ITextEditorModel {
this.model = model;
}
+ public load(): TPromise {
+ return TPromise.as(this);
+ }
+
public get textEditorModel():editorCommon.IModel {
return this.model;
}
@@ -162,6 +169,26 @@ export class SimpleEditorService implements IEditorService {
}
}
+export class SimpleProgressService implements IProgressService {
+ _serviceBrand: any;
+
+ private static NULL_PROGRESS_RUNNER:IProgressRunner = {
+ done: () => {},
+ total: () => {},
+ worked: () => {}
+ };
+
+ show(infinite: boolean, delay?: number): IProgressRunner;
+ show(total: number, delay?: number): IProgressRunner;
+ show(): IProgressRunner {
+ return SimpleProgressService.NULL_PROGRESS_RUNNER;
+ }
+
+ showWhile(promise: TPromise, delay?: number): TPromise {
+ return null;
+ }
+}
+
export class SimpleMessageService implements IMessageService {
public _serviceBrand: any;
@@ -171,7 +198,7 @@ export class SimpleMessageService implements IMessageService {
switch(sev) {
case Severity.Error:
- console.error(toErrorMessage(message, true));
+ console.error(message);
break;
case Severity.Warning:
console.warn(message);
@@ -198,11 +225,32 @@ export class SimpleMessageService implements IMessageService {
}
}
+export class StandaloneCommandService extends CommandService {
+
+ private _dynamicCommands: { [id: string]: ICommand; };
+
+ constructor(
+ instantiationService: IInstantiationService,
+ extensionService: IExtensionService
+ ) {
+ super(instantiationService, extensionService);
+
+ this._dynamicCommands = Object.create(null);
+ }
+
+ public addCommand(id:string, command:ICommand): void {
+ this._dynamicCommands[id] = command;
+ }
+
+ protected _getCommand(id:string): ICommand {
+ return super._getCommand(id) || this._dynamicCommands[id];
+ }
+}
+
export class StandaloneKeybindingService extends KeybindingService {
private static LAST_GENERATED_ID = 0;
private _dynamicKeybindings: IKeybindingItem[];
- private _dynamicCommands: { [id: string]: ICommandHandler };
constructor(
contextKeyService: IContextKeyService,
@@ -213,7 +261,6 @@ export class StandaloneKeybindingService extends KeybindingService {
super(contextKeyService, commandService, messageService);
this._dynamicKeybindings = [];
- this._dynamicCommands = Object.create(null);
this._beginListening(domNode);
}
@@ -230,7 +277,15 @@ export class StandaloneKeybindingService extends KeybindingService {
weight1: 1000,
weight2: 0
});
- this._dynamicCommands[commandId] = handler;
+
+ let commandService = this._commandService;
+ if (commandService instanceof StandaloneCommandService) {
+ commandService.addCommand(commandId, {
+ handler: handler
+ });
+ } else {
+ throw new Error('Unknown command service!');
+ }
this.updateResolver();
return commandId;
}
@@ -238,10 +293,6 @@ export class StandaloneKeybindingService extends KeybindingService {
protected _getExtraKeybindings(isFirstTime:boolean): IKeybindingItem[] {
return this._dynamicKeybindings;
}
-
- protected _getCommandHandler(commandId:string): ICommandHandler {
- return super._getCommandHandler(commandId) || this._dynamicCommands[commandId];
- }
}
export class SimpleExtensionService extends AbstractExtensionService {
diff --git a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts
index 9c6ed0740a1..c8e24481318 100644
--- a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts
+++ b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts
@@ -16,7 +16,7 @@ import {IActionDescriptor, ICodeEditorWidgetCreationOptions, IDiffEditorOptions,
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, IEditorOverrideServices, ensureStaticPlatformServices, getOrCreateStaticServices} from 'vs/editor/browser/standalone/standaloneServices';
+import {IEditorContextViewService} from 'vs/editor/browser/standalone/standaloneServices';
import {CodeEditor} from 'vs/editor/browser/codeEditor';
import {DiffEditorWidget} from 'vs/editor/browser/widget/diffEditorWidget';
import {ICodeEditor, IDiffEditor} from 'vs/editor/browser/editorBrowser';
@@ -65,7 +65,7 @@ export class StandaloneEditor extends CodeEditor implements IStandaloneCodeEdito
constructor(
domElement:HTMLElement,
options:IEditorConstructionOptions,
- toDispose: IDisposable[],
+ toDispose: IDisposable,
@IInstantiationService instantiationService: IInstantiationService,
@ICodeEditorService codeEditorService: ICodeEditorService,
@ICommandService commandService: ICommandService,
@@ -81,7 +81,7 @@ export class StandaloneEditor extends CodeEditor implements IStandaloneCodeEdito
}
this._contextViewService = contextViewService;
- this._toDispose2 = toDispose;
+ this._toDispose2 = [toDispose];
let model: IModel = null;
if (typeof options.model === 'undefined') {
@@ -154,7 +154,7 @@ export class StandaloneEditor extends CodeEditor implements IStandaloneCodeEdito
_postDetachModelCleanup(detachedModel:IModel): void {
super._postDetachModelCleanup(detachedModel);
if (detachedModel && this._ownsModel) {
- detachedModel.destroy();
+ detachedModel.dispose();
this._ownsModel = false;
}
}
@@ -169,7 +169,7 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon
constructor(
domElement:HTMLElement,
options:IDiffEditorConstructionOptions,
- toDispose: IDisposable[],
+ toDispose: IDisposable,
@IInstantiationService instantiationService: IInstantiationService,
@IContextKeyService contextKeyService: IContextKeyService,
@IKeybindingService keybindingService: IKeybindingService,
@@ -184,7 +184,7 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon
this._contextViewService = contextViewService;
- this._toDispose2 = toDispose;
+ this._toDispose2 = [toDispose];
this._contextViewService.setContainer(this._containerDomElement);
}
@@ -230,34 +230,3 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon
}
}
}
-
-export var startup = (function() {
-
- var modesRegistryInitialized = false;
- var setupServicesCalled = false;
-
- return {
- initStaticServicesIfNecessary: function() {
- if (modesRegistryInitialized) {
- return;
- }
- modesRegistryInitialized = true;
- getOrCreateStaticServices();
- },
-
- setupServices: function(services: IEditorOverrideServices): IEditorOverrideServices {
- if (setupServicesCalled) {
- console.error('Call to monaco.editor.setupServices is ignored because it was called before');
- return;
- }
- setupServicesCalled = true;
- if (modesRegistryInitialized) {
- console.error('Call to monaco.editor.setupServices is ignored because other API was called before');
- return;
- }
-
- return ensureStaticPlatformServices(services);
- }
- };
-
-})();
diff --git a/src/vs/editor/browser/standalone/standaloneEditor.ts b/src/vs/editor/browser/standalone/standaloneEditor.ts
index a5334880b00..ab59657aa90 100644
--- a/src/vs/editor/browser/standalone/standaloneEditor.ts
+++ b/src/vs/editor/browser/standalone/standaloneEditor.ts
@@ -7,43 +7,58 @@
import 'vs/css!./media/standalone-tokens';
import * as editorCommon from 'vs/editor/common/editorCommon';
import {ContentWidgetPositionPreference, OverlayWidgetPositionPreference} from 'vs/editor/browser/editorBrowser';
-import {ShallowCancelThenPromise} from 'vs/base/common/async';
-import {StandaloneEditor, IStandaloneCodeEditor, StandaloneDiffEditor, IStandaloneDiffEditor, startup, IEditorConstructionOptions, IDiffEditorConstructionOptions} from 'vs/editor/browser/standalone/standaloneCodeEditor';
+import {StandaloneEditor, IStandaloneCodeEditor, StandaloneDiffEditor, IStandaloneDiffEditor, IEditorConstructionOptions, IDiffEditorConstructionOptions} from 'vs/editor/browser/standalone/standaloneCodeEditor';
import {ScrollbarVisibility} from 'vs/base/common/scrollable';
-import {IEditorOverrideServices, ensureDynamicPlatformServices, ensureStaticPlatformServices} from 'vs/editor/browser/standalone/standaloneServices';
+import {IEditorOverrideServices, DynamicStandaloneServices, StaticServices} from 'vs/editor/browser/standalone/standaloneServices';
import {IDisposable} from 'vs/base/common/lifecycle';
import URI from 'vs/base/common/uri';
import {TPromise} from 'vs/base/common/winjs.base';
-import {createDecorator} from 'vs/platform/instantiation/common/instantiation';
-import {ServiceCollection} from 'vs/platform/instantiation/common/serviceCollection';
-import {InstantiationService} from 'vs/platform/instantiation/common/instantiationService';
import {OpenerService} from 'vs/platform/opener/browser/openerService';
+import {IOpenerService} from 'vs/platform/opener/common/opener';
import {IModel} from 'vs/editor/common/editorCommon';
-import {IModelService} from 'vs/editor/common/services/modelService';
import {Colorizer, IColorizerElementOptions, IColorizerOptions} from 'vs/editor/browser/standalone/colorizer';
import {SimpleEditorService} from 'vs/editor/browser/standalone/simpleServices';
import * as modes from 'vs/editor/common/modes';
-import {EditorWorkerClient} from 'vs/editor/common/services/editorWorkerServiceImpl';
+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';
-
-function shallowClone(obj:T): T {
- let r:T = {};
- if (obj) {
- let keys = Object.keys(obj);
- for (let i = 0, len = keys.length; i < len; i++) {
- let key = keys[i];
- r[key] = obj[key];
- }
- }
- return r;
-}
+import {IEditorService} from 'vs/platform/editor/common/editor';
+import {ICommandService} from 'vs/platform/commands/common/commands';
+import {IContextViewService} from 'vs/platform/contextview/browser/contextView';
+import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
+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';
/**
* @internal
*/
-export function setupServices(services: IEditorOverrideServices): IEditorOverrideServices {
- return startup.setupServices(services);
+export function setupServices(overrides: IEditorOverrideServices): any {
+ return StaticServices.init(overrides);
+}
+
+function withAllStandaloneServices(domElement:HTMLElement, override:IEditorOverrideServices, callback:(services:DynamicStandaloneServices)=>T): T {
+ let services = new DynamicStandaloneServices(domElement, override);
+
+ // The editorService is a lovely beast. It needs to point back to the code editor instance...
+ let simpleEditorService: SimpleEditorService = null;
+ if (!services.has(IEditorService)) {
+ simpleEditorService = new SimpleEditorService();
+ services.set(IEditorService, simpleEditorService);
+ }
+
+ if (!services.has(IOpenerService)) {
+ services.set(IOpenerService, new OpenerService(services.get(IEditorService), services.get(ICommandService)));
+ }
+
+ let result = callback(services);
+
+ if (simpleEditorService) {
+ simpleEditorService.setEditor(result);
+ }
+
+ return result;
}
/**
@@ -51,28 +66,20 @@ export function setupServices(services: IEditorOverrideServices): IEditorOverrid
* `domElement` should be empty (not contain other dom nodes).
* The editor will read the size of `domElement`.
*/
-export function create(domElement:HTMLElement, options?:IEditorConstructionOptions, services?:IEditorOverrideServices):IStandaloneCodeEditor {
- startup.initStaticServicesIfNecessary();
-
- services = shallowClone(services);
- var editorService: SimpleEditorService = null;
- if (!services || !services.editorService) {
- editorService = new SimpleEditorService();
- services.editorService = editorService;
- }
-
- if (!services.openerService) {
- services.openerService = new OpenerService(editorService, services.commandService);
- }
-
- var t = prepareServices(domElement, services);
- var result = t.ctx.instantiationService.createInstance(StandaloneEditor, domElement, options, t.toDispose);
-
- if (editorService) {
- editorService.setEditor(result);
- }
-
- return result;
+export function create(domElement:HTMLElement, options?:IEditorConstructionOptions, override?:IEditorOverrideServices):IStandaloneCodeEditor {
+ return withAllStandaloneServices(domElement, override, (services) => {
+ return new StandaloneEditor(
+ domElement,
+ options,
+ services,
+ services.get(IInstantiationService),
+ services.get(ICodeEditorService),
+ services.get(ICommandService),
+ services.get(IContextKeyService),
+ services.get(IKeybindingService),
+ services.get(IContextViewService)
+ );
+ });
}
/**
@@ -80,24 +87,19 @@ export function create(domElement:HTMLElement, options?:IEditorConstructionOptio
* `domElement` should be empty (not contain other dom nodes).
* The editor will read the size of `domElement`.
*/
-export function createDiffEditor(domElement:HTMLElement, options?:IDiffEditorConstructionOptions, services?: IEditorOverrideServices):IStandaloneDiffEditor {
- startup.initStaticServicesIfNecessary();
-
- services = shallowClone(services);
- var editorService: SimpleEditorService = null;
- if (!services || !services.editorService) {
- editorService = new SimpleEditorService();
- services.editorService = editorService;
- }
-
- var t = prepareServices(domElement, services);
- var result = t.ctx.instantiationService.createInstance(StandaloneDiffEditor, domElement, options, t.toDispose);
-
- if (editorService) {
- editorService.setEditor(result);
- }
-
- return result;
+export function createDiffEditor(domElement:HTMLElement, options?:IDiffEditorConstructionOptions, override?: IEditorOverrideServices):IStandaloneDiffEditor {
+ return withAllStandaloneServices(domElement, override, (services) => {
+ return new StandaloneDiffEditor(
+ domElement,
+ options,
+ services,
+ services.get(IInstantiationService),
+ services.get(IContextKeyService),
+ services.get(IKeybindingService),
+ services.get(IContextViewService),
+ services.get(IEditorWorkerService)
+ );
+ });
}
export interface IDiffNavigator {
@@ -117,30 +119,8 @@ export function createDiffNavigator(diffEditor:IStandaloneDiffEditor, opts?:IDif
return new DiffNavigator(diffEditor, opts);
}
-function prepareServices(domElement: HTMLElement, services: IEditorOverrideServices): { ctx: IEditorOverrideServices; toDispose: IDisposable[]; } {
- services = ensureStaticPlatformServices(services);
- var toDispose = ensureDynamicPlatformServices(domElement, services);
-
- var collection = new ServiceCollection();
- for (var legacyServiceId in services) {
- if (services.hasOwnProperty(legacyServiceId)) {
- let id = createDecorator(legacyServiceId);
- let service = services[legacyServiceId];
- collection.set(id, service);
- }
- }
- services.instantiationService = new InstantiationService(collection);
-
- return {
- ctx: services,
- toDispose: toDispose
- };
-}
-
function doCreateModel(value:string, mode:TPromise, uri?:URI): IModel {
- let modelService = ensureStaticPlatformServices(null).modelService;
-
- return modelService.createModel(value, mode, uri);
+ return StaticServices.modelService.get().createModel(value, mode, uri);
}
/**
@@ -148,12 +128,8 @@ function doCreateModel(value:string, mode:TPromise, uri?:URI): IMod
* You can specify the language that should be set for this model or let the language be inferred from the `uri`.
*/
export function createModel(value:string, language?:string, uri?:URI): IModel {
- startup.initStaticServicesIfNecessary();
-
value = value || '';
- let modeService = ensureStaticPlatformServices(null).modeService;
-
if (!language) {
let path = uri ? uri.path : null;
@@ -163,73 +139,58 @@ export function createModel(value:string, language?:string, uri?:URI): IModel {
firstLine = value.substring(0, firstLF);
}
- return doCreateModel(value, modeService.getOrCreateModeByFilenameOrFirstLine(path, firstLine), uri);
+ return doCreateModel(value, StaticServices.modeService.get().getOrCreateModeByFilenameOrFirstLine(path, firstLine), uri);
}
- return doCreateModel(value, modeService.getOrCreateMode(language), uri);
+ return doCreateModel(value, StaticServices.modeService.get().getOrCreateMode(language), uri);
}
/**
* Change the language for a model.
*/
export function setModelLanguage(model:IModel, language:string): void {
- startup.initStaticServicesIfNecessary();
- let modeService = ensureStaticPlatformServices(null).modeService;
-
- model.setMode(modeService.getOrCreateMode(language));
+ model.setMode(StaticServices.modeService.get().getOrCreateMode(language));
}
/**
* Set the markers for a model.
*/
export function setModelMarkers(model:IModel, owner:string, markers: IMarkerData[]): void {
- startup.initStaticServicesIfNecessary();
- var markerService = ensureStaticPlatformServices(null).markerService;
- markerService.changeOne(owner, model.uri, markers);
+ StaticServices.markerService.get().changeOne(owner, model.uri, markers);
}
/**
* Get the model that has `uri` if it exists.
*/
export function getModel(uri: URI): IModel {
- startup.initStaticServicesIfNecessary();
- var modelService = ensureStaticPlatformServices(null).modelService;
- return modelService.getModel(uri);
+ return StaticServices.modelService.get().getModel(uri);
}
/**
* Get all the created models.
*/
export function getModels(): IModel[] {
- startup.initStaticServicesIfNecessary();
- var modelService = ensureStaticPlatformServices(null).modelService;
- return modelService.getModels();
+ return StaticServices.modelService.get().getModels();
}
/**
* Emitted when a model is created.
*/
export function onDidCreateModel(listener:(model:IModel)=>void): IDisposable {
- startup.initStaticServicesIfNecessary();
- var modelService = ensureStaticPlatformServices(null).modelService;
- return modelService.onModelAdded(listener);
+ return StaticServices.modelService.get().onModelAdded(listener);
}
/**
* Emitted right before a model is disposed.
*/
export function onWillDisposeModel(listener:(model:IModel)=>void): IDisposable {
- startup.initStaticServicesIfNecessary();
- var modelService = ensureStaticPlatformServices(null).modelService;
- return modelService.onModelRemoved(listener);
+ return StaticServices.modelService.get().onModelRemoved(listener);
}
/**
* Emitted when a different language is set to a model.
*/
export function onDidChangeModelLanguage(listener:(e:{ model: IModel; oldLanguage: string; })=>void): IDisposable {
- startup.initStaticServicesIfNecessary();
- var modelService = ensureStaticPlatformServices(null).modelService;
- return modelService.onModelModeChanged((e) => {
+ return StaticServices.modelService.get().onModelModeChanged((e) => {
listener({
model: e.model,
oldLanguage: e.oldModeId
@@ -242,129 +203,31 @@ export function onDidChangeModelLanguage(listener:(e:{ model: IModel; oldLanguag
* @internal
*/
export function getOrCreateMode(modeId: string):TPromise {
- startup.initStaticServicesIfNecessary();
- var modeService = ensureStaticPlatformServices(null).modeService;
-
- return modeService.getOrCreateMode(modeId);
+ return StaticServices.modeService.get().getOrCreateMode(modeId);
}
-/**
- * A web worker that can provide a proxy to an arbitrary file.
- */
-export interface MonacoWebWorker {
- /**
- * Terminate the web worker, thus invalidating the returned proxy.
- */
- dispose(): void;
- /**
- * Get a proxy to the arbitrary loaded code.
- */
- getProxy(): TPromise;
- /**
- * Synchronize (send) the models at `resources` to the web worker,
- * making them available in the monaco.worker.getMirrorModels().
- */
- withSyncedResources(resources: URI[]): TPromise;
-}
-/**
- * @internal
- */
-export class MonacoWebWorkerImpl extends EditorWorkerClient implements MonacoWebWorker {
-
- private _foreignModuleId: string;
- private _foreignModuleCreateData: any;
- private _foreignProxy: TPromise;
-
- /**
- * @internal
- */
- constructor(modelService: IModelService, opts:IWebWorkerOptions) {
- super(modelService);
- this._foreignModuleId = opts.moduleId;
- this._foreignModuleCreateData = opts.createData || null;
- this._foreignProxy = null;
- }
-
- private _getForeignProxy(): TPromise {
- if (!this._foreignProxy) {
- this._foreignProxy = new ShallowCancelThenPromise(this._getProxy().then((proxy) => {
- return proxy.loadForeignModule(this._foreignModuleId, this._foreignModuleCreateData).then((foreignMethods) => {
- this._foreignModuleId = null;
- this._foreignModuleCreateData = null;
-
- let proxyMethodRequest = (method:string, args:any[]): TPromise => {
- return proxy.fmr(method, args);
- };
-
- let createProxyMethod = (method:string, proxyMethodRequest:(method:string, args:any[])=>TPromise): Function => {
- return function () {
- let args = Array.prototype.slice.call(arguments, 0);
- return proxyMethodRequest(method, args);
- };
- };
-
- let foreignProxy = {};
- for (let i = 0; i < foreignMethods.length; i++) {
- foreignProxy[foreignMethods[i]] = createProxyMethod(foreignMethods[i], proxyMethodRequest);
- }
-
- return foreignProxy;
- });
- }));
- }
- return this._foreignProxy;
- }
-
- public getProxy(): TPromise {
- return this._getForeignProxy();
- }
-
- public withSyncedResources(resources: URI[]): TPromise {
- return this._withSyncedResources(resources).then(_ => this.getProxy());
- }
-}
-
-export interface IWebWorkerOptions {
- /**
- * The AMD moduleId to load.
- * It should export a function `create` that should return the exported proxy.
- */
- moduleId: string;
- /**
- * The data to send over when calling create on the module.
- */
- createData?: any;
-}
/**
* Create a new web worker that has model syncing capabilities built in.
* Specify an AMD module to load that will `create` an object that will be proxied.
*/
export function createWebWorker(opts:IWebWorkerOptions): MonacoWebWorker {
- startup.initStaticServicesIfNecessary();
- let staticPlatformServices = ensureStaticPlatformServices(null);
- let modelService = staticPlatformServices.modelService;
-
- return new MonacoWebWorkerImpl(modelService, opts);
+ return actualCreateWebWorker(StaticServices.modelService.get(), opts);
}
/**
* Colorize the contents of `domNode` using attribute `data-lang`.
*/
export function colorizeElement(domNode:HTMLElement, options:IColorizerElementOptions): TPromise {
- startup.initStaticServicesIfNecessary();
- var modeService = ensureStaticPlatformServices(null).modeService;
- return Colorizer.colorizeElement(modeService, domNode, options);
+ return Colorizer.colorizeElement(StaticServices.modeService.get(), domNode, options);
}
/**
* Colorize `text` using language `languageId`.
*/
export function colorize(text:string, languageId:string, options:IColorizerOptions): TPromise {
- startup.initStaticServicesIfNecessary();
- var modeService = ensureStaticPlatformServices(null).modeService;
- return Colorizer.colorize(modeService, text, languageId, options);
+ return Colorizer.colorize(StaticServices.modeService.get(), text, languageId, options);
}
/**
diff --git a/src/vs/editor/browser/standalone/standaloneLanguages.ts b/src/vs/editor/browser/standalone/standaloneLanguages.ts
index e95da74c61f..5faaca7524f 100644
--- a/src/vs/editor/browser/standalone/standaloneLanguages.ts
+++ b/src/vs/editor/browser/standalone/standaloneLanguages.ts
@@ -11,9 +11,8 @@ import {ExtensionsRegistry} from 'vs/platform/extensions/common/extensionsRegist
import {ModesRegistry} from 'vs/editor/common/modes/modesRegistry';
import {IMonarchLanguage} from 'vs/editor/common/modes/monarch/monarchTypes';
import {ILanguageExtensionPoint} from 'vs/editor/common/services/modeService';
-import {ensureStaticPlatformServices} from 'vs/editor/browser/standalone/standaloneServices';
+import {StaticServices} from 'vs/editor/browser/standalone/standaloneServices';
import * as modes from 'vs/editor/common/modes';
-import {startup} from './standaloneCodeEditor';
import {LanguageConfiguration} from 'vs/editor/common/modes/languageConfigurationRegistry';
import * as editorCommon from 'vs/editor/common/editorCommon';
import {Position} from 'vs/editor/common/core/position';
@@ -68,22 +67,16 @@ export function setLanguageConfiguration(languageId:string, configuration:Langua
* Set the tokens provider for a language (manual implementation).
*/
export function setTokensProvider(languageId:string, provider:modes.TokensProvider): IDisposable {
- startup.initStaticServicesIfNecessary();
- let staticPlatformServices = ensureStaticPlatformServices(null);
- return staticPlatformServices.modeService.registerTokenizationSupport2(languageId, provider);
+ return StaticServices.modeService.get().registerTokenizationSupport2(languageId, provider);
}
/**
* Set the tokens provider for a language (monarch implementation).
*/
export function setMonarchTokensProvider(languageId:string, languageDef:IMonarchLanguage): IDisposable {
- startup.initStaticServicesIfNecessary();
- let staticPlatformServices = ensureStaticPlatformServices(null);
let lexer = compile(languageId, languageDef);
- let modeService = staticPlatformServices.modeService;
-
- return modeService.registerTokenizationSupport(languageId, (mode) => {
- return createTokenizationSupport(modeService, mode, lexer);
+ return StaticServices.modeService.get().registerTokenizationSupport(languageId, (mode) => {
+ return createTokenizationSupport(StaticServices.modeService.get(), mode, lexer);
});
}
@@ -149,9 +142,7 @@ export function registerCodeLensProvider(languageId:string, provider:modes.CodeL
export function registerCodeActionProvider(languageId:string, provider:CodeActionProvider): IDisposable {
return modes.CodeActionProviderRegistry.register(languageId, {
provideCodeActions: (model:editorCommon.IReadOnlyModel, range:Range, token: CancellationToken): modes.CodeAction[] | Thenable => {
- startup.initStaticServicesIfNecessary();
- var markerService = ensureStaticPlatformServices(null).markerService;
- let markers = markerService.read({resource: model.uri }).filter(m => {
+ let markers = StaticServices.markerService.get().read({resource: model.uri }).filter(m => {
return Range.areIntersectingOrTouching(m, range);
});
return provider.provideCodeActions(model, range, { markers }, token);
diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/browser/standalone/standaloneServices.ts
index 5408ac69bbd..d1fa71183ab 100644
--- a/src/vs/editor/browser/standalone/standaloneServices.ts
+++ b/src/vs/editor/browser/standalone/standaloneServices.ts
@@ -4,22 +4,19 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
-import {IDisposable} from 'vs/base/common/lifecycle';
+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';
import {ContextViewService} from 'vs/platform/contextview/browser/contextViewService';
-import {IEditorService} from 'vs/platform/editor/common/editor';
import {IEventService} from 'vs/platform/event/common/event';
import {EventService} from 'vs/platform/event/common/eventService';
import {IExtensionService} from 'vs/platform/extensions/common/extensions';
-import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
+import {createDecorator, IInstantiationService, ServiceIdentifier} from 'vs/platform/instantiation/common/instantiation';
import {InstantiationService} from 'vs/platform/instantiation/common/instantiationService';
import {ServiceCollection} from 'vs/platform/instantiation/common/serviceCollection';
import {ICommandService} from 'vs/platform/commands/common/commands';
-import {CommandService} from 'vs/platform/commands/common/commandService';
-import {IOpenerService} from 'vs/platform/opener/common/opener';
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
import {IContextKeyService} from 'vs/platform/contextkey/common/contextkey';
import {MarkerService} from 'vs/platform/markers/common/markerService';
@@ -37,7 +34,10 @@ import {MainThreadModeServiceImpl} from 'vs/editor/common/services/modeServiceIm
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, SimpleMessageService, SimpleExtensionService, StandaloneKeybindingService} from 'vs/editor/browser/standalone/simpleServices';
+import {
+ SimpleConfigurationService, SimpleMessageService, SimpleExtensionService,
+ StandaloneKeybindingService, StandaloneCommandService, SimpleProgressService
+} from 'vs/editor/browser/standalone/simpleServices';
import {ContextKeyService} from 'vs/platform/contextkey/browser/contextKeyService';
import {IMenuService} from 'vs/platform/actions/common/actions';
import {MenuService} from 'vs/platform/actions/common/menuService';
@@ -50,256 +50,159 @@ export interface IEditorContextViewService extends IContextViewService {
}
export interface IEditorOverrideServices {
- /**
- * @internal
- */
- compatWorkerService?: ICompatWorkerService;
- /**
- * @internal
- */
- modeService?: IModeService;
- /**
- * @internal
- */
- extensionService?:IExtensionService;
- /**
- * @internal
- */
- instantiationService?:IInstantiationService;
- /**
- * @internal
- */
- messageService?:IMessageService;
- /**
- * @internal
- */
- markerService?:IMarkerService;
- /**
- * @internal
- */
- menuService?:IMenuService;
- /**
- * @internal
- */
- editorService?:IEditorService;
- /**
- * @internal
- */
- commandService?:ICommandService;
- /**
- * @internal
- */
- openerService?:IOpenerService;
- /**
- * @internal
- */
- contextKeyService?:IContextKeyService;
- /**
- * @internal
- */
- keybindingService?:IKeybindingService;
- /**
- * @internal
- */
- contextService?:IWorkspaceContextService;
- /**
- * @internal
- */
- contextViewService?:IEditorContextViewService;
- /**
- * @internal
- */
- contextMenuService?:IContextMenuService;
- /**
- * @internal
- */
- telemetryService?:ITelemetryService;
- /**
- * @internal
- */
- eventService?:IEventService;
- /**
- * @internal
- */
- storageService?:IStorageService;
- /**
- * @internal
- */
- configurationService?:IConfigurationService;
- /**
- * @internal
- */
- progressService?:IProgressService;
- /**
- * @internal
- */
- modelService?: IModelService;
- /**
- * @internal
- */
- codeEditorService?: ICodeEditorService;
- /**
- * @internal
- */
- editorWorkerService?: IEditorWorkerService;
}
-export interface IStaticServices {
- configurationService: IConfigurationService;
- compatWorkerService: ICompatWorkerService;
- modeService: IModeService;
- extensionService: IExtensionService;
- markerService: IMarkerService;
- menuService: IMenuService;
- contextService: IWorkspaceContextService;
- messageService: IMessageService;
- telemetryService: ITelemetryService;
- modelService: IModelService;
- codeEditorService: ICodeEditorService;
- editorWorkerService: IEditorWorkerService;
- eventService: IEventService;
- storageService: IStorageService;
- commandService: ICommandService;
- instantiationService: IInstantiationService;
-}
+export module StaticServices {
-function shallowClone(obj:T): T {
- let r:T = {};
- if (obj) {
- let keys = Object.keys(obj);
- for (let i = 0, len = keys.length; i < len; i++) {
- let key = keys[i];
- r[key] = obj[key];
+ const _serviceCollection = new ServiceCollection();
+
+ export class LazyStaticService {
+ private _serviceId: ServiceIdentifier;
+ private _factory: (overrides: IEditorOverrideServices) => T;
+ private _value: T;
+
+ public get id() { return this._serviceId; }
+
+ constructor(serviceId:ServiceIdentifier, factory:(overrides: IEditorOverrideServices) => T) {
+ this._serviceId = serviceId;
+ this._factory = factory;
+ this._value = null;
}
- }
- return r;
-}
-export function ensureStaticPlatformServices(services: IEditorOverrideServices): IEditorOverrideServices {
- services = shallowClone(services);
-
- var statics = getOrCreateStaticServices(services);
-
- let keys = Object.keys(statics);
- for (let i = 0, len = keys.length; i < len; i++) {
- let serviceId = keys[i];
- if (!services.hasOwnProperty(serviceId)) {
- services[serviceId] = statics[serviceId];
+ public get(overrides?: IEditorOverrideServices): T {
+ if (!this._value) {
+ if (overrides) {
+ this._value = overrides[this._serviceId.toString()];
+ }
+ if (!this._value) {
+ this._value = this._factory(overrides);
+ }
+ if (!this._value) {
+ throw new Error('Service ' + this._serviceId + ' is missing!');
+ }
+ _serviceCollection.set(this._serviceId, this._value);
+ }
+ return this._value;
}
}
- return services;
-}
+ let _all: LazyStaticService[] = [];
-export function ensureDynamicPlatformServices(domElement:HTMLElement, services: IEditorOverrideServices): IDisposable[] {
- let r:IDisposable[] = [];
-
- let contextKeyService:IContextKeyService;
- if (typeof services.contextKeyService === 'undefined') {
- contextKeyService = new ContextKeyService(services.configurationService);
- r.push(contextKeyService);
- services.contextKeyService = contextKeyService;
- } else {
- contextKeyService = services.contextKeyService;
- }
- if (typeof services.keybindingService === 'undefined') {
- let keybindingService = new StandaloneKeybindingService(contextKeyService, services.commandService, services.messageService, domElement);
- r.push(keybindingService);
- services.keybindingService = keybindingService;
+ function define(serviceId:ServiceIdentifier, factory:(overrides: IEditorOverrideServices) => T): LazyStaticService {
+ let r = new LazyStaticService(serviceId, factory);
+ _all.push(r);
+ return r;
}
- let contextViewService:IEditorContextViewService;
- if (typeof services.contextViewService === 'undefined') {
- contextViewService = new ContextViewService(domElement, services.telemetryService, services.messageService);
- r.push(contextViewService);
- services.contextViewService = contextViewService;
- } else {
- contextViewService = services.contextViewService;
+ export function init(overrides: IEditorOverrideServices): [ServiceCollection, IInstantiationService] {
+ // Create a fresh service collection
+ let result = new ServiceCollection();
+
+ // Initialize the service collection with the overrides
+ for (let serviceId in overrides) {
+ if (overrides.hasOwnProperty(serviceId)) {
+ result.set(createDecorator(serviceId), overrides[serviceId]);
+ }
+ }
+
+ // Make sure the same static services are present in all service collections
+ _all.forEach(service => result.set(service.id, service.get(overrides)));
+
+ // Ensure the collection gets the correct instantiation service
+ let instantiationService = new InstantiationService(result, true);
+ result.set(IInstantiationService, instantiationService);
+
+ return [result, instantiationService];
}
- if (typeof services.contextMenuService === 'undefined') {
- let contextMenuService = new ContextMenuService(domElement, services.telemetryService, services.messageService, contextViewService);
- r.push(contextMenuService);
- services.contextMenuService = contextMenuService;
- }
+ export const instantiationService = define(IInstantiationService, () => new InstantiationService(_serviceCollection, true));
- return r;
-}
-
-// The static services represents a map of services that once 1 editor has been created must be used for all subsequent editors
-var staticServices: IStaticServices = null;
-export function getOrCreateStaticServices(services?: IEditorOverrideServices): IStaticServices {
- if (staticServices) {
- return staticServices;
- }
- services = services || {};
-
- let serviceCollection = new ServiceCollection();
- const instantiationService = new InstantiationService(serviceCollection, true);
-
- let contextService = services.contextService || new WorkspaceContextService({
+ export const contextService = define(IWorkspaceContextService, () => new WorkspaceContextService({
resource: URI.from({ scheme: 'inmemory', authority: 'model', path: '/' })
- });
- serviceCollection.set(IWorkspaceContextService, contextService);
+ }));
- let telemetryService = services.telemetryService || NullTelemetryService;
- serviceCollection.set(ITelemetryService, telemetryService);
+ export const telemetryService = define(ITelemetryService, () => NullTelemetryService);
- let eventService = services.eventService || new EventService();
- serviceCollection.set(IEventService, eventService);
+ export const eventService = define(IEventService, () => new EventService());
- let configurationService = services.configurationService || new SimpleConfigurationService();
- serviceCollection.set(IConfigurationService, configurationService);
+ export const configurationService = define(IConfigurationService, () => new SimpleConfigurationService());
- let messageService = services.messageService || new SimpleMessageService();
- serviceCollection.set(IMessageService, messageService);
+ export const messageService = define(IMessageService, () => new SimpleMessageService());
- let extensionService = services.extensionService || new SimpleExtensionService();
- serviceCollection.set(IExtensionService, extensionService);
+ export const extensionService = define(IExtensionService, () => new SimpleExtensionService());
- let commandService = services.commandService || new CommandService(instantiationService, extensionService);
- serviceCollection.set(ICommandService, commandService);
+ export const markerService = define(IMarkerService, () => new MarkerService());
- let markerService = services.markerService || new MarkerService();
- serviceCollection.set(IMarkerService, markerService);
+ export const modeService = define(IModeService, (o) => new MainThreadModeServiceImpl(instantiationService.get(o), extensionService.get(o), configurationService.get(o)));
- let modeService = services.modeService || new MainThreadModeServiceImpl(instantiationService, extensionService, configurationService);
- serviceCollection.set(IModeService, modeService);
+ export const modelService = define(IModelService, (o) => new ModelServiceImpl(markerService.get(o), configurationService.get(o), messageService.get(o)));
- let modelService = services.modelService || new ModelServiceImpl(markerService, configurationService, messageService);
- serviceCollection.set(IModelService, modelService);
+ export const compatWorkerService = define(ICompatWorkerService, (o) => new MainThreadCompatWorkerService(modelService.get(o)));
- let compatWorkerService = services.compatWorkerService || new MainThreadCompatWorkerService(modelService);
- serviceCollection.set(ICompatWorkerService, compatWorkerService);
+ export const editorWorkerService = define(IEditorWorkerService, (o) => new EditorWorkerServiceImpl(modelService.get(o)));
- let editorWorkerService = services.editorWorkerService || new EditorWorkerServiceImpl(modelService);
- serviceCollection.set(IEditorWorkerService, editorWorkerService);
+ export const codeEditorService = define(ICodeEditorService, () => new CodeEditorServiceImpl());
- let codeEditorService = services.codeEditorService || new CodeEditorServiceImpl();
- serviceCollection.set(ICodeEditorService, codeEditorService);
+ export const progressService = define(IProgressService, () => new SimpleProgressService());
- let menuService = services.menuService || new MenuService(extensionService, commandService);
- serviceCollection.set(IMenuService, menuService);
-
- staticServices = {
- configurationService: configurationService,
- extensionService: extensionService,
- commandService: commandService,
- compatWorkerService: compatWorkerService,
- modeService: modeService,
- markerService: markerService,
- menuService: menuService,
- contextService: contextService,
- telemetryService: telemetryService,
- messageService: messageService,
- modelService: modelService,
- codeEditorService: codeEditorService,
- editorWorkerService: editorWorkerService,
- eventService: eventService,
- storageService: services.storageService || NullStorageService,
- instantiationService: instantiationService
- };
-
- return staticServices;
+ export const storageService = define(IStorageService, () => NullStorageService);
}
+export class DynamicStandaloneServices extends Disposable {
+
+ private _serviceCollection: ServiceCollection;
+ private _instantiationService: IInstantiationService;
+
+ constructor(domElement:HTMLElement, overrides: IEditorOverrideServices) {
+ super();
+
+ const [_serviceCollection, _instantiationService] = StaticServices.init(overrides);
+ this._serviceCollection = _serviceCollection;
+ this._instantiationService = _instantiationService;
+
+ const configurationService = this.get(IConfigurationService);
+ const extensionService = this.get(IExtensionService);
+ const messageService = this.get(IMessageService);
+ const telemetryService = this.get(ITelemetryService);
+
+ let ensure = (serviceId:ServiceIdentifier, factory:() => T): T => {
+ let value:T = null;
+ if (overrides) {
+ value = overrides[serviceId.toString()];
+ }
+ if (!value) {
+ value = factory();
+ }
+ this._serviceCollection.set(serviceId, value);
+ return value;
+ };
+
+ let contextKeyService = ensure(IContextKeyService, () => this._register(new ContextKeyService(configurationService)));
+
+ let commandService = ensure(ICommandService, () => new StandaloneCommandService(this._instantiationService, extensionService));
+
+ ensure(IKeybindingService, () => this._register(new StandaloneKeybindingService(contextKeyService, commandService, messageService, domElement)));
+
+ let contextViewService = ensure(IContextViewService, () => this._register(new ContextViewService(domElement, telemetryService, messageService)));
+
+ ensure(IContextMenuService, () => this._register(new ContextMenuService(domElement, telemetryService, messageService, contextViewService)));
+
+ ensure(IMenuService, () => new MenuService(extensionService, commandService));
+ }
+
+ public get(serviceId:ServiceIdentifier): T {
+ let r = this._serviceCollection.get(serviceId);
+ if (!r) {
+ throw new Error('Missing service ' + serviceId);
+ }
+ return r;
+ }
+
+ public set(serviceId:ServiceIdentifier, instance: T): void {
+ this._serviceCollection.set(serviceId, instance);
+ }
+
+ public has(serviceId:ServiceIdentifier): boolean {
+ return this._serviceCollection.has(serviceId);
+ }
+}
diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts
index 249de085fb0..006a158b653 100644
--- a/src/vs/editor/browser/view/viewImpl.ts
+++ b/src/vs/editor/browser/view/viewImpl.ts
@@ -11,7 +11,6 @@ import * as timer from 'vs/base/common/timer';
import * as browser from 'vs/base/browser/browser';
import * as dom from 'vs/base/browser/dom';
import {StyleMutator} from 'vs/base/browser/styleMutator';
-import {IContextKey, IContextKeyService} from 'vs/platform/contextkey/common/contextkey';
import {ICommandService} from 'vs/platform/commands/common/commands';
import {Range} from 'vs/editor/common/core/range';
import * as editorCommon from 'vs/editor/common/editorCommon';
@@ -47,8 +46,6 @@ import {ViewLinesViewportData} from 'vs/editor/common/viewLayout/viewLinesViewpo
import {IRenderingContext} from 'vs/editor/common/view/renderingContext';
import {IPointerHandlerHelper} from 'vs/editor/browser/controller/mouseHandler';
-import EditorContextKeys = editorCommon.EditorContextKeys;
-
export class View extends ViewEventHandler implements editorBrowser.IView, IDisposable {
private eventDispatcher:ViewEventDispatcher;
@@ -90,10 +87,7 @@ export class View extends ViewEventHandler implements editorBrowser.IView, IDisp
private accumulatedModelEvents: EmitterEvent[];
private _renderAnimationFrame: IDisposable;
- private _editorTextFocusContextKey: IContextKey;
-
constructor(
- contextKeyService: IContextKeyService,
commandService: ICommandService,
configuration:Configuration,
model:IViewModel,
@@ -135,7 +129,7 @@ export class View extends ViewEventHandler implements editorBrowser.IView, IDisp
(eventHandler:IViewEventHandler) => this.eventDispatcher.removeEventHandler(eventHandler)
);
- this.createTextArea(contextKeyService);
+ this.createTextArea();
this.createViewParts();
// Keyboard handler
@@ -172,10 +166,9 @@ export class View extends ViewEventHandler implements editorBrowser.IView, IDisp
}
}
- private createTextArea(contextKeyService: IContextKeyService): void {
+ private createTextArea(): void {
// Text Area (The focus will always be in the textarea when the cursor is blinking)
this.textArea = document.createElement('textarea');
- this._editorTextFocusContextKey = EditorContextKeys.TextFocus.bindTo(contextKeyService);
this.textArea.className = editorBrowser.ClassNames.TEXTAREA;
this.textArea.setAttribute('wrap', 'off');
this.textArea.setAttribute('autocorrect', 'off');
@@ -479,10 +472,8 @@ export class View extends ViewEventHandler implements editorBrowser.IView, IDisp
public onViewFocusChanged(isFocused:boolean): boolean {
dom.toggleClass(this.domNode, 'focused', isFocused);
if (isFocused) {
- this._editorTextFocusContextKey.set(true);
this.outgoingEventBus.emit(editorCommon.EventType.ViewFocusGained, {});
} else {
- this._editorTextFocusContextKey.reset();
this.outgoingEventBus.emit(editorCommon.EventType.ViewFocusLost, {});
}
return false;
@@ -531,7 +522,6 @@ export class View extends ViewEventHandler implements editorBrowser.IView, IDisp
this.viewParts = [];
this.layoutProvider.dispose();
- this._editorTextFocusContextKey.reset();
}
// --- begin Code Editor APIs
diff --git a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts
index 2e5bb1e972a..05e582adac3 100644
--- a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts
+++ b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts
@@ -16,6 +16,7 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay {
private _context:ViewContext;
private _lineHeight:number;
private _readOnly:boolean;
+ private _renderLineHighlight:boolean;
private _layoutProvider:ILayoutProvider;
private _selectionIsEmpty:boolean;
private _primaryCursorIsInEditableRange:boolean;
@@ -28,6 +29,7 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay {
this._context = context;
this._lineHeight = this._context.configuration.editor.lineHeight;
this._readOnly = this._context.configuration.editor.readOnly;
+ this._renderLineHighlight = this._context.configuration.editor.viewInfo.renderLineHighlight;
this._layoutProvider = layoutProvider;
@@ -87,6 +89,9 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay {
if (e.readOnly) {
this._readOnly = this._context.configuration.editor.readOnly;
}
+ if (e.viewInfo.renderLineHighlight) {
+ this._renderLineHighlight = this._context.configuration.editor.viewInfo.renderLineHighlight;
+ }
if (e.layoutInfo) {
this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth;
}
@@ -129,6 +134,6 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay {
}
private _shouldShowCurrentLine(): boolean {
- return this._selectionIsEmpty && this._primaryCursorIsInEditableRange && !this._readOnly;
+ return this._renderLineHighlight && this._selectionIsEmpty && this._primaryCursorIsInEditableRange && !this._readOnly;
}
}
diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts
index 2e0e8fb674c..997ab474114 100644
--- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts
+++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts
@@ -24,10 +24,6 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler {
this._context.addEventHandler(this);
}
- public destroy(): void {
- this.dispose();
- }
-
public dispose(): void {
this._context.removeEventHandler(this);
this._overviewRuler.dispose();
diff --git a/src/vs/editor/browser/viewParts/selections/selections.css b/src/vs/editor/browser/viewParts/selections/selections.css
index 44701f7ab86..4c1c38ee310 100644
--- a/src/vs/editor/browser/viewParts/selections/selections.css
+++ b/src/vs/editor/browser/viewParts/selections/selections.css
@@ -21,9 +21,11 @@
.monaco-editor.hc-black .top-right-radius { border-top-right-radius: 0; }
.monaco-editor.hc-black .bottom-right-radius { border-bottom-right-radius: 0; }
-.monaco-editor.vs .view-overlays .selected-text { background: #E5EBF1; }
-.monaco-editor.vs .view-overlays.focused .selected-text { background: #ADD6FF; }
-.monaco-editor.vs-dark .view-overlays .selected-text { background: #3A3D41; }
-.monaco-editor.vs-dark .view-overlays.focused .selected-text { background: #264F78; }
-.monaco-editor.hc-black .view-overlays .selected-text { background: none; }
-.monaco-editor.hc-black .view-overlays.focused .selected-text { background: white; border-radius: 0; }
+.monaco-editor.vs .view-overlays .selected-text { background: #E5EBF1; }
+.monaco-editor.vs .view-overlays.focused .selected-text { background: #ADD6FF; }
+.monaco-editor.vs-dark .view-overlays .selected-text { background: #3A3D41; }
+.monaco-editor.vs-dark .view-overlays.focused .selected-text { background: #264F78; }
+.monaco-editor.hc-black .view-overlays .selected-text { background: none; }
+.monaco-editor.hc-black .view-overlays.focused .selected-text { background: white; }
+.monaco-editor.ie.hc-black .view-overlays.focused .selected-text { background: none; border: 2px solid #f38518; }
+.monaco-editor.edge.hc-black .view-overlays.focused .selected-text { background: none; border: 2px solid #f38518; }
diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.css b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.css
index 6a5cde5843b..964f54368a7 100644
--- a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.css
+++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.css
@@ -59,33 +59,33 @@
@keyframes cursor-smooth {
0%,
20% {
- opacity: 0;
+ opacity: 1;
}
60%,
100% {
- opacity: 1;
+ opacity: 0;
}
}
@keyframes cursor-phase {
0%,
20% {
- opacity: 0;
+ opacity: 1;
}
90%,
100% {
- opacity: 1;
+ opacity: 0;
}
}
@keyframes cursor-expand {
0%,
20% {
- transform: scaleY(0);
+ transform: scaleY(1);
}
80%,
100% {
- transform: scaleY(1);
+ transform: scaleY(0);
}
}
diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts
index 57b1a6ab777..8adb5ce1c4d 100644
--- a/src/vs/editor/browser/widget/codeEditorWidget.ts
+++ b/src/vs/editor/browser/widget/codeEditorWidget.ts
@@ -18,11 +18,10 @@ import {CommonEditorConfiguration} from 'vs/editor/common/config/commonEditorCon
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} from 'vs/editor/common/editorCommonExtensions';
+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 {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
import {Colorizer} from 'vs/editor/browser/standalone/colorizer';
import {View} from 'vs/editor/browser/view/viewImpl';
import {Disposable, IDisposable} from 'vs/base/common/lifecycle';
@@ -30,7 +29,7 @@ import Event, {Emitter} from 'vs/base/common/event';
import {IKeyboardEvent} from 'vs/base/browser/keyboardEvent';
import {InternalEditorAction} from 'vs/editor/common/editorAction';
-export class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.ICodeEditor {
+export abstract class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.ICodeEditor {
public onMouseUp(listener: (e:editorBrowser.IEditorMouseEvent)=>void): IDisposable {
return this.addListener2(editorCommon.EventType.MouseUp, listener);
@@ -90,10 +89,8 @@ export class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.
let hasFocus = this._focusTracker.hasFocus();
if (hasFocus) {
- this._editorFocusContextKey.set(true);
this.emit(editorCommon.EventType.EditorFocus, {});
} else {
- this._editorFocusContextKey.reset();
this.emit(editorCommon.EventType.EditorBlur, {});
}
});
@@ -101,17 +98,18 @@ export class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.
this.contentWidgets = {};
this.overlayWidgets = {};
- let contributionDescriptors = [].concat(EditorBrowserRegistry.getEditorContributions()).concat(CommonEditorRegistry.getEditorContributions());
- for (let i = 0, len = contributionDescriptors.length; i < len; i++) {
+ let contributions = this._getContributions();
+ for (let i = 0, len = contributions.length; i < len; i++) {
+ let ctor = contributions[i];
try {
- let contribution = contributionDescriptors[i].createInstance(this._instantiationService, this);
+ let contribution = this._instantiationService.createInstance(ctor, this);
this._contributions[contribution.getId()] = contribution;
} catch (err) {
onUnexpectedError(err);
}
}
- CommonEditorRegistry.getEditorActions().forEach((action) => {
+ this._getActions().forEach((action) => {
let internalAction = new InternalEditorAction(action, this, this._instantiationService, this._contextKeyService);
this._actions[internalAction.id] = internalAction;
});
@@ -119,6 +117,9 @@ export class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.
this._codeEditorService.addCodeEditor(this);
}
+ protected abstract _getContributions(): editorBrowser.IEditorContributionCtor[];
+ protected abstract _getActions(): EditorAction[];
+
protected _createConfiguration(options:editorCommon.ICodeEditorWidgetCreationOptions): CommonEditorConfiguration {
return new Configuration(options, this.domElement);
}
@@ -309,7 +310,7 @@ export class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.
}
public hasWidgetFocus(): boolean {
- return this._focusTracker.hasFocus();
+ return this._focusTracker && this._focusTracker.hasFocus();
}
public addContentWidget(widget: editorBrowser.IContentWidget): void {
@@ -506,7 +507,6 @@ export class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.
protected _createView(): void {
this._view = new View(
- this._contextKeyService,
this._commandService,
this._configuration,
this.viewModel,
diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts
index c73fc66f728..a3d24a4fc21 100644
--- a/src/vs/editor/browser/widget/diffEditorWidget.ts
+++ b/src/vs/editor/browser/widget/diffEditorWidget.ts
@@ -381,8 +381,8 @@ export class DiffEditorWidget extends EventEmitter implements editorBrowser.IDif
this._originalOverviewRuler.dispose();
this._modifiedOverviewRuler.dispose();
- this.originalEditor.destroy();
- this.modifiedEditor.destroy();
+ this.originalEditor.dispose();
+ this.modifiedEditor.dispose();
this._strategy.dispose();
diff --git a/src/vs/editor/browser/widget/media/editor.css b/src/vs/editor/browser/widget/media/editor.css
index 586ffaa0185..b812108a658 100644
--- a/src/vs/editor/browser/widget/media/editor.css
+++ b/src/vs/editor/browser/widget/media/editor.css
@@ -22,6 +22,8 @@
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;
}
.monaco-editor.enable-ligatures {
-webkit-font-feature-settings: "liga" on, "calt" on;
@@ -112,11 +114,11 @@
top: 0;
}
-/* -------------------- Highlight a line -------------------- */
+/* -------------------- Highlight a range -------------------- */
-.monaco-editor.vs .lineHighlight { background: rgba(253, 255, 0, 0.2); }
-.monaco-editor.vs-dark .lineHighlight { background: rgba(243, 240, 245, 0.2); }
-.monaco-editor.hc-black .lineHighlight { background: rgba(243, 240, 245, 0.2); }
+.monaco-editor.vs .rangeHighlight { background: rgba(253, 255, 0, 0.2); }
+.monaco-editor.vs-dark .rangeHighlight { background: rgba(255, 255, 255, 0.044); }
+.monaco-editor.hc-black .rangeHighlight { border: 1px dotted #f38518; }
/* -------------------- Squigglies -------------------- */
diff --git a/src/vs/editor/common/commands/shiftCommand.ts b/src/vs/editor/common/commands/shiftCommand.ts
index 63e2e77aee6..ec65fed4d55 100644
--- a/src/vs/editor/common/commands/shiftCommand.ts
+++ b/src/vs/editor/common/commands/shiftCommand.ts
@@ -51,9 +51,9 @@ export class ShiftCommand implements ICommand {
}
public getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void {
- let startLine = this._selection.startLineNumber,
- endLine = this._selection.endLineNumber,
- _SPACE = ' '.charCodeAt(0);
+ let startLine = this._selection.startLineNumber;
+ let endLine = this._selection.endLineNumber;
+ let _SPACE = ' '.charCodeAt(0);
if (this._selection.endColumn === 1 && startLine !== endLine) {
endLine = endLine - 1;
diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts
index 7cb38bc6054..75d7dc1e11a 100644
--- a/src/vs/editor/common/commonCodeEditor.ts
+++ b/src/vs/editor/common/commonCodeEditor.ts
@@ -6,7 +6,7 @@
import {onUnexpectedError} from 'vs/base/common/errors';
import {EventEmitter, IEventEmitter} from 'vs/base/common/eventEmitter';
-import {IDisposable, dispose} from 'vs/base/common/lifecycle';
+import {Disposable, IDisposable, dispose} from 'vs/base/common/lifecycle';
import {TPromise} from 'vs/base/common/winjs.base';
import {ServicesAccessor, IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
import {ServiceCollection} from 'vs/platform/instantiation/common/serviceCollection';
@@ -84,8 +84,8 @@ export abstract class CommonCodeEditor extends EventEmitter implements editorCom
protected id:number;
- _lifetimeDispose: IDisposable[];
- _configuration:CommonEditorConfiguration;
+ protected _lifetimeDispose: IDisposable[];
+ protected _configuration:CommonEditorConfiguration;
protected _contributions:{ [key:string]:editorCommon.IEditorContribution; };
protected _actions:{ [key:string]:editorCommon.IEditorAction; };
@@ -107,13 +107,6 @@ export abstract class CommonCodeEditor extends EventEmitter implements editorCom
private _decorationTypeKeysToIds: {[decorationTypeKey:string]:string[]};
private _decorationTypeSubtypes: {[decorationTypeKey:string]:{ [subtype:string]:boolean}};
- private _editorIdContextKey: IContextKey;
- protected _editorFocusContextKey: IContextKey;
- private _editorTabMovesFocusKey: IContextKey;
- private _editorReadonly: IContextKey;
- private _hasMultipleSelectionsKey: IContextKey;
- private _hasNonEmptySelectionKey: IContextKey;
- private _langIdKey: IContextKey;
constructor(
domElement: IContextKeyServiceTarget,
@@ -130,15 +123,6 @@ export abstract class CommonCodeEditor extends EventEmitter implements editorCom
// listeners that are kept during the whole editor lifetime
this._lifetimeDispose = [];
- this._contextKeyService = contextKeyService.createScoped(this.domElement);
- this._editorIdContextKey = this._contextKeyService.createKey('editorId', this.getId());
- this._editorFocusContextKey = EditorContextKeys.Focus.bindTo(this._contextKeyService);
- this._editorTabMovesFocusKey = EditorContextKeys.TabMovesFocus.bindTo(this._contextKeyService);
- this._editorReadonly = EditorContextKeys.ReadOnly.bindTo(this._contextKeyService);
- this._hasMultipleSelectionsKey = EditorContextKeys.HasMultipleSelections.bindTo(this._contextKeyService);
- this._hasNonEmptySelectionKey = EditorContextKeys.HasNonEmptySelection.bindTo(this._contextKeyService);
- this._langIdKey = EditorContextKeys.LanguageId.bindTo(this._contextKeyService);
- this._lifetimeDispose.push(new EditorModeContext(this, this._contextKeyService));
this._decorationTypeKeysToIds = {};
this._decorationTypeSubtypes = {};
@@ -149,19 +133,14 @@ export abstract class CommonCodeEditor extends EventEmitter implements editorCom
}
this._configuration = this._createConfiguration(options);
- if (this._configuration.editor.tabFocusMode) {
- this._editorTabMovesFocusKey.set(true);
- }
- this._editorReadonly.set(this._configuration.editor.readOnly);
this._lifetimeDispose.push(this._configuration.onDidChange((e) => {
- if (this._configuration.editor.tabFocusMode) {
- this._editorTabMovesFocusKey.set(true);
- } else {
- this._editorTabMovesFocusKey.reset();
- }
this.emit(editorCommon.EventType.ConfigurationChanged, e);
}));
+ this._contextKeyService = contextKeyService.createScoped(this.domElement);
+ this._lifetimeDispose.push(new EditorContextKeysManager(this, this._contextKeyService));
+ this._lifetimeDispose.push(new EditorModeContext(this, this._contextKeyService));
+
this._instantiationService = instantiationService.createChild(new ServiceCollection([IContextKeyService, this._contextKeyService]));
this._attachModel(null);
@@ -214,8 +193,6 @@ export abstract class CommonCodeEditor extends EventEmitter implements editorCom
public updateOptions(newOptions:editorCommon.IEditorOptions): void {
this._configuration.updateOptions(newOptions);
- this._editorReadonly.set(this._configuration.editor.readOnly);
- this._editorTabMovesFocusKey.set(this._configuration.editor.tabFocusMode);
}
public getConfiguration(): editorCommon.InternalEditorOptions {
@@ -228,8 +205,8 @@ export abstract class CommonCodeEditor extends EventEmitter implements editorCom
public getValue(options:{ preserveBOM:boolean; lineEnding:string; }=null): string {
if (this.model) {
- var preserveBOM:boolean = (options && options.preserveBOM) ? true : false;
- var eolPreference = editorCommon.EndOfLinePreference.TextDefined;
+ let preserveBOM:boolean = (options && options.preserveBOM) ? true : false;
+ let eolPreference = editorCommon.EndOfLinePreference.TextDefined;
if (options && options.lineEnding && options.lineEnding === '\n') {
eolPreference = editorCommon.EndOfLinePreference.LF;
} else if (options && options.lineEnding && options.lineEnding === '\r\n') {
@@ -256,10 +233,10 @@ export abstract class CommonCodeEditor extends EventEmitter implements editorCom
return;
}
- var detachedModel = this._detachModel();
+ let detachedModel = this._detachModel();
this._attachModel(model);
- var e: editorCommon.IModelChangedEvent = {
+ let e: editorCommon.IModelChangedEvent = {
oldModelUrl: detachedModel ? detachedModel.uri : null,
newModelUrl: model ? model.uri : null
};
@@ -315,9 +292,9 @@ export abstract class CommonCodeEditor extends EventEmitter implements editorCom
if (!Range.isIRange(range)) {
throw new Error('Invalid arguments');
}
- var validatedRange = this.model.validateRange(range);
+ let validatedRange = this.model.validateRange(range);
- var revealRangeEvent: editorCommon.ICursorRevealRangeEvent = {
+ let revealRangeEvent: editorCommon.ICursorRevealRangeEvent = {
range: validatedRange,
viewRange: null,
verticalType: verticalType,
@@ -401,9 +378,9 @@ export abstract class CommonCodeEditor extends EventEmitter implements editorCom
if (!this.cursor) {
return null;
}
- var selections = this.cursor.getSelections();
- var result:Selection[] = [];
- for (var i = 0, len = selections.length; i < len; i++) {
+ let selections = this.cursor.getSelections();
+ let result:Selection[] = [];
+ for (let i = 0, len = selections.length; i < len; i++) {
result[i] = selections[i].clone();
}
return result;
@@ -414,8 +391,8 @@ export abstract class CommonCodeEditor extends EventEmitter implements editorCom
public setSelection(selection:editorCommon.ISelection, reveal?:boolean, revealVerticalInCenter?:boolean, revealHorizontal?:boolean): void;
public setSelection(editorSelection:Selection, reveal?:boolean, revealVerticalInCenter?:boolean, revealHorizontal?:boolean): void;
public setSelection(something:any, reveal:boolean = false, revealVerticalInCenter:boolean = false, revealHorizontal:boolean = false): void {
- var isSelection = Selection.isISelection(something);
- var isRange = Range.isIRange(something);
+ let isSelection = Selection.isISelection(something);
+ let isRange = Range.isIRange(something);
if (!isSelection && !isRange) {
throw new Error('Invalid arguments');
@@ -425,7 +402,7 @@ export abstract class CommonCodeEditor extends EventEmitter implements editorCom
this._setSelectionImpl(