Merge branch 'master' into automation-fixes

This commit is contained in:
Daniel Imms 2019-11-04 15:35:12 -08:00 committed by GitHub
commit 918ea9cded
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 385 additions and 419 deletions

View file

@ -86,7 +86,8 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
],
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
importIgnorePattern: /(^vs\/css!)|(promise-polyfill\/polyfill)/,
destRoot: path.join(root, 'out-editor-src')
destRoot: path.join(root, 'out-editor-src'),
redirects: []
});
});

View file

@ -98,7 +98,7 @@
"git": {
"name": "vscode-codicons",
"repositoryUrl": "https://github.com/microsoft/vscode-codicons",
"commitHash": "febb4e4ff48b79234054d4e988450093030da6ef"
"commitHash": "1f8534396cda86d3fa199b0e45ce110b55d794d0"
}
},
"license": "MIT and Creative Commons Attribution 4.0",

View file

@ -9,7 +9,7 @@
},
"main": "./out/cssServerMain",
"dependencies": {
"vscode-css-languageservice": "^4.0.3-next.18",
"vscode-css-languageservice": "^4.0.3-next.15",
"vscode-languageserver": "^6.0.0-next.1"
},
"devDependencies": {

View file

@ -781,15 +781,14 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"
vscode-css-languageservice@^4.0.3-next.18:
version "4.0.3-next.18"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.18.tgz#917bdde62b99838428dd390fd44e6aab0550f9b4"
integrity sha512-JTKs2NWtInylwaRmLiJWrjVOHlrmtAFHCyBM94+IGp+bEwE9Y6smwoLkeMB8vh4NfKXZnFVe7VK3PsIkSmR1kg==
vscode-css-languageservice@^4.0.3-next.15:
version "4.0.3-next.15"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.15.tgz#e7b7dab2f1e6e9452bb2fb8c400dbcff3b8927aa"
integrity sha512-y2bNfcZgNH3F7R0N/1ePnVtzvGwi9f6leW5L0zPso/wVK9A4xw5rmZA1pTV9vMjoio2h3gUB1T8HTQeVxota2Q==
dependencies:
vscode-languageserver-textdocument "^1.0.0-next.2"
vscode-languageserver-types "^3.15.0-next.6"
vscode-languageserver-types "^3.15.0-next.5"
vscode-nls "^4.1.1"
vscode-uri "^2.1.1"
vscode-uri "^2.0.3"
vscode-jsonrpc@^5.0.0-next.2:
version "5.0.0-next.2"
@ -804,21 +803,11 @@ vscode-languageserver-protocol@^3.15.0-next.9:
vscode-jsonrpc "^5.0.0-next.2"
vscode-languageserver-types "^3.15.0-next.5"
vscode-languageserver-textdocument@^1.0.0-next.2:
version "1.0.0-next.2"
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.0-next.2.tgz#0324c50e93c32e39a151ba635a4ac61dbf6aa760"
integrity sha512-omA1bS2ENVnhYnenmGGNQjAdxz3FbGgNvGOKrppAS1KxdYrOczxon+AQF0JswRwE0yxwhFwEFDvB4e5earYCww==
vscode-languageserver-types@^3.15.0-next.5:
version "3.15.0-next.5"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.5.tgz#863d711bf47b338ff5e63ae19fb20d4fcd4d713b"
integrity sha512-7hrELhTeWieUgex3+6692KjCkcmO/+V/bFItM5MHGcBotzwmjEuXjapLLYTYhIspuJ1ibRSik5MhX5YwLpsPiw==
vscode-languageserver-types@^3.15.0-next.6:
version "3.15.0-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.6.tgz#7a990d00c39ad4e744335afb4cc422a3e687ff25"
integrity sha512-+4jfvmZ26oFMSX6EgPRB75PWHoT8pzyWuSSWk0erC4hTzmJq2gWxVLh20bZutZjMmiivawvPshtM3XZhX2SttA==
vscode-languageserver@^6.0.0-next.1:
version "6.0.0-next.1"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-6.0.0-next.1.tgz#4d71886d4a17d22eafc61b3a5fbf84e8e27c191f"
@ -837,10 +826,10 @@ vscode-textbuffer@^1.0.0:
resolved "https://registry.yarnpkg.com/vscode-textbuffer/-/vscode-textbuffer-1.0.0.tgz#1faee638c8e0e4131c8d5c353993a1874acda086"
integrity sha512-zPaHo4urgpwsm+PrJWfNakolRpryNja18SUip/qIIsfhuEqEIPEXMxHOlFPjvDC4JgTaimkncNW7UMXRJTY6ow==
vscode-uri@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.1.1.tgz#5aa1803391b6ebdd17d047f51365cf62c38f6e90"
integrity sha512-eY9jmGoEnVf8VE8xr5znSah7Qt1P/xsCdErz+g8HYZtJ7bZqKH5E3d+6oVNm1AC/c6IHUDokbmVXKOi4qPAC9A==
vscode-uri@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.0.3.tgz#25e5f37f552fbee3cec7e5f80cef8469cefc6543"
integrity sha512-4D3DI3F4uRy09WNtDGD93H9q034OHImxiIcSq664Hq1Y1AScehlP3qqZyTkX/RWxeu0MRMHGkrxYqm2qlDF/aw==
which-module@^2.0.0:
version "2.0.0"

View file

@ -9,8 +9,8 @@
},
"main": "./out/htmlServerMain",
"dependencies": {
"vscode-css-languageservice": "^4.0.3-next.18",
"vscode-html-languageservice": "^3.0.4-next.7",
"vscode-css-languageservice": "^4.0.3-next.15",
"vscode-html-languageservice": "^3.0.4-next.6",
"vscode-languageserver": "^6.0.0-next.1",
"vscode-languageserver-types": "3.15.0-next.5",
"vscode-nls": "^4.1.1",

View file

@ -611,23 +611,21 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"
vscode-css-languageservice@^4.0.3-next.18:
version "4.0.3-next.18"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.18.tgz#917bdde62b99838428dd390fd44e6aab0550f9b4"
integrity sha512-JTKs2NWtInylwaRmLiJWrjVOHlrmtAFHCyBM94+IGp+bEwE9Y6smwoLkeMB8vh4NfKXZnFVe7VK3PsIkSmR1kg==
vscode-css-languageservice@^4.0.3-next.15:
version "4.0.3-next.15"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.15.tgz#e7b7dab2f1e6e9452bb2fb8c400dbcff3b8927aa"
integrity sha512-y2bNfcZgNH3F7R0N/1ePnVtzvGwi9f6leW5L0zPso/wVK9A4xw5rmZA1pTV9vMjoio2h3gUB1T8HTQeVxota2Q==
dependencies:
vscode-languageserver-textdocument "^1.0.0-next.2"
vscode-languageserver-types "^3.15.0-next.6"
vscode-languageserver-types "^3.15.0-next.5"
vscode-nls "^4.1.1"
vscode-uri "^2.1.1"
vscode-uri "^2.0.3"
vscode-html-languageservice@^3.0.4-next.7:
version "3.0.4-next.7"
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-3.0.4-next.7.tgz#4e7c19c671c4314cb9a42fa4330418be3de754bf"
integrity sha512-fpnuATB/09K1ERND6qjuOEUNzr8QtWpW6efB3LMJamILwnFCvh2WXfbjnM8ZEe+1XeOcB+Il8HhkWcb7/zsY2A==
vscode-html-languageservice@^3.0.4-next.6:
version "3.0.4-next.6"
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-3.0.4-next.6.tgz#ef0f535828f086bcf9bafb2609d54bb285d29d2a"
integrity sha512-DvFpvPJ9wGKIpNa6kxoUSRjZTzLadyKPO2rNhmU7oor9pAQbaNIdJBGoGCm3YELLLPFNcR0/jWDDC4z8wFPk3Q==
dependencies:
vscode-languageserver-textdocument "^1.0.0-next.2"
vscode-languageserver-types "^3.15.0-next.6"
vscode-languageserver-types "^3.15.0-next.5"
vscode-nls "^4.1.1"
vscode-uri "^2.0.3"
@ -644,21 +642,11 @@ vscode-languageserver-protocol@^3.15.0-next.9:
vscode-jsonrpc "^5.0.0-next.2"
vscode-languageserver-types "^3.15.0-next.5"
vscode-languageserver-textdocument@^1.0.0-next.2:
version "1.0.0-next.2"
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.0-next.2.tgz#0324c50e93c32e39a151ba635a4ac61dbf6aa760"
integrity sha512-omA1bS2ENVnhYnenmGGNQjAdxz3FbGgNvGOKrppAS1KxdYrOczxon+AQF0JswRwE0yxwhFwEFDvB4e5earYCww==
vscode-languageserver-types@3.15.0-next.5, vscode-languageserver-types@^3.15.0-next.5:
version "3.15.0-next.5"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.5.tgz#863d711bf47b338ff5e63ae19fb20d4fcd4d713b"
integrity sha512-7hrELhTeWieUgex3+6692KjCkcmO/+V/bFItM5MHGcBotzwmjEuXjapLLYTYhIspuJ1ibRSik5MhX5YwLpsPiw==
vscode-languageserver-types@^3.15.0-next.6:
version "3.15.0-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.6.tgz#7a990d00c39ad4e744335afb4cc422a3e687ff25"
integrity sha512-+4jfvmZ26oFMSX6EgPRB75PWHoT8pzyWuSSWk0erC4hTzmJq2gWxVLh20bZutZjMmiivawvPshtM3XZhX2SttA==
vscode-languageserver@^6.0.0-next.1:
version "6.0.0-next.1"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-6.0.0-next.1.tgz#4d71886d4a17d22eafc61b3a5fbf84e8e27c191f"
@ -682,11 +670,6 @@ vscode-uri@^2.0.3:
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.0.3.tgz#25e5f37f552fbee3cec7e5f80cef8469cefc6543"
integrity sha512-4D3DI3F4uRy09WNtDGD93H9q034OHImxiIcSq664Hq1Y1AScehlP3qqZyTkX/RWxeu0MRMHGkrxYqm2qlDF/aw==
vscode-uri@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.1.1.tgz#5aa1803391b6ebdd17d047f51365cf62c38f6e90"
integrity sha512-eY9jmGoEnVf8VE8xr5znSah7Qt1P/xsCdErz+g8HYZtJ7bZqKH5E3d+6oVNm1AC/c6IHUDokbmVXKOi4qPAC9A==
which-module@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"

View file

@ -22,8 +22,9 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode.window.registerWebviewEditorProvider(
PreviewManager.viewType,
{
async resolveWebviewEditor(resource: vscode.Uri, editor: vscode.WebviewEditor): Promise<void> {
async resolveWebviewEditor({ resource }, editor: vscode.WebviewPanel): Promise<vscode.WebviewEditorCapabilities> {
previewManager.resolve(resource, editor);
return {};
}
}));

View file

@ -27,7 +27,7 @@ export class PreviewManager {
public resolve(
resource: vscode.Uri,
webviewEditor: vscode.WebviewEditor,
webviewEditor: vscode.WebviewPanel,
) {
const preview = new Preview(this.extensionRoot, resource, webviewEditor, this.sizeStatusBarEntry, this.zoomStatusBarEntry);
this._previews.add(preview);
@ -73,7 +73,7 @@ class Preview extends Disposable {
constructor(
private readonly extensionRoot: vscode.Uri,
private readonly resource: vscode.Uri,
private readonly webviewEditor: vscode.WebviewEditor,
private readonly webviewEditor: vscode.WebviewPanel,
private readonly sizeStatusBarEntry: SizeStatusBarEntry,
private readonly zoomStatusBarEntry: ZoomStatusBarEntry,
) {
@ -208,7 +208,7 @@ class Preview extends Disposable {
</html>`;
}
private getResourcePath(webviewEditor: vscode.WebviewEditor, resource: vscode.Uri, version: string) {
private getResourcePath(webviewEditor: vscode.WebviewPanel, resource: vscode.Uri, version: string) {
switch (resource.scheme) {
case 'data':
return encodeURI(resource.toString(true));

View file

@ -328,7 +328,7 @@ namespace CompletionConfiguration {
class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider {
public static readonly triggerCharacters = ['.', '"', '\'', '/', '@', '<'];
public static readonly triggerCharacters = ['.', '"', '\'', '`', '/', '@', '<'];
constructor(
private readonly client: ITypeScriptServiceClient,

View file

@ -5,7 +5,7 @@
@font-face {
font-family: "codicon";
src: url("./codicon.ttf?ef02cfeb1bd632108a31e60b27eeeaac") format("truetype");
src: url("./codicon.ttf?f5d7d29fe5677c620f764a26698d7611") format("truetype");
}
.codicon[class*='codicon-'] {
@ -19,6 +19,11 @@
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
/* Hack to get web rendering to align to pixel grid */
transform: rotate(0);
-webkit-transform: rotate(0.1deg);
-moz-transform: rotate(0);
}
@ -92,6 +97,7 @@
.codicon-file:before { content: "\ea7b" }
.codicon-file-text:before { content: "\ea7b" }
.codicon-more:before { content: "\ea7c" }
.codicon-ellipsis:before { content: "\ea7c" }
.codicon-kebab-horizontal:before { content: "\ea7c" }
.codicon-mail-reply:before { content: "\ea7d" }
.codicon-reply:before { content: "\ea7d" }
@ -146,240 +152,239 @@
.codicon-symbol-value:before { content: "\ea95" }
.codicon-symbol-ruler:before { content: "\ea96" }
.codicon-symbol-unit:before { content: "\ea96" }
.codicon-activate-breakpoints:before { content: "\f101" }
.codicon-archive:before { content: "\f102" }
.codicon-arrow-both:before { content: "\f103" }
.codicon-arrow-down:before { content: "\f104" }
.codicon-arrow-left:before { content: "\f105" }
.codicon-arrow-right:before { content: "\f106" }
.codicon-arrow-small-down:before { content: "\f107" }
.codicon-arrow-small-left:before { content: "\f108" }
.codicon-arrow-small-right:before { content: "\f109" }
.codicon-arrow-small-up:before { content: "\f10a" }
.codicon-arrow-up:before { content: "\f10b" }
.codicon-bell:before { content: "\f10c" }
.codicon-bold:before { content: "\f10d" }
.codicon-book:before { content: "\f10e" }
.codicon-bookmark:before { content: "\f10f" }
.codicon-breakpoint-conditional-unverified:before { content: "\f110" }
.codicon-breakpoint-conditional:before { content: "\f111" }
.codicon-breakpoint-data-unverified:before { content: "\f112" }
.codicon-breakpoint-data:before { content: "\f113" }
.codicon-breakpoint-log-unverified:before { content: "\f114" }
.codicon-breakpoint-log:before { content: "\f115" }
.codicon-briefcase:before { content: "\f116" }
.codicon-broadcast:before { content: "\f117" }
.codicon-browser:before { content: "\f118" }
.codicon-bug:before { content: "\f119" }
.codicon-calendar:before { content: "\f11a" }
.codicon-case-sensitive:before { content: "\f11b" }
.codicon-check:before { content: "\f11c" }
.codicon-checklist:before { content: "\f11d" }
.codicon-chevron-down:before { content: "\f11e" }
.codicon-chevron-left:before { content: "\f11f" }
.codicon-chevron-right:before { content: "\f120" }
.codicon-chevron-up:before { content: "\f121" }
.codicon-chrome-close:before { content: "\f122" }
.codicon-chrome-maximize:before { content: "\f123" }
.codicon-chrome-minimize:before { content: "\f124" }
.codicon-chrome-restore:before { content: "\f125" }
.codicon-circle-outline:before { content: "\f126" }
.codicon-circle-slash:before { content: "\f127" }
.codicon-circuit-board:before { content: "\f128" }
.codicon-clear-all:before { content: "\f129" }
.codicon-clippy:before { content: "\f12a" }
.codicon-close-all:before { content: "\f12b" }
.codicon-cloud-download:before { content: "\f12c" }
.codicon-cloud-upload:before { content: "\f12d" }
.codicon-code:before { content: "\f12e" }
.codicon-collapse-all:before { content: "\f12f" }
.codicon-color-mode:before { content: "\f130" }
.codicon-comment-discussion:before { content: "\f131" }
.codicon-compare-changes:before { content: "\f132" }
.codicon-credit-card:before { content: "\f133" }
.codicon-current-and-breakpoint:before { content: "\f134" }
.codicon-current:before { content: "\f135" }
.codicon-dash:before { content: "\f136" }
.codicon-dashboard:before { content: "\f137" }
.codicon-database:before { content: "\f138" }
.codicon-debug-continue:before { content: "\f139" }
.codicon-debug-disconnect:before { content: "\f13a" }
.codicon-debug-pause:before { content: "\f13b" }
.codicon-debug-restart:before { content: "\f13c" }
.codicon-debug-start:before { content: "\f13d" }
.codicon-debug-step-into:before { content: "\f13e" }
.codicon-debug-step-out:before { content: "\f13f" }
.codicon-debug-step-over:before { content: "\f140" }
.codicon-debug-stop:before { content: "\f141" }
.codicon-debug:before { content: "\f142" }
.codicon-device-camera-video:before { content: "\f143" }
.codicon-device-camera:before { content: "\f144" }
.codicon-device-mobile:before { content: "\f145" }
.codicon-diff-added:before { content: "\f146" }
.codicon-diff-ignored:before { content: "\f147" }
.codicon-diff-modified:before { content: "\f148" }
.codicon-diff-removed:before { content: "\f149" }
.codicon-diff-renamed:before { content: "\f14a" }
.codicon-diff:before { content: "\f14b" }
.codicon-discard:before { content: "\f14c" }
.codicon-editor-layout:before { content: "\f14d" }
.codicon-ellipsis:before { content: "\f14e" }
.codicon-empty-window:before { content: "\f14f" }
.codicon-exclude:before { content: "\f150" }
.codicon-extensions:before { content: "\f151" }
.codicon-eye-closed:before { content: "\f152" }
.codicon-file-binary:before { content: "\f153" }
.codicon-file-code:before { content: "\f154" }
.codicon-file-media:before { content: "\f155" }
.codicon-file-pdf:before { content: "\f156" }
.codicon-file-submodule:before { content: "\f157" }
.codicon-file-symlink-directory:before { content: "\f158" }
.codicon-file-symlink-file:before { content: "\f159" }
.codicon-file-zip:before { content: "\f15a" }
.codicon-files:before { content: "\f15b" }
.codicon-filter:before { content: "\f15c" }
.codicon-flame:before { content: "\f15d" }
.codicon-fold-down:before { content: "\f15e" }
.codicon-fold-up:before { content: "\f15f" }
.codicon-fold:before { content: "\f160" }
.codicon-folder-active:before { content: "\f161" }
.codicon-folder-opened:before { content: "\f162" }
.codicon-gear:before { content: "\f163" }
.codicon-gift:before { content: "\f164" }
.codicon-gist-secret:before { content: "\f165" }
.codicon-gist:before { content: "\f166" }
.codicon-git-commit:before { content: "\f167" }
.codicon-git-compare:before { content: "\f168" }
.codicon-git-merge:before { content: "\f169" }
.codicon-github-action:before { content: "\f16a" }
.codicon-github-alt:before { content: "\f16b" }
.codicon-globe:before { content: "\f16c" }
.codicon-grabber:before { content: "\f16d" }
.codicon-graph:before { content: "\f16e" }
.codicon-gripper:before { content: "\f16f" }
.codicon-heart:before { content: "\f170" }
.codicon-home:before { content: "\f171" }
.codicon-horizontal-rule:before { content: "\f172" }
.codicon-hubot:before { content: "\f173" }
.codicon-inbox:before { content: "\f174" }
.codicon-issue-closed:before { content: "\f175" }
.codicon-issue-reopened:before { content: "\f176" }
.codicon-issues:before { content: "\f177" }
.codicon-italic:before { content: "\f178" }
.codicon-jersey:before { content: "\f179" }
.codicon-json:before { content: "\f17a" }
.codicon-kebab-vertical:before { content: "\f17b" }
.codicon-key:before { content: "\f17c" }
.codicon-law:before { content: "\f17d" }
.codicon-lightbulb-autofix:before { content: "\f17e" }
.codicon-link-external:before { content: "\f17f" }
.codicon-link:before { content: "\f180" }
.codicon-list-ordered:before { content: "\f181" }
.codicon-list-unordered:before { content: "\f182" }
.codicon-live-share:before { content: "\f183" }
.codicon-loading:before { content: "\f184" }
.codicon-location:before { content: "\f185" }
.codicon-mail-read:before { content: "\f186" }
.codicon-mail:before { content: "\f187" }
.codicon-markdown:before { content: "\f188" }
.codicon-megaphone:before { content: "\f189" }
.codicon-mention:before { content: "\f18a" }
.codicon-milestone:before { content: "\f18b" }
.codicon-mortar-board:before { content: "\f18c" }
.codicon-move:before { content: "\f18d" }
.codicon-multiple-windows:before { content: "\f18e" }
.codicon-mute:before { content: "\f18f" }
.codicon-no-newline:before { content: "\f190" }
.codicon-note:before { content: "\f191" }
.codicon-octoface:before { content: "\f192" }
.codicon-open-preview:before { content: "\f193" }
.codicon-package:before { content: "\f194" }
.codicon-paintcan:before { content: "\f195" }
.codicon-pin:before { content: "\f196" }
.codicon-play:before { content: "\f197" }
.codicon-plug:before { content: "\f198" }
.codicon-preserve-case:before { content: "\f199" }
.codicon-preview:before { content: "\f19a" }
.codicon-project:before { content: "\f19b" }
.codicon-pulse:before { content: "\f19c" }
.codicon-question:before { content: "\f19d" }
.codicon-quote:before { content: "\f19e" }
.codicon-radio-tower:before { content: "\f19f" }
.codicon-reactions:before { content: "\f1a0" }
.codicon-references:before { content: "\f1a1" }
.codicon-refresh:before { content: "\f1a2" }
.codicon-regex:before { content: "\f1a3" }
.codicon-remote-explorer:before { content: "\f1a4" }
.codicon-remote:before { content: "\f1a5" }
.codicon-remove:before { content: "\f1a6" }
.codicon-replace-all:before { content: "\f1a7" }
.codicon-replace:before { content: "\f1a8" }
.codicon-repo-clone:before { content: "\f1a9" }
.codicon-repo-force-push:before { content: "\f1aa" }
.codicon-repo-pull:before { content: "\f1ab" }
.codicon-repo-push:before { content: "\f1ac" }
.codicon-report:before { content: "\f1ad" }
.codicon-request-changes:before { content: "\f1ae" }
.codicon-rocket:before { content: "\f1af" }
.codicon-root-folder-opened:before { content: "\f1b0" }
.codicon-root-folder:before { content: "\f1b1" }
.codicon-rss:before { content: "\f1b2" }
.codicon-ruby:before { content: "\f1b3" }
.codicon-save-all:before { content: "\f1b4" }
.codicon-save-as:before { content: "\f1b5" }
.codicon-save:before { content: "\f1b6" }
.codicon-screen-full:before { content: "\f1b7" }
.codicon-screen-normal:before { content: "\f1b8" }
.codicon-search-stop:before { content: "\f1b9" }
.codicon-selection:before { content: "\f1ba" }
.codicon-server:before { content: "\f1bb" }
.codicon-settings-gear:before { content: "\f1bc" }
.codicon-settings:before { content: "\f1bd" }
.codicon-shield:before { content: "\f1be" }
.codicon-smiley:before { content: "\f1bf" }
.codicon-sort-precedence:before { content: "\f1c0" }
.codicon-split-horizontal:before { content: "\f1c1" }
.codicon-split-vertical:before { content: "\f1c2" }
.codicon-squirrel:before { content: "\f1c3" }
.codicon-star-full:before { content: "\f1c4" }
.codicon-star-half:before { content: "\f1c5" }
.codicon-symbol-class:before { content: "\f1c6" }
.codicon-symbol-color:before { content: "\f1c7" }
.codicon-symbol-constant:before { content: "\f1c8" }
.codicon-symbol-enum-member:before { content: "\f1c9" }
.codicon-symbol-field:before { content: "\f1ca" }
.codicon-symbol-file:before { content: "\f1cb" }
.codicon-symbol-interface:before { content: "\f1cc" }
.codicon-symbol-keyword:before { content: "\f1cd" }
.codicon-symbol-misc:before { content: "\f1ce" }
.codicon-symbol-operator:before { content: "\f1cf" }
.codicon-symbol-property:before { content: "\f1d0" }
.codicon-symbol-snippet:before { content: "\f1d1" }
.codicon-tasklist:before { content: "\f1d2" }
.codicon-telescope:before { content: "\f1d3" }
.codicon-text-size:before { content: "\f1d4" }
.codicon-three-bars:before { content: "\f1d5" }
.codicon-thumbsdown:before { content: "\f1d6" }
.codicon-thumbsup:before { content: "\f1d7" }
.codicon-tools:before { content: "\f1d8" }
.codicon-triangle-down:before { content: "\f1d9" }
.codicon-triangle-left:before { content: "\f1da" }
.codicon-triangle-right:before { content: "\f1db" }
.codicon-triangle-up:before { content: "\f1dc" }
.codicon-twitter:before { content: "\f1dd" }
.codicon-unfold:before { content: "\f1de" }
.codicon-unlock:before { content: "\f1df" }
.codicon-unmute:before { content: "\f1e0" }
.codicon-unverified:before { content: "\f1e1" }
.codicon-verified:before { content: "\f1e2" }
.codicon-versions:before { content: "\f1e3" }
.codicon-vm-active:before { content: "\f1e4" }
.codicon-vm-outline:before { content: "\f1e5" }
.codicon-vm-running:before { content: "\f1e6" }
.codicon-watch:before { content: "\f1e7" }
.codicon-whitespace:before { content: "\f1e8" }
.codicon-whole-word:before { content: "\f1e9" }
.codicon-window:before { content: "\f1ea" }
.codicon-word-wrap:before { content: "\f1eb" }
.codicon-zoom-in:before { content: "\f1ec" }
.codicon-zoom-out:before { content: "\f1ed" }
.codicon-activate-breakpoints:before { content: "\ea97" }
.codicon-archive:before { content: "\ea98" }
.codicon-arrow-both:before { content: "\ea99" }
.codicon-arrow-down:before { content: "\ea9a" }
.codicon-arrow-left:before { content: "\ea9b" }
.codicon-arrow-right:before { content: "\ea9c" }
.codicon-arrow-small-down:before { content: "\ea9d" }
.codicon-arrow-small-left:before { content: "\ea9e" }
.codicon-arrow-small-right:before { content: "\ea9f" }
.codicon-arrow-small-up:before { content: "\eaa0" }
.codicon-arrow-up:before { content: "\eaa1" }
.codicon-bell:before { content: "\eaa2" }
.codicon-bold:before { content: "\eaa3" }
.codicon-book:before { content: "\eaa4" }
.codicon-bookmark:before { content: "\eaa5" }
.codicon-breakpoint-conditional-unverified:before { content: "\eaa6" }
.codicon-breakpoint-conditional:before { content: "\eaa7" }
.codicon-breakpoint-data-unverified:before { content: "\eaa8" }
.codicon-breakpoint-data:before { content: "\eaa9" }
.codicon-breakpoint-log-unverified:before { content: "\eaaa" }
.codicon-breakpoint-log:before { content: "\eaab" }
.codicon-briefcase:before { content: "\eaac" }
.codicon-broadcast:before { content: "\eaad" }
.codicon-browser:before { content: "\eaae" }
.codicon-bug:before { content: "\eaaf" }
.codicon-calendar:before { content: "\eab0" }
.codicon-case-sensitive:before { content: "\eab1" }
.codicon-check:before { content: "\eab2" }
.codicon-checklist:before { content: "\eab3" }
.codicon-chevron-down:before { content: "\eab4" }
.codicon-chevron-left:before { content: "\eab5" }
.codicon-chevron-right:before { content: "\eab6" }
.codicon-chevron-up:before { content: "\eab7" }
.codicon-chrome-close:before { content: "\eab8" }
.codicon-chrome-maximize:before { content: "\eab9" }
.codicon-chrome-minimize:before { content: "\eaba" }
.codicon-chrome-restore:before { content: "\eabb" }
.codicon-circle-outline:before { content: "\eabc" }
.codicon-circle-slash:before { content: "\eabd" }
.codicon-circuit-board:before { content: "\eabe" }
.codicon-clear-all:before { content: "\eabf" }
.codicon-clippy:before { content: "\eac0" }
.codicon-close-all:before { content: "\eac1" }
.codicon-cloud-download:before { content: "\eac2" }
.codicon-cloud-upload:before { content: "\eac3" }
.codicon-code:before { content: "\eac4" }
.codicon-collapse-all:before { content: "\eac5" }
.codicon-color-mode:before { content: "\eac6" }
.codicon-comment-discussion:before { content: "\eac7" }
.codicon-compare-changes:before { content: "\eac8" }
.codicon-credit-card:before { content: "\eac9" }
.codicon-current-and-breakpoint:before { content: "\eaca" }
.codicon-current:before { content: "\eacb" }
.codicon-dash:before { content: "\eacc" }
.codicon-dashboard:before { content: "\eacd" }
.codicon-database:before { content: "\eace" }
.codicon-debug-continue:before { content: "\eacf" }
.codicon-debug-disconnect:before { content: "\ead0" }
.codicon-debug-pause:before { content: "\ead1" }
.codicon-debug-restart:before { content: "\ead2" }
.codicon-debug-start:before { content: "\ead3" }
.codicon-debug-step-into:before { content: "\ead4" }
.codicon-debug-step-out:before { content: "\ead5" }
.codicon-debug-step-over:before { content: "\ead6" }
.codicon-debug-stop:before { content: "\ead7" }
.codicon-debug:before { content: "\ead8" }
.codicon-device-camera-video:before { content: "\ead9" }
.codicon-device-camera:before { content: "\eada" }
.codicon-device-mobile:before { content: "\eadb" }
.codicon-diff-added:before { content: "\eadc" }
.codicon-diff-ignored:before { content: "\eadd" }
.codicon-diff-modified:before { content: "\eade" }
.codicon-diff-removed:before { content: "\eadf" }
.codicon-diff-renamed:before { content: "\eae0" }
.codicon-diff:before { content: "\eae1" }
.codicon-discard:before { content: "\eae2" }
.codicon-editor-layout:before { content: "\eae3" }
.codicon-empty-window:before { content: "\eae4" }
.codicon-exclude:before { content: "\eae5" }
.codicon-extensions:before { content: "\eae6" }
.codicon-eye-closed:before { content: "\eae7" }
.codicon-file-binary:before { content: "\eae8" }
.codicon-file-code:before { content: "\eae9" }
.codicon-file-media:before { content: "\eaea" }
.codicon-file-pdf:before { content: "\eaeb" }
.codicon-file-submodule:before { content: "\eaec" }
.codicon-file-symlink-directory:before { content: "\eaed" }
.codicon-file-symlink-file:before { content: "\eaee" }
.codicon-file-zip:before { content: "\eaef" }
.codicon-files:before { content: "\eaf0" }
.codicon-filter:before { content: "\eaf1" }
.codicon-flame:before { content: "\eaf2" }
.codicon-fold-down:before { content: "\eaf3" }
.codicon-fold-up:before { content: "\eaf4" }
.codicon-fold:before { content: "\eaf5" }
.codicon-folder-active:before { content: "\eaf6" }
.codicon-folder-opened:before { content: "\eaf7" }
.codicon-gear:before { content: "\eaf8" }
.codicon-gift:before { content: "\eaf9" }
.codicon-gist-secret:before { content: "\eafa" }
.codicon-gist:before { content: "\eafb" }
.codicon-git-commit:before { content: "\eafc" }
.codicon-git-compare:before { content: "\eafd" }
.codicon-git-merge:before { content: "\eafe" }
.codicon-github-action:before { content: "\eaff" }
.codicon-github-alt:before { content: "\eb00" }
.codicon-globe:before { content: "\eb01" }
.codicon-grabber:before { content: "\eb02" }
.codicon-graph:before { content: "\eb03" }
.codicon-gripper:before { content: "\eb04" }
.codicon-heart:before { content: "\eb05" }
.codicon-home:before { content: "\eb06" }
.codicon-horizontal-rule:before { content: "\eb07" }
.codicon-hubot:before { content: "\eb08" }
.codicon-inbox:before { content: "\eb09" }
.codicon-issue-closed:before { content: "\eb0a" }
.codicon-issue-reopened:before { content: "\eb0b" }
.codicon-issues:before { content: "\eb0c" }
.codicon-italic:before { content: "\eb0d" }
.codicon-jersey:before { content: "\eb0e" }
.codicon-json:before { content: "\eb0f" }
.codicon-kebab-vertical:before { content: "\eb10" }
.codicon-key:before { content: "\eb11" }
.codicon-law:before { content: "\eb12" }
.codicon-lightbulb-autofix:before { content: "\eb13" }
.codicon-link-external:before { content: "\eb14" }
.codicon-link:before { content: "\eb15" }
.codicon-list-ordered:before { content: "\eb16" }
.codicon-list-unordered:before { content: "\eb17" }
.codicon-live-share:before { content: "\eb18" }
.codicon-loading:before { content: "\eb19" }
.codicon-location:before { content: "\eb1a" }
.codicon-mail-read:before { content: "\eb1b" }
.codicon-mail:before { content: "\eb1c" }
.codicon-markdown:before { content: "\eb1d" }
.codicon-megaphone:before { content: "\eb1e" }
.codicon-mention:before { content: "\eb1f" }
.codicon-milestone:before { content: "\eb20" }
.codicon-mortar-board:before { content: "\eb21" }
.codicon-move:before { content: "\eb22" }
.codicon-multiple-windows:before { content: "\eb23" }
.codicon-mute:before { content: "\eb24" }
.codicon-no-newline:before { content: "\eb25" }
.codicon-note:before { content: "\eb26" }
.codicon-octoface:before { content: "\eb27" }
.codicon-open-preview:before { content: "\eb28" }
.codicon-package:before { content: "\eb29" }
.codicon-paintcan:before { content: "\eb2a" }
.codicon-pin:before { content: "\eb2b" }
.codicon-play:before { content: "\eb2c" }
.codicon-plug:before { content: "\eb2d" }
.codicon-preserve-case:before { content: "\eb2e" }
.codicon-preview:before { content: "\eb2f" }
.codicon-project:before { content: "\eb30" }
.codicon-pulse:before { content: "\eb31" }
.codicon-question:before { content: "\eb32" }
.codicon-quote:before { content: "\eb33" }
.codicon-radio-tower:before { content: "\eb34" }
.codicon-reactions:before { content: "\eb35" }
.codicon-references:before { content: "\eb36" }
.codicon-refresh:before { content: "\eb37" }
.codicon-regex:before { content: "\eb38" }
.codicon-remote-explorer:before { content: "\eb39" }
.codicon-remote:before { content: "\eb3a" }
.codicon-remove:before { content: "\eb3b" }
.codicon-replace-all:before { content: "\eb3c" }
.codicon-replace:before { content: "\eb3d" }
.codicon-repo-clone:before { content: "\eb3e" }
.codicon-repo-force-push:before { content: "\eb3f" }
.codicon-repo-pull:before { content: "\eb40" }
.codicon-repo-push:before { content: "\eb41" }
.codicon-report:before { content: "\eb42" }
.codicon-request-changes:before { content: "\eb43" }
.codicon-rocket:before { content: "\eb44" }
.codicon-root-folder-opened:before { content: "\eb45" }
.codicon-root-folder:before { content: "\eb46" }
.codicon-rss:before { content: "\eb47" }
.codicon-ruby:before { content: "\eb48" }
.codicon-save-all:before { content: "\eb49" }
.codicon-save-as:before { content: "\eb4a" }
.codicon-save:before { content: "\eb4b" }
.codicon-screen-full:before { content: "\eb4c" }
.codicon-screen-normal:before { content: "\eb4d" }
.codicon-search-stop:before { content: "\eb4e" }
.codicon-selection:before { content: "\eb4f" }
.codicon-server:before { content: "\eb50" }
.codicon-settings-gear:before { content: "\eb51" }
.codicon-settings:before { content: "\eb52" }
.codicon-shield:before { content: "\eb53" }
.codicon-smiley:before { content: "\eb54" }
.codicon-sort-precedence:before { content: "\eb55" }
.codicon-split-horizontal:before { content: "\eb56" }
.codicon-split-vertical:before { content: "\eb57" }
.codicon-squirrel:before { content: "\eb58" }
.codicon-star-full:before { content: "\eb59" }
.codicon-star-half:before { content: "\eb5a" }
.codicon-symbol-class:before { content: "\eb5b" }
.codicon-symbol-color:before { content: "\eb5c" }
.codicon-symbol-constant:before { content: "\eb5d" }
.codicon-symbol-enum-member:before { content: "\eb5e" }
.codicon-symbol-field:before { content: "\eb5f" }
.codicon-symbol-file:before { content: "\eb60" }
.codicon-symbol-interface:before { content: "\eb61" }
.codicon-symbol-keyword:before { content: "\eb62" }
.codicon-symbol-misc:before { content: "\eb63" }
.codicon-symbol-operator:before { content: "\eb64" }
.codicon-symbol-property:before { content: "\eb65" }
.codicon-symbol-snippet:before { content: "\eb66" }
.codicon-tasklist:before { content: "\eb67" }
.codicon-telescope:before { content: "\eb68" }
.codicon-text-size:before { content: "\eb69" }
.codicon-three-bars:before { content: "\eb6a" }
.codicon-thumbsdown:before { content: "\eb6b" }
.codicon-thumbsup:before { content: "\eb6c" }
.codicon-tools:before { content: "\eb6d" }
.codicon-triangle-down:before { content: "\eb6e" }
.codicon-triangle-left:before { content: "\eb6f" }
.codicon-triangle-right:before { content: "\eb70" }
.codicon-triangle-up:before { content: "\eb71" }
.codicon-twitter:before { content: "\eb72" }
.codicon-unfold:before { content: "\eb73" }
.codicon-unlock:before { content: "\eb74" }
.codicon-unmute:before { content: "\eb75" }
.codicon-unverified:before { content: "\eb76" }
.codicon-verified:before { content: "\eb77" }
.codicon-versions:before { content: "\eb78" }
.codicon-vm-active:before { content: "\eb79" }
.codicon-vm-outline:before { content: "\eb7a" }
.codicon-vm-running:before { content: "\eb7b" }
.codicon-watch:before { content: "\eb7c" }
.codicon-whitespace:before { content: "\eb7d" }
.codicon-whole-word:before { content: "\eb7e" }
.codicon-window:before { content: "\eb7f" }
.codicon-word-wrap:before { content: "\eb80" }
.codicon-zoom-in:before { content: "\eb81" }
.codicon-zoom-out:before { content: "\f101" }

View file

@ -92,7 +92,7 @@ export function createChannelSender<T>(channel: IChannel, options?: IChannelSend
const disableMarshalling = options && options.disableMarshalling;
return new Proxy({}, {
get(_target, propKey, _receiver) {
get(_target: T, propKey: PropertyKey) {
if (typeof propKey === 'string') {
// Event

View file

@ -1444,14 +1444,6 @@ export interface IWebviewPanelOptions {
readonly retainContextWhenHidden?: boolean;
}
/**
* @internal
*/
export const enum WebviewContentState {
Readonly = 1,
Unchanged = 2,
Dirty = 3,
}
export interface CodeLens {
range: IRange;

View file

@ -889,26 +889,89 @@ declare module 'vscode' {
//#region Custom editors, mjbvz
export interface WebviewEditor extends WebviewPanel {
/**
*
*/
interface WebviewEditorCapabilities {
/**
* Invoked when the resource has been renamed in VS Code.
*
* This is called when the resource's new name also matches the custom editor selector.
*
* If this is not implementedor if the new resource name does not match the existing selectorthen VS Code
* will close and reopen the editor on rename.
*
* @param newResource Full path to the resource.
*
* @return Thenable that signals the save is complete.
*/
rename?(newResource: Uri): Thenable<void>;
readonly editingCapability?: WebviewEditorEditingCapability;
}
interface WebviewEditorEditingCapability {
/**
* Persist the resource.
*/
save(resource: Uri): Thenable<void>;
/**
* Called when the editor exits.
*/
hotExit(hotExitPath: Uri): Thenable<void>;
/**
* Signal to VS Code that an edit has occurred.
*
* Edits must be a json serilizable object.
*/
readonly onEdit: Event<any>;
/**
* Apply a set of edits.
*
* This is triggered on redo and when restoring a custom editor after restart. Note that is not invoked
* when `onEdit` is called as `onEdit` implies also updating the view to reflect the edit.
*
* @param edit Array of edits. Sorted from oldest to most recent.
*/
applyEdits(edits: any[]): Thenable<void>;
/**
* Undo a set of edits.
*
* This is triggered when a user undoes an edit or when revert is called on a file.
*
* @param edit Array of edits. Sorted from most recent to oldest.
*/
undoEdits(edits: any[]): Thenable<void>;
}
export interface WebviewEditorProvider {
/**
* Fills out a `WebviewEditor` for a given resource.
*
* The provider should take ownership of passed in `editor`.
* @param input Information about the resource being resolved.
* @param webview Webview being resolved. The provider should take ownership of this webview.
*
* @return Thenable to a `WebviewEditorCapabilities` indicating that the webview editor has been resolved.
* The `WebviewEditorCapabilities` defines how the custom editor interacts with VS Code.
* **Note**: `WebviewEditorCapabilities` is not actually implemented... yet!
*/
resolveWebviewEditor(
resource: Uri,
editor: WebviewEditor
): Thenable<void>;
input: {
readonly resource: Uri
},
webview: WebviewPanel,
): Thenable<WebviewEditorCapabilities>;
}
namespace window {
export function registerWebviewEditorProvider(
viewType: string,
provider: WebviewEditorProvider,
options?: WebviewPanelOptions
options?: WebviewPanelOptions,
): Disposable;
}

View file

@ -67,7 +67,7 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape {
err.name = FileSystemProviderErrorCode.FileNotADirectory;
throw err;
}
return !stat.children ? [] : stat.children.map(child => [child.name, MainThreadFileSystem._getFileType(child)]);
return !stat.children ? [] : stat.children.map(child => [child.name, MainThreadFileSystem._getFileType(child)] as [string, FileType]);
}).catch(MainThreadFileSystem._handleError);
}
@ -80,19 +80,23 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape {
}
$writeFile(uri: UriComponents, content: VSBuffer): Promise<void> {
return this._fileService.writeFile(URI.revive(uri), content).catch(MainThreadFileSystem._handleError);
return this._fileService.writeFile(URI.revive(uri), content)
.then(() => undefined).catch(MainThreadFileSystem._handleError);
}
$rename(source: UriComponents, target: UriComponents, opts: FileOverwriteOptions): Promise<void> {
return this._fileService.move(URI.revive(source), URI.revive(target), opts.overwrite).catch(MainThreadFileSystem._handleError);
return this._fileService.move(URI.revive(source), URI.revive(target), opts.overwrite)
.then(() => undefined).catch(MainThreadFileSystem._handleError);
}
$copy(source: UriComponents, target: UriComponents, opts: FileOverwriteOptions): Promise<void> {
return this._fileService.copy(URI.revive(source), URI.revive(target), opts.overwrite).catch(MainThreadFileSystem._handleError);
return this._fileService.copy(URI.revive(source), URI.revive(target), opts.overwrite)
.then(() => undefined).catch(MainThreadFileSystem._handleError);
}
$mkdir(uri: UriComponents): Promise<void> {
return this._fileService.createFolder(URI.revive(uri)).catch(MainThreadFileSystem._handleError);
return this._fileService.createFolder(URI.revive(uri))
.then(() => undefined).catch(MainThreadFileSystem._handleError);
}
$delete(uri: UriComponents, opts: FileDeleteOptions): Promise<void> {

View file

@ -168,13 +168,6 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
webview.setName(value);
}
public $setState(handle: extHostProtocol.WebviewPanelHandle, state: modes.WebviewContentState): void {
const webview = this.getWebviewInput(handle);
if (webview instanceof CustomFileEditorInput) {
webview.setState(state);
}
}
public $setIconPath(handle: extHostProtocol.WebviewPanelHandle, value: { light: UriComponents, dark: UriComponents; } | undefined): void {
const webview = this.getWebviewInput(handle);
webview.iconPath = reviveWebviewIcon(value);
@ -276,12 +269,6 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
webviewInput.webview.options = options;
webviewInput.webview.extension = extension;
if (webviewInput instanceof CustomFileEditorInput) {
webviewInput.onWillSave(e => {
e.waitUntil(this._proxy.$save(handle));
});
}
try {
await this._proxy.$resolveWebviewEditor(
webviewInput.getResource(),

View file

@ -558,7 +558,6 @@ export interface MainThreadWebviewsShape extends IDisposable {
$disposeWebview(handle: WebviewPanelHandle): void;
$reveal(handle: WebviewPanelHandle, showOptions: WebviewPanelShowOptions): void;
$setTitle(handle: WebviewPanelHandle, value: string): void;
$setState(handle: WebviewPanelHandle, state: modes.WebviewContentState): void;
$setIconPath(handle: WebviewPanelHandle, value: { light: UriComponents, dark: UriComponents } | undefined): void;
$setHtml(handle: WebviewPanelHandle, value: string): void;
@ -588,7 +587,6 @@ export interface ExtHostWebviewsShape {
$onDidDisposeWebviewPanel(handle: WebviewPanelHandle): Promise<void>;
$deserializeWebviewPanel(newWebviewHandle: WebviewPanelHandle, viewType: string, title: string, state: any, position: EditorViewColumn, options: modes.IWebviewOptions & modes.IWebviewPanelOptions): Promise<void>;
$resolveWebviewEditor(resource: UriComponents, newWebviewHandle: WebviewPanelHandle, viewType: string, title: string, position: EditorViewColumn, options: modes.IWebviewOptions & modes.IWebviewPanelOptions): Promise<void>;
$save(handle: WebviewPanelHandle): Promise<boolean>;
}
export interface MainThreadUrlsShape extends IDisposable {

View file

@ -12,6 +12,7 @@ import { ExtHostDocumentData, setWordDefinitionFor } from 'vs/workbench/api/comm
import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors';
import * as TypeConverters from 'vs/workbench/api/common/extHostTypeConverters';
import * as vscode from 'vscode';
import { assertIsDefined } from 'vs/base/common/types';
export class ExtHostDocuments implements ExtHostDocumentsShape {
@ -84,7 +85,7 @@ export class ExtHostDocuments implements ExtHostDocumentsShape {
if (!promise) {
promise = this._proxy.$tryOpenDocument(uri).then(() => {
this._documentLoader.delete(uri.toString());
return this._documentsAndEditors.getDocument(uri);
return assertIsDefined(this._documentsAndEditors.getDocument(uri));
}, err => {
this._documentLoader.delete(uri.toString());
return Promise.reject(err);

View file

@ -91,7 +91,7 @@ export class ExtHostWebview implements vscode.Webview {
}
}
export class ExtHostWebviewEditor implements vscode.WebviewEditor {
export class ExtHostWebviewEditor implements vscode.WebviewPanel {
private readonly _handle: WebviewPanelHandle;
private readonly _proxy: MainThreadWebviewsShape;
@ -223,18 +223,6 @@ export class ExtHostWebviewEditor implements vscode.WebviewEditor {
this._visible = value;
}
private readonly _onWillSave = new Emitter<{ waitUntil: (thenable: Thenable<boolean>) => void }>();
public readonly onWillSave = this._onWillSave.event;
async _save(): Promise<boolean> {
const waitingOn: Thenable<boolean>[] = [];
this._onWillSave.fire({
waitUntil: (thenable: Thenable<boolean>): void => { waitingOn.push(thenable); },
});
const result = await Promise.all(waitingOn);
return result.every(x => x);
}
public postMessage(message: any): Promise<boolean> {
this.assertNotDisposed();
return this._proxy.$postMessage(this._handle, message);
@ -434,15 +422,7 @@ export class ExtHostWebviews implements ExtHostWebviewsShape {
const webview = new ExtHostWebview(handle, this._proxy, options, this.initData, this.workspace, extension);
const revivedPanel = new ExtHostWebviewEditor(handle, this._proxy, viewType, title, typeof position === 'number' && position >= 0 ? typeConverters.ViewColumn.to(position) : undefined, options, webview);
this._webviewPanels.set(handle, revivedPanel);
return Promise.resolve(provider.resolveWebviewEditor(URI.revive(resource), revivedPanel));
}
async $save(handle: WebviewPanelHandle): Promise<boolean> {
const panel = this.getWebviewPanel(handle);
if (panel) {
return panel._save();
}
return false;
await Promise.resolve(provider.resolveWebviewEditor({ resource: URI.revive(resource) }, revivedPanel));
}
}

View file

@ -383,7 +383,7 @@ export class ExtHostDebugService implements IExtHostDebugService, ExtHostDebugSe
public async $substituteVariables(folderUri: UriComponents | undefined, config: IConfig): Promise<IConfig> {
if (!this._variableResolver) {
const [workspaceFolders, configProvider] = await Promise.all([this._workspaceService.getWorkspaceFolders2(), this._configurationService.getConfigProvider()]);
this._variableResolver = new ExtHostVariableResolverService(workspaceFolders || [], this._editorsService, configProvider);
this._variableResolver = new ExtHostVariableResolverService(workspaceFolders || [], this._editorsService, configProvider!);
}
let ws: IWorkspaceFolder | undefined;
const folder = await this.getFolder(folderUri);
@ -783,7 +783,7 @@ export class ExtHostDebugService implements IExtHostDebugService, ExtHostDebugSe
}
return undefined;
}),
new Promise((resolve, reject) => {
new Promise<never>((resolve, reject) => {
const timeout = setTimeout(() => {
clearTimeout(timeout);
reject(new Error('timeout'));

View file

@ -72,6 +72,7 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
return nativeProcessSend.apply(process, args);
}
mainThreadConsole.$logExtensionHostMessage(args[0]);
return false;
};
}

View file

@ -186,7 +186,7 @@ body.web {
}
.monaco-workbench .select-container:after {
content: "\f11e";
content: "\eab4";
font-family: codicon;
font-size: 14px;
width: 14px;

View file

@ -90,10 +90,11 @@
.monaco-workbench .part.statusbar > .items-container > .statusbar-item > a {
cursor: pointer;
display: inline-block;
display: flex;
height: 100%;
padding: 0 5px 0 5px;
white-space: pre; /* gives some degree of styling */
align-items: center
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item > a:hover {

View file

@ -108,7 +108,7 @@ class InstallAction extends Action {
promisify(cp.exec)(command, {})
.then(undefined, _ => Promise.reject(new Error(nls.localize('cantCreateBinFolder', "Unable to create '/usr/local/bin'."))))
.then(resolve, reject);
.then(() => resolve(), reject);
break;
case 1 /* Cancel */:
reject(new Error(nls.localize('aborted', "Aborted")));
@ -175,7 +175,7 @@ class UninstallAction extends Action {
promisify(cp.exec)(command, {})
.then(undefined, _ => Promise.reject(new Error(nls.localize('cantUninstall', "Unable to uninstall the shell command '{0}'.", this.target))))
.then(resolve, reject);
.then(() => resolve(), reject);
break;
case 1 /* Cancel */:
reject(new Error(nls.localize('aborted', "Aborted")));

View file

@ -4,28 +4,23 @@
*--------------------------------------------------------------------------------------------*/
import { memoize } from 'vs/base/common/decorators';
import { Emitter } from 'vs/base/common/event';
import { Lazy } from 'vs/base/common/lazy';
import { UnownedDisposable } from 'vs/base/common/lifecycle';
import { Schemas } from 'vs/base/common/network';
import { basename } from 'vs/base/common/path';
import { DataUri, isEqual } from 'vs/base/common/resources';
import { URI } from 'vs/base/common/uri';
import { WebviewContentState } from 'vs/editor/common/modes';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { ILabelService } from 'vs/platform/label/common/label';
import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
import { ConfirmResult, IEditorInput, Verbosity } from 'vs/workbench/common/editor';
import { IEditorInput, Verbosity } from 'vs/workbench/common/editor';
import { WebviewEditorOverlay } from 'vs/workbench/contrib/webview/browser/webview';
import { IWebviewWorkbenchService, LazilyResolvedWebviewEditorInput } from 'vs/workbench/contrib/webview/browser/webviewWorkbenchService';
import { promptSave } from 'vs/workbench/services/textfile/browser/textFileService';
export class CustomFileEditorInput extends LazilyResolvedWebviewEditorInput {
public static typeId = 'workbench.editors.webviewEditor';
private readonly _editorResource: URI;
private _state = WebviewContentState.Readonly;
constructor(
resource: URI,
@ -34,7 +29,6 @@ export class CustomFileEditorInput extends LazilyResolvedWebviewEditorInput {
webview: Lazy<UnownedDisposable<WebviewEditorOverlay>>,
@ILifecycleService lifecycleService: ILifecycleService,
@IWebviewWorkbenchService webviewWorkbenchService: IWebviewWorkbenchService,
@IDialogService private readonly dialogService: IDialogService,
@ILabelService private readonly labelService: ILabelService,
) {
super(id, viewType, '', webview, webviewWorkbenchService, lifecycleService);
@ -111,35 +105,4 @@ export class CustomFileEditorInput extends LazilyResolvedWebviewEditorInput {
return this.longTitle;
}
}
public setState(newState: WebviewContentState): void {
this._state = newState;
this._onDidChangeDirty.fire();
}
public isDirty() {
return this._state === WebviewContentState.Dirty;
}
public async confirmSave(): Promise<ConfirmResult> {
if (!this.isDirty()) {
return ConfirmResult.DONT_SAVE;
}
return promptSave(this.dialogService, [this.getResource()]);
}
public async save(): Promise<boolean> {
if (!this.isDirty) {
return true;
}
const waitingOn: Promise<boolean>[] = [];
this._onWillSave.fire({
waitUntil: (thenable: Promise<boolean>): void => { waitingOn.push(thenable); },
});
const result = await Promise.all(waitingOn);
return result.every(x => x);
}
private readonly _onWillSave = this._register(new Emitter<{ waitUntil: (thenable: Thenable<boolean>) => void }>());
public readonly onWillSave = this._onWillSave.event;
}

View file

@ -1305,7 +1305,7 @@ export class SettingsEditor2 extends BaseEditor {
private _filterOrSearchPreferencesModel(filter: string, model: ISettingsEditorModel, provider?: ISearchProvider, token?: CancellationToken): Promise<ISearchResult | null> {
const searchP = provider ? provider.searchModel(model, token) : Promise.resolve(null);
return searchP
.then<ISearchResult>(null, err => {
.then<ISearchResult, ISearchResult | null>(undefined, err => {
if (isPromiseCanceledError(err)) {
return Promise.reject(err);
} else {
@ -1321,7 +1321,7 @@ export class SettingsEditor2 extends BaseEditor {
this.telemetryService.publicLog('settingsEditor.searchError', { message, filter });
this.logService.info('Setting search error: ' + message);
}
return Promise.resolve(null);
return null;
}
});
}

View file

@ -2033,10 +2033,10 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
}
});
const timeout: boolean = await Promise.race([new Promise(async (resolve) => {
const timeout: boolean = await Promise.race([new Promise<boolean>(async (resolve) => {
await _createEntries;
resolve(false);
}), new Promise((resolve) => {
}), new Promise<boolean>((resolve) => {
const timer = setTimeout(() => {
clearTimeout(timer);
resolve(true);
@ -2560,10 +2560,10 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
});
});
const timeout: boolean = await Promise.race([new Promise(async (resolve) => {
const timeout: boolean = await Promise.race([new Promise<boolean>(async (resolve) => {
await entries;
resolve(false);
}), new Promise((resolve) => {
}), new Promise<boolean>((resolve) => {
const timer = setTimeout(() => {
clearTimeout(timer);
resolve(true);

View file

@ -74,18 +74,21 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
if (!stat.isDirectory()) {
return Promise.reject(SHELL_CWD_INVALID_EXIT_CODE);
}
return undefined;
}, async err => {
if (err && err.code === 'ENOENT') {
// So we can include in the error message the specified CWD
shellLaunchConfig.cwd = cwd;
return Promise.reject(SHELL_CWD_INVALID_EXIT_CODE);
}
return undefined;
});
const executableVerification = stat(shellLaunchConfig.executable!).then(async stat => {
if (!stat.isFile() && !stat.isSymbolicLink()) {
return Promise.reject(stat.isDirectory() ? SHELL_PATH_DIRECTORY_EXIT_CODE : SHELL_PATH_INVALID_EXIT_CODE);
}
return undefined;
}, async (err) => {
if (err && err.code === 'ENOENT') {
let cwd = shellLaunchConfig.cwd instanceof URI ? shellLaunchConfig.cwd.path : shellLaunchConfig.cwd!;
@ -96,6 +99,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
return Promise.reject(SHELL_PATH_INVALID_EXIT_CODE);
}
}
return undefined;
});
Promise.all([cwdVerification, executableVerification]).then(() => {

View file

@ -81,9 +81,7 @@ export class ReleaseNotesManager {
{
tryRestoreScrollPosition: true,
enableFindWidget: true,
localResourceRoots: [
URI.parse(require.toUrl('./media'))
]
localResourceRoots: []
},
undefined);

View file

@ -111,7 +111,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
let result: DeltaExtensionsResult;
// local: only enabled and web'ish extension
localExtensions = localExtensions.filter(ext => this._isEnabled(ext) && canExecuteOnWeb(ext, this._productService, this._configService));
localExtensions = localExtensions!.filter(ext => this._isEnabled(ext) && canExecuteOnWeb(ext, this._productService, this._configService));
this._checkEnableProposedApi(localExtensions);
if (!remoteEnv) {

View file

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { ITelemetryService, ITelemetryInfo, ITelemetryData } from 'vs/platform/telemetry/common/telemetry';
import { NullTelemetryService, combinedAppender, LogAppender, ITelemetryAppender, validateTelemetryData } from 'vs/platform/telemetry/common/telemetryUtils';
import { NullTelemetryService, combinedAppender, LogAppender, ITelemetryAppender } from 'vs/platform/telemetry/common/telemetryUtils';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { Disposable } from 'vs/base/common/lifecycle';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
@ -22,13 +22,8 @@ export class WebTelemetryAppender implements ITelemetryAppender {
constructor(private _logService: ILogService, private _appender: IRemoteAgentService) { }
log(eventName: string, data: any): void {
data = validateTelemetryData(data);
this._logService.trace(`telemetry/${eventName}`, data);
this._appender.logTelemetry(eventName, {
properties: data.properties,
measurements: data.measurements
});
this._appender.logTelemetry(eventName, data);
}
flush(): Promise<void> {