From 8472ca94896efeccf2abd80b330e183b7dd82c11 Mon Sep 17 00:00:00 2001 From: Malige Julien Date: Wed, 26 Sep 2018 11:25:45 +0200 Subject: [PATCH 001/710] PreserveCase visual component --- src/vs/editor/contrib/find/findWidget.css | 26 +++++++++++++++++++ src/vs/editor/contrib/find/findWidget.ts | 21 +++++++++++++++ .../find/images/preserve-case-dark.svg | 1 + .../contrib/find/images/preserve-case.svg | 1 + 4 files changed, 49 insertions(+) create mode 100644 src/vs/editor/contrib/find/images/preserve-case-dark.svg create mode 100644 src/vs/editor/contrib/find/images/preserve-case.svg diff --git a/src/vs/editor/contrib/find/findWidget.css b/src/vs/editor/contrib/find/findWidget.css index faf3f7efe98..8c570d5977a 100644 --- a/src/vs/editor/contrib/find/findWidget.css +++ b/src/vs/editor/contrib/find/findWidget.css @@ -83,6 +83,11 @@ width: 100% !important; padding-right: 66px; } + +.monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .input { + padding-right: 22px; +} + .monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input, .monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .input { padding-top: 2px; @@ -215,6 +220,10 @@ background-image: url('images/expando-collapsed.svg'); } +.monaco-editor .find-widget .preserve-case { + background: url('images/preserve-case.svg') center center no-repeat; +} + .monaco-editor .find-widget .replace { background-image: url('images/replace.svg'); } @@ -228,12 +237,19 @@ } .monaco-editor .find-widget > .replace-part > .replace-input { + position: relative; display: flex; display: -webkit-flex; vertical-align: middle; width: auto !important; } +.monaco-editor .find-widget > .replace-part > .replace-input > .controls { + position: absolute; + top: 3px; + right: 2px; +} + /* REDUCED */ .monaco-editor .find-widget.reduced-find-widget .matchesCount, .monaco-editor .find-widget.reduced-find-widget .monaco-checkbox { @@ -306,6 +322,16 @@ background-image: url('images/close-dark.svg'); } +.monaco-editor.hc-black .find-widget .preserve-case-dark, +.monaco-editor.vs-dark .find-widget .preserve-case-dark { + background-image: url('images/preserve-case-dark.svg'); +} + +.monaco-editor.hc-black .find-widget .preserve-case, +.monaco-editor.vs-dark .find-widget .preserve-case { + background: url('images/preserve-case-dark.svg') center center no-repeat; +} + .monaco-editor.hc-black .find-widget .replace, .monaco-editor.vs-dark .find-widget .replace { background-image: url('images/replace-inverse.svg'); diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index a86d207d76a..7c39aedfbf9 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -18,6 +18,7 @@ import { FindInput, IFindInputStyles } from 'vs/base/browser/ui/findinput/findIn import { IMessage as InputBoxMessage, HistoryInputBox } from 'vs/base/browser/ui/inputbox/inputBox'; import { Widget } from 'vs/base/browser/ui/widget'; import { Sash, IHorizontalSashLayoutProvider, ISashEvent, Orientation } from 'vs/base/browser/ui/sash/sash'; +import { Checkbox } from 'vs/base/browser/ui/checkbox/checkbox'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; import { FIND_IDS, MATCHES_LIMIT, CONTEXT_FIND_INPUT_FOCUSED, CONTEXT_REPLACE_INPUT_FOCUSED } from 'vs/editor/contrib/find/findModel'; @@ -45,6 +46,7 @@ const NLS_TOGGLE_SELECTION_FIND_TITLE = nls.localize('label.toggleSelectionFind' const NLS_CLOSE_BTN_LABEL = nls.localize('label.closeButton', "Close"); const NLS_REPLACE_INPUT_LABEL = nls.localize('label.replace', "Replace"); const NLS_REPLACE_INPUT_PLACEHOLDER = nls.localize('placeholder.replace', "Replace"); +const NLS_PRESERVE_CASE_LABEL = nls.localize('label.preserveCaseCheckbox', "Preserve Case"); const NLS_REPLACE_BTN_LABEL = nls.localize('label.replaceButton', "Replace"); const NLS_REPLACE_ALL_BTN_LABEL = nls.localize('label.replaceAllButton', "Replace All"); const NLS_TOGGLE_REPLACE_MODE_BTN_LABEL = nls.localize('label.toggleReplaceButton', "Toggle Replace mode"); @@ -99,6 +101,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas private _nextBtn: SimpleButton; private _toggleSelectionFind: SimpleCheckbox; private _closeBtn: SimpleButton; + private _preserveCase: Checkbox; private _replaceBtn: SimpleButton; private _replaceAllBtn: SimpleButton; @@ -862,6 +865,18 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._state.change({ replaceString: this._replaceInputBox.value }, false); })); + this._preserveCase = this._register(new Checkbox({ + actionClassName: 'preserve-case', + title: NLS_PRESERVE_CASE_LABEL, + isChecked: false + })); + this._preserveCase.checked = !!this._state.preserveCase; + this._register(this._preserveCase.onChange(viaKeyboard => { + if (!viaKeyboard) { + this._replaceInputBox.focus(); + } + })); + // Replace one button this._replaceBtn = this._register(new SimpleButton({ label: NLS_REPLACE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceOneAction), @@ -886,6 +901,12 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas } })); + let controls = document.createElement('div'); + controls.className = 'controls'; + controls.style.display = 'block'; + controls.appendChild(this._preserveCase.domNode); + replaceInput.appendChild(controls); + let replacePart = document.createElement('div'); replacePart.className = 'replace-part'; replacePart.appendChild(replaceInput); diff --git a/src/vs/editor/contrib/find/images/preserve-case-dark.svg b/src/vs/editor/contrib/find/images/preserve-case-dark.svg new file mode 100644 index 00000000000..ae540172027 --- /dev/null +++ b/src/vs/editor/contrib/find/images/preserve-case-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/editor/contrib/find/images/preserve-case.svg b/src/vs/editor/contrib/find/images/preserve-case.svg new file mode 100644 index 00000000000..1f3b1a2c57e --- /dev/null +++ b/src/vs/editor/contrib/find/images/preserve-case.svg @@ -0,0 +1 @@ + \ No newline at end of file From 73af37ceefee11038a1e6aeac16163e7f62dbb67 Mon Sep 17 00:00:00 2001 From: Malige Julien Date: Tue, 9 Oct 2018 14:06:29 +0200 Subject: [PATCH 002/710] Build ReplaceString preserving case --- src/vs/editor/contrib/find/findController.ts | 14 +++++++++++-- src/vs/editor/contrib/find/findModel.ts | 5 +++-- src/vs/editor/contrib/find/findState.ts | 21 ++++++++++++++++++++ src/vs/editor/contrib/find/findWidget.ts | 3 ++- src/vs/editor/contrib/find/replacePattern.ts | 17 ++++++++++++++-- 5 files changed, 53 insertions(+), 7 deletions(-) diff --git a/src/vs/editor/contrib/find/findController.ts b/src/vs/editor/contrib/find/findController.ts index c633e761e24..ccf388a4b7f 100644 --- a/src/vs/editor/contrib/find/findController.ts +++ b/src/vs/editor/contrib/find/findController.ts @@ -109,7 +109,8 @@ export class CommonFindController extends Disposable implements editorCommon.IEd searchScope: null, matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, false), wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, false), - isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, false) + isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, false), + preserveCase: this._storageService.getBoolean('editor.preserveCase', StorageScope.WORKSPACE, false) }, false); if (shouldRestartFind) { @@ -167,13 +168,17 @@ export class CommonFindController extends Disposable implements editorCommon.IEd if (e.matchCase) { this._storageService.store('editor.matchCase', this._state.actualMatchCase, StorageScope.WORKSPACE); } + if (e.preserveCase) { + this._storageService.store('editor.preserveCase', this._state.actualPreserveCase, StorageScope.WORKSPACE); + } } private loadQueryState() { this._state.change({ matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, this._state.matchCase), wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, this._state.wholeWord), - isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, this._state.isRegex) + isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, this._state.isRegex), + preserveCase: this._storageService.getBoolean('editor.preserveCase', StorageScope.WORKSPACE, this._state.preserveCase) }, false); } @@ -214,6 +219,11 @@ export class CommonFindController extends Disposable implements editorCommon.IEd } } + public togglePreserveCase(): void { + this._state.change({ preserveCase: !this._state.preserveCase }, false); + this.highlightFindOptions(); + } + public toggleSearchScope(): void { if (this._state.searchScope) { this._state.change({ searchScope: null }, true); diff --git a/src/vs/editor/contrib/find/findModel.ts b/src/vs/editor/contrib/find/findModel.ts index b5b4102a821..bac233753a8 100644 --- a/src/vs/editor/contrib/find/findModel.ts +++ b/src/vs/editor/contrib/find/findModel.ts @@ -59,6 +59,7 @@ export const FIND_IDS = { ToggleWholeWordCommand: 'toggleFindWholeWord', ToggleRegexCommand: 'toggleFindRegex', ToggleSearchScopeCommand: 'toggleFindInSelection', + TogglePreserveCaseCommand: 'togglePreserveCase', ReplaceOneAction: 'editor.action.replaceOne', ReplaceAllAction: 'editor.action.replaceAll', SelectAllMatchesAction: 'editor.action.selectAllMatches' @@ -417,11 +418,11 @@ export class FindModelBoundToEditorModel { let replacePattern = this._getReplacePattern(); let selection = this._editor.getSelection(); - let nextMatch = this._getNextMatch(selection.getStartPosition(), replacePattern.hasReplacementPatterns, false); + let nextMatch = this._getNextMatch(selection.getStartPosition(), true, false); if (nextMatch) { if (selection.equalsRange(nextMatch.range)) { // selection sits on a find match => replace it! - let replaceString = replacePattern.buildReplaceString(nextMatch.matches); + let replaceString = replacePattern.buildReplaceString(nextMatch.matches, this._state.preserveCase); let command = new ReplaceCommand(selection, replaceString); diff --git a/src/vs/editor/contrib/find/findState.ts b/src/vs/editor/contrib/find/findState.ts index 35ff1e4dbf5..6be950fbb53 100644 --- a/src/vs/editor/contrib/find/findState.ts +++ b/src/vs/editor/contrib/find/findState.ts @@ -18,6 +18,7 @@ export interface FindReplaceStateChangedEvent { isRegex: boolean; wholeWord: boolean; matchCase: boolean; + preserveCase: boolean; searchScope: boolean; matchesPosition: boolean; matchesCount: boolean; @@ -41,6 +42,8 @@ export interface INewFindReplaceState { wholeWordOverride?: FindOptionOverride; matchCase?: boolean; matchCaseOverride?: FindOptionOverride; + preserveCase?: boolean; + preserveCaseOverride?: FindOptionOverride; searchScope?: Range; } @@ -65,6 +68,8 @@ export class FindReplaceState implements IDisposable { private _wholeWordOverride: FindOptionOverride; private _matchCase: boolean; private _matchCaseOverride: FindOptionOverride; + private _preserveCase: boolean; + private _preserveCaseOverride: FindOptionOverride; private _searchScope: Range | null; private _matchesPosition: number; private _matchesCount: number; @@ -78,10 +83,12 @@ export class FindReplaceState implements IDisposable { public get isRegex(): boolean { return effectiveOptionValue(this._isRegexOverride, this._isRegex); } public get wholeWord(): boolean { return effectiveOptionValue(this._wholeWordOverride, this._wholeWord); } public get matchCase(): boolean { return effectiveOptionValue(this._matchCaseOverride, this._matchCase); } + public get preserveCase(): boolean { return effectiveOptionValue(this._preserveCaseOverride, this._preserveCase); } public get actualIsRegex(): boolean { return this._isRegex; } public get actualWholeWord(): boolean { return this._wholeWord; } public get actualMatchCase(): boolean { return this._matchCase; } + public get actualPreserveCase(): boolean { return this._preserveCase; } public get searchScope(): Range | null { return this._searchScope; } public get matchesPosition(): number { return this._matchesPosition; } @@ -100,6 +107,8 @@ export class FindReplaceState implements IDisposable { this._wholeWordOverride = FindOptionOverride.NotSet; this._matchCase = false; this._matchCaseOverride = FindOptionOverride.NotSet; + this._preserveCase = false; + this._preserveCaseOverride = FindOptionOverride.NotSet; this._searchScope = null; this._matchesPosition = 0; this._matchesCount = 0; @@ -121,6 +130,7 @@ export class FindReplaceState implements IDisposable { isRegex: false, wholeWord: false, matchCase: false, + preserveCase: false, searchScope: false, matchesPosition: false, matchesCount: false, @@ -170,6 +180,7 @@ export class FindReplaceState implements IDisposable { isRegex: false, wholeWord: false, matchCase: false, + preserveCase: false, searchScope: false, matchesPosition: false, matchesCount: false, @@ -180,6 +191,7 @@ export class FindReplaceState implements IDisposable { const oldEffectiveIsRegex = this.isRegex; const oldEffectiveWholeWords = this.wholeWord; const oldEffectiveMatchCase = this.matchCase; + const oldEffectivePreserveCase = this.preserveCase; if (typeof newState.searchString !== 'undefined') { if (this._searchString !== newState.searchString) { @@ -218,6 +230,9 @@ export class FindReplaceState implements IDisposable { if (typeof newState.matchCase !== 'undefined') { this._matchCase = newState.matchCase; } + if (typeof newState.preserveCase !== 'undefined') { + this._preserveCase = newState.preserveCase; + } if (typeof newState.searchScope !== 'undefined') { if (!Range.equalsRange(this._searchScope, newState.searchScope)) { this._searchScope = newState.searchScope; @@ -230,6 +245,7 @@ export class FindReplaceState implements IDisposable { this._isRegexOverride = (typeof newState.isRegexOverride !== 'undefined' ? newState.isRegexOverride : FindOptionOverride.NotSet); this._wholeWordOverride = (typeof newState.wholeWordOverride !== 'undefined' ? newState.wholeWordOverride : FindOptionOverride.NotSet); this._matchCaseOverride = (typeof newState.matchCaseOverride !== 'undefined' ? newState.matchCaseOverride : FindOptionOverride.NotSet); + this._preserveCaseOverride = (typeof newState.preserveCaseOverride !== 'undefined' ? newState.preserveCaseOverride : FindOptionOverride.NotSet); if (oldEffectiveIsRegex !== this.isRegex) { somethingChanged = true; @@ -244,6 +260,11 @@ export class FindReplaceState implements IDisposable { changeEvent.matchCase = true; } + if (oldEffectivePreserveCase !== this.preserveCase) { + somethingChanged = true; + changeEvent.preserveCase = true; + } + if (somethingChanged) { this._onFindReplaceStateChange.fire(changeEvent); } diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index 7c39aedfbf9..bfb2a5cfdc1 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -868,11 +868,12 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._preserveCase = this._register(new Checkbox({ actionClassName: 'preserve-case', title: NLS_PRESERVE_CASE_LABEL, - isChecked: false + isChecked: false, })); this._preserveCase.checked = !!this._state.preserveCase; this._register(this._preserveCase.onChange(viaKeyboard => { if (!viaKeyboard) { + this._state.change({ preserveCase: !this._state.preserveCase }, false); this._replaceInputBox.focus(); } })); diff --git a/src/vs/editor/contrib/find/replacePattern.ts b/src/vs/editor/contrib/find/replacePattern.ts index 3bd09a78e2d..c881a4e0330 100644 --- a/src/vs/editor/contrib/find/replacePattern.ts +++ b/src/vs/editor/contrib/find/replacePattern.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { CharCode } from 'vs/base/common/charCode'; +import { containsUppercaseCharacter } from 'vs/base/common/strings'; const enum ReplacePatternKind { StaticValue = 0, @@ -48,9 +49,21 @@ export class ReplacePattern { } } - public buildReplaceString(matches: string[] | null): string { + public buildReplaceString(matches: string[] | null, preserveCase?: boolean): string { if (this._state.kind === ReplacePatternKind.StaticValue) { - return this._state.staticValue; + if (preserveCase && matches && matches[0]) { + if (matches[0].toUpperCase() === matches[0]) { + return this._state.staticValue.toUpperCase(); + } else if (matches[0].toLowerCase() === matches[0]) { + return this._state.staticValue.toLowerCase(); + } else if (containsUppercaseCharacter(matches[0][0])) { + return this._state.staticValue[0].toUpperCase() + this._state.staticValue.substr(1); + } else { + return this._state.staticValue[0].toLocaleLowerCase() + this._state.staticValue.substr(1); + } + } else { + return this._state.staticValue; + } } let result = ''; From a053f98c80b2ddc88364469dea9069a3e1134c31 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Sat, 2 Mar 2019 21:01:18 +0100 Subject: [PATCH 003/710] avoid extensionTestsLocationURI.fsPath as it normalizes path (for #69569) --- src/vs/workbench/api/node/extHostExtensionService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index cada07e1ff7..58ba2e568ef 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -5,6 +5,7 @@ import * as nls from 'vs/nls'; import * as path from 'vs/base/common/path'; +import { originalFSPath } from 'vs/base/common/resources'; import { Barrier } from 'vs/base/common/async'; import { IDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle'; import { TernarySearchTree } from 'vs/base/common/map'; @@ -614,7 +615,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { return Promise.resolve(undefined); } - const extensionTestsPath = extensionTestsLocationURI.fsPath; + const extensionTestsPath = originalFSPath(extensionTestsLocationURI); // Require the test runner via node require from the provided path let testRunner: ITestRunner | undefined; From 5d001b842b693d7dcb931f9b6518a9e5830f8eaf Mon Sep 17 00:00:00 2001 From: Dave Alongi Date: Fri, 15 Mar 2019 13:08:05 -0700 Subject: [PATCH 004/710] Extension URI Handlers: "Don't ask me again" checkbox when confirming --- .../inactiveExtensionUrlHandler.ts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/vs/workbench/services/extensions/electron-browser/inactiveExtensionUrlHandler.ts b/src/vs/workbench/services/extensions/electron-browser/inactiveExtensionUrlHandler.ts index 2713af6dad8..b44c3ddc468 100644 --- a/src/vs/workbench/services/extensions/electron-browser/inactiveExtensionUrlHandler.ts +++ b/src/vs/workbench/services/extensions/electron-browser/inactiveExtensionUrlHandler.ts @@ -22,6 +22,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; const FIVE_MINUTES = 5 * 60 * 1000; const THIRTY_SECONDS = 30 * 1000; const URL_TO_HANDLE = 'extensionUrlHandler.urlToHandle'; +const CONFIRMED_EXTENSIONS_STORAGE_KEY = 'extensionUrlHandler.confirmedExtensions'; function isExtensionId(value: string): boolean { return /^[a-z0-9][a-z0-9\-]*\.[a-z0-9][a-z0-9\-]*$/i.test(value); @@ -90,6 +91,9 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { return true; } + const confirmedExtensionIds = this.getConfirmedExtensionIds(); + confirmed = confirmed || confirmedExtensionIds.indexOf(ExtensionIdentifier.toKey(extensionId)) >= 0; + if (!confirmed) { let uriString = uri.toString(); @@ -99,6 +103,9 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { const result = await this.dialogService.confirm({ message: localize('confirmUrl', "Allow an extension to open this URL?", extensionId), + checkbox: { + label: localize('rememberConfirmUrl', "Don't ask again for this extension."), + }, detail: `${extension.displayName || extension.name} (${extensionId}) wants to open a URL:\n\n${uriString}`, primaryButton: localize('open', "&&Open"), type: 'question' @@ -107,6 +114,14 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { if (!result.confirmed) { return true; } + + if (result.checkboxChecked) { + this.storageService.store( + CONFIRMED_EXTENSIONS_STORAGE_KEY, + JSON.stringify([...confirmedExtensionIds, ExtensionIdentifier.toKey(extensionId)]), + StorageScope.GLOBAL, + ); + } } const handler = this.extensionHandlers.get(ExtensionIdentifier.toKey(extensionId)); @@ -153,6 +168,15 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { this.extensionHandlers.delete(ExtensionIdentifier.toKey(extensionId)); } + private getConfirmedExtensionIds(): Array { + const ignoredExtensions = this.storageService.get(CONFIRMED_EXTENSIONS_STORAGE_KEY, StorageScope.GLOBAL, '[]'); + try { + return JSON.parse(ignoredExtensions); + } catch (err) { + return []; + } + } + private async handleUnhandledURL(uri: URI, extensionIdentifier: IExtensionIdentifier): Promise { const installedExtensions = await this.extensionManagementService.getInstalled(); const extension = installedExtensions.filter(e => areSameExtensions(e.identifier, extensionIdentifier))[0]; From 8d1eb98d69cad195b70c48d2d4a0b10829d36955 Mon Sep 17 00:00:00 2001 From: Dave Alongi Date: Wed, 20 Mar 2019 10:28:34 -0700 Subject: [PATCH 005/710] Additionally honor a configuration setting --- .../extensions.contribution.ts | 5 ++ .../common/inactiveExtensionUrlHandler.ts | 67 ++++++++++++++----- 2 files changed, 56 insertions(+), 16 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts index 73d6f8953f0..19efc2fd429 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts @@ -240,6 +240,11 @@ Registry.as(ConfigurationExtensions.Configuration) type: 'boolean', description: localize('extensionsCloseExtensionDetailsOnViewChange', "When enabled, editors with extension details will be automatically closed upon navigating away from the Extensions View."), default: false + }, + 'extensions.confirmedUriHandlerExtensionIds': { + type: 'array', + description: localize('handleUriConfirmedExtensions', "When extensions are listed here, a confirmation prompt will not be required before that extension can handle a URI."), + default: [] } } }); diff --git a/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts b/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts index ddb7f8e90e8..edba464569d 100644 --- a/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts +++ b/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts @@ -7,6 +7,7 @@ import { localize } from 'vs/nls'; import { Action } from 'vs/base/common/actions'; import { IDisposable, combinedDisposable, toDisposable } from 'vs/base/common/lifecycle'; import { URI } from 'vs/base/common/uri'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { EnablementState, IExtensionEnablementService, IExtensionGalleryService, IExtensionIdentifier, IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; @@ -22,6 +23,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; const FIVE_MINUTES = 5 * 60 * 1000; const THIRTY_SECONDS = 30 * 1000; const URL_TO_HANDLE = 'extensionUrlHandler.urlToHandle'; +const CONFIRMED_EXTENSIONS_CONFIGURATION_KEY = 'extensions.confirmedUriHandlerExtensionIds'; const CONFIRMED_EXTENSIONS_STORAGE_KEY = 'extensionUrlHandler.confirmedExtensions'; function isExtensionId(value: string): boolean { @@ -62,7 +64,9 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, @IWindowService private readonly windowService: IWindowService, @IExtensionGalleryService private readonly galleryService: IExtensionGalleryService, - @IStorageService private readonly storageService: IStorageService + @IStorageService private readonly storageService: IStorageService, + @IConfigurationService private readonly configurationService: IConfigurationService + ) { const interval = setInterval(() => this.garbageCollect(), THIRTY_SECONDS); const urlToHandleValue = this.storageService.get(URL_TO_HANDLE, StorageScope.WORKSPACE); @@ -92,7 +96,7 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { } const confirmedExtensionIds = this.getConfirmedExtensionIds(); - confirmed = confirmed || confirmedExtensionIds.indexOf(ExtensionIdentifier.toKey(extensionId)) >= 0; + confirmed = confirmed || confirmedExtensionIds.has(ExtensionIdentifier.toKey(extensionId)); if (!confirmed) { let uriString = uri.toString(); @@ -116,11 +120,7 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { } if (result.checkboxChecked) { - this.storageService.store( - CONFIRMED_EXTENSIONS_STORAGE_KEY, - JSON.stringify([...confirmedExtensionIds, ExtensionIdentifier.toKey(extensionId)]), - StorageScope.GLOBAL, - ); + this.addConfirmedExtensionIdToStorage(extensionId); } } @@ -168,15 +168,6 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { this.extensionHandlers.delete(ExtensionIdentifier.toKey(extensionId)); } - private getConfirmedExtensionIds(): Array { - const ignoredExtensions = this.storageService.get(CONFIRMED_EXTENSIONS_STORAGE_KEY, StorageScope.GLOBAL, '[]'); - try { - return JSON.parse(ignoredExtensions); - } catch (err) { - return []; - } - } - private async handleUnhandledURL(uri: URI, extensionIdentifier: IExtensionIdentifier): Promise { const installedExtensions = await this.extensionManagementService.getInstalled(); const extension = installedExtensions.filter(e => areSameExtensions(e.identifier, extensionIdentifier))[0]; @@ -290,6 +281,50 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { this.uriBuffer = uriBuffer; } + private getConfirmedExtensionIds(): Set { + return new Set([ + ...this.getConfirmedExtensionIdsFromStorage(), + ...this.getConfirmedExtensionIdsFromConfiguration(), + ].map( + extensionId => ExtensionIdentifier.toKey(extensionId) + )); + } + + private getConfirmedExtensionIdsFromConfiguration(): Array { + const confirmedExtensionIds = this.configurationService.getValue>( + CONFIRMED_EXTENSIONS_CONFIGURATION_KEY + ); + if (!Array.isArray(confirmedExtensionIds)) { + return []; + } + + return confirmedExtensionIds; + } + + private getConfirmedExtensionIdsFromStorage(): Array { + const confirmedExtensionIdsJson = this.storageService.get( + CONFIRMED_EXTENSIONS_STORAGE_KEY, + StorageScope.GLOBAL, + '[]', + ); + try { + return JSON.parse(confirmedExtensionIdsJson); + } catch (err) { + return []; + } + } + private addConfirmedExtensionIdToStorage(extensionId: string): void { + const existingConfirmedExtensionIds = this.getConfirmedExtensionIdsFromStorage(); + this.storageService.store( + CONFIRMED_EXTENSIONS_STORAGE_KEY, + JSON.stringify([ + ...existingConfirmedExtensionIds, + ExtensionIdentifier.toKey(extensionId), + ]), + StorageScope.GLOBAL, + ); + } + dispose(): void { this.disposable.dispose(); this.extensionHandlers.clear(); From 6ae15bb89542dcce780536b4ab865445a93f1a06 Mon Sep 17 00:00:00 2001 From: Dave Alongi Date: Wed, 20 Mar 2019 10:40:20 -0700 Subject: [PATCH 006/710] Update extensions.contribution.ts Improve description of configuration --- .../extensions/electron-browser/extensions.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts index 19efc2fd429..dc59610c50c 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts @@ -243,7 +243,7 @@ Registry.as(ConfigurationExtensions.Configuration) }, 'extensions.confirmedUriHandlerExtensionIds': { type: 'array', - description: localize('handleUriConfirmedExtensions', "When extensions are listed here, a confirmation prompt will not be required before that extension can handle a URI."), + description: localize('handleUriConfirmedExtensions', "When an extension is listed here, a confirmation prompt will not be shown when that extension handles a URI."), default: [] } } From ee8372c0c798f116b6bced5ee1b61223ec5255dd Mon Sep 17 00:00:00 2001 From: Kostya Bushuev Date: Sun, 31 Mar 2019 10:17:39 +0500 Subject: [PATCH 007/710] Fixed #71134 --- src/vs/base/browser/ui/list/listWidget.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index 0869c52c0d2..a6e058d9b67 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -330,6 +330,7 @@ export function mightProducePrintableCharacter(event: IKeyboardEvent): boolean { return (event.keyCode >= KeyCode.KEY_A && event.keyCode <= KeyCode.KEY_Z) || (event.keyCode >= KeyCode.KEY_0 && event.keyCode <= KeyCode.KEY_9) + || (event.keyCode >= KeyCode.NUMPAD_0 && event.keyCode <= KeyCode.NUMPAD_9) || (event.keyCode >= KeyCode.US_SEMICOLON && event.keyCode <= KeyCode.US_QUOTE); } From 39bbc129a019105a0a0668ae5b8243e9fb4a760a Mon Sep 17 00:00:00 2001 From: Mathieu Plourde Date: Thu, 11 Apr 2019 09:45:26 -0400 Subject: [PATCH 008/710] Add shadow root support for isInDOM By getting the "host" property when "parentNode" is undefined, the function can properly climb the DOM tree and allow monaco-editor to be used within a shadow root. --- src/vs/base/browser/dom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index ccce65e591c..0d6139deab3 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -32,7 +32,7 @@ export function isInDOM(node: Node | null): boolean { if (node === document.body) { return true; } - node = node.parentNode; + node = node.parentNode || node.host; } return false; } From 2432eb643dd5d3739cb85126adb8c21b29a08734 Mon Sep 17 00:00:00 2001 From: Mathieu Plourde Date: Sun, 14 Apr 2019 23:42:12 -0400 Subject: [PATCH 009/710] Add type assertion to prevent typescript error --- src/vs/base/browser/dom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index 0d6139deab3..756f3a3ceb8 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -32,7 +32,7 @@ export function isInDOM(node: Node | null): boolean { if (node === document.body) { return true; } - node = node.parentNode || node.host; + node = node.parentNode || (node as ShadowRoot).host; } return false; } From fb3c5da8f7b5fe32966ee72b7c60f9960e53fda8 Mon Sep 17 00:00:00 2001 From: Michael Flanagan Date: Mon, 15 Apr 2019 21:52:01 -0400 Subject: [PATCH 010/710] Fixed issue 71683 and modified test cases to match. This issue was a feature request to add 'delete all left' functionality to any selected highlighted text. The oracles to certain test cases had to be modified in order to fix this issue --- src/vs/editor/contrib/linesOperations/linesOperations.ts | 2 +- .../contrib/linesOperations/test/linesOperations.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/contrib/linesOperations/linesOperations.ts b/src/vs/editor/contrib/linesOperations/linesOperations.ts index e6984905582..9fb95158f25 100644 --- a/src/vs/editor/contrib/linesOperations/linesOperations.ts +++ b/src/vs/editor/contrib/linesOperations/linesOperations.ts @@ -581,7 +581,7 @@ export class DeleteAllLeftAction extends AbstractDeleteAllToBoundaryAction { return new Range(selection.startLineNumber, 1, selection.startLineNumber, selection.startColumn); } } else { - return selection; + return new Range(selection.startLineNumber, 1, selection.endLineNumber, selection.endColumn); } }); diff --git a/src/vs/editor/contrib/linesOperations/test/linesOperations.test.ts b/src/vs/editor/contrib/linesOperations/test/linesOperations.test.ts index 5d2ef4d0515..e9479c0f6d4 100644 --- a/src/vs/editor/contrib/linesOperations/test/linesOperations.test.ts +++ b/src/vs/editor/contrib/linesOperations/test/linesOperations.test.ts @@ -268,7 +268,7 @@ suite('Editor Contrib - Line Operations', () => { editor.setSelections([new Selection(2, 2, 2, 2), new Selection(2, 4, 2, 5)]); deleteAllLeftAction.run(null!, editor); - assert.equal(model.getLineContent(2), 'ord', '002'); + assert.equal(model.getLineContent(2), 'd', '002'); editor.setSelections([new Selection(3, 2, 3, 5), new Selection(3, 7, 3, 7)]); deleteAllLeftAction.run(null!, editor); @@ -276,11 +276,11 @@ suite('Editor Contrib - Line Operations', () => { editor.setSelections([new Selection(4, 3, 4, 3), new Selection(4, 5, 5, 4)]); deleteAllLeftAction.run(null!, editor); - assert.equal(model.getLineContent(4), 'lljour', '004'); + assert.equal(model.getLineContent(4), 'jour', '004'); editor.setSelections([new Selection(5, 3, 6, 3), new Selection(6, 5, 7, 5), new Selection(7, 7, 7, 7)]); deleteAllLeftAction.run(null!, editor); - assert.equal(model.getLineContent(5), 'horlworld', '005'); + assert.equal(model.getLineContent(5), 'world', '005'); }); }); From 474b58464c296086048ba6a9ce2e2bda94fe9f7d Mon Sep 17 00:00:00 2001 From: Dave Alongi Date: Wed, 17 Apr 2019 07:39:51 -0700 Subject: [PATCH 011/710] Fix formatting that was broken during github.com conflict resolution --- .../extensions/electron-browser/extensions.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts index 1a852603229..83a97292973 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts @@ -246,7 +246,7 @@ Registry.as(ConfigurationExtensions.Configuration) type: 'array', description: localize('handleUriConfirmedExtensions', "When an extension is listed here, a confirmation prompt will not be shown when that extension handles a URI."), default: [] - }, + }, 'extensions.extensionKind': { type: 'object', description: localize('extensions.extensionKind', "Configure ui or workspace extensions and allow them to enable locally or remotely in a remote window."), From 100cc5850adff366dd44d3a71c6ebc6d0cd3c2a0 Mon Sep 17 00:00:00 2001 From: Michael Flanagan Date: Sat, 20 Apr 2019 17:22:06 -0400 Subject: [PATCH 012/710] Added check in twitter feedback to make sure the user does not add more than the required max amount of character --- .../contrib/feedback/electron-browser/feedback.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/contrib/feedback/electron-browser/feedback.ts b/src/vs/workbench/contrib/feedback/electron-browser/feedback.ts index 7c2403d200c..864c312dd46 100644 --- a/src/vs/workbench/contrib/feedback/electron-browser/feedback.ts +++ b/src/vs/workbench/contrib/feedback/electron-browser/feedback.ts @@ -310,12 +310,6 @@ export class FeedbackDropdown extends Dropdown { }; } - private updateFeedbackDescription() { - if (this.feedbackDescriptionInput && this.feedbackDescriptionInput.textLength > this.maxFeedbackCharacters) { - this.feedbackDescriptionInput.value = this.feedbackDescriptionInput.value.substring(0, this.maxFeedbackCharacters); - } - } - private getCharCountText(charCount: number): string { const remaining = this.maxFeedbackCharacters - charCount; const text = (remaining === 1) @@ -355,7 +349,11 @@ export class FeedbackDropdown extends Dropdown { this.sentiment = smile ? 1 : 0; this.maxFeedbackCharacters = this.feedbackDelegate.getCharacterLimit(this.sentiment); - this.updateFeedbackDescription(); + + if (this.feedbackDescriptionInput && this.feedbackDescriptionInput.value.length > this.maxFeedbackCharacters) { + this.feedbackDescriptionInput.value = this.feedbackDescriptionInput.value.substring(0, this.maxFeedbackCharacters); + } + this.updateCharCountText(); if (this.feedbackDescriptionInput) { this.feedbackDescriptionInput.maxLength = this.maxFeedbackCharacters; From d680e3b6007a6baa01a5a5b19f53dd8fbceb5bd5 Mon Sep 17 00:00:00 2001 From: Shiva Prasanth Date: Wed, 1 May 2019 23:47:47 +0530 Subject: [PATCH 013/710] in multiple git repositories, can't view/focus changes on keypress up arrow and enter --- src/vs/workbench/contrib/scm/browser/scmViewlet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts index 0b0cba6c374..2bcb3fcdf5e 100644 --- a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts +++ b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts @@ -316,7 +316,7 @@ export class MainPanel extends ViewletPanel { } private onListSelectionChange(e: IListEvent): void { - if (e.elements.length > 0 && e.browserEvent) { + if (e.elements.length > 0) { const scrollTop = this.list.scrollTop; this.viewModel.setVisibleRepositories(e.elements); this.list.scrollTop = scrollTop; From 8755a2aa359f0ebf45b66d6b53a4992c77d070e1 Mon Sep 17 00:00:00 2001 From: Harry Hedger Date: Mon, 15 Apr 2019 06:12:54 -0700 Subject: [PATCH 014/710] Implemented onDidExecuteCommand api method --- .../standalone/browser/simpleServices.ts | 5 ++++- .../editor/test/browser/editorTestServices.ts | 5 ++++- .../browser/services/openerService.test.ts | 1 + src/vs/platform/commands/common/commands.ts | 3 +++ .../common/abstractKeybindingService.test.ts | 1 + src/vs/vscode.proposed.d.ts | 8 ++++++++ .../api/browser/mainThreadCommands.ts | 10 +++++++++- .../workbench/api/common/extHost.protocol.ts | 4 +++- .../workbench/api/common/extHostCommands.ts | 19 +++++++++++++++++-- src/vs/workbench/api/node/extHost.api.impl.ts | 5 ++++- .../commands/common/commandService.ts | 9 ++++++++- .../configurationResolverService.test.ts | 1 + .../api/extHostMessagerService.test.ts | 1 + 13 files changed, 64 insertions(+), 8 deletions(-) diff --git a/src/vs/editor/standalone/browser/simpleServices.ts b/src/vs/editor/standalone/browser/simpleServices.ts index b6468cddfc1..6d16f975897 100644 --- a/src/vs/editor/standalone/browser/simpleServices.ts +++ b/src/vs/editor/standalone/browser/simpleServices.ts @@ -225,7 +225,9 @@ export class StandaloneCommandService implements ICommandService { private readonly _dynamicCommands: { [id: string]: ICommand; }; private readonly _onWillExecuteCommand = new Emitter(); + private readonly _onDidExecuteCommand = new Emitter(); public readonly onWillExecuteCommand: Event = this._onWillExecuteCommand.event; + public readonly onDidExecuteCommand: Event = this._onDidExecuteCommand.event; constructor(instantiationService: IInstantiationService) { this._instantiationService = instantiationService; @@ -247,8 +249,9 @@ export class StandaloneCommandService implements ICommandService { } try { - this._onWillExecuteCommand.fire({ commandId: id }); + this._onWillExecuteCommand.fire({ commandId: id, args }); const result = this._instantiationService.invokeFunction.apply(this._instantiationService, [command.handler, ...args]) as T; + this._onDidExecuteCommand.fire({ commandId: id, args }); return Promise.resolve(result); } catch (err) { return Promise.reject(err); diff --git a/src/vs/editor/test/browser/editorTestServices.ts b/src/vs/editor/test/browser/editorTestServices.ts index 25af3b0efa6..fc005b742a9 100644 --- a/src/vs/editor/test/browser/editorTestServices.ts +++ b/src/vs/editor/test/browser/editorTestServices.ts @@ -32,6 +32,9 @@ export class TestCommandService implements ICommandService { private readonly _onWillExecuteCommand = new Emitter(); public readonly onWillExecuteCommand: Event = this._onWillExecuteCommand.event; + private readonly _onDidExecuteCommand = new Emitter(); + public readonly onDidExecuteCommand: Event = this._onDidExecuteCommand.event; + constructor(instantiationService: IInstantiationService) { this._instantiationService = instantiationService; } @@ -43,7 +46,7 @@ export class TestCommandService implements ICommandService { } try { - this._onWillExecuteCommand.fire({ commandId: id }); + this._onWillExecuteCommand.fire({ commandId: id, args }); const result = this._instantiationService.invokeFunction.apply(this._instantiationService, [command.handler, ...args]) as T; return Promise.resolve(result); } catch (err) { diff --git a/src/vs/editor/test/browser/services/openerService.test.ts b/src/vs/editor/test/browser/services/openerService.test.ts index 3e643742469..eadf902357a 100644 --- a/src/vs/editor/test/browser/services/openerService.test.ts +++ b/src/vs/editor/test/browser/services/openerService.test.ts @@ -17,6 +17,7 @@ suite('OpenerService', function () { const commandService = new class implements ICommandService { _serviceBrand: any; onWillExecuteCommand = () => ({ dispose: () => { } }); + onDidExecuteCommand = () => ({ dispose: () => { } }); executeCommand(id: string, ...args: any[]): Promise { lastCommand = { id, args }; return Promise.resolve(undefined); diff --git a/src/vs/platform/commands/common/commands.ts b/src/vs/platform/commands/common/commands.ts index 91541847a17..bb15b457bc8 100644 --- a/src/vs/platform/commands/common/commands.ts +++ b/src/vs/platform/commands/common/commands.ts @@ -14,11 +14,13 @@ export const ICommandService = createDecorator('commandService' export interface ICommandEvent { commandId: string; + args: any[]; } export interface ICommandService { _serviceBrand: any; onWillExecuteCommand: Event; + onDidExecuteCommand: Event; executeCommand(commandId: string, ...args: any[]): Promise; } @@ -133,6 +135,7 @@ export const CommandsRegistry: ICommandRegistry = new class implements ICommandR export const NullCommandService: ICommandService = { _serviceBrand: undefined, onWillExecuteCommand: () => ({ dispose: () => { } }), + onDidExecuteCommand: () => ({ dispose: () => { } }), executeCommand() { return Promise.resolve(undefined); } diff --git a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts index d2b97151250..055362596c5 100644 --- a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts +++ b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts @@ -119,6 +119,7 @@ suite('AbstractKeybindingService', () => { let commandService: ICommandService = { _serviceBrand: undefined, onWillExecuteCommand: () => ({ dispose: () => { } }), + onDidExecuteCommand: () => ({ dispose: () => { } }), executeCommand: (commandId: string, ...args: any[]): Promise => { executeCommandCalls.push({ commandId: commandId, diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index b1c6b84bb3b..ffbbb08e063 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1,3 +1,5 @@ +import { ICommandEvent } from 'vs/platform/commands/common/commands' + /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -555,6 +557,12 @@ declare module 'vscode' { * @return Disposable which unregisters this command on disposal. */ export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable; + + + /** + * An event that is emitted when a [command](#Command) is executed. + */ + export const onDidExecuteCommand: Event; } //#endregion diff --git a/src/vs/workbench/api/browser/mainThreadCommands.ts b/src/vs/workbench/api/browser/mainThreadCommands.ts index c61ad7e5733..6d0e3c9276c 100644 --- a/src/vs/workbench/api/browser/mainThreadCommands.ts +++ b/src/vs/workbench/api/browser/mainThreadCommands.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ICommandService, CommandsRegistry, ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; +import { ICommandService, CommandsRegistry, ICommandHandlerDescription, ICommandEvent } from 'vs/platform/commands/common/commands'; import { IDisposable } from 'vs/base/common/lifecycle'; import { ExtHostContext, MainThreadCommandsShape, ExtHostCommandsShape, MainContext, IExtHostContext } from '../common/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers'; @@ -78,9 +78,17 @@ export class MainThreadCommands implements MainThreadCommandsShape { return this._commandService.executeCommand(id, ...args); } + $onDidExecuteCommand() { + return this._commandService.onDidExecuteCommand((command) => this.handleExecuteCommand(command)); + } + $getCommands(): Promise { return Promise.resolve(Object.keys(CommandsRegistry.getCommands())); } + + handleExecuteCommand(command: ICommandEvent) { + this._proxy.$handleDidExecuteCommand(command); + } } // --- command doc diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index cff14ddb273..8e836e5de1a 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -17,7 +17,7 @@ import { ISingleEditOperation, EndOfLineSequence } from 'vs/editor/common/model' import { IModelChangedEvent } from 'vs/editor/common/model/mirrorTextModel'; import * as modes from 'vs/editor/common/modes'; import { CharacterPair, CommentRule, EnterAction } from 'vs/editor/common/modes/languageConfiguration'; -import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; +import { ICommandHandlerDescription, ICommandEvent } from 'vs/platform/commands/common/commands'; import { ConfigurationTarget, IConfigurationData, IConfigurationModel } from 'vs/platform/configuration/common/configuration'; import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; import * as files from 'vs/platform/files/common/files'; @@ -113,6 +113,7 @@ export interface MainThreadClipboardShape extends IDisposable { export interface MainThreadCommandsShape extends IDisposable { $registerCommand(id: string): void; + $onDidExecuteCommand(): void; $unregisterCommand(id: string): void; $executeCommand(id: string, args: any[]): Promise; $getCommands(): Promise; @@ -709,6 +710,7 @@ export interface MainThreadWindowShape extends IDisposable { export interface ExtHostCommandsShape { $executeContributedCommand(id: string, ...args: any[]): Promise; $getContributedCommandHandlerDescriptions(): Promise<{ [id: string]: string | ICommandHandlerDescription }>; + $handleDidExecuteCommand(command: ICommandEvent): void; } export interface ExtHostConfigurationShape { diff --git a/src/vs/workbench/api/common/extHostCommands.ts b/src/vs/workbench/api/common/extHostCommands.ts index 59edc45abf3..449e15e600b 100644 --- a/src/vs/workbench/api/common/extHostCommands.ts +++ b/src/vs/workbench/api/common/extHostCommands.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { validateConstraint } from 'vs/base/common/types'; -import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; +import { ICommandHandlerDescription, ICommandEvent } from 'vs/platform/commands/common/commands'; import * as extHostTypes from 'vs/workbench/api/common/extHostTypes'; import * as extHostTypeConverter from 'vs/workbench/api/common/extHostTypeConverters'; import { cloneAndChange } from 'vs/base/common/objects'; @@ -18,6 +18,8 @@ import { revive } from 'vs/base/common/marshalling'; import { Range } from 'vs/editor/common/core/range'; import { Position } from 'vs/editor/common/core/position'; import { URI } from 'vs/base/common/uri'; +import { Event, Emitter } from 'vs/base/common/event'; +import { IDisposable } from 'vs/base/common/lifecycle'; interface CommandHandler { callback: Function; @@ -30,6 +32,8 @@ export interface ArgumentProcessor { } export class ExtHostCommands implements ExtHostCommandsShape { + private readonly _onDidExecuteCommand: Emitter = new Emitter(); + public readonly onDidExecuteCommandEmitter: Event = this._onDidExecuteCommand.event; private readonly _commands = new Map(); private readonly _proxy: MainThreadCommandsShape; @@ -107,6 +111,15 @@ export class ExtHostCommands implements ExtHostCommandsShape { }); } + onDidExecuteCommand(listener: (command: ICommandEvent) => any, thisArgs?: any, disposables?: IDisposable[]) { + this._proxy.$onDidExecuteCommand(); + return this.onDidExecuteCommandEmitter(listener, thisArgs, disposables); + } + + $handleDidExecuteCommand(command: ICommandEvent): void { + this._onDidExecuteCommand.fire(command); + } + executeCommand(id: string, ...args: any[]): Promise { this._logService.trace('ExtHostCommands#executeCommand', id); @@ -133,7 +146,9 @@ export class ExtHostCommands implements ExtHostCommandsShape { } }); - return this._proxy.$executeCommand(id, args).then(result => revive(result, 0)); + return this._proxy.$executeCommand(id, args).then(result => { + return revive(result, 0); + }); } } diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index ffe929454e3..0e527dab21a 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -230,7 +230,10 @@ export function createApiFactory( }, getCommands(filterInternal: boolean = false): Thenable { return extHostCommands.getCommands(filterInternal); - } + }, + onDidExecuteCommand: (listener, thisArgs?, disposables?) => { + return extHostCommands.onDidExecuteCommand(listener, thisArgs, disposables); + }, }; // namespace: env diff --git a/src/vs/workbench/services/commands/common/commandService.ts b/src/vs/workbench/services/commands/common/commandService.ts index ffb7d1ebd83..c396d7ed897 100644 --- a/src/vs/workbench/services/commands/common/commandService.ts +++ b/src/vs/workbench/services/commands/common/commandService.ts @@ -22,6 +22,9 @@ export class CommandService extends Disposable implements ICommandService { private readonly _onWillExecuteCommand: Emitter = this._register(new Emitter()); public readonly onWillExecuteCommand: Event = this._onWillExecuteCommand.event; + private readonly _onDidExecuteCommand: Emitter = new Emitter(); + public readonly onDidExecuteCommand: Event = this._onDidExecuteCommand.event; + constructor( @IInstantiationService private readonly _instantiationService: IInstantiationService, @IExtensionService private readonly _extensionService: IExtensionService, @@ -77,8 +80,12 @@ export class CommandService extends Disposable implements ICommandService { return Promise.reject(new Error(`command '${id}' not found`)); } try { - this._onWillExecuteCommand.fire({ commandId: id }); + this._onWillExecuteCommand.fire({ commandId: id, args }); const result = this._instantiationService.invokeFunction.apply(this._instantiationService, [command.handler, ...args]); + this._onDidExecuteCommand.fire({ + commandId: id, + args, + }); return Promise.resolve(result); } catch (err) { return Promise.reject(err); diff --git a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts index cefee9701c9..5b9f44514e9 100644 --- a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts +++ b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts @@ -523,6 +523,7 @@ class MockCommandService implements ICommandService { public callCount = 0; onWillExecuteCommand = () => Disposable.None; + onDidExecuteCommand = () => Disposable.None; public executeCommand(commandId: string, ...args: any[]): Promise { this.callCount++; diff --git a/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts b/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts index 9ffa9aee794..c19beb1371f 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts @@ -24,6 +24,7 @@ const emptyDialogService = new class implements IDialogService { const emptyCommandService: ICommandService = { _serviceBrand: undefined, onWillExecuteCommand: () => ({ dispose: () => { } }), + onDidExecuteCommand: () => ({ dispose: () => { } }), executeCommand: (commandId: string, ...args: any[]): Promise => { return Promise.resolve(undefined); } From b9c3c20a75bd1de02f2e139e3c20d4352bd2cd82 Mon Sep 17 00:00:00 2001 From: Harry Hedger Date: Tue, 16 Apr 2019 01:51:22 -0700 Subject: [PATCH 015/710] Made recommended changes --- .../editor/standalone/browser/simpleServices.ts | 2 ++ src/vs/editor/test/browser/editorTestServices.ts | 2 ++ .../test/browser/services/openerService.test.ts | 1 + src/vs/platform/commands/common/commands.ts | 2 ++ .../test/common/abstractKeybindingService.test.ts | 1 + src/vs/vscode.proposed.d.ts | 6 ++++-- .../workbench/api/browser/mainThreadCommands.ts | 4 ++++ src/vs/workbench/api/common/extHost.protocol.ts | 1 + src/vs/workbench/api/common/extHostCommands.ts | 15 +++++++++------ src/vs/workbench/api/node/extHost.api.impl.ts | 4 ++-- .../services/commands/common/commandService.ts | 6 ++---- .../configurationResolverService.test.ts | 1 + .../api/extHostMessagerService.test.ts | 1 + 13 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/vs/editor/standalone/browser/simpleServices.ts b/src/vs/editor/standalone/browser/simpleServices.ts index 6d16f975897..53480932df3 100644 --- a/src/vs/editor/standalone/browser/simpleServices.ts +++ b/src/vs/editor/standalone/browser/simpleServices.ts @@ -228,6 +228,7 @@ export class StandaloneCommandService implements ICommandService { private readonly _onDidExecuteCommand = new Emitter(); public readonly onWillExecuteCommand: Event = this._onWillExecuteCommand.event; public readonly onDidExecuteCommand: Event = this._onDidExecuteCommand.event; + public readonly disposeListeners: () => void; constructor(instantiationService: IInstantiationService) { this._instantiationService = instantiationService; @@ -251,6 +252,7 @@ export class StandaloneCommandService implements ICommandService { try { this._onWillExecuteCommand.fire({ commandId: id, args }); const result = this._instantiationService.invokeFunction.apply(this._instantiationService, [command.handler, ...args]) as T; + this._onDidExecuteCommand.fire({ commandId: id, args }); return Promise.resolve(result); } catch (err) { diff --git a/src/vs/editor/test/browser/editorTestServices.ts b/src/vs/editor/test/browser/editorTestServices.ts index fc005b742a9..f3cca955cd5 100644 --- a/src/vs/editor/test/browser/editorTestServices.ts +++ b/src/vs/editor/test/browser/editorTestServices.ts @@ -35,6 +35,8 @@ export class TestCommandService implements ICommandService { private readonly _onDidExecuteCommand = new Emitter(); public readonly onDidExecuteCommand: Event = this._onDidExecuteCommand.event; + public readonly disposeListeners: () => void; + constructor(instantiationService: IInstantiationService) { this._instantiationService = instantiationService; } diff --git a/src/vs/editor/test/browser/services/openerService.test.ts b/src/vs/editor/test/browser/services/openerService.test.ts index eadf902357a..e42545251ea 100644 --- a/src/vs/editor/test/browser/services/openerService.test.ts +++ b/src/vs/editor/test/browser/services/openerService.test.ts @@ -18,6 +18,7 @@ suite('OpenerService', function () { _serviceBrand: any; onWillExecuteCommand = () => ({ dispose: () => { } }); onDidExecuteCommand = () => ({ dispose: () => { } }); + disposeListeners = () => { }; executeCommand(id: string, ...args: any[]): Promise { lastCommand = { id, args }; return Promise.resolve(undefined); diff --git a/src/vs/platform/commands/common/commands.ts b/src/vs/platform/commands/common/commands.ts index bb15b457bc8..d7d70fe07d7 100644 --- a/src/vs/platform/commands/common/commands.ts +++ b/src/vs/platform/commands/common/commands.ts @@ -21,6 +21,7 @@ export interface ICommandService { _serviceBrand: any; onWillExecuteCommand: Event; onDidExecuteCommand: Event; + disposeListeners: () => void; executeCommand(commandId: string, ...args: any[]): Promise; } @@ -136,6 +137,7 @@ export const NullCommandService: ICommandService = { _serviceBrand: undefined, onWillExecuteCommand: () => ({ dispose: () => { } }), onDidExecuteCommand: () => ({ dispose: () => { } }), + disposeListeners: () => { }, executeCommand() { return Promise.resolve(undefined); } diff --git a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts index 055362596c5..8c9a8cccbdb 100644 --- a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts +++ b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts @@ -120,6 +120,7 @@ suite('AbstractKeybindingService', () => { _serviceBrand: undefined, onWillExecuteCommand: () => ({ dispose: () => { } }), onDidExecuteCommand: () => ({ dispose: () => { } }), + disposeListeners: () => { }, executeCommand: (commandId: string, ...args: any[]): Promise => { executeCommandCalls.push({ commandId: commandId, diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index ffbbb08e063..370c8524198 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1,5 +1,3 @@ -import { ICommandEvent } from 'vs/platform/commands/common/commands' - /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -558,6 +556,10 @@ declare module 'vscode' { */ export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable; + export interface ICommandEvent { + commandId: string; + args: any[]; + } /** * An event that is emitted when a [command](#Command) is executed. diff --git a/src/vs/workbench/api/browser/mainThreadCommands.ts b/src/vs/workbench/api/browser/mainThreadCommands.ts index 6d0e3c9276c..008e3729037 100644 --- a/src/vs/workbench/api/browser/mainThreadCommands.ts +++ b/src/vs/workbench/api/browser/mainThreadCommands.ts @@ -82,6 +82,10 @@ export class MainThreadCommands implements MainThreadCommandsShape { return this._commandService.onDidExecuteCommand((command) => this.handleExecuteCommand(command)); } + $disposeListeners() { + return this._commandService.disposeListeners(); + } + $getCommands(): Promise { return Promise.resolve(Object.keys(CommandsRegistry.getCommands())); } diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 8e836e5de1a..c0f52cded80 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -114,6 +114,7 @@ export interface MainThreadClipboardShape extends IDisposable { export interface MainThreadCommandsShape extends IDisposable { $registerCommand(id: string): void; $onDidExecuteCommand(): void; + $disposeListeners(): void; $unregisterCommand(id: string): void; $executeCommand(id: string, args: any[]): Promise; $getCommands(): Promise; diff --git a/src/vs/workbench/api/common/extHostCommands.ts b/src/vs/workbench/api/common/extHostCommands.ts index 449e15e600b..84042c6529b 100644 --- a/src/vs/workbench/api/common/extHostCommands.ts +++ b/src/vs/workbench/api/common/extHostCommands.ts @@ -32,8 +32,8 @@ export interface ArgumentProcessor { } export class ExtHostCommands implements ExtHostCommandsShape { - private readonly _onDidExecuteCommand: Emitter = new Emitter(); - public readonly onDidExecuteCommandEmitter: Event = this._onDidExecuteCommand.event; + private readonly _onDidExecuteCommand: Emitter; + public readonly onDidExecuteCommandEmitter: Event; private readonly _commands = new Map(); private readonly _proxy: MainThreadCommandsShape; @@ -47,6 +47,11 @@ export class ExtHostCommands implements ExtHostCommandsShape { logService: ILogService ) { this._proxy = mainContext.getProxy(MainContext.MainThreadCommands); + this._onDidExecuteCommand = new Emitter({ + onFirstListenerDidAdd: this._proxy.$onDidExecuteCommand, + onLastListenerRemove: this._proxy.$disposeListeners, + }); + this.onDidExecuteCommandEmitter = this._onDidExecuteCommand.event; this._logService = logService; this._converter = new CommandsConverter(this, heapService); this._argumentProcessors = [ @@ -112,7 +117,6 @@ export class ExtHostCommands implements ExtHostCommandsShape { } onDidExecuteCommand(listener: (command: ICommandEvent) => any, thisArgs?: any, disposables?: IDisposable[]) { - this._proxy.$onDidExecuteCommand(); return this.onDidExecuteCommandEmitter(listener, thisArgs, disposables); } @@ -146,9 +150,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { } }); - return this._proxy.$executeCommand(id, args).then(result => { - return revive(result, 0); - }); + return this._proxy.$executeCommand(id, args).then(result => revive(result, 0)); } } @@ -170,6 +172,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { try { const result = callback.apply(thisArg, args); + this._onDidExecuteCommand.fire({ commandId: id, args }); return Promise.resolve(result); } catch (err) { this._logService.error(err, id); diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 0e527dab21a..4013345e06a 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -231,9 +231,9 @@ export function createApiFactory( getCommands(filterInternal: boolean = false): Thenable { return extHostCommands.getCommands(filterInternal); }, - onDidExecuteCommand: (listener, thisArgs?, disposables?) => { + onDidExecuteCommand: proposedApiFunction(extension, (listener, thisArgs?, disposables?) => { return extHostCommands.onDidExecuteCommand(listener, thisArgs, disposables); - }, + }), }; // namespace: env diff --git a/src/vs/workbench/services/commands/common/commandService.ts b/src/vs/workbench/services/commands/common/commandService.ts index c396d7ed897..07e4f8d25ea 100644 --- a/src/vs/workbench/services/commands/common/commandService.ts +++ b/src/vs/workbench/services/commands/common/commandService.ts @@ -24,6 +24,7 @@ export class CommandService extends Disposable implements ICommandService { private readonly _onDidExecuteCommand: Emitter = new Emitter(); public readonly onDidExecuteCommand: Event = this._onDidExecuteCommand.event; + public readonly disposeListeners: () => void = () => this._onDidExecuteCommand.dispose(); constructor( @IInstantiationService private readonly _instantiationService: IInstantiationService, @@ -82,10 +83,7 @@ export class CommandService extends Disposable implements ICommandService { try { this._onWillExecuteCommand.fire({ commandId: id, args }); const result = this._instantiationService.invokeFunction.apply(this._instantiationService, [command.handler, ...args]); - this._onDidExecuteCommand.fire({ - commandId: id, - args, - }); + this._onDidExecuteCommand.fire({ commandId: id, args }); return Promise.resolve(result); } catch (err) { return Promise.reject(err); diff --git a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts index 5b9f44514e9..dab2143fe05 100644 --- a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts +++ b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts @@ -524,6 +524,7 @@ class MockCommandService implements ICommandService { onWillExecuteCommand = () => Disposable.None; onDidExecuteCommand = () => Disposable.None; + disposeListeners = () => { }; public executeCommand(commandId: string, ...args: any[]): Promise { this.callCount++; diff --git a/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts b/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts index c19beb1371f..d4918ec62c2 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts @@ -25,6 +25,7 @@ const emptyCommandService: ICommandService = { _serviceBrand: undefined, onWillExecuteCommand: () => ({ dispose: () => { } }), onDidExecuteCommand: () => ({ dispose: () => { } }), + disposeListeners: () => { }, executeCommand: (commandId: string, ...args: any[]): Promise => { return Promise.resolve(undefined); } From 43e0b18c5bb35a84a38abd98d218d5e1e82d0218 Mon Sep 17 00:00:00 2001 From: Harry Hedger Date: Tue, 16 Apr 2019 02:25:51 -0700 Subject: [PATCH 016/710] removed public --- src/vs/workbench/api/common/extHostCommands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/common/extHostCommands.ts b/src/vs/workbench/api/common/extHostCommands.ts index 84042c6529b..53f4d85d636 100644 --- a/src/vs/workbench/api/common/extHostCommands.ts +++ b/src/vs/workbench/api/common/extHostCommands.ts @@ -33,7 +33,7 @@ export interface ArgumentProcessor { export class ExtHostCommands implements ExtHostCommandsShape { private readonly _onDidExecuteCommand: Emitter; - public readonly onDidExecuteCommandEmitter: Event; + readonly onDidExecuteCommandEmitter: Event; private readonly _commands = new Map(); private readonly _proxy: MainThreadCommandsShape; From 62f2b712f012c1f42ca5e02222109d4aa7b58050 Mon Sep 17 00:00:00 2001 From: Harry Hedger Date: Tue, 30 Apr 2019 03:04:16 -0700 Subject: [PATCH 017/710] Removed disposeListeners from commandService and only remove listener on MainThreadCommands --- src/vs/editor/standalone/browser/simpleServices.ts | 1 - src/vs/editor/test/browser/editorTestServices.ts | 3 +-- src/vs/editor/test/browser/services/openerService.test.ts | 1 - src/vs/platform/commands/common/commands.ts | 2 -- .../test/common/abstractKeybindingService.test.ts | 1 - src/vs/workbench/api/browser/mainThreadCommands.ts | 7 ++++--- src/vs/workbench/api/common/extHost.protocol.ts | 2 +- src/vs/workbench/api/common/extHostCommands.ts | 2 +- .../workbench/services/commands/common/commandService.ts | 1 - .../electron-browser/configurationResolverService.test.ts | 1 - .../electron-browser/api/extHostMessagerService.test.ts | 1 - 11 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/vs/editor/standalone/browser/simpleServices.ts b/src/vs/editor/standalone/browser/simpleServices.ts index 53480932df3..2c354a407c5 100644 --- a/src/vs/editor/standalone/browser/simpleServices.ts +++ b/src/vs/editor/standalone/browser/simpleServices.ts @@ -228,7 +228,6 @@ export class StandaloneCommandService implements ICommandService { private readonly _onDidExecuteCommand = new Emitter(); public readonly onWillExecuteCommand: Event = this._onWillExecuteCommand.event; public readonly onDidExecuteCommand: Event = this._onDidExecuteCommand.event; - public readonly disposeListeners: () => void; constructor(instantiationService: IInstantiationService) { this._instantiationService = instantiationService; diff --git a/src/vs/editor/test/browser/editorTestServices.ts b/src/vs/editor/test/browser/editorTestServices.ts index f3cca955cd5..f896360acf4 100644 --- a/src/vs/editor/test/browser/editorTestServices.ts +++ b/src/vs/editor/test/browser/editorTestServices.ts @@ -35,8 +35,6 @@ export class TestCommandService implements ICommandService { private readonly _onDidExecuteCommand = new Emitter(); public readonly onDidExecuteCommand: Event = this._onDidExecuteCommand.event; - public readonly disposeListeners: () => void; - constructor(instantiationService: IInstantiationService) { this._instantiationService = instantiationService; } @@ -50,6 +48,7 @@ export class TestCommandService implements ICommandService { try { this._onWillExecuteCommand.fire({ commandId: id, args }); const result = this._instantiationService.invokeFunction.apply(this._instantiationService, [command.handler, ...args]) as T; + this._onDidExecuteCommand.fire({ commandId: id, args }); return Promise.resolve(result); } catch (err) { return Promise.reject(err); diff --git a/src/vs/editor/test/browser/services/openerService.test.ts b/src/vs/editor/test/browser/services/openerService.test.ts index e42545251ea..eadf902357a 100644 --- a/src/vs/editor/test/browser/services/openerService.test.ts +++ b/src/vs/editor/test/browser/services/openerService.test.ts @@ -18,7 +18,6 @@ suite('OpenerService', function () { _serviceBrand: any; onWillExecuteCommand = () => ({ dispose: () => { } }); onDidExecuteCommand = () => ({ dispose: () => { } }); - disposeListeners = () => { }; executeCommand(id: string, ...args: any[]): Promise { lastCommand = { id, args }; return Promise.resolve(undefined); diff --git a/src/vs/platform/commands/common/commands.ts b/src/vs/platform/commands/common/commands.ts index d7d70fe07d7..bb15b457bc8 100644 --- a/src/vs/platform/commands/common/commands.ts +++ b/src/vs/platform/commands/common/commands.ts @@ -21,7 +21,6 @@ export interface ICommandService { _serviceBrand: any; onWillExecuteCommand: Event; onDidExecuteCommand: Event; - disposeListeners: () => void; executeCommand(commandId: string, ...args: any[]): Promise; } @@ -137,7 +136,6 @@ export const NullCommandService: ICommandService = { _serviceBrand: undefined, onWillExecuteCommand: () => ({ dispose: () => { } }), onDidExecuteCommand: () => ({ dispose: () => { } }), - disposeListeners: () => { }, executeCommand() { return Promise.resolve(undefined); } diff --git a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts index 8c9a8cccbdb..055362596c5 100644 --- a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts +++ b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts @@ -120,7 +120,6 @@ suite('AbstractKeybindingService', () => { _serviceBrand: undefined, onWillExecuteCommand: () => ({ dispose: () => { } }), onDidExecuteCommand: () => ({ dispose: () => { } }), - disposeListeners: () => { }, executeCommand: (commandId: string, ...args: any[]): Promise => { executeCommandCalls.push({ commandId: commandId, diff --git a/src/vs/workbench/api/browser/mainThreadCommands.ts b/src/vs/workbench/api/browser/mainThreadCommands.ts index 008e3729037..3f98aed5553 100644 --- a/src/vs/workbench/api/browser/mainThreadCommands.ts +++ b/src/vs/workbench/api/browser/mainThreadCommands.ts @@ -15,6 +15,7 @@ export class MainThreadCommands implements MainThreadCommandsShape { private readonly _disposables = new Map(); private readonly _generateCommandsDocumentationRegistration: IDisposable; private readonly _proxy: ExtHostCommandsShape; + private _onDidExecuteCommandListener: IDisposable; constructor( extHostContext: IExtHostContext, @@ -79,11 +80,11 @@ export class MainThreadCommands implements MainThreadCommandsShape { } $onDidExecuteCommand() { - return this._commandService.onDidExecuteCommand((command) => this.handleExecuteCommand(command)); + this._onDidExecuteCommandListener = this._commandService.onDidExecuteCommand((command) => this.handleExecuteCommand(command)); } - $disposeListeners() { - return this._commandService.disposeListeners(); + $disposeListener() { + return this._onDidExecuteCommandListener.dispose(); } $getCommands(): Promise { diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index c0f52cded80..71446f49d62 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -114,7 +114,7 @@ export interface MainThreadClipboardShape extends IDisposable { export interface MainThreadCommandsShape extends IDisposable { $registerCommand(id: string): void; $onDidExecuteCommand(): void; - $disposeListeners(): void; + $disposeListener(): void; $unregisterCommand(id: string): void; $executeCommand(id: string, args: any[]): Promise; $getCommands(): Promise; diff --git a/src/vs/workbench/api/common/extHostCommands.ts b/src/vs/workbench/api/common/extHostCommands.ts index 53f4d85d636..bdd6219fda2 100644 --- a/src/vs/workbench/api/common/extHostCommands.ts +++ b/src/vs/workbench/api/common/extHostCommands.ts @@ -49,7 +49,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { this._proxy = mainContext.getProxy(MainContext.MainThreadCommands); this._onDidExecuteCommand = new Emitter({ onFirstListenerDidAdd: this._proxy.$onDidExecuteCommand, - onLastListenerRemove: this._proxy.$disposeListeners, + onLastListenerRemove: this._proxy.$disposeListener, }); this.onDidExecuteCommandEmitter = this._onDidExecuteCommand.event; this._logService = logService; diff --git a/src/vs/workbench/services/commands/common/commandService.ts b/src/vs/workbench/services/commands/common/commandService.ts index 07e4f8d25ea..f1826cd036a 100644 --- a/src/vs/workbench/services/commands/common/commandService.ts +++ b/src/vs/workbench/services/commands/common/commandService.ts @@ -24,7 +24,6 @@ export class CommandService extends Disposable implements ICommandService { private readonly _onDidExecuteCommand: Emitter = new Emitter(); public readonly onDidExecuteCommand: Event = this._onDidExecuteCommand.event; - public readonly disposeListeners: () => void = () => this._onDidExecuteCommand.dispose(); constructor( @IInstantiationService private readonly _instantiationService: IInstantiationService, diff --git a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts index dab2143fe05..5b9f44514e9 100644 --- a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts +++ b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts @@ -524,7 +524,6 @@ class MockCommandService implements ICommandService { onWillExecuteCommand = () => Disposable.None; onDidExecuteCommand = () => Disposable.None; - disposeListeners = () => { }; public executeCommand(commandId: string, ...args: any[]): Promise { this.callCount++; diff --git a/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts b/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts index d4918ec62c2..c19beb1371f 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts @@ -25,7 +25,6 @@ const emptyCommandService: ICommandService = { _serviceBrand: undefined, onWillExecuteCommand: () => ({ dispose: () => { } }), onDidExecuteCommand: () => ({ dispose: () => { } }), - disposeListeners: () => { }, executeCommand: (commandId: string, ...args: any[]): Promise => { return Promise.resolve(undefined); } From ab7694754b6b2b6b39e66ef8890d0c7ffcb8a7c3 Mon Sep 17 00:00:00 2001 From: Harry Hedger Date: Tue, 30 Apr 2019 05:57:47 -0700 Subject: [PATCH 018/710] renamed listeners to registerCommandListener and unregisterCommandListener --- src/vs/workbench/api/browser/mainThreadCommands.ts | 4 ++-- src/vs/workbench/api/common/extHost.protocol.ts | 4 ++-- src/vs/workbench/api/common/extHostCommands.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadCommands.ts b/src/vs/workbench/api/browser/mainThreadCommands.ts index 3f98aed5553..1f63ed47dd0 100644 --- a/src/vs/workbench/api/browser/mainThreadCommands.ts +++ b/src/vs/workbench/api/browser/mainThreadCommands.ts @@ -79,11 +79,11 @@ export class MainThreadCommands implements MainThreadCommandsShape { return this._commandService.executeCommand(id, ...args); } - $onDidExecuteCommand() { + $registerCommandListener() { this._onDidExecuteCommandListener = this._commandService.onDidExecuteCommand((command) => this.handleExecuteCommand(command)); } - $disposeListener() { + $unregisterCommandListener() { return this._onDidExecuteCommandListener.dispose(); } diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 71446f49d62..7dafdda0c68 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -113,8 +113,8 @@ export interface MainThreadClipboardShape extends IDisposable { export interface MainThreadCommandsShape extends IDisposable { $registerCommand(id: string): void; - $onDidExecuteCommand(): void; - $disposeListener(): void; + $registerCommandListener(): void; + $unregisterCommandListener(): void; $unregisterCommand(id: string): void; $executeCommand(id: string, args: any[]): Promise; $getCommands(): Promise; diff --git a/src/vs/workbench/api/common/extHostCommands.ts b/src/vs/workbench/api/common/extHostCommands.ts index bdd6219fda2..2c84c8d03f7 100644 --- a/src/vs/workbench/api/common/extHostCommands.ts +++ b/src/vs/workbench/api/common/extHostCommands.ts @@ -48,8 +48,8 @@ export class ExtHostCommands implements ExtHostCommandsShape { ) { this._proxy = mainContext.getProxy(MainContext.MainThreadCommands); this._onDidExecuteCommand = new Emitter({ - onFirstListenerDidAdd: this._proxy.$onDidExecuteCommand, - onLastListenerRemove: this._proxy.$disposeListener, + onFirstListenerDidAdd: () => this._proxy.$registerCommandListener(), + onLastListenerRemove: () => this._proxy.$unregisterCommandListener(), }); this.onDidExecuteCommandEmitter = this._onDidExecuteCommand.event; this._logService = logService; From fa406d2dd15cc9bc1fc11cc11843e20180e1c4ed Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 16 May 2019 09:51:30 -0700 Subject: [PATCH 019/710] tiny tweaks --- src/vs/vscode.proposed.d.ts | 16 +++++++++++----- .../api/browser/mainThreadCommands.ts | 17 +++++++++-------- src/vs/workbench/api/common/extHostCommands.ts | 18 +++++++----------- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 370c8524198..bd90b412ab1 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -555,16 +555,22 @@ declare module 'vscode' { * @return Disposable which unregisters this command on disposal. */ export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable; + } - export interface ICommandEvent { - commandId: string; - args: any[]; - } + //#endregion + //#region Joh: onDidExecuteCommand + + export interface CommandExecutionEvent { + command: string; + arguments: any[]; + } + + export namespace commands { /** * An event that is emitted when a [command](#Command) is executed. */ - export const onDidExecuteCommand: Event; + export const onDidExecuteCommand: Event; } //#endregion diff --git a/src/vs/workbench/api/browser/mainThreadCommands.ts b/src/vs/workbench/api/browser/mainThreadCommands.ts index 1f63ed47dd0..aab239bebd5 100644 --- a/src/vs/workbench/api/browser/mainThreadCommands.ts +++ b/src/vs/workbench/api/browser/mainThreadCommands.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ICommandService, CommandsRegistry, ICommandHandlerDescription, ICommandEvent } from 'vs/platform/commands/common/commands'; +import { ICommandService, CommandsRegistry, ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; import { IDisposable } from 'vs/base/common/lifecycle'; import { ExtHostContext, MainThreadCommandsShape, ExtHostCommandsShape, MainContext, IExtHostContext } from '../common/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers'; @@ -15,7 +15,7 @@ export class MainThreadCommands implements MainThreadCommandsShape { private readonly _disposables = new Map(); private readonly _generateCommandsDocumentationRegistration: IDisposable; private readonly _proxy: ExtHostCommandsShape; - private _onDidExecuteCommandListener: IDisposable; + private _onDidExecuteCommandListener?: IDisposable; constructor( extHostContext: IExtHostContext, @@ -80,20 +80,21 @@ export class MainThreadCommands implements MainThreadCommandsShape { } $registerCommandListener() { - this._onDidExecuteCommandListener = this._commandService.onDidExecuteCommand((command) => this.handleExecuteCommand(command)); + if (!this._onDidExecuteCommandListener) { + this._onDidExecuteCommandListener = this._commandService.onDidExecuteCommand(command => this._proxy.$handleDidExecuteCommand(command)); + } } $unregisterCommandListener() { - return this._onDidExecuteCommandListener.dispose(); + if (this._onDidExecuteCommandListener) { + this._onDidExecuteCommandListener.dispose(); + this._onDidExecuteCommandListener = undefined; + } } $getCommands(): Promise { return Promise.resolve(Object.keys(CommandsRegistry.getCommands())); } - - handleExecuteCommand(command: ICommandEvent) { - this._proxy.$handleDidExecuteCommand(command); - } } // --- command doc diff --git a/src/vs/workbench/api/common/extHostCommands.ts b/src/vs/workbench/api/common/extHostCommands.ts index 2c84c8d03f7..178834dad96 100644 --- a/src/vs/workbench/api/common/extHostCommands.ts +++ b/src/vs/workbench/api/common/extHostCommands.ts @@ -19,7 +19,6 @@ import { Range } from 'vs/editor/common/core/range'; import { Position } from 'vs/editor/common/core/position'; import { URI } from 'vs/base/common/uri'; import { Event, Emitter } from 'vs/base/common/event'; -import { IDisposable } from 'vs/base/common/lifecycle'; interface CommandHandler { callback: Function; @@ -32,8 +31,9 @@ export interface ArgumentProcessor { } export class ExtHostCommands implements ExtHostCommandsShape { - private readonly _onDidExecuteCommand: Emitter; - readonly onDidExecuteCommandEmitter: Event; + + private readonly _onDidExecuteCommand: Emitter; + readonly onDidExecuteCommand: Event; private readonly _commands = new Map(); private readonly _proxy: MainThreadCommandsShape; @@ -47,11 +47,11 @@ export class ExtHostCommands implements ExtHostCommandsShape { logService: ILogService ) { this._proxy = mainContext.getProxy(MainContext.MainThreadCommands); - this._onDidExecuteCommand = new Emitter({ + this._onDidExecuteCommand = new Emitter({ onFirstListenerDidAdd: () => this._proxy.$registerCommandListener(), onLastListenerRemove: () => this._proxy.$unregisterCommandListener(), }); - this.onDidExecuteCommandEmitter = this._onDidExecuteCommand.event; + this.onDidExecuteCommand = this._onDidExecuteCommand.event; this._logService = logService; this._converter = new CommandsConverter(this, heapService); this._argumentProcessors = [ @@ -116,12 +116,8 @@ export class ExtHostCommands implements ExtHostCommandsShape { }); } - onDidExecuteCommand(listener: (command: ICommandEvent) => any, thisArgs?: any, disposables?: IDisposable[]) { - return this.onDidExecuteCommandEmitter(listener, thisArgs, disposables); - } - $handleDidExecuteCommand(command: ICommandEvent): void { - this._onDidExecuteCommand.fire(command); + this._onDidExecuteCommand.fire({ command: command.commandId, arguments: command.args }); } executeCommand(id: string, ...args: any[]): Promise { @@ -172,7 +168,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { try { const result = callback.apply(thisArg, args); - this._onDidExecuteCommand.fire({ commandId: id, args }); + this._onDidExecuteCommand.fire({ command: id, arguments: args }); return Promise.resolve(result); } catch (err) { this._logService.error(err, id); From 4d04ce30d5ac2d733c280966e21b7a1862d90517 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 16 May 2019 09:52:39 -0700 Subject: [PATCH 020/710] add proposed api check --- src/vs/workbench/api/node/extHost.api.impl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 4013345e06a..ef3d3504f91 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -232,6 +232,7 @@ export function createApiFactory( return extHostCommands.getCommands(filterInternal); }, onDidExecuteCommand: proposedApiFunction(extension, (listener, thisArgs?, disposables?) => { + checkProposedApiEnabled(extension); return extHostCommands.onDidExecuteCommand(listener, thisArgs, disposables); }), }; From d3f7e90524f16307921aa95734cea30d07378da9 Mon Sep 17 00:00:00 2001 From: skprabhanjan Date: Mon, 3 Jun 2019 21:00:23 +0530 Subject: [PATCH 021/710] fix-73341 Removed notificationService prompt --- .../node/extensionsWorkbenchService.ts | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts index 1362c838196..f97909e2c71 100644 --- a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts @@ -1001,29 +1001,9 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension if (extension) { return this.windowService.focusWindow() .then(() => this.open(extension)); + } else { + return Promise.resolve(null); } - - return this.queryGallery({ names: [extensionId], source: 'uri' }, CancellationToken.None).then(result => { - if (result.total < 1) { - return Promise.resolve(null); - } - - const extension = result.firstPage[0]; - - return this.windowService.focusWindow().then(() => { - return this.open(extension).then(() => { - this.notificationService.prompt( - Severity.Info, - nls.localize('installConfirmation', "Would you like to install the '{0}' extension?", extension.displayName, extension.publisher), - [{ - label: nls.localize('install', "Install"), - run: () => this.install(extension).then(undefined, error => this.onError(error)) - }], - { sticky: true } - ); - }); - }); - }); }).then(undefined, error => this.onError(error)); } From 95a799c2bb8eb681b16e4dbd95a837663bace78c Mon Sep 17 00:00:00 2001 From: skprabhanjan Date: Tue, 4 Jun 2019 00:13:56 +0530 Subject: [PATCH 022/710] fix-73341 Review #1 Changes --- .../extensions/node/extensionsWorkbenchService.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts index f97909e2c71..0f2437de9da 100644 --- a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts @@ -1001,9 +1001,18 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension if (extension) { return this.windowService.focusWindow() .then(() => this.open(extension)); - } else { - return Promise.resolve(null); } + return this.queryGallery({ names: [extensionId], source: 'uri' }, CancellationToken.None).then(result => { + if (result.total < 1) { + return Promise.resolve(null); + } + + const extension = result.firstPage[0]; + + return this.windowService.focusWindow().then(() => { + return this.open(extension); + }); + }); }).then(undefined, error => this.onError(error)); } From 9b9b519a48133fcae9e19ea3cc4205a8d5ab06a5 Mon Sep 17 00:00:00 2001 From: skprabhanjan Date: Mon, 10 Jun 2019 11:56:30 +0530 Subject: [PATCH 023/710] removed unused Severity import statement --- .../contrib/extensions/node/extensionsWorkbenchService.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts index 0f2437de9da..ada50332ae4 100644 --- a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts @@ -20,7 +20,6 @@ import { getGalleryExtensionTelemetryData, getLocalExtensionTelemetryData, areSa import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWindowService } from 'vs/platform/windows/common/windows'; -import Severity from 'vs/base/common/severity'; import { URI } from 'vs/base/common/uri'; import { IExtension, ExtensionState, IExtensionsWorkbenchService, AutoUpdateConfigurationKey, AutoCheckUpdatesConfigurationKey } from 'vs/workbench/contrib/extensions/common/extensions'; import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService'; From 952e604fde39b60f73a417a5de5d97ad2eb1401e Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 17 Jun 2019 10:16:08 +0200 Subject: [PATCH 024/710] fix smoke test after problems view css change --- test/smoke/src/areas/problems/problems.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke/src/areas/problems/problems.ts b/test/smoke/src/areas/problems/problems.ts index c71b7d33791..e0499151dcb 100644 --- a/test/smoke/src/areas/problems/problems.ts +++ b/test/smoke/src/areas/problems/problems.ts @@ -39,7 +39,7 @@ export class Problems { } public static getSelectorInProblemsView(problemType: ProblemSeverity): string { - let selector = problemType === ProblemSeverity.WARNING ? 'warning' : 'error'; + let selector = problemType === ProblemSeverity.WARNING ? 'severity-warning' : 'severity-error'; return `div[id="workbench.panel.markers"] .monaco-tl-contents .marker-icon.${selector}`; } From 8e38e56f891da56e9622b0957d2856fa072ac2d7 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 17 Jun 2019 12:06:10 +0200 Subject: [PATCH 025/710] make isEqual case sensitive for non-file URIs --- src/vs/base/common/resources.ts | 2 +- src/vs/platform/files/common/files.ts | 5 ++--- src/vs/workbench/api/common/extHostWorkspace.ts | 3 +-- .../contrib/files/browser/editors/fileEditorTracker.ts | 7 +++---- src/vs/workbench/contrib/files/browser/fileActions.ts | 6 +++--- .../contrib/files/browser/views/explorerViewer.ts | 7 ++++--- .../preferences/common/preferencesContribution.ts | 3 +-- .../electron-browser/relauncher.contribution.ts | 4 ++-- .../configuration/browser/configurationService.ts | 9 +-------- .../services/textfile/common/textFileEditorModel.ts | 7 +++---- .../services/textfile/common/textFileService.ts | 6 +++--- .../workbench/services/textfile/node/textFileService.ts | 4 ++-- 12 files changed, 26 insertions(+), 37 deletions(-) diff --git a/src/vs/base/common/resources.ts b/src/vs/base/common/resources.ts index 521a02a4b57..67d82599d28 100644 --- a/src/vs/base/common/resources.ts +++ b/src/vs/base/common/resources.ts @@ -20,7 +20,7 @@ export function getComparisonKey(resource: URI): string { export function hasToIgnoreCase(resource: URI | undefined): boolean { // A file scheme resource is in the same platform as code, so ignore case for non linux platforms // Resource can be from another platform. Lowering the case as an hack. Should come from File system provider - return resource && resource.scheme === Schemas.file ? !isLinux : true; + return resource && resource.scheme === Schemas.file ? !isLinux : false; } export function basenameOrAuthority(resource: URI): string { diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index ac73dd3de19..c843856851e 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -6,7 +6,6 @@ import { sep } from 'vs/base/common/path'; import { URI } from 'vs/base/common/uri'; import * as glob from 'vs/base/common/glob'; -import { isLinux } from 'vs/base/common/platform'; import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { Event } from 'vs/base/common/event'; import { startsWithIgnoreCase } from 'vs/base/common/strings'; @@ -429,10 +428,10 @@ export class FileChangesEvent { // For deleted also return true when deleted folder is parent of target path if (change.type === FileChangeType.DELETED) { - return isEqualOrParent(resource, change.resource, !isLinux /* ignorecase */); + return isEqualOrParent(resource, change.resource); } - return isEqual(resource, change.resource, !isLinux /* ignorecase */); + return isEqual(resource, change.resource); }); } diff --git a/src/vs/workbench/api/common/extHostWorkspace.ts b/src/vs/workbench/api/common/extHostWorkspace.ts index bf8abf0eab9..f6d9c59a1b6 100644 --- a/src/vs/workbench/api/common/extHostWorkspace.ts +++ b/src/vs/workbench/api/common/extHostWorkspace.ts @@ -9,7 +9,6 @@ import { CancellationToken } from 'vs/base/common/cancellation'; import { Emitter, Event } from 'vs/base/common/event'; import { TernarySearchTree } from 'vs/base/common/map'; import { Counter } from 'vs/base/common/numbers'; -import { isLinux } from 'vs/base/common/platform'; import { basenameOrAuthority, dirname, isEqual, relativePath, basename } from 'vs/base/common/resources'; import { compare } from 'vs/base/common/strings'; import { URI } from 'vs/base/common/uri'; @@ -34,7 +33,7 @@ export interface IExtHostWorkspaceProvider { } function isFolderEqual(folderA: URI, folderB: URI): boolean { - return isEqual(folderA, folderB, !isLinux); + return isEqual(folderA, folderB); } function compareWorkspaceFolderByUri(a: vscode.WorkspaceFolder, b: vscode.WorkspaceFolder): number { diff --git a/src/vs/workbench/contrib/files/browser/editors/fileEditorTracker.ts b/src/vs/workbench/contrib/files/browser/editors/fileEditorTracker.ts index 04fa2d58140..c04d6638e87 100644 --- a/src/vs/workbench/contrib/files/browser/editors/fileEditorTracker.ts +++ b/src/vs/workbench/contrib/files/browser/editors/fileEditorTracker.ts @@ -16,7 +16,6 @@ import { Disposable, IDisposable, dispose } from 'vs/base/common/lifecycle'; import { distinct, coalesce } from 'vs/base/common/arrays'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { isLinux } from 'vs/base/common/platform'; import { ResourceMap } from 'vs/base/common/map'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { isCodeEditor } from 'vs/editor/browser/editorBrowser'; @@ -221,7 +220,7 @@ export class FileEditorTracker extends Disposable implements IWorkbenchContribut if (oldResource.toString() === resource.toString()) { reopenFileResource = newResource; // file got moved } else { - const index = this.getIndexOfPath(resource.path, oldResource.path); + const index = this.getIndexOfPath(resource.path, oldResource.path, resources.hasToIgnoreCase(resource)); reopenFileResource = resources.joinPath(newResource, resource.path.substr(index + oldResource.path.length + 1)); // parent folder got moved } @@ -244,7 +243,7 @@ export class FileEditorTracker extends Disposable implements IWorkbenchContribut }); } - private getIndexOfPath(path: string, candidate: string): number { + private getIndexOfPath(path: string, candidate: string, ignoreCase: boolean): number { if (candidate.length > path.length) { return -1; } @@ -253,7 +252,7 @@ export class FileEditorTracker extends Disposable implements IWorkbenchContribut return 0; } - if (!isLinux /* ignore case */) { + if (ignoreCase) { path = path.toLowerCase(); candidate = candidate.toLowerCase(); } diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index 4b0a0547dc9..9fd612b3801 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -6,7 +6,7 @@ import 'vs/css!./media/fileactions'; import * as nls from 'vs/nls'; import * as types from 'vs/base/common/types'; -import { isWindows, isLinux } from 'vs/base/common/platform'; +import { isWindows } from 'vs/base/common/platform'; import * as extpath from 'vs/base/common/extpath'; import * as resources from 'vs/base/common/resources'; import { URI } from 'vs/base/common/uri'; @@ -152,7 +152,7 @@ function deleteFiles(textFileService: ITextFileService, dialogService: IDialogSe // Handle dirty let confirmDirtyPromise: Promise = Promise.resolve(true); - const dirty = textFileService.getDirty().filter(d => distinctElements.some(e => resources.isEqualOrParent(d, e.resource, !isLinux /* ignorecase */))); + const dirty = textFileService.getDirty().filter(d => distinctElements.some(e => resources.isEqualOrParent(d, e.resource))); if (dirty.length) { let message: string; if (distinctElements.length > 1) { @@ -1031,7 +1031,7 @@ export const pasteFileHandler = (accessor: ServicesAccessor) => { // Check if target is ancestor of pasted folder Promise.all(toPaste.map(fileToPaste => { - if (element.resource.toString() !== fileToPaste.toString() && resources.isEqualOrParent(element.resource, fileToPaste, !isLinux /* ignorecase */)) { + if (element.resource.toString() !== fileToPaste.toString() && resources.isEqualOrParent(element.resource, fileToPaste)) { throw new Error(nls.localize('fileIsAncestor', "File to paste is an ancestor of the destination folder")); } diff --git a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts index 76fab053275..515f5737463 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts @@ -35,7 +35,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IDragAndDropData, DataTransfers } from 'vs/base/browser/dnd'; import { Schemas } from 'vs/base/common/network'; import { DesktopDragAndDropData, ExternalElementsDragAndDropData, ElementsDragAndDropData } from 'vs/base/browser/ui/list/listView'; -import { isMacintosh, isLinux } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/common/platform'; import { IDialogService, IConfirmationResult, IConfirmation, getConfirmMessage } from 'vs/platform/dialogs/common/dialogs'; import { ITextFileService, ITextFileOperationResult } from 'vs/workbench/services/textfile/common/textfiles'; import { IWindowService } from 'vs/platform/windows/common/windows'; @@ -515,7 +515,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop { return true; // Can not move a file to the same parent unless we copy } - if (isEqualOrParent(target.resource, source.resource, !isLinux /* ignorecase */)) { + if (isEqualOrParent(target.resource, source.resource)) { return true; // Can not move a parent folder into one of its children } @@ -655,8 +655,9 @@ export class FileDragAndDrop implements ITreeDragAndDrop { // Check for name collisions const targetNames = new Set(); if (targetStat.children) { + const ignoreCase = hasToIgnoreCase(target.resource); targetStat.children.forEach(child => { - targetNames.add(isLinux ? child.name : child.name.toLowerCase()); + targetNames.add(ignoreCase ? child.name : child.name.toLowerCase()); }); } diff --git a/src/vs/workbench/contrib/preferences/common/preferencesContribution.ts b/src/vs/workbench/contrib/preferences/common/preferencesContribution.ts index 246eaf2ed11..6e7f43ffcfa 100644 --- a/src/vs/workbench/contrib/preferences/common/preferencesContribution.ts +++ b/src/vs/workbench/contrib/preferences/common/preferencesContribution.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ import { dispose, IDisposable, DisposableStore } from 'vs/base/common/lifecycle'; -import { isLinux } from 'vs/base/common/platform'; import { isEqual } from 'vs/base/common/resources'; import { endsWith } from 'vs/base/common/strings'; import { URI } from 'vs/base/common/uri'; @@ -79,7 +78,7 @@ export class PreferencesContribution implements IWorkbenchContribution { } // Global User Settings File - if (isEqual(resource, this.environmentService.settingsResource, !isLinux)) { + if (isEqual(resource, this.environmentService.settingsResource)) { return { override: this.preferencesService.openGlobalSettings(true, options, group) }; } diff --git a/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts b/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts index 16e10299bd0..d0a81408c10 100644 --- a/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts +++ b/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts @@ -15,7 +15,7 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten import { RunOnceScheduler } from 'vs/base/common/async'; import { URI } from 'vs/base/common/uri'; import { isEqual } from 'vs/base/common/resources'; -import { isLinux, isMacintosh } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/common/platform'; import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; @@ -207,7 +207,7 @@ export class WorkspaceChangeExtHostRelauncher extends Disposable implements IWor // Restart extension host if first root folder changed (impact on deprecated workspace.rootPath API) const newFirstFolderResource = workspace.folders.length > 0 ? workspace.folders[0].uri : undefined; - if (!isEqual(this.firstFolderResource, newFirstFolderResource, !isLinux)) { + if (!isEqual(this.firstFolderResource, newFirstFolderResource)) { this.firstFolderResource = newFirstFolderResource; this.extensionHostRestarter.schedule(); // buffer calls to extension host restart diff --git a/src/vs/workbench/services/configuration/browser/configurationService.ts b/src/vs/workbench/services/configuration/browser/configurationService.ts index 618fb0bc326..d9c009c0a55 100644 --- a/src/vs/workbench/services/configuration/browser/configurationService.ts +++ b/src/vs/workbench/services/configuration/browser/configurationService.ts @@ -11,7 +11,6 @@ import { Disposable } from 'vs/base/common/lifecycle'; import { Queue, Barrier } from 'vs/base/common/async'; import { IJSONContributionRegistry, Extensions as JSONExtensions } from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; import { IWorkspaceContextService, Workspace, WorkbenchState, IWorkspaceFolder, toWorkspaceFolders, IWorkspaceFoldersChangeEvent, WorkspaceFolder, toWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; -import { isLinux } from 'vs/base/common/platform'; import { ConfigurationChangeEvent, ConfigurationModel, DefaultConfigurationModel } from 'vs/platform/configuration/common/configurationModels'; import { IConfigurationChangeEvent, ConfigurationTarget, IConfigurationOverrides, keyFromOverrideIdentifier, isConfigurationOverrides, IConfigurationData, IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { Configuration, WorkspaceConfigurationChangeEvent, AllKeysConfigurationChangeEvent } from 'vs/workbench/services/configuration/common/configurationModels'; @@ -225,13 +224,7 @@ export class WorkspaceService extends Disposable implements IConfigurationServic } private contains(resources: URI[], toCheck: URI): boolean { - return resources.some(resource => { - if (isLinux) { - return resource.toString() === toCheck.toString(); - } - - return resource.toString().toLowerCase() === toCheck.toString().toLowerCase(); - }); + return resources.some(resource => isEqual(resource, toCheck)); } // Workspace Configuration Service Impl diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index 9a70fd94b6a..b27c3277d70 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -24,7 +24,6 @@ import { RunOnceScheduler, timeout } from 'vs/base/common/async'; import { ITextBufferFactory } from 'vs/editor/common/model'; import { hash } from 'vs/base/common/hash'; import { INotificationService } from 'vs/platform/notification/common/notification'; -import { isLinux } from 'vs/base/common/platform'; import { toDisposable, MutableDisposable } from 'vs/base/common/lifecycle'; import { ILogService } from 'vs/platform/log/common/log'; import { isEqual, isEqualOrParent, extname, basename, joinPath } from 'vs/base/common/resources'; @@ -775,17 +774,17 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil } // Check for global settings file - if (isEqual(this.resource, this.environmentService.settingsResource, !isLinux)) { + if (isEqual(this.resource, this.environmentService.settingsResource)) { return 'global-settings'; } // Check for keybindings file - if (isEqual(this.resource, this.environmentService.keybindingsResource, !isLinux)) { + if (isEqual(this.resource, this.environmentService.keybindingsResource)) { return 'keybindings'; } // Check for locale file - if (isEqual(this.resource, joinPath(this.environmentService.appSettingsHome, 'locale.json'), !isLinux)) { + if (isEqual(this.resource, joinPath(this.environmentService.appSettingsHome, 'locale.json'))) { return 'locale'; } diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index 9b1c25db695..657d38bc817 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -436,7 +436,7 @@ export abstract class TextFileService extends Disposable implements ITextFileSer } async delete(resource: URI, options?: { useTrash?: boolean, recursive?: boolean }): Promise { - const dirtyFiles = this.getDirty().filter(dirty => isEqualOrParent(dirty, resource, !platform.isLinux /* ignorecase */)); + const dirtyFiles = this.getDirty().filter(dirty => isEqualOrParent(dirty, resource)); await this.revertAll(dirtyFiles, { soft: true }); @@ -467,7 +467,7 @@ export abstract class TextFileService extends Disposable implements ITextFileSer } // Handle dirty source models if existing (if source URI is a folder, this can be multiple) - const dirtySourceModels = this.getDirtyFileModels().filter(model => isEqualOrParent(model.getResource(), source, !platform.isLinux /* ignorecase */)); + const dirtySourceModels = this.getDirtyFileModels().filter(model => isEqualOrParent(model.getResource(), source)); const dirtyTargetModelUris: URI[] = []; if (dirtySourceModels.length) { await Promise.all(dirtySourceModels.map(async sourceModel => { @@ -475,7 +475,7 @@ export abstract class TextFileService extends Disposable implements ITextFileSer let targetModelResource: URI; // If the source is the actual model, just use target as new resource - if (isEqual(sourceModelResource, source, !platform.isLinux /* ignorecase */)) { + if (isEqual(sourceModelResource, source)) { targetModelResource = target; } diff --git a/src/vs/workbench/services/textfile/node/textFileService.ts b/src/vs/workbench/services/textfile/node/textFileService.ts index 242aadab987..a9c2a222a8f 100644 --- a/src/vs/workbench/services/textfile/node/textFileService.ts +++ b/src/vs/workbench/services/textfile/node/textFileService.ts @@ -13,7 +13,7 @@ import { IFileStatWithMetadata, ICreateFileOptions, FileOperationError, FileOper import { Schemas } from 'vs/base/common/network'; import { exists, stat, chmod, rimraf, MAX_FILE_SIZE, MAX_HEAP_SIZE } from 'vs/base/node/pfs'; import { join, dirname } from 'vs/base/common/path'; -import { isMacintosh, isLinux } from 'vs/base/common/platform'; +import { isMacintosh } from 'vs/base/common/platform'; import product from 'vs/platform/product/node/product'; import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; @@ -490,7 +490,7 @@ export class EncodingOracle extends Disposable implements IResourceEncodings { for (const override of this.encodingOverrides) { // check if the resource is child of encoding override path - if (override.parent && isEqualOrParent(resource, override.parent, !isLinux /* ignorecase */)) { + if (override.parent && isEqualOrParent(resource, override.parent)) { return override.encoding; } From 34d245ed44ca9b2780c658ceded53378abee0a03 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sun, 30 Jun 2019 20:10:28 +0200 Subject: [PATCH 026/710] trigger workspace contains activation event on new folders --- .../api/browser/mainThreadWorkspace.ts | 5 ++- .../workbench/api/common/extHost.protocol.ts | 2 +- .../api/node/extHostExtensionService.ts | 35 +++++++++++-------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadWorkspace.ts b/src/vs/workbench/api/browser/mainThreadWorkspace.ts index 6720db87bf9..b508baea7db 100644 --- a/src/vs/workbench/api/browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/browser/mainThreadWorkspace.ts @@ -179,10 +179,9 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape { return search; } - $checkExists(includes: string[], token: CancellationToken): Promise { + $checkExists(folders: UriComponents[], includes: string[], token: CancellationToken): Promise { const queryBuilder = this._instantiationService.createInstance(QueryBuilder); - const folders = this._contextService.getWorkspace().folders.map(folder => folder.uri); - const query = queryBuilder.file(folders, { + const query = queryBuilder.file(folders.map(folder => URI.revive(folder)), { _reason: 'checkExists', includePattern: includes.join(', '), expandPatterns: true, diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 2f51c54ee7c..4b7ea728692 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -578,7 +578,7 @@ export interface ITextSearchComplete { export interface MainThreadWorkspaceShape extends IDisposable { $startFileSearch(includePattern: string | undefined, includeFolder: UriComponents | undefined, excludePatternOrDisregardExcludes: string | false | undefined, maxResults: number | undefined, token: CancellationToken): Promise; $startTextSearch(query: search.IPatternInfo, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise; - $checkExists(includes: string[], token: CancellationToken): Promise; + $checkExists(folders: UriComponents[], includes: string[], token: CancellationToken): Promise; $saveAll(includeUntitled?: boolean): Promise; $updateWorkspaceFolders(extensionName: string, index: number, deleteCount: number, workspaceFoldersToAdd: { uri: UriComponents, name?: string }[]): Promise; $resolveProxy(url: string): Promise; diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index c5360322431..6f1b2c6cc74 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -7,7 +7,7 @@ import * as nls from 'vs/nls'; import * as path from 'vs/base/common/path'; import { originalFSPath } from 'vs/base/common/resources'; import { Barrier } from 'vs/base/common/async'; -import { dispose, toDisposable } from 'vs/base/common/lifecycle'; +import { dispose, toDisposable, DisposableStore } from 'vs/base/common/lifecycle'; import { TernarySearchTree } from 'vs/base/common/map'; import { URI } from 'vs/base/common/uri'; import { ILogService } from 'vs/platform/log/common/log'; @@ -26,7 +26,6 @@ import { CancellationTokenSource } from 'vs/base/common/cancellation'; import * as errors from 'vs/base/common/errors'; import * as vscode from 'vscode'; import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; import { Schemas } from 'vs/base/common/network'; import { withNullAsUndefined } from 'vs/base/common/types'; import { VSBuffer } from 'vs/base/common/buffer'; @@ -81,6 +80,8 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { private _started: boolean; + private readonly _disposables: DisposableStore; + constructor( hostUtils: IHostUtils, initData: IInitData, @@ -98,6 +99,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { this._extHostConfiguration = extHostConfiguration; this._environment = environment; this._extHostLogService = extHostLogService; + this._disposables = new DisposableStore(); this._mainThreadWorkspaceProxy = this._extHostContext.getProxy(MainContext.MainThreadWorkspace); this._mainThreadTelemetryProxy = this._extHostContext.getProxy(MainContext.MainThreadTelemetry); @@ -414,27 +416,32 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { console.error(err); }); - return this._handleWorkspaceContainsEagerExtensions(this._extHostWorkspace.workspace); + this._extHostWorkspace.onDidChangeWorkspace(({ added }) => this._handleWorkspaceContainsEagerExtensions(added), this, this._disposables); + const folders = this._extHostWorkspace.workspace ? this._extHostWorkspace.workspace.folders : []; + return this._handleWorkspaceContainsEagerExtensions(folders); } - private _handleWorkspaceContainsEagerExtensions(workspace: IWorkspace | undefined): Promise { - if (!workspace || workspace.folders.length === 0) { + private _handleWorkspaceContainsEagerExtensions(folders: ReadonlyArray): Promise { + if (folders.length === 0) { return Promise.resolve(undefined); } - return Promise.all( this._registry.getAllExtensionDescriptions().map((desc) => { - return this._handleWorkspaceContainsEagerExtension(workspace, desc); + return this._handleWorkspaceContainsEagerExtension(folders, desc); }) ).then(() => { }); } - private _handleWorkspaceContainsEagerExtension(workspace: IWorkspace, desc: IExtensionDescription): Promise { + private _handleWorkspaceContainsEagerExtension(folders: ReadonlyArray, desc: IExtensionDescription): Promise { const activationEvents = desc.activationEvents; if (!activationEvents) { return Promise.resolve(undefined); } + if (this.isActivated(desc.identifier)) { + return Promise.resolve(undefined); + } + const fileNames: string[] = []; const globPatterns: string[] = []; @@ -453,16 +460,16 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { return Promise.resolve(undefined); } - const fileNamePromise = Promise.all(fileNames.map((fileName) => this._activateIfFileName(workspace, desc.identifier, fileName))).then(() => { }); - const globPatternPromise = this._activateIfGlobPatterns(desc.identifier, globPatterns); + const fileNamePromise = Promise.all(fileNames.map((fileName) => this._activateIfFileName(folders, desc.identifier, fileName))).then(() => { }); + const globPatternPromise = this._activateIfGlobPatterns(desc.identifier, folders, globPatterns); return Promise.all([fileNamePromise, globPatternPromise]).then(() => { }); } - private async _activateIfFileName(workspace: IWorkspace, extensionId: ExtensionIdentifier, fileName: string): Promise { + private async _activateIfFileName(folders: ReadonlyArray, extensionId: ExtensionIdentifier, fileName: string): Promise { // find exact path - for (const { uri } of workspace.folders) { + for (const { uri } of folders) { if (await this._hostUtils.exists(path.join(URI.revive(uri).fsPath, fileName))) { // the file was found return ( @@ -475,7 +482,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { return undefined; } - private async _activateIfGlobPatterns(extensionId: ExtensionIdentifier, globPatterns: string[]): Promise { + private async _activateIfGlobPatterns(extensionId: ExtensionIdentifier, folders: ReadonlyArray, globPatterns: string[]): Promise { this._extHostLogService.trace(`extensionHostMain#activateIfGlobPatterns: fileSearch, extension: ${extensionId.value}, entryPoint: workspaceContains`); if (globPatterns.length === 0) { @@ -483,7 +490,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { } const tokenSource = new CancellationTokenSource(); - const searchP = this._mainThreadWorkspaceProxy.$checkExists(globPatterns, tokenSource.token); + const searchP = this._mainThreadWorkspaceProxy.$checkExists(folders.map(folder => folder.uri), globPatterns, tokenSource.token); const timer = setTimeout(async () => { tokenSource.cancel(); From 47f9ed5d22a635ef202880b50e0dda2dd65b9684 Mon Sep 17 00:00:00 2001 From: masliu <37888489+masliu@users.noreply.github.com> Date: Thu, 4 Jul 2019 21:37:28 -0400 Subject: [PATCH 027/710] Save source viewColumn for previews, fixes #74008 --- .../src/commands/showSource.ts | 8 +++++--- .../markdown-language-features/src/features/preview.ts | 10 ++++++++++ .../src/features/previewManager.ts | 5 +++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/extensions/markdown-language-features/src/commands/showSource.ts b/extensions/markdown-language-features/src/commands/showSource.ts index a916bccefc0..fb28397440b 100644 --- a/extensions/markdown-language-features/src/commands/showSource.ts +++ b/extensions/markdown-language-features/src/commands/showSource.ts @@ -15,9 +15,11 @@ export class ShowSourceCommand implements Command { ) { } public execute() { - if (this.previewManager.activePreviewResource) { - return vscode.workspace.openTextDocument(this.previewManager.activePreviewResource) - .then(document => vscode.window.showTextDocument(document)); + const { activePreviewResource, activePreviewSourceViewColumn } = this.previewManager; + if (activePreviewResource && activePreviewSourceViewColumn) { + return vscode.workspace.openTextDocument(activePreviewResource).then(document => { + vscode.window.showTextDocument(document, activePreviewSourceViewColumn); + }); } return undefined; } diff --git a/extensions/markdown-language-features/src/features/preview.ts b/extensions/markdown-language-features/src/features/preview.ts index 1479a6ea112..596c86e81b7 100644 --- a/extensions/markdown-language-features/src/features/preview.ts +++ b/extensions/markdown-language-features/src/features/preview.ts @@ -101,11 +101,13 @@ export class MarkdownPreview extends Disposable { const resource = vscode.Uri.parse(state.resource); const locked = state.locked; const line = state.line; + const sourceViewColumn = state.sourceViewColumn; const preview = new MarkdownPreview( webview, resource, locked, + sourceViewColumn, contentProvider, previewConfigurations, logger, @@ -124,6 +126,7 @@ export class MarkdownPreview extends Disposable { public static create( resource: vscode.Uri, previewColumn: vscode.ViewColumn, + resourceColumn: vscode.ViewColumn, locked: boolean, contentProvider: MarkdownContentProvider, previewConfigurations: MarkdownPreviewConfigurationManager, @@ -143,6 +146,7 @@ export class MarkdownPreview extends Disposable { webview, resource, locked, + resourceColumn, contentProvider, previewConfigurations, logger, @@ -154,6 +158,7 @@ export class MarkdownPreview extends Disposable { webview: vscode.WebviewPanel, resource: vscode.Uri, locked: boolean, + private readonly _sourceViewColumn: vscode.ViewColumn, private readonly _contentProvider: MarkdownContentProvider, private readonly _previewConfigurations: MarkdownPreviewConfigurationManager, private readonly _logger: Logger, @@ -248,11 +253,16 @@ export class MarkdownPreview extends Disposable { return this._resource; } + public get sourceViewColumn(): vscode.ViewColumn { + return this._sourceViewColumn; + } + public get state() { return { resource: this.resource.toString(), locked: this._locked, line: this.line, + sourceViewColumn: this.sourceViewColumn, imageInfo: this.imageInfo }; } diff --git a/extensions/markdown-language-features/src/features/previewManager.ts b/extensions/markdown-language-features/src/features/previewManager.ts index dda56c87172..db09c2aaa11 100644 --- a/extensions/markdown-language-features/src/features/previewManager.ts +++ b/extensions/markdown-language-features/src/features/previewManager.ts @@ -65,6 +65,10 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview return this._activePreview && this._activePreview.resource; } + public get activePreviewSourceViewColumn() { + return this._activePreview && this._activePreview.sourceViewColumn; + } + public toggleLock() { const preview = this._activePreview; if (preview) { @@ -110,6 +114,7 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview const preview = MarkdownPreview.create( resource, previewSettings.previewColumn, + previewSettings.resourceColumn, previewSettings.locked, this._contentProvider, this._previewConfigurations, From 173d010b0a40f0dd74339fb7eb39be530169b06a Mon Sep 17 00:00:00 2001 From: masliu <37888489+masliu@users.noreply.github.com> Date: Thu, 4 Jul 2019 22:29:23 -0400 Subject: [PATCH 028/710] Rename sourceViewColumn to resourceColumn --- .../src/commands/showSource.ts | 6 +++--- .../src/features/preview.ts | 12 ++++++------ .../src/features/previewManager.ts | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/extensions/markdown-language-features/src/commands/showSource.ts b/extensions/markdown-language-features/src/commands/showSource.ts index fb28397440b..d61a3211e8c 100644 --- a/extensions/markdown-language-features/src/commands/showSource.ts +++ b/extensions/markdown-language-features/src/commands/showSource.ts @@ -15,10 +15,10 @@ export class ShowSourceCommand implements Command { ) { } public execute() { - const { activePreviewResource, activePreviewSourceViewColumn } = this.previewManager; - if (activePreviewResource && activePreviewSourceViewColumn) { + const { activePreviewResource, activePreviewResourceColumn } = this.previewManager; + if (activePreviewResource && activePreviewResourceColumn) { return vscode.workspace.openTextDocument(activePreviewResource).then(document => { - vscode.window.showTextDocument(document, activePreviewSourceViewColumn); + vscode.window.showTextDocument(document, activePreviewResourceColumn); }); } return undefined; diff --git a/extensions/markdown-language-features/src/features/preview.ts b/extensions/markdown-language-features/src/features/preview.ts index 596c86e81b7..8822b8d4a61 100644 --- a/extensions/markdown-language-features/src/features/preview.ts +++ b/extensions/markdown-language-features/src/features/preview.ts @@ -101,13 +101,13 @@ export class MarkdownPreview extends Disposable { const resource = vscode.Uri.parse(state.resource); const locked = state.locked; const line = state.line; - const sourceViewColumn = state.sourceViewColumn; + const resourceColumn = state.resourceColumn; const preview = new MarkdownPreview( webview, resource, locked, - sourceViewColumn, + resourceColumn, contentProvider, previewConfigurations, logger, @@ -158,7 +158,7 @@ export class MarkdownPreview extends Disposable { webview: vscode.WebviewPanel, resource: vscode.Uri, locked: boolean, - private readonly _sourceViewColumn: vscode.ViewColumn, + private readonly _resourceColumn: vscode.ViewColumn, private readonly _contentProvider: MarkdownContentProvider, private readonly _previewConfigurations: MarkdownPreviewConfigurationManager, private readonly _logger: Logger, @@ -253,8 +253,8 @@ export class MarkdownPreview extends Disposable { return this._resource; } - public get sourceViewColumn(): vscode.ViewColumn { - return this._sourceViewColumn; + public get resourceColumn(): vscode.ViewColumn { + return this._resourceColumn; } public get state() { @@ -262,7 +262,7 @@ export class MarkdownPreview extends Disposable { resource: this.resource.toString(), locked: this._locked, line: this.line, - sourceViewColumn: this.sourceViewColumn, + resourceColumn: this.resourceColumn, imageInfo: this.imageInfo }; } diff --git a/extensions/markdown-language-features/src/features/previewManager.ts b/extensions/markdown-language-features/src/features/previewManager.ts index db09c2aaa11..3fc8106908b 100644 --- a/extensions/markdown-language-features/src/features/previewManager.ts +++ b/extensions/markdown-language-features/src/features/previewManager.ts @@ -65,8 +65,8 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview return this._activePreview && this._activePreview.resource; } - public get activePreviewSourceViewColumn() { - return this._activePreview && this._activePreview.sourceViewColumn; + public get activePreviewResourceColumn() { + return this._activePreview && this._activePreview.resourceColumn; } public toggleLock() { From b840bc0475d8caea27ae0f00444089a11be6d9ef Mon Sep 17 00:00:00 2001 From: skprabhanjan Date: Mon, 8 Jul 2019 10:50:22 +0530 Subject: [PATCH 029/710] Added Reveal in Side Bar Menu to search --- .../contrib/search/browser/search.contribution.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/vs/workbench/contrib/search/browser/search.contribution.ts b/src/vs/workbench/contrib/search/browser/search.contribution.ts index 8c46d8864bc..1bfee39db9e 100644 --- a/src/vs/workbench/contrib/search/browser/search.contribution.ts +++ b/src/vs/workbench/contrib/search/browser/search.contribution.ts @@ -55,6 +55,8 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { ISearchConfiguration, ISearchConfigurationProperties, PANEL_ID, VIEWLET_ID, VIEW_CONTAINER, VIEW_ID } from 'vs/workbench/services/search/common/search'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; +import { REVEAL_IN_EXPLORER_COMMAND_ID } from 'vs/workbench/contrib/files/browser/fileCommands'; +import { ResourceContextKey } from 'vs/workbench/common/resources'; registerSingleton(ISearchWorkbenchService, SearchWorkbenchService, true); @@ -212,6 +214,15 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ } }); +MenuRegistry.appendMenuItem(MenuId.SearchContext, { + command: { + id: REVEAL_IN_EXPLORER_COMMAND_ID, + title: nls.localize('revealInSideBar', "Reveal in Side Bar") + }, + when: ResourceContextKey.IsFileSystemResource && Constants.HasSearchResults, + group: '2_files', +}); + MenuRegistry.appendMenuItem(MenuId.SearchContext, { command: { id: Constants.ReplaceActionId, From 55be0a91fe785aefbb5fe5ff16ec9be544600a0c Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 8 Jul 2019 15:45:08 -0700 Subject: [PATCH 030/710] xterm@3.15.0-beta70 Diff: https://github.com/xtermjs/xterm.js/compare/f235d70...44a843b Changes: - Parser sub-parameters/colon notation - Webgl simplify atlas/fix npe - Move sound into browser - Fix keyup event (related #76050) --- package.json | 4 ++-- remote/package.json | 2 +- remote/yarn.lock | 8 ++++---- yarn.lock | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 4b7ec1f3164..692d2e95e94 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "vscode-ripgrep": "^1.3.1", "vscode-sqlite3": "4.0.8", "vscode-textmate": "^4.1.1", - "xterm": "3.15.0-beta67", + "xterm": "3.15.0-beta70", "xterm-addon-search": "0.2.0-beta2", "xterm-addon-web-links": "0.1.0-beta10", "yauzl": "^2.9.2", @@ -156,4 +156,4 @@ "windows-mutex": "0.2.1", "windows-process-tree": "0.2.3" } -} \ No newline at end of file +} diff --git a/remote/package.json b/remote/package.json index f6c663cb0ad..291b4bde809 100644 --- a/remote/package.json +++ b/remote/package.json @@ -21,7 +21,7 @@ "vscode-proxy-agent": "0.4.0", "vscode-ripgrep": "^1.3.1", "vscode-textmate": "^4.1.1", - "xterm": "3.15.0-beta67", + "xterm": "3.15.0-beta70", "xterm-addon-search": "0.2.0-beta2", "xterm-addon-web-links": "0.1.0-beta10", "yauzl": "^2.9.2", diff --git a/remote/yarn.lock b/remote/yarn.lock index 288e1f3e2cb..98ea4a5acd8 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -1554,10 +1554,10 @@ xterm-addon-web-links@0.1.0-beta10: resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.1.0-beta10.tgz#610fa9773a2a5ccd41c1c83ba0e2dd2c9eb66a23" integrity sha512-xfpjy0V6bB4BR44qIgZQPoCMVakxb65gMscPkHpO//QxvUxKzabV3dxOsIbeZRFkUGsWTFlvz2OoaBLoNtv5gg== -xterm@3.15.0-beta67: - version "3.15.0-beta67" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta67.tgz#71973e174bdc08df620945eecd3f87912f1ac550" - integrity sha512-qLfo9GHVlu/IxgDI3vRGObWZM7UL4eLhMfjZhprx2aXNMpzmrOW6l3JDRsCjUWm93EoVavbULtnDhGSiTlKitQ== +xterm@3.15.0-beta70: + version "3.15.0-beta70" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta70.tgz#3e81f32e8cd7147f9a0764fbe2599c277c697a74" + integrity sha512-VXhEbWwaxrs9Ac2KuTCmGX7Ktd0V+rVF5sdjXBsq/KBCtnUdwNzKnEjamNPsoNTDUv9y93INEbq82X7iBs1Gwg== yauzl@^2.9.2: version "2.10.0" diff --git a/yarn.lock b/yarn.lock index ec6484d334d..c763890e7b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9822,10 +9822,10 @@ xterm-addon-web-links@0.1.0-beta10: resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.1.0-beta10.tgz#610fa9773a2a5ccd41c1c83ba0e2dd2c9eb66a23" integrity sha512-xfpjy0V6bB4BR44qIgZQPoCMVakxb65gMscPkHpO//QxvUxKzabV3dxOsIbeZRFkUGsWTFlvz2OoaBLoNtv5gg== -xterm@3.15.0-beta67: - version "3.15.0-beta67" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta67.tgz#71973e174bdc08df620945eecd3f87912f1ac550" - integrity sha512-qLfo9GHVlu/IxgDI3vRGObWZM7UL4eLhMfjZhprx2aXNMpzmrOW6l3JDRsCjUWm93EoVavbULtnDhGSiTlKitQ== +xterm@3.15.0-beta70: + version "3.15.0-beta70" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta70.tgz#3e81f32e8cd7147f9a0764fbe2599c277c697a74" + integrity sha512-VXhEbWwaxrs9Ac2KuTCmGX7Ktd0V+rVF5sdjXBsq/KBCtnUdwNzKnEjamNPsoNTDUv9y93INEbq82X7iBs1Gwg== y18n@^3.2.1: version "3.2.1" From 28e32d1936a168e653111a8d391e71ac74abb9dc Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 8 Jul 2019 16:05:03 -0700 Subject: [PATCH 031/710] Add commands for terminal navigation mode Part of #76050 --- .../standalone/browser/standaloneServices.ts | 4 +- .../accessibility/common/accessibility.ts | 5 +- .../common/accessibilityService.ts | 26 +++++- .../terminal/browser/terminal.contribution.ts | 20 ++++- .../terminal/browser/terminalActions.ts | 42 +++++++++ .../terminal/browser/terminalInstance.ts | 85 ++++++++++++++++++- .../contrib/terminal/common/terminal.ts | 6 ++ .../terminal/common/terminalCommands.ts | 2 + .../node/accessibilityService.ts | 29 ++++++- 9 files changed, 207 insertions(+), 12 deletions(-) diff --git a/src/vs/editor/standalone/browser/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts index 996798d3d6a..f1129bd3a72 100644 --- a/src/vs/editor/standalone/browser/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts @@ -140,8 +140,6 @@ export module StaticServices { export const notificationService = define(INotificationService, () => new SimpleNotificationService()); - export const accessibilityService = define(IAccessibilityService, () => new BrowserAccessibilityService()); - export const markerService = define(IMarkerService, () => new MarkerService()); export const modeService = define(IModeService, (o) => new ModeServiceImpl()); @@ -194,6 +192,8 @@ export class DynamicStandaloneServices extends Disposable { let contextKeyService = ensure(IContextKeyService, () => this._register(new ContextKeyService(configurationService))); + ensure(IAccessibilityService, () => new BrowserAccessibilityService(contextKeyService, configurationService)); + ensure(IListService, () => new ListService(contextKeyService)); let commandService = ensure(ICommandService, () => new StandaloneCommandService(this._instantiationService)); diff --git a/src/vs/platform/accessibility/common/accessibility.ts b/src/vs/platform/accessibility/common/accessibility.ts index 72be5a7f6b5..4e695b039f9 100644 --- a/src/vs/platform/accessibility/common/accessibility.ts +++ b/src/vs/platform/accessibility/common/accessibility.ts @@ -5,6 +5,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Event } from 'vs/base/common/event'; +import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; export const IAccessibilityService = createDecorator('accessibilityService'); @@ -27,4 +28,6 @@ export const enum AccessibilitySupport { Disabled = 1, Enabled = 2 -} \ No newline at end of file +} + +export const CONTEXT_ACCESSIBILITY_MODE_ENABLED = new RawContextKey('accessibilityModeEnabled', false); diff --git a/src/vs/platform/accessibility/common/accessibilityService.ts b/src/vs/platform/accessibility/common/accessibilityService.ts index 8af1badf8ae..902531f7a19 100644 --- a/src/vs/platform/accessibility/common/accessibilityService.ts +++ b/src/vs/platform/accessibility/common/accessibilityService.ts @@ -4,17 +4,34 @@ *--------------------------------------------------------------------------------------------*/ import { Emitter, Event } from 'vs/base/common/event'; -import { IAccessibilityService, AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility'; +import { IAccessibilityService, AccessibilitySupport, CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vs/platform/accessibility/common/accessibility'; import { Disposable } from 'vs/base/common/lifecycle'; +import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; export class BrowserAccessibilityService extends Disposable implements IAccessibilityService { _serviceBrand: any; private _accessibilitySupport = AccessibilitySupport.Unknown; + private _accessibilityModeEnabledContext: IContextKey; private readonly _onDidChangeAccessibilitySupport = new Emitter(); readonly onDidChangeAccessibilitySupport: Event = this._onDidChangeAccessibilitySupport.event; + constructor( + @IContextKeyService private readonly _contextKeyService: IContextKeyService, + @IConfigurationService private readonly _configurationService: IConfigurationService, + ) { + super(); + this._accessibilityModeEnabledContext = CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService); + this._register(this._configurationService.onDidChangeConfiguration(e => { + if (e.affectsConfiguration('editor.accessibilitySupport')) { + this._updateContextKey(); + } + })); + this._updateContextKey(); + } + alwaysUnderlineAccessKeys(): Promise { return Promise.resolve(false); } @@ -26,9 +43,16 @@ export class BrowserAccessibilityService extends Disposable implements IAccessib this._accessibilitySupport = accessibilitySupport; this._onDidChangeAccessibilitySupport.fire(); + this._updateContextKey(); } getAccessibilitySupport(): AccessibilitySupport { return this._accessibilitySupport; } + + private _updateContextKey(): void { + const detected = this.getAccessibilitySupport() === AccessibilitySupport.Enabled; + const config = this._configurationService.getValue('editor.accessibilitySupport'); + this._accessibilityModeEnabledContext.set(config === 'on' || (config === 'auto' && detected)); + } } \ No newline at end of file diff --git a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts index 14a1be7a866..963f369ea7f 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts @@ -20,10 +20,10 @@ import * as panel from 'vs/workbench/browser/panel'; import { getQuickNavigateHandler } from 'vs/workbench/browser/parts/quickopen/quickopen'; import { Extensions as QuickOpenExtensions, IQuickOpenRegistry, QuickOpenHandlerDescriptor } from 'vs/workbench/browser/quickopen'; import { Extensions as ActionExtensions, IWorkbenchActionRegistry } from 'vs/workbench/common/actions'; -import { AllowWorkspaceShellTerminalCommand, ClearSelectionTerminalAction, ClearTerminalAction, CopyTerminalSelectionAction, CreateNewInActiveWorkspaceTerminalAction, CreateNewTerminalAction, DeleteToLineStartTerminalAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction, DisallowWorkspaceShellTerminalCommand, FindNext, FindPrevious, FocusActiveTerminalAction, FocusNextPaneTerminalAction, FocusNextTerminalAction, FocusPreviousPaneTerminalAction, FocusPreviousTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, KillTerminalAction, MoveToLineEndTerminalAction, MoveToLineStartTerminalAction, QuickOpenActionTermContributor, QuickOpenTermAction, RenameTerminalAction, ResizePaneDownTerminalAction, ResizePaneLeftTerminalAction, ResizePaneRightTerminalAction, ResizePaneUpTerminalAction, RunActiveFileInTerminalAction, RunSelectedTextInTerminalAction, ScrollDownPageTerminalAction, ScrollDownTerminalAction, ScrollToBottomTerminalAction, ScrollToNextCommandAction, ScrollToPreviousCommandAction, ScrollToTopTerminalAction, ScrollUpPageTerminalAction, ScrollUpTerminalAction, SelectAllTerminalAction, SelectDefaultShellWindowsTerminalAction, SelectToNextCommandAction, SelectToNextLineAction, SelectToPreviousCommandAction, SelectToPreviousLineAction, SendSequenceTerminalCommand, SplitInActiveWorkspaceTerminalAction, SplitTerminalAction, TerminalPasteAction, TERMINAL_PICKER_PREFIX, ToggleCaseSensitiveCommand, ToggleEscapeSequenceLoggingAction, ToggleRegexCommand, ToggleTerminalAction, ToggleWholeWordCommand } from 'vs/workbench/contrib/terminal/browser/terminalActions'; +import { AllowWorkspaceShellTerminalCommand, ClearSelectionTerminalAction, ClearTerminalAction, CopyTerminalSelectionAction, CreateNewInActiveWorkspaceTerminalAction, CreateNewTerminalAction, DeleteToLineStartTerminalAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction, DisallowWorkspaceShellTerminalCommand, FindNext, FindPrevious, FocusActiveTerminalAction, FocusNextPaneTerminalAction, FocusNextTerminalAction, FocusPreviousPaneTerminalAction, FocusPreviousTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, KillTerminalAction, MoveToLineEndTerminalAction, MoveToLineStartTerminalAction, QuickOpenActionTermContributor, QuickOpenTermAction, RenameTerminalAction, ResizePaneDownTerminalAction, ResizePaneLeftTerminalAction, ResizePaneRightTerminalAction, ResizePaneUpTerminalAction, RunActiveFileInTerminalAction, RunSelectedTextInTerminalAction, ScrollDownPageTerminalAction, ScrollDownTerminalAction, ScrollToBottomTerminalAction, ScrollToNextCommandAction, ScrollToPreviousCommandAction, ScrollToTopTerminalAction, ScrollUpPageTerminalAction, ScrollUpTerminalAction, SelectAllTerminalAction, SelectDefaultShellWindowsTerminalAction, SelectToNextCommandAction, SelectToNextLineAction, SelectToPreviousCommandAction, SelectToPreviousLineAction, SendSequenceTerminalCommand, SplitInActiveWorkspaceTerminalAction, SplitTerminalAction, TerminalPasteAction, TERMINAL_PICKER_PREFIX, ToggleCaseSensitiveCommand, ToggleEscapeSequenceLoggingAction, ToggleRegexCommand, ToggleTerminalAction, ToggleWholeWordCommand, FocusPreviousA11yLineTerminalAction, FocusNextA11yLineTerminalAction } from 'vs/workbench/contrib/terminal/browser/terminalActions'; import { TerminalPanel } from 'vs/workbench/contrib/terminal/browser/terminalPanel'; import { TerminalPickerHandler } from 'vs/workbench/contrib/terminal/browser/terminalQuickOpen'; -import { KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_NOT_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, DEFAULT_LETTER_SPACING, DEFAULT_LINE_HEIGHT, TerminalCursorStyle, ITerminalService, TERMINAL_ACTION_CATEGORY } from 'vs/workbench/contrib/terminal/common/terminal'; +import { KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_NOT_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, DEFAULT_LETTER_SPACING, DEFAULT_LINE_HEIGHT, TerminalCursorStyle, ITerminalService, TERMINAL_ACTION_CATEGORY, KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS } from 'vs/workbench/contrib/terminal/common/terminal'; import { registerColors } from 'vs/workbench/contrib/terminal/common/terminalColorRegistry'; import { setupTerminalCommands, TERMINAL_COMMAND_ID } from 'vs/workbench/contrib/terminal/common/terminalCommands'; import { setupTerminalMenu } from 'vs/workbench/contrib/terminal/common/terminalMenu'; @@ -33,6 +33,7 @@ import { DEFAULT_COMMANDS_TO_SKIP_SHELL } from 'vs/workbench/contrib/terminal/br import { TerminalService } from 'vs/workbench/contrib/terminal/browser/terminalService'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { registerShellConfiguration } from 'vs/workbench/contrib/terminal/common/terminalShellConfig'; +import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vs/platform/accessibility/common/accessibility'; registerSingleton(ITerminalService, TerminalService, true); @@ -459,6 +460,21 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(SelectToNextComm primary: 0, mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.DownArrow } }, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Select To Next Command', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusActiveTerminalAction, FocusActiveTerminalAction.ID, FocusActiveTerminalAction.LABEL, { + primary: KeyCode.Escape +}, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS, CONTEXT_ACCESSIBILITY_MODE_ENABLED)), 'Terminal: Exit Navigation Mode', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusPreviousA11yLineTerminalAction, FocusPreviousA11yLineTerminalAction.ID, FocusPreviousA11yLineTerminalAction.LABEL, { + primary: KeyMod.CtrlCmd | KeyCode.UpArrow +}, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, CONTEXT_ACCESSIBILITY_MODE_ENABLED)), 'Terminal: Focus Previous Line (Navigation Mode)', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusPreviousA11yLineTerminalAction, FocusPreviousA11yLineTerminalAction.ID, FocusPreviousA11yLineTerminalAction.LABEL, { + primary: KeyMod.CtrlCmd | KeyCode.UpArrow +}, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS, CONTEXT_ACCESSIBILITY_MODE_ENABLED)), 'Terminal: Focus Previous Line (Navigation Mode)', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusNextA11yLineTerminalAction, FocusNextA11yLineTerminalAction.ID, FocusNextA11yLineTerminalAction.LABEL, { + primary: KeyMod.CtrlCmd | KeyCode.DownArrow +}, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, CONTEXT_ACCESSIBILITY_MODE_ENABLED)), 'Terminal: Focus Next Line (Navigation Mode)', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusNextA11yLineTerminalAction, FocusNextA11yLineTerminalAction.ID, FocusNextA11yLineTerminalAction.LABEL, { + primary: KeyMod.CtrlCmd | KeyCode.DownArrow +}, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS, CONTEXT_ACCESSIBILITY_MODE_ENABLED)), 'Terminal: Focus Next Line (Navigation Mode)', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(SelectToPreviousLineAction, SelectToPreviousLineAction.ID, SelectToPreviousLineAction.LABEL), 'Terminal: Select To Previous Line', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(SelectToNextLineAction, SelectToNextLineAction.ID, SelectToNextLineAction.LABEL), 'Terminal: Select To Next Line', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleEscapeSequenceLoggingAction, ToggleEscapeSequenceLoggingAction.ID, ToggleEscapeSequenceLoggingAction.LABEL), 'Terminal: Toggle Escape Sequence Logging', category); diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index 0e01b387a47..26808c1cfea 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -886,6 +886,48 @@ export class ScrollToTopTerminalAction extends Action { } } +export class FocusPreviousA11yLineTerminalAction extends Action { + + public static readonly ID = TERMINAL_COMMAND_ID.FOCUS_PREVIOUS_A11Y_LINE; + public static readonly LABEL = nls.localize('workbench.action.terminal.focusPreviousA11yLine', "Focus Previous Line (Accessibility Mode)"); + + constructor( + id: string, label: string, + @ITerminalService private readonly terminalService: ITerminalService + ) { + super(id, label); + } + + public run(event?: any): Promise { + const terminalInstance = this.terminalService.getActiveInstance(); + if (terminalInstance) { + terminalInstance.focusPreviousA11yLine(); + } + return Promise.resolve(undefined); + } +} + +export class FocusNextA11yLineTerminalAction extends Action { + + public static readonly ID = TERMINAL_COMMAND_ID.FOCUS_NEXT_A11Y_LINE; + public static readonly LABEL = nls.localize('workbench.action.terminal.focusNextA11yLine', "Focus Next Line (Accessibility Mode)"); + + constructor( + id: string, label: string, + @ITerminalService private readonly terminalService: ITerminalService + ) { + super(id, label); + } + + public run(event?: any): Promise { + const terminalInstance = this.terminalService.getActiveInstance(); + if (terminalInstance) { + terminalInstance.focusNextA11yLine(); + } + return Promise.resolve(undefined); + } +} + export class ClearTerminalAction extends Action { public static readonly ID = TERMINAL_COMMAND_ID.CLEAR; diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index 76c6127aa99..9669b793e8b 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -25,7 +25,7 @@ import { activeContrastBorder, scrollbarSliderActiveBackground, scrollbarSliderB import { ICssStyleCollector, ITheme, IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { PANEL_BACKGROUND } from 'vs/workbench/common/theme'; import { TerminalWidgetManager } from 'vs/workbench/contrib/terminal/browser/terminalWidgetManager'; -import { IShellLaunchConfig, ITerminalDimensions, ITerminalInstance, ITerminalProcessManager, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, NEVER_MEASURE_RENDER_TIME_STORAGE_KEY, ProcessState, TERMINAL_PANEL_ID, IWindowsShellHelper, SHELL_PATH_INVALID_EXIT_CODE, SHELL_PATH_DIRECTORY_EXIT_CODE, SHELL_CWD_INVALID_EXIT_CODE } from 'vs/workbench/contrib/terminal/common/terminal'; +import { IShellLaunchConfig, ITerminalDimensions, ITerminalInstance, ITerminalProcessManager, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, NEVER_MEASURE_RENDER_TIME_STORAGE_KEY, ProcessState, TERMINAL_PANEL_ID, IWindowsShellHelper, SHELL_PATH_INVALID_EXIT_CODE, SHELL_PATH_DIRECTORY_EXIT_CODE, SHELL_CWD_INVALID_EXIT_CODE, KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS } from 'vs/workbench/contrib/terminal/common/terminal'; import { ansiColorIdentifiers, TERMINAL_BACKGROUND_COLOR, TERMINAL_CURSOR_BACKGROUND_COLOR, TERMINAL_CURSOR_FOREGROUND_COLOR, TERMINAL_FOREGROUND_COLOR, TERMINAL_SELECTION_BACKGROUND_COLOR } from 'vs/workbench/contrib/terminal/common/terminalColorRegistry'; import { TERMINAL_COMMAND_ID } from 'vs/workbench/contrib/terminal/common/terminalCommands'; import { TerminalConfigHelper } from 'vs/workbench/contrib/terminal/browser/terminalConfigHelper'; @@ -57,8 +57,10 @@ export const DEFAULT_COMMANDS_TO_SKIP_SHELL: string[] = [ TERMINAL_COMMAND_ID.TOGGLE_FIND_REGEX_TERMINAL_FOCUS, TERMINAL_COMMAND_ID.TOGGLE_FIND_WHOLE_WORD_TERMINAL_FOCUS, TERMINAL_COMMAND_ID.TOGGLE_FIND_CASE_SENSITIVE_TERMINAL_FOCUS, + TERMINAL_COMMAND_ID.FOCUS_NEXT_A11Y_LINE, TERMINAL_COMMAND_ID.FOCUS_NEXT_PANE, TERMINAL_COMMAND_ID.FOCUS_NEXT, + TERMINAL_COMMAND_ID.FOCUS_PREVIOUS_A11Y_LINE, TERMINAL_COMMAND_ID.FOCUS_PREVIOUS_PANE, TERMINAL_COMMAND_ID.FOCUS_PREVIOUS, TERMINAL_COMMAND_ID.FOCUS, @@ -172,6 +174,7 @@ export class TerminalInstance implements ITerminalInstance { private _xtermSearch: SearchAddon | undefined; private _xtermElement: HTMLDivElement; private _terminalHasTextContextKey: IContextKey; + private _terminalA11yTreeFocusContextKey: IContextKey; private _cols: number; private _rows: number; private _dimensionsOverride: ITerminalDimensions | undefined; @@ -270,6 +273,7 @@ export class TerminalInstance implements ITerminalInstance { }); this._terminalHasTextContextKey = KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED.bindTo(this._contextKeyService); + this._terminalA11yTreeFocusContextKey = KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS.bindTo(this._contextKeyService); this.disableLayout = false; this._logService.trace(`terminalInstance#ctor (id: ${this.id})`, this._shellLaunchConfig); @@ -907,6 +911,84 @@ export class TerminalInstance implements ITerminalInstance { } } + public focusPreviousA11yLine(): void { + // Focus previous row if a row is already focused + if (document.activeElement && document.activeElement.parentElement && document.activeElement.parentElement.classList.contains('xterm-accessibility-tree')) { + const element = document.activeElement.previousElementSibling; + if (element) { + element.focus(); + const disposable = dom.addDisposableListener(element, 'blur', () => { + this._terminalA11yTreeFocusContextKey.set(false); + disposable.dispose(); + }); + this._terminalA11yTreeFocusContextKey.set(true); + } + return; + } + + // Ensure a11y tree exists + const treeContainer = this._xterm.element.querySelector('.xterm-accessibility-tree'); + if (!treeContainer) { + return; + } + + // Target is row before the cursor + const targetRow = Math.max(this._xterm.buffer.cursorY - 1, 0); + + // Check bounds + if (treeContainer.childElementCount < targetRow) { + return; + } + + // Focus + const element = treeContainer.childNodes.item(targetRow); + element.focus(); + const disposable = dom.addDisposableListener(element, 'blur', () => { + this._terminalA11yTreeFocusContextKey.set(false); + disposable.dispose(); + }); + this._terminalA11yTreeFocusContextKey.set(true); + } + + public focusNextA11yLine(): void { + // Focus previous row if a row is already focused + if (document.activeElement && document.activeElement.parentElement && document.activeElement.parentElement.classList.contains('xterm-accessibility-tree')) { + const element = document.activeElement.nextElementSibling; + if (element) { + element.focus(); + const disposable = dom.addDisposableListener(element, 'blur', () => { + this._terminalA11yTreeFocusContextKey.set(false); + disposable.dispose(); + }); + this._terminalA11yTreeFocusContextKey.set(true); + } + return; + } + + // Ensure a11y tree exists + const treeContainer = this._xterm.element.querySelector('.xterm-accessibility-tree'); + if (!treeContainer) { + return; + } + + // Target is cursor row + const targetRow = this._xterm.buffer.cursorY; + + // Check bounds + if (treeContainer.childElementCount < targetRow) { + return; + } + + // Focus row before cursor + const element = treeContainer.childNodes.item(targetRow); + element.focus(); + const disposable = dom.addDisposableListener(element, 'blur', () => { + this._terminalA11yTreeFocusContextKey.set(false); + disposable.dispose(); + }); + this._terminalA11yTreeFocusContextKey.set(true); + } + public scrollDownLine(): void { this._xterm.scrollLines(1); } @@ -938,7 +1020,6 @@ export class TerminalInstance implements ITerminalInstance { private _refreshSelectionContextKey() { const activePanel = this._panelService.getActivePanel(); const isActive = !!activePanel && activePanel.getId() === TERMINAL_PANEL_ID; - this._terminalHasTextContextKey.set(isActive && this.hasSelection()); } diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index 643d0aaeda2..e12b4483ef6 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -21,6 +21,8 @@ export const KEYBINDING_CONTEXT_TERMINAL_IS_OPEN = new RawContextKey('t export const KEYBINDING_CONTEXT_TERMINAL_FOCUS = new RawContextKey('terminalFocus', false); /** A context key that is set when the integrated terminal does not have focus. */ export const KEYBINDING_CONTEXT_TERMINAL_NOT_FOCUSED: ContextKeyExpr = KEYBINDING_CONTEXT_TERMINAL_FOCUS.toNegated(); +/** A context key that is set when the user is navigating the accessibility tree */ +export const KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS = new RawContextKey('terminalA11yTreeFocus', false); /** A keybinding context key that is set when the integrated terminal has text selected. */ export const KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED = new RawContextKey('terminalTextSelected', false); @@ -615,6 +617,10 @@ export interface ITerminalInstance { /** Scroll the terminal buffer to the top. */ scrollToTop(): void; + /** Focus the previous line in the accessibility tree */ + focusPreviousA11yLine(): void; + focusNextA11yLine(): void; + /** * Clears the terminal buffer, leaving only the prompt line. */ diff --git a/src/vs/workbench/contrib/terminal/common/terminalCommands.ts b/src/vs/workbench/contrib/terminal/common/terminalCommands.ts index 8dd482ffbab..2533c9875ab 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalCommands.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalCommands.ts @@ -34,7 +34,9 @@ export const enum TERMINAL_COMMAND_ID { RESIZE_PANE_DOWN = 'workbench.action.terminal.resizePaneDown', FOCUS = 'workbench.action.terminal.focus', FOCUS_NEXT = 'workbench.action.terminal.focusNext', + FOCUS_NEXT_A11Y_LINE = 'workbench.action.terminal.focusNextA11yLine', FOCUS_PREVIOUS = 'workbench.action.terminal.focusPrevious', + FOCUS_PREVIOUS_A11Y_LINE = 'workbench.action.terminal.focusPreviousA11yLine', PASTE = 'workbench.action.terminal.paste', SELECT_DEFAULT_SHELL = 'workbench.action.terminal.selectDefaultShell', RUN_SELECTED_TEXT = 'workbench.action.terminal.runSelectedText', diff --git a/src/vs/workbench/services/accessibility/node/accessibilityService.ts b/src/vs/workbench/services/accessibility/node/accessibilityService.ts index d9ace4fc45b..1efe4edadc0 100644 --- a/src/vs/workbench/services/accessibility/node/accessibilityService.ts +++ b/src/vs/workbench/services/accessibility/node/accessibilityService.ts @@ -3,21 +3,36 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IAccessibilityService, AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility'; +import { IAccessibilityService, AccessibilitySupport, CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vs/platform/accessibility/common/accessibility'; import { isWindows } from 'vs/base/common/platform'; import { Emitter, Event } from 'vs/base/common/event'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; +import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { Disposable } from 'vs/base/common/lifecycle'; -export class AccessibilityService implements IAccessibilityService { +export class AccessibilityService extends Disposable implements IAccessibilityService { _serviceBrand: any; private _accessibilitySupport = AccessibilitySupport.Unknown; + private _accessibilityModeEnabledContext: IContextKey; private readonly _onDidChangeAccessibilitySupport = new Emitter(); readonly onDidChangeAccessibilitySupport: Event = this._onDidChangeAccessibilitySupport.event; constructor( - @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService - ) { } + @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, + @IContextKeyService private readonly _contextKeyService: IContextKeyService, + @IConfigurationService private readonly _configurationService: IConfigurationService + ) { + super(); + this._accessibilityModeEnabledContext = CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService); + this._register(this._configurationService.onDidChangeConfiguration(e => { + if (e.affectsConfiguration('editor.accessibilitySupport')) { + this._updateContextKey(); + } + })); + this._updateContextKey(); + } alwaysUnderlineAccessKeys(): Promise { if (!isWindows) { @@ -55,4 +70,10 @@ export class AccessibilityService implements IAccessibilityService { return this._accessibilitySupport; } + + private _updateContextKey(): void { + const detected = this.getAccessibilitySupport() === AccessibilitySupport.Enabled; + const config = this._configurationService.getValue('editor.accessibilitySupport'); + this._accessibilityModeEnabledContext.set(config === 'on' || (config === 'auto' && detected)); + } } \ No newline at end of file From 5e15bad1f4e82d4cc1db9fa3e8a76ac971a89923 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 8 Jul 2019 16:55:41 -0700 Subject: [PATCH 032/710] Add commands for terminal navigation mode --- .../browser/addons/navigationModeAddon.ts | 106 ++++++++++++++++++ .../terminal/browser/terminal.contribution.ts | 12 +- .../terminal/browser/terminalActions.ts | 43 +++++-- .../terminal/browser/terminalInstance.ts | 104 ++++------------- .../contrib/terminal/common/terminal.ts | 23 ++-- .../terminal/common/terminalCommands.ts | 5 +- 6 files changed, 176 insertions(+), 117 deletions(-) create mode 100644 src/vs/workbench/contrib/terminal/browser/addons/navigationModeAddon.ts diff --git a/src/vs/workbench/contrib/terminal/browser/addons/navigationModeAddon.ts b/src/vs/workbench/contrib/terminal/browser/addons/navigationModeAddon.ts new file mode 100644 index 00000000000..74542173298 --- /dev/null +++ b/src/vs/workbench/contrib/terminal/browser/addons/navigationModeAddon.ts @@ -0,0 +1,106 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { IContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { Terminal, ITerminalAddon } from 'xterm'; +import { addDisposableListener } from 'vs/base/browser/dom'; +import { INavigationMode } from 'vs/workbench/contrib/terminal/common/terminal'; + +export class NavigationModeAddon implements INavigationMode, ITerminalAddon { + private _terminal: Terminal; + + constructor( + private _navigationModeContextKey: IContextKey + ) { } + + activate(terminal: Terminal): void { + this._terminal = terminal; + } + + dispose() { } + + exitNavigationMode(): void { + this._terminal.scrollToBottom(); + this._terminal.focus(); + } + + focusPreviousLine(): void { + // Focus previous row if a row is already focused + if (document.activeElement && document.activeElement.parentElement && document.activeElement.parentElement.classList.contains('xterm-accessibility-tree')) { + const element = document.activeElement.previousElementSibling; + if (element) { + element.focus(); + const disposable = addDisposableListener(element, 'blur', () => { + this._navigationModeContextKey.set(false); + disposable.dispose(); + }); + this._navigationModeContextKey.set(true); + } + return; + } + + // Ensure a11y tree exists + const treeContainer = this._terminal.element.querySelector('.xterm-accessibility-tree'); + if (!treeContainer) { + return; + } + + // Target is row before the cursor + const targetRow = Math.max(this._terminal.buffer.cursorY - 1, 0); + + // Check bounds + if (treeContainer.childElementCount < targetRow) { + return; + } + + // Focus + const element = treeContainer.childNodes.item(targetRow); + element.focus(); + const disposable = addDisposableListener(element, 'blur', () => { + this._navigationModeContextKey.set(false); + disposable.dispose(); + }); + this._navigationModeContextKey.set(true); + } + + focusNextLine(): void { + // Focus previous row if a row is already focused + if (document.activeElement && document.activeElement.parentElement && document.activeElement.parentElement.classList.contains('xterm-accessibility-tree')) { + const element = document.activeElement.nextElementSibling; + if (element) { + element.focus(); + const disposable = addDisposableListener(element, 'blur', () => { + this._navigationModeContextKey.set(false); + disposable.dispose(); + }); + this._navigationModeContextKey.set(true); + } + return; + } + + // Ensure a11y tree exists + const treeContainer = this._terminal.element.querySelector('.xterm-accessibility-tree'); + if (!treeContainer) { + return; + } + + // Target is cursor row + const targetRow = this._terminal.buffer.cursorY; + + // Check bounds + if (treeContainer.childElementCount < targetRow) { + return; + } + + // Focus row before cursor + const element = treeContainer.childNodes.item(targetRow); + element.focus(); + const disposable = addDisposableListener(element, 'blur', () => { + this._navigationModeContextKey.set(false); + disposable.dispose(); + }); + this._navigationModeContextKey.set(true); + } +} \ No newline at end of file diff --git a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts index 963f369ea7f..08fc487af2f 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts @@ -20,7 +20,7 @@ import * as panel from 'vs/workbench/browser/panel'; import { getQuickNavigateHandler } from 'vs/workbench/browser/parts/quickopen/quickopen'; import { Extensions as QuickOpenExtensions, IQuickOpenRegistry, QuickOpenHandlerDescriptor } from 'vs/workbench/browser/quickopen'; import { Extensions as ActionExtensions, IWorkbenchActionRegistry } from 'vs/workbench/common/actions'; -import { AllowWorkspaceShellTerminalCommand, ClearSelectionTerminalAction, ClearTerminalAction, CopyTerminalSelectionAction, CreateNewInActiveWorkspaceTerminalAction, CreateNewTerminalAction, DeleteToLineStartTerminalAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction, DisallowWorkspaceShellTerminalCommand, FindNext, FindPrevious, FocusActiveTerminalAction, FocusNextPaneTerminalAction, FocusNextTerminalAction, FocusPreviousPaneTerminalAction, FocusPreviousTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, KillTerminalAction, MoveToLineEndTerminalAction, MoveToLineStartTerminalAction, QuickOpenActionTermContributor, QuickOpenTermAction, RenameTerminalAction, ResizePaneDownTerminalAction, ResizePaneLeftTerminalAction, ResizePaneRightTerminalAction, ResizePaneUpTerminalAction, RunActiveFileInTerminalAction, RunSelectedTextInTerminalAction, ScrollDownPageTerminalAction, ScrollDownTerminalAction, ScrollToBottomTerminalAction, ScrollToNextCommandAction, ScrollToPreviousCommandAction, ScrollToTopTerminalAction, ScrollUpPageTerminalAction, ScrollUpTerminalAction, SelectAllTerminalAction, SelectDefaultShellWindowsTerminalAction, SelectToNextCommandAction, SelectToNextLineAction, SelectToPreviousCommandAction, SelectToPreviousLineAction, SendSequenceTerminalCommand, SplitInActiveWorkspaceTerminalAction, SplitTerminalAction, TerminalPasteAction, TERMINAL_PICKER_PREFIX, ToggleCaseSensitiveCommand, ToggleEscapeSequenceLoggingAction, ToggleRegexCommand, ToggleTerminalAction, ToggleWholeWordCommand, FocusPreviousA11yLineTerminalAction, FocusNextA11yLineTerminalAction } from 'vs/workbench/contrib/terminal/browser/terminalActions'; +import { AllowWorkspaceShellTerminalCommand, ClearSelectionTerminalAction, ClearTerminalAction, CopyTerminalSelectionAction, CreateNewInActiveWorkspaceTerminalAction, CreateNewTerminalAction, DeleteToLineStartTerminalAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction, DisallowWorkspaceShellTerminalCommand, FindNext, FindPrevious, FocusActiveTerminalAction, FocusNextPaneTerminalAction, FocusNextTerminalAction, FocusPreviousPaneTerminalAction, FocusPreviousTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, KillTerminalAction, MoveToLineEndTerminalAction, MoveToLineStartTerminalAction, QuickOpenActionTermContributor, QuickOpenTermAction, RenameTerminalAction, ResizePaneDownTerminalAction, ResizePaneLeftTerminalAction, ResizePaneRightTerminalAction, ResizePaneUpTerminalAction, RunActiveFileInTerminalAction, RunSelectedTextInTerminalAction, ScrollDownPageTerminalAction, ScrollDownTerminalAction, ScrollToBottomTerminalAction, ScrollToNextCommandAction, ScrollToPreviousCommandAction, ScrollToTopTerminalAction, ScrollUpPageTerminalAction, ScrollUpTerminalAction, SelectAllTerminalAction, SelectDefaultShellWindowsTerminalAction, SelectToNextCommandAction, SelectToNextLineAction, SelectToPreviousCommandAction, SelectToPreviousLineAction, SendSequenceTerminalCommand, SplitInActiveWorkspaceTerminalAction, SplitTerminalAction, TerminalPasteAction, TERMINAL_PICKER_PREFIX, ToggleCaseSensitiveCommand, ToggleEscapeSequenceLoggingAction, ToggleRegexCommand, ToggleTerminalAction, ToggleWholeWordCommand, NavigationModeFocusPreviousTerminalAction, NavigationModeFocusNextTerminalAction, NavigationModeExitTerminalAction } from 'vs/workbench/contrib/terminal/browser/terminalActions'; import { TerminalPanel } from 'vs/workbench/contrib/terminal/browser/terminalPanel'; import { TerminalPickerHandler } from 'vs/workbench/contrib/terminal/browser/terminalQuickOpen'; import { KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_NOT_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, DEFAULT_LETTER_SPACING, DEFAULT_LINE_HEIGHT, TerminalCursorStyle, ITerminalService, TERMINAL_ACTION_CATEGORY, KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS } from 'vs/workbench/contrib/terminal/common/terminal'; @@ -460,19 +460,19 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(SelectToNextComm primary: 0, mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.DownArrow } }, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Select To Next Command', category); -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusActiveTerminalAction, FocusActiveTerminalAction.ID, FocusActiveTerminalAction.LABEL, { +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(NavigationModeExitTerminalAction, NavigationModeExitTerminalAction.ID, NavigationModeExitTerminalAction.LABEL, { primary: KeyCode.Escape }, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS, CONTEXT_ACCESSIBILITY_MODE_ENABLED)), 'Terminal: Exit Navigation Mode', category); -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusPreviousA11yLineTerminalAction, FocusPreviousA11yLineTerminalAction.ID, FocusPreviousA11yLineTerminalAction.LABEL, { +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(NavigationModeFocusPreviousTerminalAction, NavigationModeFocusPreviousTerminalAction.ID, NavigationModeFocusPreviousTerminalAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.UpArrow }, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, CONTEXT_ACCESSIBILITY_MODE_ENABLED)), 'Terminal: Focus Previous Line (Navigation Mode)', category); -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusPreviousA11yLineTerminalAction, FocusPreviousA11yLineTerminalAction.ID, FocusPreviousA11yLineTerminalAction.LABEL, { +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(NavigationModeFocusPreviousTerminalAction, NavigationModeFocusPreviousTerminalAction.ID, NavigationModeFocusPreviousTerminalAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.UpArrow }, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS, CONTEXT_ACCESSIBILITY_MODE_ENABLED)), 'Terminal: Focus Previous Line (Navigation Mode)', category); -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusNextA11yLineTerminalAction, FocusNextA11yLineTerminalAction.ID, FocusNextA11yLineTerminalAction.LABEL, { +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(NavigationModeFocusNextTerminalAction, NavigationModeFocusNextTerminalAction.ID, NavigationModeFocusNextTerminalAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.DownArrow }, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, CONTEXT_ACCESSIBILITY_MODE_ENABLED)), 'Terminal: Focus Next Line (Navigation Mode)', category); -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusNextA11yLineTerminalAction, FocusNextA11yLineTerminalAction.ID, FocusNextA11yLineTerminalAction.LABEL, { +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(NavigationModeFocusNextTerminalAction, NavigationModeFocusNextTerminalAction.ID, NavigationModeFocusNextTerminalAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.DownArrow }, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS, CONTEXT_ACCESSIBILITY_MODE_ENABLED)), 'Terminal: Focus Next Line (Navigation Mode)', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(SelectToPreviousLineAction, SelectToPreviousLineAction.ID, SelectToPreviousLineAction.LABEL), 'Terminal: Select To Previous Line', category); diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index 26808c1cfea..4d040d45d0d 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -886,10 +886,10 @@ export class ScrollToTopTerminalAction extends Action { } } -export class FocusPreviousA11yLineTerminalAction extends Action { +export class NavigationModeExitTerminalAction extends Action { - public static readonly ID = TERMINAL_COMMAND_ID.FOCUS_PREVIOUS_A11Y_LINE; - public static readonly LABEL = nls.localize('workbench.action.terminal.focusPreviousA11yLine', "Focus Previous Line (Accessibility Mode)"); + public static readonly ID = TERMINAL_COMMAND_ID.NAVIGATION_MODE_EXIT; + public static readonly LABEL = nls.localize('workbench.action.terminal.navigationModeExit', "Exit Navigation Mode"); constructor( id: string, label: string, @@ -900,17 +900,19 @@ export class FocusPreviousA11yLineTerminalAction extends Action { public run(event?: any): Promise { const terminalInstance = this.terminalService.getActiveInstance(); - if (terminalInstance) { - terminalInstance.focusPreviousA11yLine(); + if (terminalInstance && terminalInstance.navigationMode) { + terminalInstance.navigationMode.exitNavigationMode(); } return Promise.resolve(undefined); } } -export class FocusNextA11yLineTerminalAction extends Action { - public static readonly ID = TERMINAL_COMMAND_ID.FOCUS_NEXT_A11Y_LINE; - public static readonly LABEL = nls.localize('workbench.action.terminal.focusNextA11yLine', "Focus Next Line (Accessibility Mode)"); + +export class NavigationModeFocusPreviousTerminalAction extends Action { + + public static readonly ID = TERMINAL_COMMAND_ID.NAVIGATION_MODE_FOCUS_PREVIOUS; + public static readonly LABEL = nls.localize('workbench.action.terminal.navigationModeFocusPrevious', "Focus Previous Line (Navigation Mode)"); constructor( id: string, label: string, @@ -921,8 +923,29 @@ export class FocusNextA11yLineTerminalAction extends Action { public run(event?: any): Promise { const terminalInstance = this.terminalService.getActiveInstance(); - if (terminalInstance) { - terminalInstance.focusNextA11yLine(); + if (terminalInstance && terminalInstance.navigationMode) { + terminalInstance.navigationMode.focusPreviousLine(); + } + return Promise.resolve(undefined); + } +} + +export class NavigationModeFocusNextTerminalAction extends Action { + + public static readonly ID = TERMINAL_COMMAND_ID.NAVIGATION_MODE_FOCUS_NEXT; + public static readonly LABEL = nls.localize('workbench.action.terminal.navigationModeFocusNext', "Focus Next Line (Navigation Mode)"); + + constructor( + id: string, label: string, + @ITerminalService private readonly terminalService: ITerminalService + ) { + super(id, label); + } + + public run(event?: any): Promise { + const terminalInstance = this.terminalService.getActiveInstance(); + if (terminalInstance && terminalInstance.navigationMode) { + terminalInstance.navigationMode.focusNextLine(); } return Promise.resolve(undefined); } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index 9669b793e8b..7dfe8d6f14d 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -25,7 +25,7 @@ import { activeContrastBorder, scrollbarSliderActiveBackground, scrollbarSliderB import { ICssStyleCollector, ITheme, IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { PANEL_BACKGROUND } from 'vs/workbench/common/theme'; import { TerminalWidgetManager } from 'vs/workbench/contrib/terminal/browser/terminalWidgetManager'; -import { IShellLaunchConfig, ITerminalDimensions, ITerminalInstance, ITerminalProcessManager, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, NEVER_MEASURE_RENDER_TIME_STORAGE_KEY, ProcessState, TERMINAL_PANEL_ID, IWindowsShellHelper, SHELL_PATH_INVALID_EXIT_CODE, SHELL_PATH_DIRECTORY_EXIT_CODE, SHELL_CWD_INVALID_EXIT_CODE, KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS } from 'vs/workbench/contrib/terminal/common/terminal'; +import { IShellLaunchConfig, ITerminalDimensions, ITerminalInstance, ITerminalProcessManager, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, NEVER_MEASURE_RENDER_TIME_STORAGE_KEY, ProcessState, TERMINAL_PANEL_ID, IWindowsShellHelper, SHELL_PATH_INVALID_EXIT_CODE, SHELL_PATH_DIRECTORY_EXIT_CODE, SHELL_CWD_INVALID_EXIT_CODE, KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS, INavigationMode } from 'vs/workbench/contrib/terminal/common/terminal'; import { ansiColorIdentifiers, TERMINAL_BACKGROUND_COLOR, TERMINAL_CURSOR_BACKGROUND_COLOR, TERMINAL_CURSOR_FOREGROUND_COLOR, TERMINAL_FOREGROUND_COLOR, TERMINAL_SELECTION_BACKGROUND_COLOR } from 'vs/workbench/contrib/terminal/common/terminalColorRegistry'; import { TERMINAL_COMMAND_ID } from 'vs/workbench/contrib/terminal/common/terminalCommands'; import { TerminalConfigHelper } from 'vs/workbench/contrib/terminal/browser/terminalConfigHelper'; @@ -35,8 +35,9 @@ import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IAccessibilityService, AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility'; import { ITerminalInstanceService } from 'vs/workbench/contrib/terminal/browser/terminal'; import { TerminalProcessManager } from 'vs/workbench/contrib/terminal/browser/terminalProcessManager'; -import { Terminal as XTermTerminal, IBuffer } from 'xterm'; +import { Terminal as XTermTerminal, IBuffer, ITerminalAddon } from 'xterm'; import { SearchAddon, ISearchOptions } from 'xterm-addon-search'; +import { NavigationModeAddon } from 'vs/workbench/contrib/terminal/browser/addons/navigationModeAddon'; // How long in milliseconds should an average frame take to render for a notification to appear // which suggests the fallback DOM-based renderer @@ -57,10 +58,8 @@ export const DEFAULT_COMMANDS_TO_SKIP_SHELL: string[] = [ TERMINAL_COMMAND_ID.TOGGLE_FIND_REGEX_TERMINAL_FOCUS, TERMINAL_COMMAND_ID.TOGGLE_FIND_WHOLE_WORD_TERMINAL_FOCUS, TERMINAL_COMMAND_ID.TOGGLE_FIND_CASE_SENSITIVE_TERMINAL_FOCUS, - TERMINAL_COMMAND_ID.FOCUS_NEXT_A11Y_LINE, TERMINAL_COMMAND_ID.FOCUS_NEXT_PANE, TERMINAL_COMMAND_ID.FOCUS_NEXT, - TERMINAL_COMMAND_ID.FOCUS_PREVIOUS_A11Y_LINE, TERMINAL_COMMAND_ID.FOCUS_PREVIOUS_PANE, TERMINAL_COMMAND_ID.FOCUS_PREVIOUS, TERMINAL_COMMAND_ID.FOCUS, @@ -93,6 +92,9 @@ export const DEFAULT_COMMANDS_TO_SKIP_SHELL: string[] = [ TERMINAL_COMMAND_ID.SPLIT_IN_ACTIVE_WORKSPACE, TERMINAL_COMMAND_ID.SPLIT, TERMINAL_COMMAND_ID.TOGGLE, + TERMINAL_COMMAND_ID.NAVIGATION_MODE_EXIT, + TERMINAL_COMMAND_ID.NAVIGATION_MODE_FOCUS_NEXT, + TERMINAL_COMMAND_ID.NAVIGATION_MODE_FOCUS_PREVIOUS, 'editor.action.toggleTabFocusMode', 'workbench.action.quickOpen', 'workbench.action.quickOpenPreviousEditor', @@ -189,6 +191,7 @@ export class TerminalInstance implements ITerminalInstance { private _widgetManager: TerminalWidgetManager; private _linkHandler: TerminalLinkHandler; private _commandTracker: TerminalCommandTracker; + private _navigationModeAddon: INavigationMode & ITerminalAddon | undefined; public disableLayout: boolean; public get id(): number { return this._id; } @@ -216,6 +219,7 @@ export class TerminalInstance implements ITerminalInstance { public get isTitleSetByProcess(): boolean { return !!this._messageTitleDisposable; } public get shellLaunchConfig(): IShellLaunchConfig { return this._shellLaunchConfig; } public get commandTracker(): TerminalCommandTracker { return this._commandTracker; } + public get navigationMode(): INavigationMode | undefined { return this._navigationModeAddon; } private readonly _onExit = new Emitter(); public get onExit(): Event { return this._onExit.event; } @@ -446,13 +450,13 @@ export class TerminalInstance implements ITerminalInstance { letterSpacing: font.letterSpacing, lineHeight: font.lineHeight, bellStyle: config.enableBell ? 'sound' : 'none', - screenReaderMode: this._isScreenReaderOptimized(), macOptionIsMeta: config.macOptionIsMeta, macOptionClickForcesSelection: config.macOptionClickForcesSelection, rightClickSelectsWord: config.rightClickBehavior === 'selectWord', // TODO: Guess whether to use canvas or dom better rendererType: config.rendererType === 'auto' ? 'canvas' : config.rendererType }); + this.updateAccessibilitySupport(); this._terminalInstanceService.getXtermSearchConstructor().then(Addon => { this._xtermSearch = new Addon(); this._xterm.loadAddon(this._xtermSearch); @@ -911,84 +915,6 @@ export class TerminalInstance implements ITerminalInstance { } } - public focusPreviousA11yLine(): void { - // Focus previous row if a row is already focused - if (document.activeElement && document.activeElement.parentElement && document.activeElement.parentElement.classList.contains('xterm-accessibility-tree')) { - const element = document.activeElement.previousElementSibling; - if (element) { - element.focus(); - const disposable = dom.addDisposableListener(element, 'blur', () => { - this._terminalA11yTreeFocusContextKey.set(false); - disposable.dispose(); - }); - this._terminalA11yTreeFocusContextKey.set(true); - } - return; - } - - // Ensure a11y tree exists - const treeContainer = this._xterm.element.querySelector('.xterm-accessibility-tree'); - if (!treeContainer) { - return; - } - - // Target is row before the cursor - const targetRow = Math.max(this._xterm.buffer.cursorY - 1, 0); - - // Check bounds - if (treeContainer.childElementCount < targetRow) { - return; - } - - // Focus - const element = treeContainer.childNodes.item(targetRow); - element.focus(); - const disposable = dom.addDisposableListener(element, 'blur', () => { - this._terminalA11yTreeFocusContextKey.set(false); - disposable.dispose(); - }); - this._terminalA11yTreeFocusContextKey.set(true); - } - - public focusNextA11yLine(): void { - // Focus previous row if a row is already focused - if (document.activeElement && document.activeElement.parentElement && document.activeElement.parentElement.classList.contains('xterm-accessibility-tree')) { - const element = document.activeElement.nextElementSibling; - if (element) { - element.focus(); - const disposable = dom.addDisposableListener(element, 'blur', () => { - this._terminalA11yTreeFocusContextKey.set(false); - disposable.dispose(); - }); - this._terminalA11yTreeFocusContextKey.set(true); - } - return; - } - - // Ensure a11y tree exists - const treeContainer = this._xterm.element.querySelector('.xterm-accessibility-tree'); - if (!treeContainer) { - return; - } - - // Target is cursor row - const targetRow = this._xterm.buffer.cursorY; - - // Check bounds - if (treeContainer.childElementCount < targetRow) { - return; - } - - // Focus row before cursor - const element = treeContainer.childNodes.item(targetRow); - element.focus(); - const disposable = dom.addDisposableListener(element, 'blur', () => { - this._terminalA11yTreeFocusContextKey.set(false); - disposable.dispose(); - }); - this._terminalA11yTreeFocusContextKey.set(true); - } - public scrollDownLine(): void { this._xterm.scrollLines(1); } @@ -1284,7 +1210,17 @@ export class TerminalInstance implements ITerminalInstance { } public updateAccessibilitySupport(): void { - this._xterm.setOption('screenReaderMode', this._isScreenReaderOptimized()); + const isEnabled = this._isScreenReaderOptimized(); + if (isEnabled) { + this._navigationModeAddon = new NavigationModeAddon(this._terminalA11yTreeFocusContextKey); + this._xterm.loadAddon(this._navigationModeAddon); + } else { + if (this._navigationModeAddon) { + this._navigationModeAddon.dispose(); + this._navigationModeAddon = undefined; + } + } + this._xterm.setOption('screenReaderMode', isEnabled); } private _setCursorBlink(blink: boolean): void { diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index e12b4483ef6..18b623d18ea 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -484,6 +484,8 @@ export interface ITerminalInstance { */ readonly commandTracker: ITerminalCommandTracker; + readonly navigationMode: INavigationMode | undefined; + /** * Dispose the terminal instance, removing it from the panel/service and freeing up resources. * @@ -617,10 +619,6 @@ export interface ITerminalInstance { /** Scroll the terminal buffer to the top. */ scrollToTop(): void; - /** Focus the previous line in the accessibility tree */ - focusPreviousA11yLine(): void; - focusNextA11yLine(): void; - /** * Clears the terminal buffer, leaving only the prompt line. */ @@ -634,17 +632,6 @@ export interface ITerminalInstance { */ attachToElement(container: HTMLElement): void; - /** - * Updates the configuration of the terminal instance. - */ - updateConfig(): void; - - /** - * Updates the accessibility support state of the terminal instance. - * @param isEnabled Whether it's enabled. - */ - updateAccessibilitySupport(isEnabled: boolean): void; - /** * Configure the dimensions of the terminal instance. * @@ -692,6 +679,12 @@ export interface ITerminalCommandTracker { selectToNextLine(): void; } +export interface INavigationMode { + exitNavigationMode(): void; + focusPreviousLine(): void; + focusNextLine(): void; +} + export interface IBeforeProcessDataEvent { /** * The data of the event, this can be modified by the event listener to change what gets sent diff --git a/src/vs/workbench/contrib/terminal/common/terminalCommands.ts b/src/vs/workbench/contrib/terminal/common/terminalCommands.ts index 2533c9875ab..60da258805d 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalCommands.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalCommands.ts @@ -34,9 +34,7 @@ export const enum TERMINAL_COMMAND_ID { RESIZE_PANE_DOWN = 'workbench.action.terminal.resizePaneDown', FOCUS = 'workbench.action.terminal.focus', FOCUS_NEXT = 'workbench.action.terminal.focusNext', - FOCUS_NEXT_A11Y_LINE = 'workbench.action.terminal.focusNextA11yLine', FOCUS_PREVIOUS = 'workbench.action.terminal.focusPrevious', - FOCUS_PREVIOUS_A11Y_LINE = 'workbench.action.terminal.focusPreviousA11yLine', PASTE = 'workbench.action.terminal.paste', SELECT_DEFAULT_SHELL = 'workbench.action.terminal.selectDefaultShell', RUN_SELECTED_TEXT = 'workbench.action.terminal.runSelectedText', @@ -70,6 +68,9 @@ export const enum TERMINAL_COMMAND_ID { TOGGLE_FIND_REGEX_TERMINAL_FOCUS = 'workbench.action.terminal.toggleFindRegexTerminalFocus', TOGGLE_FIND_WHOLE_WORD_TERMINAL_FOCUS = 'workbench.action.terminal.toggleFindWholeWordTerminalFocus', TOGGLE_FIND_CASE_SENSITIVE_TERMINAL_FOCUS = 'workbench.action.terminal.toggleFindCaseSensitiveTerminalFocus', + NAVIGATION_MODE_EXIT = 'workbench.action.terminal.navigationModeExit', + NAVIGATION_MODE_FOCUS_NEXT = 'workbench.action.terminal.navigationModeFocusNext', + NAVIGATION_MODE_FOCUS_PREVIOUS = 'workbench.action.terminal.navigationModeFocusPrevious' } export function setupTerminalCommands(): void { From 01a1c9941c4571a272b9c653785555175f12fdf1 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 9 Jul 2019 12:24:04 +0200 Subject: [PATCH 033/710] cleanup build cache paths --- build/.cachesalt | 2 +- build/azure-pipelines/darwin/product-build-darwin.yml | 4 ++-- .../linux/product-build-linux-multiarch.yml | 4 ++-- build/azure-pipelines/linux/product-build-linux.yml | 4 ++-- build/azure-pipelines/product-compile.yml | 8 ++++---- build/azure-pipelines/win32/product-build-win32.yml | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/.cachesalt b/build/.cachesalt index 56a6051ca2b..1d0bd9164e8 100644 --- a/build/.cachesalt +++ b/build/.cachesalt @@ -1 +1 @@ -1 \ No newline at end of file +2019-07-09T10:22:14.653Z diff --git a/build/azure-pipelines/darwin/product-build-darwin.yml b/build/azure-pipelines/darwin/product-build-darwin.yml index cdf7eb2f1df..01bb333120a 100644 --- a/build/azure-pipelines/darwin/product-build-darwin.yml +++ b/build/azure-pipelines/darwin/product-build-darwin.yml @@ -6,8 +6,8 @@ steps: - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' + keyfile: 'build/.cachesalt, .build/commit' + targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-web-min' vstsFeed: 'npm-vscode' platformIndependent: true alias: 'Compilation' diff --git a/build/azure-pipelines/linux/product-build-linux-multiarch.yml b/build/azure-pipelines/linux/product-build-linux-multiarch.yml index 66b6bbff713..139d926bf73 100644 --- a/build/azure-pipelines/linux/product-build-linux-multiarch.yml +++ b/build/azure-pipelines/linux/product-build-linux-multiarch.yml @@ -6,8 +6,8 @@ steps: - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' + keyfile: 'build/.cachesalt, .build/commit' + targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-web-min' vstsFeed: 'npm-vscode' platformIndependent: true alias: 'Compilation' diff --git a/build/azure-pipelines/linux/product-build-linux.yml b/build/azure-pipelines/linux/product-build-linux.yml index 1e48713cd86..fd0f4347d4a 100644 --- a/build/azure-pipelines/linux/product-build-linux.yml +++ b/build/azure-pipelines/linux/product-build-linux.yml @@ -6,8 +6,8 @@ steps: - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' + keyfile: 'build/.cachesalt, .build/commit' + targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-web-min' vstsFeed: 'npm-vscode' platformIndependent: true alias: 'Compilation' diff --git a/build/azure-pipelines/product-compile.yml b/build/azure-pipelines/product-compile.yml index cc2639f139c..27a8362dd3e 100644 --- a/build/azure-pipelines/product-compile.yml +++ b/build/azure-pipelines/product-compile.yml @@ -6,8 +6,8 @@ steps: - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' + keyfile: 'build/.cachesalt, .build/commit' + targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-web-min' vstsFeed: 'npm-vscode' platformIndependent: true alias: 'Compilation' @@ -112,8 +112,8 @@ steps: - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' + keyfile: 'build/.cachesalt, .build/commit' + targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-web-min' vstsFeed: 'npm-vscode' platformIndependent: true alias: 'Compilation' diff --git a/build/azure-pipelines/win32/product-build-win32.yml b/build/azure-pipelines/win32/product-build-win32.yml index 66d8bf4af32..89c85d866ad 100644 --- a/build/azure-pipelines/win32/product-build-win32.yml +++ b/build/azure-pipelines/win32/product-build-win32.yml @@ -6,8 +6,8 @@ steps: - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' + keyfile: 'build/.cachesalt, .build/commit' + targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-web-min' vstsFeed: 'npm-vscode' platformIndependent: true alias: 'Compilation' From 2e6c31885e73e10df28de2a7b42d095731b94306 Mon Sep 17 00:00:00 2001 From: George Batalinski Date: Tue, 9 Jul 2019 20:03:57 -0400 Subject: [PATCH 034/710] search-widget(aria-live) status for results found - We would like to notify the user about the results we found the screen reader will read out the number of results or no result aria-live is added at load, as it cannot be added adhoc --- src/vs/editor/contrib/find/findWidget.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index 5e7febe1ccf..ab9ccd718d6 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -320,7 +320,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas if (e.searchString || e.matchesCount || e.matchesPosition) { let showRedOutline = (this._state.searchString.length > 0 && this._state.matchesCount === 0); dom.toggleClass(this._domNode, 'no-results', showRedOutline); - this._updateMatchesCount(); this._updateButtons(); } @@ -347,6 +346,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas private _updateMatchesCount(): void { this._matchesCount.style.minWidth = MAX_MATCHES_COUNT_WIDTH + 'px'; + if (this._state.matchesCount >= MATCHES_LIMIT) { this._matchesCount.title = NLS_MATCHES_COUNT_LIMIT_TITLE; } else { @@ -372,7 +372,9 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas } else { label = NLS_NO_RESULTS; } - this._matchesCount.appendChild(document.createTextNode(label)); + let myAlert = document.createElement('div'); + myAlert.appendChild(document.createTextNode(label)); + this._matchesCount.appendChild(myAlert); MAX_MATCHES_COUNT_WIDTH = Math.max(MAX_MATCHES_COUNT_WIDTH, this._matchesCount.clientWidth); } @@ -807,6 +809,10 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._matchesCount = document.createElement('div'); this._matchesCount.className = 'matchesCount'; + + this._matchesCount.setAttribute('role', 'alert'); + this._matchesCount.setAttribute('aria-live', 'assertive'); + this._updateMatchesCount(); // Previous button From 5826f17dda00ec56c0812d145b84db5d98356a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Wed, 10 Jul 2019 07:02:51 +0200 Subject: [PATCH 035/710] Update .cachesalt --- build/.cachesalt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/.cachesalt b/build/.cachesalt index 1d0bd9164e8..d9e527ad8ae 100644 --- a/build/.cachesalt +++ b/build/.cachesalt @@ -1 +1 @@ -2019-07-09T10:22:14.653Z +2019-07-10T05:02:42.950Z From f857d0456d93615677be4223c304d5db61c2fcc9 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 Jul 2019 11:01:24 +0200 Subject: [PATCH 036/710] splitview: make ViewItem a class --- src/vs/base/browser/ui/splitview/splitview.ts | 129 +++++++++++------- 1 file changed, 80 insertions(+), 49 deletions(-) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index fc104cc5543..99ba9e0d68f 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -57,12 +57,49 @@ interface ISashEvent { alt: boolean; } -interface IViewItem { - view: IView; - size: number; - container: HTMLElement; - disposable: IDisposable; - layout(): void; +abstract class ViewItem { + + set size(size: number) { + this._size = size; + } + + get size(): number { + return this._size; + } + + get minimumSize(): number { return this.view.minimumSize; } + get maximumSize(): number { return this.view.maximumSize; } + get onDidChange(): Event { return this.view.onDidChange; } + get priority(): LayoutPriority | undefined { return this.view.priority; } + + constructor(protected container: HTMLElement, private view: IView, private _size: number, private disposable: IDisposable) { } + + abstract layout(): void; + + layoutView(orientation: Orientation): void { + this.view.layout(this.size, orientation); + } + + dispose(): IView { + this.disposable.dispose(); + return this.view; + } +} + +class VerticalViewItem extends ViewItem { + + layout(): void { + this.container.style.height = `${this.size}px`; + this.layoutView(Orientation.VERTICAL); + } +} + +class HorizontalViewItem extends ViewItem { + + layout(): void { + this.container.style.width = `${this.size}px`; + this.layoutView(Orientation.HORIZONTAL); + } } interface ISashItem { @@ -104,7 +141,7 @@ export class SplitView extends Disposable { private size = 0; private contentSize = 0; private proportions: undefined | number[] = undefined; - private viewItems: IViewItem[] = []; + private viewItems: ViewItem[] = []; private sashItems: ISashItem[] = []; private sashDragState: ISashDragState; private state: State = State.Idle; @@ -122,11 +159,11 @@ export class SplitView extends Disposable { } get minimumSize(): number { - return this.viewItems.reduce((r, item) => r + item.view.minimumSize, 0); + return this.viewItems.reduce((r, item) => r + item.minimumSize, 0); } get maximumSize(): number { - return this.length === 0 ? Number.POSITIVE_INFINITY : this.viewItems.reduce((r, item) => r + item.view.maximumSize, 0); + return this.length === 0 ? Number.POSITIVE_INFINITY : this.viewItems.reduce((r, item) => r + item.maximumSize, 0); } private _orthogonalStartSash: Sash | undefined; @@ -201,15 +238,6 @@ export class SplitView extends Disposable { const containerDisposable = toDisposable(() => this.viewContainer.removeChild(container)); const disposable = combinedDisposable(onChangeDisposable, containerDisposable); - const layoutContainer = this.orientation === Orientation.VERTICAL - ? () => item.container.style.height = `${item.size}px` - : () => item.container.style.width = `${item.size}px`; - - const layout = () => { - layoutContainer(); - item.view.layout(item.size, this.orientation); - }; - let viewSize: number; if (typeof size === 'number') { @@ -220,7 +248,10 @@ export class SplitView extends Disposable { viewSize = view.minimumSize; } - const item: IViewItem = { view, container, size: viewSize, layout, disposable }; + const item = this.orientation === Orientation.VERTICAL + ? new VerticalViewItem(container, view, viewSize, disposable) + : new HorizontalViewItem(container, view, viewSize, disposable); + this.viewItems.splice(index, 0, item); // Add sash @@ -280,7 +311,7 @@ export class SplitView extends Disposable { // Remove view const viewItem = this.viewItems.splice(index, 1)[0]; - viewItem.disposable.dispose(); + const view = viewItem.dispose(); // Remove sash if (this.viewItems.length >= 1) { @@ -296,7 +327,7 @@ export class SplitView extends Disposable { this.distributeViewSizes(); } - return viewItem.view; + return view; } moveView(from: number, to: number): void { @@ -344,14 +375,14 @@ export class SplitView extends Disposable { if (!this.proportions) { const indexes = range(this.viewItems.length); - const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].view.priority === LayoutPriority.Low); - const highPriorityIndexes = indexes.filter(i => this.viewItems[i].view.priority === LayoutPriority.High); + const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === LayoutPriority.Low); + const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === LayoutPriority.High); this.resize(this.viewItems.length - 1, size - previousSize, undefined, lowPriorityIndexes, highPriorityIndexes); } else { for (let i = 0; i < this.viewItems.length; i++) { const item = this.viewItems[i]; - item.size = clamp(Math.round(this.proportions[i] * size), item.view.minimumSize, item.view.maximumSize); + item.size = clamp(Math.round(this.proportions[i] * size), item.minimumSize, item.maximumSize); } } @@ -391,12 +422,12 @@ export class SplitView extends Disposable { if (isLastSash) { const viewItem = this.viewItems[index]; - minDelta = (viewItem.view.minimumSize - viewItem.size) / 2; - maxDelta = (viewItem.view.maximumSize - viewItem.size) / 2; + minDelta = (viewItem.minimumSize - viewItem.size) / 2; + maxDelta = (viewItem.maximumSize - viewItem.size) / 2; } else { const viewItem = this.viewItems[index + 1]; - minDelta = (viewItem.size - viewItem.view.maximumSize) / 2; - maxDelta = (viewItem.size - viewItem.view.minimumSize) / 2; + minDelta = (viewItem.size - viewItem.maximumSize) / 2; + maxDelta = (viewItem.size - viewItem.minimumSize) / 2; } } @@ -418,8 +449,8 @@ export class SplitView extends Disposable { const newSizes = this.viewItems.map(i => i.size); const viewItemIndex = isLastSash ? index : index + 1; const viewItem = this.viewItems[viewItemIndex]; - const newMinDelta = viewItem.size - viewItem.view.maximumSize; - const newMaxDelta = viewItem.size - viewItem.view.minimumSize; + const newMinDelta = viewItem.size - viewItem.maximumSize; + const newMaxDelta = viewItem.size - viewItem.minimumSize; const resizeIndex = isLastSash ? index - 1 : index + 1; this.resize(resizeIndex, -newDelta, newSizes, undefined, undefined, newMinDelta, newMaxDelta); @@ -435,7 +466,7 @@ export class SplitView extends Disposable { this.saveProportions(); } - private onViewChange(item: IViewItem, size: number | undefined): void { + private onViewChange(item: ViewItem, size: number | undefined): void { const index = this.viewItems.indexOf(item); if (index < 0 || index >= this.viewItems.length) { @@ -443,7 +474,7 @@ export class SplitView extends Disposable { } size = typeof size === 'number' ? size : item.size; - size = clamp(size, item.view.minimumSize, item.view.maximumSize); + size = clamp(size, item.minimumSize, item.maximumSize); if (this.inverseAltBehavior && index > 0) { // In this case, we want the view to grow or shrink both sides equally @@ -470,13 +501,13 @@ export class SplitView extends Disposable { const item = this.viewItems[index]; size = Math.round(size); - size = clamp(size, item.view.minimumSize, item.view.maximumSize); + size = clamp(size, item.minimumSize, item.maximumSize); let delta = size - item.size; if (delta !== 0 && index < this.viewItems.length - 1) { const downIndexes = range(index + 1, this.viewItems.length); - const collapseDown = downIndexes.reduce((r, i) => r + (this.viewItems[i].size - this.viewItems[i].view.minimumSize), 0); - const expandDown = downIndexes.reduce((r, i) => r + (this.viewItems[i].view.maximumSize - this.viewItems[i].size), 0); + const collapseDown = downIndexes.reduce((r, i) => r + (this.viewItems[i].size - this.viewItems[i].minimumSize), 0); + const expandDown = downIndexes.reduce((r, i) => r + (this.viewItems[i].maximumSize - this.viewItems[i].size), 0); const deltaDown = clamp(delta, -expandDown, collapseDown); this.resize(index, deltaDown); @@ -485,8 +516,8 @@ export class SplitView extends Disposable { if (delta !== 0 && index > 0) { const upIndexes = range(index - 1, -1); - const collapseUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].size - this.viewItems[i].view.minimumSize), 0); - const expandUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].view.maximumSize - this.viewItems[i].size), 0); + const collapseUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].size - this.viewItems[i].minimumSize), 0); + const expandUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].maximumSize - this.viewItems[i].size), 0); const deltaUp = clamp(-delta, -collapseUp, expandUp); this.resize(index - 1, deltaUp); @@ -550,10 +581,10 @@ export class SplitView extends Disposable { const downItems = downIndexes.map(i => this.viewItems[i]); const downSizes = downIndexes.map(i => sizes[i]); - const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].view.minimumSize - sizes[i]), 0); - const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].view.maximumSize - sizes[i]), 0); - const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].view.minimumSize), 0); - const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].view.maximumSize), 0); + const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].minimumSize - sizes[i]), 0); + const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].maximumSize - sizes[i]), 0); + const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].minimumSize), 0); + const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].maximumSize), 0); const minDelta = Math.max(minDeltaUp, minDeltaDown, overloadMinDelta); const maxDelta = Math.min(maxDeltaDown, maxDeltaUp, overloadMaxDelta); @@ -561,7 +592,7 @@ export class SplitView extends Disposable { for (let i = 0, deltaUp = delta; i < upItems.length; i++) { const item = upItems[i]; - const size = clamp(upSizes[i] + deltaUp, item.view.minimumSize, item.view.maximumSize); + const size = clamp(upSizes[i] + deltaUp, item.minimumSize, item.maximumSize); const viewDelta = size - upSizes[i]; deltaUp -= viewDelta; @@ -570,7 +601,7 @@ export class SplitView extends Disposable { for (let i = 0, deltaDown = delta; i < downItems.length; i++) { const item = downItems[i]; - const size = clamp(downSizes[i] - deltaDown, item.view.minimumSize, item.view.maximumSize); + const size = clamp(downSizes[i] - deltaDown, item.minimumSize, item.maximumSize); const viewDelta = size - downSizes[i]; deltaDown += viewDelta; @@ -586,7 +617,7 @@ export class SplitView extends Disposable { for (let i = this.viewItems.length - 1; emptyDelta !== 0 && i >= 0; i--) { const item = this.viewItems[i]; - const size = clamp(item.size + emptyDelta, item.view.minimumSize, item.view.maximumSize); + const size = clamp(item.size + emptyDelta, item.minimumSize, item.maximumSize); const viewDelta = size - item.size; emptyDelta -= viewDelta; @@ -606,17 +637,17 @@ export class SplitView extends Disposable { // Update sashes enablement let previous = false; - const collapsesDown = this.viewItems.map(i => previous = (i.size - i.view.minimumSize > 0) || previous); + const collapsesDown = this.viewItems.map(i => previous = (i.size - i.minimumSize > 0) || previous); previous = false; - const expandsDown = this.viewItems.map(i => previous = (i.view.maximumSize - i.size > 0) || previous); + const expandsDown = this.viewItems.map(i => previous = (i.maximumSize - i.size > 0) || previous); const reverseViews = [...this.viewItems].reverse(); previous = false; - const collapsesUp = reverseViews.map(i => previous = (i.size - i.view.minimumSize > 0) || previous).reverse(); + const collapsesUp = reverseViews.map(i => previous = (i.size - i.minimumSize > 0) || previous).reverse(); previous = false; - const expandsUp = reverseViews.map(i => previous = (i.view.maximumSize - i.size > 0) || previous).reverse(); + const expandsUp = reverseViews.map(i => previous = (i.maximumSize - i.size > 0) || previous).reverse(); this.sashItems.forEach((s, i) => { const min = !(collapsesDown[i] && expandsUp[i + 1]); @@ -651,7 +682,7 @@ export class SplitView extends Disposable { dispose(): void { super.dispose(); - this.viewItems.forEach(i => i.disposable.dispose()); + this.viewItems.forEach(i => i.dispose()); this.viewItems = []; this.sashItems.forEach(i => i.disposable.dispose()); From a861b8bfd25a902a848088ee279c224386cfcaaf Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 Jul 2019 12:06:14 +0200 Subject: [PATCH 037/710] splitview: visibility --- .../base/browser/ui/splitview/splitview.css | 4 + src/vs/base/browser/ui/splitview/splitview.ts | 66 +++- test/splitview/package.json | 13 + test/splitview/public/index.html | 73 ++++ test/splitview/server.js | 19 + test/splitview/yarn.lock | 341 ++++++++++++++++++ 6 files changed, 508 insertions(+), 8 deletions(-) create mode 100644 test/splitview/package.json create mode 100644 test/splitview/public/index.html create mode 100644 test/splitview/server.js create mode 100644 test/splitview/yarn.lock diff --git a/src/vs/base/browser/ui/splitview/splitview.css b/src/vs/base/browser/ui/splitview/splitview.css index 7479f5178d7..6fb8f1c61d0 100644 --- a/src/vs/base/browser/ui/splitview/splitview.css +++ b/src/vs/base/browser/ui/splitview/splitview.css @@ -41,6 +41,10 @@ position: relative; } +.monaco-split-view2 > .split-view-container > .split-view-view:not(.visible) { + display: none; +} + .monaco-split-view2.vertical > .split-view-container > .split-view-view { width: 100%; } diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 99ba9e0d68f..82a9c66042a 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -67,12 +67,35 @@ abstract class ViewItem { return this._size; } - get minimumSize(): number { return this.view.minimumSize; } - get maximumSize(): number { return this.view.maximumSize; } - get onDidChange(): Event { return this.view.onDidChange; } + private cachedSize: number | undefined = undefined; + + get visible(): boolean { + return typeof this.cachedSize === 'undefined'; + } + + set visible(visible: boolean) { + if (visible === this.visible) { + return; + } + + if (visible) { + this.size = this.cachedSize!; + this.cachedSize = undefined; + } else { + this.cachedSize = this.size; + this.size = 0; + } + + dom.toggleClass(this.container, 'visible', visible); + } + + get minimumSize(): number { return this.visible ? this.view.minimumSize : 0; } + get maximumSize(): number { return this.visible ? this.view.maximumSize : 0; } get priority(): LayoutPriority | undefined { return this.view.priority; } - constructor(protected container: HTMLElement, private view: IView, private _size: number, private disposable: IDisposable) { } + constructor(protected container: HTMLElement, private view: IView, private _size: number, private disposable: IDisposable) { + dom.addClass(container, 'visible'); + } abstract layout(): void; @@ -358,6 +381,27 @@ export class SplitView extends Disposable { this.addView(fromView, toSize, to); } + isViewVisible(index: number): boolean { + if (index < 0 || index >= this.viewItems.length) { + throw new Error('Index out of bounds'); + } + + const viewItem = this.viewItems[index]; + return viewItem.visible; + } + + setViewVisible(index: number, visible: boolean): void { + if (index < 0 || index >= this.viewItems.length) { + throw new Error('Index out of bounds'); + } + + const viewItem = this.viewItems[index]; + viewItem.visible = visible; + + this.distributeEmptySpace(index); + this.layoutViews(); + } + private relayout(lowPriorityIndex?: number, highPriorityIndex?: number): void { const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); const lowPriorityIndexes = typeof lowPriorityIndex === 'number' ? [lowPriorityIndex] : undefined; @@ -611,12 +655,18 @@ export class SplitView extends Disposable { return delta; } - private distributeEmptySpace(): void { - let contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); + private distributeEmptySpace(lowPriorityIndex?: number): void { + const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); let emptyDelta = this.size - contentSize; - for (let i = this.viewItems.length - 1; emptyDelta !== 0 && i >= 0; i--) { - const item = this.viewItems[i]; + const indexes = range(this.viewItems.length - 1, -1); + + if (typeof lowPriorityIndex === 'number') { + pushToEnd(indexes, lowPriorityIndex); + } + + for (let i = 0; emptyDelta !== 0 && i < indexes.length; i++) { + const item = this.viewItems[indexes[i]]; const size = clamp(item.size + emptyDelta, item.minimumSize, item.maximumSize); const viewDelta = size - item.size; diff --git a/test/splitview/package.json b/test/splitview/package.json new file mode 100644 index 00000000000..d6ce0c37374 --- /dev/null +++ b/test/splitview/package.json @@ -0,0 +1,13 @@ +{ + "name": "splitview", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "devDependencies": { + "koa": "^2.5.1", + "koa-mount": "^3.0.0", + "koa-route": "^3.2.0", + "koa-static": "^5.0.0", + "mz": "^2.7.0" + } +} \ No newline at end of file diff --git a/test/splitview/public/index.html b/test/splitview/public/index.html new file mode 100644 index 00000000000..2493353844c --- /dev/null +++ b/test/splitview/public/index.html @@ -0,0 +1,73 @@ + + + + + SplitView + + + + +
+ + + + + + \ No newline at end of file diff --git a/test/splitview/server.js b/test/splitview/server.js new file mode 100644 index 00000000000..67f25363671 --- /dev/null +++ b/test/splitview/server.js @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +const fs = require('mz/fs'); +const path = require('path'); +const Koa = require('koa'); +const _ = require('koa-route'); +const serve = require('koa-static'); +const mount = require('koa-mount'); + +const app = new Koa(); + +app.use(serve('public')); +app.use(mount('/static', serve('../../out'))); + +app.listen(3000); +console.log('http://localhost:3000'); \ No newline at end of file diff --git a/test/splitview/yarn.lock b/test/splitview/yarn.lock new file mode 100644 index 00000000000..237201a684e --- /dev/null +++ b/test/splitview/yarn.lock @@ -0,0 +1,341 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +accepts@^1.2.2: + version "1.3.5" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" + integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= + dependencies: + mime-types "~2.1.18" + negotiator "0.6.1" + +any-promise@^1.0.0, any-promise@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= + +content-disposition@~0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= + +content-type@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +cookies@~0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/cookies/-/cookies-0.7.1.tgz#7c8a615f5481c61ab9f16c833731bcb8f663b99b" + integrity sha1-fIphX1SBxhq58WyDNzG8uPZjuZs= + dependencies: + depd "~1.1.1" + keygrip "~1.0.2" + +debug@*, debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +debug@^2.6.1: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +deep-equal@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +depd@^1.1.0, depd@~1.1.1, depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +destroy@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +error-inject@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/error-inject/-/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37" + integrity sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc= + +escape-html@~1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +fresh@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +http-assert@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.3.0.tgz#a31a5cf88c873ecbb5796907d4d6f132e8c01e4a" + integrity sha1-oxpc+IyHPsu1eWkH1NbxMujAHko= + dependencies: + deep-equal "~1.0.1" + http-errors "~1.6.1" + +http-errors@^1.2.8, http-errors@^1.6.3, http-errors@~1.6.1, http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +is-generator-function@^1.0.3: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.7.tgz#d2132e529bb0000a7f80794d4bdf5cd5e5813522" + integrity sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw== + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +keygrip@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.0.2.tgz#ad3297c557069dea8bcfe7a4fa491b75c5ddeb91" + integrity sha1-rTKXxVcGneqLz+ek+kkbdcXd65E= + +koa-compose@^3.0.0, koa-compose@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/koa-compose/-/koa-compose-3.2.1.tgz#a85ccb40b7d986d8e5a345b3a1ace8eabcf54de7" + integrity sha1-qFzLQLfZhtjlo0Wzoazo6rz1Tec= + dependencies: + any-promise "^1.1.0" + +koa-compose@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/koa-compose/-/koa-compose-4.1.0.tgz#507306b9371901db41121c812e923d0d67d3e877" + integrity sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw== + +koa-convert@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/koa-convert/-/koa-convert-1.2.0.tgz#da40875df49de0539098d1700b50820cebcd21d0" + integrity sha1-2kCHXfSd4FOQmNFwC1CCDOvNIdA= + dependencies: + co "^4.6.0" + koa-compose "^3.0.0" + +koa-is-json@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/koa-is-json/-/koa-is-json-1.0.0.tgz#273c07edcdcb8df6a2c1ab7d59ee76491451ec14" + integrity sha1-JzwH7c3Ljfaiwat9We52SRRR7BQ= + +koa-mount@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/koa-mount/-/koa-mount-3.0.0.tgz#08cab3b83d31442ed8b7e75c54b1abeb922ec197" + integrity sha1-CMqzuD0xRC7Yt+dcVLGr65IuwZc= + dependencies: + debug "^2.6.1" + koa-compose "^3.2.1" + +koa-route@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/koa-route/-/koa-route-3.2.0.tgz#76298b99a6bcfa9e38cab6fe5c79a8733e758bce" + integrity sha1-dimLmaa8+p44yrb+XHmocz51i84= + dependencies: + debug "*" + methods "~1.1.0" + path-to-regexp "^1.2.0" + +koa-send@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/koa-send/-/koa-send-5.0.0.tgz#5e8441e07ef55737734d7ced25b842e50646e7eb" + integrity sha512-90ZotV7t0p3uN9sRwW2D484rAaKIsD8tAVtypw/aBU+ryfV+fR2xrcAwhI8Wl6WRkojLUs/cB9SBSCuIb+IanQ== + dependencies: + debug "^3.1.0" + http-errors "^1.6.3" + mz "^2.7.0" + resolve-path "^1.4.0" + +koa-static@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/koa-static/-/koa-static-5.0.0.tgz#5e92fc96b537ad5219f425319c95b64772776943" + integrity sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ== + dependencies: + debug "^3.1.0" + koa-send "^5.0.0" + +koa@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/koa/-/koa-2.5.1.tgz#79f8b95f8d72d04fe9a58a8da5ebd6d341103f9c" + integrity sha512-cchwbMeG2dv3E2xTAmheDAuvR53tPgJZN/Hf1h7bTzJLSPcFZp8/t5+bNKJ6GaQZoydhZQ+1GNruhKdj3lIrug== + dependencies: + accepts "^1.2.2" + content-disposition "~0.5.0" + content-type "^1.0.0" + cookies "~0.7.0" + debug "*" + delegates "^1.0.0" + depd "^1.1.0" + destroy "^1.0.3" + error-inject "~1.0.0" + escape-html "~1.0.1" + fresh "^0.5.2" + http-assert "^1.1.0" + http-errors "^1.2.8" + is-generator-function "^1.0.3" + koa-compose "^4.0.0" + koa-convert "^1.2.0" + koa-is-json "^1.0.0" + mime-types "^2.0.7" + on-finished "^2.1.0" + only "0.0.2" + parseurl "^1.3.0" + statuses "^1.2.0" + type-is "^1.5.5" + vary "^1.0.0" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +methods@~1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== + +mime-types@^2.0.7, mime-types@~2.1.18: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== + dependencies: + mime-db "~1.33.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +mz@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= + +object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +on-finished@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +only@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4" + integrity sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q= + +parseurl@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" + integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= + +path-is-absolute@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-to-regexp@^1.2.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" + integrity sha1-Wf3g9DW62suhA6hOnTvGTpa5k30= + dependencies: + isarray "0.0.1" + +resolve-path@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/resolve-path/-/resolve-path-1.4.0.tgz#c4bda9f5efb2fce65247873ab36bb4d834fe16f7" + integrity sha1-xL2p9e+y/OZSR4c6s2u02DT+Fvc= + dependencies: + http-errors "~1.6.2" + path-is-absolute "1.0.1" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + +"statuses@>= 1.4.0 < 2", statuses@^1.2.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.0" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.0.tgz#e69e38a1babe969b0108207978b9f62b88604839" + integrity sha1-5p44obq+lpsBCCB5eLn2K4hgSDk= + dependencies: + any-promise "^1.0.0" + +type-is@^1.5.5: + version "1.6.16" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" + integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.18" + +vary@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= From 912da28814068fa8e433f7262911fb7c881f72e8 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 Jul 2019 13:35:06 +0200 Subject: [PATCH 038/710] debug --- test/splitview/public/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/splitview/public/index.html b/test/splitview/public/index.html index 2493353844c..f20c7961519 100644 --- a/test/splitview/public/index.html +++ b/test/splitview/public/index.html @@ -64,8 +64,8 @@ splitview.addView(view2, Sizing.Distribute); splitview.addView(view3, Sizing.Distribute); - const index = 2; - setInterval(() => splitview.setViewVisible(index, !splitview.isViewVisible(index)), 1000); + // const index = 2; + // setInterval(() => splitview.setViewVisible(index, !splitview.isViewVisible(index)), 1000); }); From 89397197c9328ef55b84ea764678ff0ef1c2c6fd Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 Jul 2019 13:40:39 +0200 Subject: [PATCH 039/710] splitview: view.setVisible --- src/vs/base/browser/ui/splitview/splitview.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 82a9c66042a..412c7856cec 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -48,6 +48,7 @@ export interface IView { readonly onDidChange: Event; readonly priority?: LayoutPriority; layout(size: number, orientation: Orientation): void; + setVisible?(visible: boolean): void; } interface ISashEvent { @@ -87,6 +88,10 @@ abstract class ViewItem { } dom.toggleClass(this.container, 'visible', visible); + + if (this.view.setVisible) { + this.view.setVisible(visible); + } } get minimumSize(): number { return this.visible ? this.view.minimumSize : 0; } From 972de4151e1abf318cc9fcaaf798e2f270fdb328 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 Jul 2019 15:52:31 +0200 Subject: [PATCH 040/710] splitview: snap out behaviour --- src/vs/base/browser/ui/splitview/splitview.ts | 52 +++++++++++++++++-- test/splitview/public/index.html | 10 ++-- 2 files changed, 53 insertions(+), 9 deletions(-) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 412c7856cec..90cb255f1c6 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -47,6 +47,7 @@ export interface IView { readonly maximumSize: number; readonly onDidChange: Event; readonly priority?: LayoutPriority; + readonly snap?: boolean; layout(size: number, orientation: Orientation): void; setVisible?(visible: boolean): void; } @@ -97,6 +98,7 @@ abstract class ViewItem { get minimumSize(): number { return this.visible ? this.view.minimumSize : 0; } get maximumSize(): number { return this.visible ? this.view.maximumSize : 0; } get priority(): LayoutPriority | undefined { return this.view.priority; } + get snap(): boolean { return !!this.view.snap; } constructor(protected container: HTMLElement, private view: IView, private _size: number, private disposable: IDisposable) { dom.addClass(container, 'visible'); @@ -143,6 +145,8 @@ interface ISashDragState { minDelta: number; maxDelta: number; alt: boolean; + snapIndex: number | undefined; + snapLimitDelta: number | undefined; disposable: IDisposable; } @@ -480,18 +484,40 @@ export class SplitView extends Disposable { } } - this.sashDragState = { start, current: start, index, sizes, minDelta, maxDelta, alt, disposable }; + let snapIndex: number | undefined; + let snapLimitDelta: number | undefined; + + if (!alt) { + const upIndexes = range(index, -1); + const downIndexes = range(index + 1, this.viewItems.length); + const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].minimumSize - sizes[i]), 0); + const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].maximumSize - sizes[i]), 0); + const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].minimumSize), 0); + const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].maximumSize), 0); + const minDelta = Math.max(minDeltaUp, minDeltaDown); + const maxDelta = Math.min(maxDeltaDown, maxDeltaUp); + + if (this.viewItems[index].snap) { + snapIndex = index; + snapLimitDelta = minDelta - (this.viewItems[index].minimumSize / 2); + } else if (this.viewItems[index + 1].snap) { + snapIndex = index + 1; + snapLimitDelta = maxDelta + (this.viewItems[index + 1].minimumSize / 2); + } + } + + this.sashDragState = { start, current: start, index, sizes, minDelta, maxDelta, alt, snapIndex, snapLimitDelta, disposable }; }; resetSashDragState(start, alt); } private onSashChange({ current }: ISashEvent): void { - const { index, start, sizes, alt, minDelta, maxDelta } = this.sashDragState; + const { index, start, sizes, alt, minDelta, maxDelta, snapIndex, snapLimitDelta } = this.sashDragState; this.sashDragState.current = current; const delta = current - start; - const newDelta = this.resize(index, delta, sizes, undefined, undefined, minDelta, maxDelta); + const newDelta = this.resize(index, delta, sizes, undefined, undefined, minDelta, maxDelta, snapIndex, snapLimitDelta); if (alt) { const isLastSash = index === this.sashItems.length - 1; @@ -601,7 +627,9 @@ export class SplitView extends Disposable { lowPriorityIndexes?: number[], highPriorityIndexes?: number[], overloadMinDelta: number = Number.NEGATIVE_INFINITY, - overloadMaxDelta: number = Number.POSITIVE_INFINITY + overloadMaxDelta: number = Number.POSITIVE_INFINITY, + snapIndex?: number, + snapLimitDelta?: number ): number { if (index < 0 || index >= this.viewItems.length) { return 0; @@ -637,6 +665,22 @@ export class SplitView extends Disposable { const minDelta = Math.max(minDeltaUp, minDeltaDown, overloadMinDelta); const maxDelta = Math.min(maxDeltaDown, maxDeltaUp, overloadMaxDelta); + if (typeof snapIndex === 'number' && typeof snapLimitDelta === 'number') { + const snapView = this.viewItems[snapIndex]; + + if (snapIndex === index) { // up + if (delta >= snapLimitDelta) { + snapView.visible = true; + } else { + snapView.visible = false; + } + } else { // down + snapView.visible = delta < snapLimitDelta; + } + + return this.resize(index, delta, sizes, lowPriorityIndexes, highPriorityIndexes, overloadMinDelta, overloadMaxDelta); + } + delta = clamp(delta, minDelta, maxDelta); for (let i = 0, deltaUp = delta; i < upItems.length; i++) { diff --git a/test/splitview/public/index.html b/test/splitview/public/index.html index f20c7961519..dfb7e88bd4b 100644 --- a/test/splitview/public/index.html +++ b/test/splitview/public/index.html @@ -36,7 +36,7 @@ class View { static ID = 0; - constructor() { + constructor(snap) { this.element = document.createElement('div'); this.element.className = 'view'; this.element.style.backgroundColor = `hsl(${rand(1, 360)}, 50%, 70%)`; @@ -44,7 +44,7 @@ this.minimumSize = 100; this.maximumSize = Number.POSITIVE_INFINITY; this.onDidChange = Event.None; - this.snap = true; + this.snap = snap; } layout(size, orientation) { @@ -56,9 +56,9 @@ const splitview = new SplitView(container, {}); splitview.layout(600); - const view1 = new View(); - const view2 = new View(); - const view3 = new View(); + const view1 = new View(true); + const view2 = new View(false); + const view3 = new View(true); splitview.addView(view1, Sizing.Distribute); splitview.addView(view2, Sizing.Distribute); From 557a38f352bd7a3590c2cc1a3a9a572a33c3c42e Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Wed, 10 Jul 2019 10:35:14 -0700 Subject: [PATCH 041/710] fix(sash): dragging being difficult with iframe-containing extensions It appears that (running querySelector, getElementByTagName) that the contents of electron's ``, which contain the iframe, are inaccessible. We were already disabling pointer events on iframes, this PR makes sure we do so on webviews as well. --- src/vs/base/browser/ui/sash/sash.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/base/browser/ui/sash/sash.ts b/src/vs/base/browser/ui/sash/sash.ts index 3e0efee82c9..18c4b4a4903 100644 --- a/src/vs/base/browser/ui/sash/sash.ts +++ b/src/vs/base/browser/ui/sash/sash.ts @@ -212,7 +212,13 @@ export class Sash extends Disposable { return; } - const iframes = getElementsByTagName('iframe'); + // Select both iframes and webviews; internally Electron nests an iframe + // in its component, but this isn't queryable. + const iframes = [ + ...getElementsByTagName('iframe'), + ...getElementsByTagName('webview'), + ]; + for (const iframe of iframes) { iframe.style.pointerEvents = 'none'; // disable mouse events on iframes as long as we drag the sash } From 3731042835fb46a8db846d921c8f28b5b81a1633 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 Jul 2019 10:34:00 -0700 Subject: [PATCH 042/710] Don't show quick fix link in hovers until we know we have quick fixes Fixes #71579 **Bug** We currently always show the `quick fix` button in problem hovers. This has confused a lot of users (see #71579) because we lead them to think that every error has a quick fix **Fix** Only show the quick fix button when we have known quick fixes --- .../contrib/codeAction/codeActionCommands.ts | 2 +- .../editor/contrib/codeAction/codeActionUi.ts | 10 +-- .../editor/contrib/hover/modesContentHover.ts | 62 ++++++++++--------- 3 files changed, 36 insertions(+), 38 deletions(-) diff --git a/src/vs/editor/contrib/codeAction/codeActionCommands.ts b/src/vs/editor/contrib/codeAction/codeActionCommands.ts index 4484c4405dc..1b76fa157ee 100644 --- a/src/vs/editor/contrib/codeAction/codeActionCommands.ts +++ b/src/vs/editor/contrib/codeAction/codeActionCommands.ts @@ -80,7 +80,7 @@ export class QuickFixController extends Disposable implements IEditorContributio this._ui.update(newState); } - public showCodeActions(actions: Promise, at: IAnchor | IPosition) { + public showCodeActions(actions: CodeActionSet, at: IAnchor | IPosition) { return this._ui.showCodeActionList(actions, at); } diff --git a/src/vs/editor/contrib/codeAction/codeActionUi.ts b/src/vs/editor/contrib/codeAction/codeActionUi.ts index 8b5bf92538d..a496f3e708f 100644 --- a/src/vs/editor/contrib/codeAction/codeActionUi.ts +++ b/src/vs/editor/contrib/codeAction/codeActionUi.ts @@ -95,15 +95,7 @@ export class CodeActionUi extends Disposable { } } - public async showCodeActionList(codeActions: Promise, at?: IAnchor | IPosition): Promise { - let actions: CodeActionSet; - try { - actions = await codeActions; - } catch (e) { - onUnexpectedError(e); - return; - } - + public async showCodeActionList(actions: CodeActionSet, at?: IAnchor | IPosition): Promise { this._codeActionWidget.show(actions, at); } diff --git a/src/vs/editor/contrib/hover/modesContentHover.ts b/src/vs/editor/contrib/hover/modesContentHover.ts index 356cc653aff..bea566d9403 100644 --- a/src/vs/editor/contrib/hover/modesContentHover.ts +++ b/src/vs/editor/contrib/hover/modesContentHover.ts @@ -13,7 +13,7 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { Position } from 'vs/editor/common/core/position'; import { IRange, Range } from 'vs/editor/common/core/range'; import { ModelDecorationOptions } from 'vs/editor/common/model/textModel'; -import { DocumentColorProvider, Hover as MarkdownHover, HoverProviderRegistry, IColor, CodeAction } from 'vs/editor/common/modes'; +import { DocumentColorProvider, Hover as MarkdownHover, HoverProviderRegistry, IColor } from 'vs/editor/common/modes'; import { getColorPresentations } from 'vs/editor/contrib/colorPicker/color'; import { ColorDetector } from 'vs/editor/contrib/colorPicker/colorDetector'; import { ColorPickerModel } from 'vs/editor/contrib/colorPicker/colorPickerModel'; @@ -518,21 +518,6 @@ export class ModesContentHoverWidget extends ContentHoverWidget { const hoverElement = $('div.hover-row.status-bar'); const disposables = new DisposableStore(); const actionsElement = dom.append(hoverElement, $('div.actions')); - disposables.add(this.renderAction(actionsElement, { - label: nls.localize('quick fixes', "Quick Fix..."), - commandId: QuickFixAction.Id, - run: async (target) => { - const codeActionsPromise = this.getCodeActions(markerHover.marker); - disposables.add(toDisposable(() => codeActionsPromise.cancel())); - - const controller = QuickFixController.get(this._editor); - const elementPosition = dom.getDomNodePagePosition(target); - controller.showCodeActions(codeActionsPromise, { - x: elementPosition.left + 6, - y: elementPosition.top + elementPosition.height + 6 - }); - } - })); if (markerHover.marker.severity === MarkerSeverity.Error || markerHover.marker.severity === MarkerSeverity.Warning || markerHover.marker.severity === MarkerSeverity.Info) { disposables.add(this.renderAction(actionsElement, { label: nls.localize('peek problem', "Peek Problem"), @@ -544,27 +529,48 @@ export class ModesContentHoverWidget extends ContentHoverWidget { } })); } + + const codeActionsPromise = this.getCodeActions(markerHover.marker); + disposables.add(toDisposable(() => codeActionsPromise.cancel())); + codeActionsPromise.then(actions => { + if (!actions.actions.length) { + actions.dispose(); + return; + } + let showing = false; + + disposables.add(toDisposable(() => { + if (!showing) { + actions.dispose(); + } + })); + + disposables.add(this.renderAction(actionsElement, { + label: nls.localize('quick fixes', "Quick Fix..."), + commandId: QuickFixAction.Id, + run: (target) => { + showing = true; + const controller = QuickFixController.get(this._editor); + const elementPosition = dom.getDomNodePagePosition(target); + controller.showCodeActions(actions, { + x: elementPosition.left + 6, + y: elementPosition.top + elementPosition.height + 6 + }); + } + })); + }); + this.renderDisposable.value = disposables; return hoverElement; } private getCodeActions(marker: IMarker): CancelablePromise { - const noAction: CodeAction = { - title: nls.localize('editor.action.quickFix.noneMessage', "No code actions available"), - kind: CodeActionKind.QuickFix.value, - }; - return createCancelablePromise(async (cancellationToken): Promise => { - const result = await getCodeActions( + return createCancelablePromise(cancellationToken => { + return getCodeActions( this._editor.getModel()!, new Range(marker.startLineNumber, marker.startColumn, marker.endLineNumber, marker.endColumn), { type: 'manual', filter: { kind: CodeActionKind.QuickFix } }, cancellationToken); - - return { - actions: result.actions.length ? result.actions : [noAction], - hasAutoFix: result.hasAutoFix, - dispose: () => result.dispose(), - }; }); } From f9517d6e5d5b1f635ed1e4e2034afe4c0c752e8b Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 Jul 2019 11:44:28 -0700 Subject: [PATCH 043/710] Add progress indicator --- src/vs/editor/contrib/hover/modesContentHover.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/hover/modesContentHover.ts b/src/vs/editor/contrib/hover/modesContentHover.ts index bea566d9403..f3590e2f3c4 100644 --- a/src/vs/editor/contrib/hover/modesContentHover.ts +++ b/src/vs/editor/contrib/hover/modesContentHover.ts @@ -530,15 +530,21 @@ export class ModesContentHoverWidget extends ContentHoverWidget { })); } + const quickfixPlaceholderElement = dom.append(actionsElement, $('div')); + quickfixPlaceholderElement.textContent = nls.localize('checkingForQuickFixes', "Checking for quick fixes..."); + disposables.add(toDisposable(() => quickfixPlaceholderElement.remove())); + const codeActionsPromise = this.getCodeActions(markerHover.marker); disposables.add(toDisposable(() => codeActionsPromise.cancel())); codeActionsPromise.then(actions => { if (!actions.actions.length) { actions.dispose(); + quickfixPlaceholderElement.textContent = nls.localize('noQuickFixes', "No quick fixes available"); return; } - let showing = false; + quickfixPlaceholderElement.remove(); + let showing = false; disposables.add(toDisposable(() => { if (!showing) { actions.dispose(); From 0df67647103e037fd0af5f367f79cbaa20479e02 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 10 Jul 2019 20:55:44 +0200 Subject: [PATCH 044/710] move file service to platform --- build/gulpfile.vscode.js | 4 +-- build/lib/test/i18n.test.ts | 4 +-- .../files/common/fileService.ts | 0 .../diskFileSystemProvider.ts | 2 +- .../files/node/diskFileSystemProvider.ts | 10 +++--- .../node/watcher/nodejs/watcherService.ts | 2 +- .../node/watcher/nsfw/nsfwWatcherService.ts | 4 +-- .../nsfw/test/nsfwWatcherService.test.ts | 4 +-- .../files/node/watcher/nsfw/watcher.ts | 2 +- .../files/node/watcher/nsfw/watcherApp.ts | 4 +-- .../files/node/watcher/nsfw/watcherIpc.ts | 2 +- .../files/node/watcher/nsfw/watcherService.ts | 8 ++--- .../watcher/unix/chokidarWatcherService.ts | 4 +-- .../unix/test/chockidarWatcherService.test.ts | 2 +- .../files/node/watcher/unix/watcher.ts | 2 +- .../files/node/watcher/unix/watcherApp.ts | 4 +-- .../files/node/watcher/unix/watcherIpc.ts | 2 +- .../files/node/watcher/unix/watcherService.ts | 8 ++--- .../files/node/watcher/watcher.ts | 0 .../files/node/watcher/win32/CodeHelper.exe | Bin .../files/node/watcher/win32/CodeHelper.md | 0 .../watcher/win32/csharpWatcherService.ts | 4 +-- .../node/watcher/win32/watcherService.ts | 4 +-- .../files/test/browser/fileService.test.ts | 4 +-- .../test/common/nullFileSystemProvider.ts | 33 ++++++++++++++++++ .../files/test/node/diskFileService.test.ts | 4 +-- .../fixtures/resolver/examples/company.js | 0 .../node/fixtures/resolver/examples/conway.js | 0 .../fixtures/resolver/examples/employee.js | 0 .../node/fixtures/resolver/examples/small.js | 0 .../test/node/fixtures/resolver/index.html | 0 .../fixtures/resolver/other/deep/company.js | 0 .../fixtures/resolver/other/deep/conway.js | 0 .../fixtures/resolver/other/deep/employee.js | 0 .../fixtures/resolver/other/deep/small.js | 0 .../test/node/fixtures/resolver/site.css | 0 .../test/node/fixtures/service/binary.txt | Bin .../node/fixtures/service/deep/company.js | 0 .../test/node/fixtures/service/deep/conway.js | 0 .../node/fixtures/service/deep/employee.js | 0 .../test/node/fixtures/service/deep/small.js | 0 .../test/node/fixtures/service/index.html | 0 .../test/node/fixtures/service/lorem.txt | 0 .../test/node/fixtures/service/small.txt | 0 .../node/fixtures/service/small_umlaut.txt | 0 .../node/fixtures/service/some_utf16le.css | Bin .../node/fixtures/service/some_utf8_bom.txt | 0 .../files/test/node/normalizer.test.ts | 2 +- .../storage/test/node/storage.test.ts | 4 +-- src/vs/workbench/browser/web.main.ts | 2 +- src/vs/workbench/buildfile.js | 4 +-- .../extensionsTipsService.test.ts | 4 +-- src/vs/workbench/electron-browser/main.ts | 4 +-- .../test/node/backupFileService.test.ts | 4 +-- .../configurationEditingService.test.ts | 4 +-- .../configurationService.test.ts | 4 +-- .../editor/test/browser/editorService.test.ts | 3 +- .../services/files/common/workspaceWatcher.ts | 2 +- .../keybindingEditing.test.ts | 4 +-- .../textfile/test/textFileService.io.test.ts | 4 +-- .../fileUserDataProvider.test.ts | 4 +-- .../workbench/test/workbenchTestServices.ts | 24 ------------- 62 files changed, 100 insertions(+), 90 deletions(-) rename src/vs/{workbench/services => platform}/files/common/fileService.ts (100%) rename src/vs/{workbench/services => platform}/files/electron-browser/diskFileSystemProvider.ts (95%) rename src/vs/{workbench/services => platform}/files/node/diskFileSystemProvider.ts (97%) rename src/vs/{workbench/services => platform}/files/node/watcher/nodejs/watcherService.ts (98%) rename src/vs/{workbench/services => platform}/files/node/watcher/nsfw/nsfwWatcherService.ts (98%) rename src/vs/{workbench/services => platform}/files/node/watcher/nsfw/test/nsfwWatcherService.test.ts (92%) rename src/vs/{workbench/services => platform}/files/node/watcher/nsfw/watcher.ts (88%) rename src/vs/{workbench/services => platform}/files/node/watcher/nsfw/watcherApp.ts (74%) rename src/vs/{workbench/services => platform}/files/node/watcher/nsfw/watcherIpc.ts (94%) rename src/vs/{workbench/services => platform}/files/node/watcher/nsfw/watcherService.ts (89%) rename src/vs/{workbench/services => platform}/files/node/watcher/unix/chokidarWatcherService.ts (99%) rename src/vs/{workbench/services => platform}/files/node/watcher/unix/test/chockidarWatcherService.test.ts (99%) rename src/vs/{workbench/services => platform}/files/node/watcher/unix/watcher.ts (89%) rename src/vs/{workbench/services => platform}/files/node/watcher/unix/watcherApp.ts (74%) rename src/vs/{workbench/services => platform}/files/node/watcher/unix/watcherIpc.ts (94%) rename src/vs/{workbench/services => platform}/files/node/watcher/unix/watcherService.ts (88%) rename src/vs/{workbench/services => platform}/files/node/watcher/watcher.ts (100%) rename src/vs/{workbench/services => platform}/files/node/watcher/win32/CodeHelper.exe (100%) rename src/vs/{workbench/services => platform}/files/node/watcher/win32/CodeHelper.md (100%) rename src/vs/{workbench/services => platform}/files/node/watcher/win32/csharpWatcherService.ts (94%) rename src/vs/{workbench/services => platform}/files/node/watcher/win32/watcherService.ts (91%) rename src/vs/{workbench/services => platform}/files/test/browser/fileService.test.ts (95%) create mode 100644 src/vs/platform/files/test/common/nullFileSystemProvider.ts rename src/vs/{workbench/services => platform}/files/test/node/diskFileService.test.ts (99%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/resolver/examples/company.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/resolver/examples/conway.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/resolver/examples/employee.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/resolver/examples/small.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/resolver/index.html (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/resolver/other/deep/company.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/resolver/other/deep/conway.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/resolver/other/deep/employee.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/resolver/other/deep/small.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/resolver/site.css (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/service/binary.txt (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/service/deep/company.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/service/deep/conway.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/service/deep/employee.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/service/deep/small.js (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/service/index.html (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/service/lorem.txt (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/service/small.txt (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/service/small_umlaut.txt (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/service/some_utf16le.css (100%) rename src/vs/{workbench/services => platform}/files/test/node/fixtures/service/some_utf8_bom.txt (100%) rename src/vs/{workbench/services => platform}/files/test/node/normalizer.test.ts (99%) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 2d73433dfd6..8b200ee04ae 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -77,8 +77,8 @@ const vscodeResources = [ 'out-build/vs/**/markdown.css', 'out-build/vs/workbench/contrib/tasks/**/*.json', 'out-build/vs/workbench/contrib/welcome/walkThrough/**/*.md', - 'out-build/vs/workbench/services/files/**/*.exe', - 'out-build/vs/workbench/services/files/**/*.md', + 'out-build/vs/platform/files/**/*.exe', + 'out-build/vs/platform/files/**/*.md', 'out-build/vs/code/electron-browser/workbench/**', 'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js', 'out-build/vs/code/electron-browser/issue/issueReporter.js', diff --git a/build/lib/test/i18n.test.ts b/build/lib/test/i18n.test.ts index eebc7742457..29a0f665799 100644 --- a/build/lib/test/i18n.test.ts +++ b/build/lib/test/i18n.test.ts @@ -39,7 +39,7 @@ suite('XLF Parser Tests', () => { base = { name: 'vs/base', project: editorProject }, code = { name: 'vs/code', project: workbenchProject }, workbenchParts = { name: 'vs/workbench/contrib/html', project: workbenchProject }, - workbenchServices = { name: 'vs/workbench/services/files', project: workbenchProject }, + workbenchServices = { name: 'vs/workbench/services/textfile', project: workbenchProject }, workbench = { name: 'vs/workbench', project: workbenchProject}; assert.deepEqual(i18n.getResource('vs/platform/actions/browser/menusExtensionPoint'), platform); @@ -48,7 +48,7 @@ suite('XLF Parser Tests', () => { assert.deepEqual(i18n.getResource('vs/base/common/errorMessage'), base); assert.deepEqual(i18n.getResource('vs/code/electron-main/window'), code); assert.deepEqual(i18n.getResource('vs/workbench/contrib/html/browser/webview'), workbenchParts); - assert.deepEqual(i18n.getResource('vs/workbench/services/files/node/fileService'), workbenchServices); + assert.deepEqual(i18n.getResource('vs/workbench/services/textfile/node/testFileService'), workbenchServices); assert.deepEqual(i18n.getResource('vs/workbench/browser/parts/panel/panelActions'), workbench); }); }); \ No newline at end of file diff --git a/src/vs/workbench/services/files/common/fileService.ts b/src/vs/platform/files/common/fileService.ts similarity index 100% rename from src/vs/workbench/services/files/common/fileService.ts rename to src/vs/platform/files/common/fileService.ts diff --git a/src/vs/workbench/services/files/electron-browser/diskFileSystemProvider.ts b/src/vs/platform/files/electron-browser/diskFileSystemProvider.ts similarity index 95% rename from src/vs/workbench/services/files/electron-browser/diskFileSystemProvider.ts rename to src/vs/platform/files/electron-browser/diskFileSystemProvider.ts index 118eb6c762f..68cc8ed95db 100644 --- a/src/vs/workbench/services/files/electron-browser/diskFileSystemProvider.ts +++ b/src/vs/platform/files/electron-browser/diskFileSystemProvider.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { shell } from 'electron'; -import { DiskFileSystemProvider as NodeDiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider'; +import { DiskFileSystemProvider as NodeDiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; import { FileDeleteOptions, FileSystemProviderCapabilities } from 'vs/platform/files/common/files'; import { isWindows } from 'vs/base/common/platform'; import { localize } from 'vs/nls'; diff --git a/src/vs/workbench/services/files/node/diskFileSystemProvider.ts b/src/vs/platform/files/node/diskFileSystemProvider.ts similarity index 97% rename from src/vs/workbench/services/files/node/diskFileSystemProvider.ts rename to src/vs/platform/files/node/diskFileSystemProvider.ts index ef3bb343450..5b37992ad63 100644 --- a/src/vs/workbench/services/files/node/diskFileSystemProvider.ts +++ b/src/vs/platform/files/node/diskFileSystemProvider.ts @@ -17,11 +17,11 @@ import { isEqual } from 'vs/base/common/extpath'; import { retry, ThrottledDelayer } from 'vs/base/common/async'; import { ILogService, LogLevel } from 'vs/platform/log/common/log'; import { localize } from 'vs/nls'; -import { IDiskFileChange, toFileChanges, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; -import { FileWatcher as UnixWatcherService } from 'vs/workbench/services/files/node/watcher/unix/watcherService'; -import { FileWatcher as WindowsWatcherService } from 'vs/workbench/services/files/node/watcher/win32/watcherService'; -import { FileWatcher as NsfwWatcherService } from 'vs/workbench/services/files/node/watcher/nsfw/watcherService'; -import { FileWatcher as NodeJSWatcherService } from 'vs/workbench/services/files/node/watcher/nodejs/watcherService'; +import { IDiskFileChange, toFileChanges, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; +import { FileWatcher as UnixWatcherService } from 'vs/platform/files/node/watcher/unix/watcherService'; +import { FileWatcher as WindowsWatcherService } from 'vs/platform/files/node/watcher/win32/watcherService'; +import { FileWatcher as NsfwWatcherService } from 'vs/platform/files/node/watcher/nsfw/watcherService'; +import { FileWatcher as NodeJSWatcherService } from 'vs/platform/files/node/watcher/nodejs/watcherService'; export interface IWatcherOptions { pollingInterval?: number; diff --git a/src/vs/workbench/services/files/node/watcher/nodejs/watcherService.ts b/src/vs/platform/files/node/watcher/nodejs/watcherService.ts similarity index 98% rename from src/vs/workbench/services/files/node/watcher/nodejs/watcherService.ts rename to src/vs/platform/files/node/watcher/nodejs/watcherService.ts index 4b07ee0a5c0..58c4a327734 100644 --- a/src/vs/workbench/services/files/node/watcher/nodejs/watcherService.ts +++ b/src/vs/platform/files/node/watcher/nodejs/watcherService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IDiskFileChange, normalizeFileChanges, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; +import { IDiskFileChange, normalizeFileChanges, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; import { Disposable } from 'vs/base/common/lifecycle'; import { statLink } from 'vs/base/node/pfs'; import { realpath } from 'vs/base/node/extpath'; diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts b/src/vs/platform/files/node/watcher/nsfw/nsfwWatcherService.ts similarity index 98% rename from src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts rename to src/vs/platform/files/node/watcher/nsfw/nsfwWatcherService.ts index 37340c40168..a9db893575b 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts +++ b/src/vs/platform/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -7,9 +7,9 @@ import * as glob from 'vs/base/common/glob'; import * as extpath from 'vs/base/common/extpath'; import * as path from 'vs/base/common/path'; import * as platform from 'vs/base/common/platform'; -import { IDiskFileChange, normalizeFileChanges, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; +import { IDiskFileChange, normalizeFileChanges, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; import * as nsfw from 'nsfw'; -import { IWatcherService, IWatcherRequest, IWatcherOptions } from 'vs/workbench/services/files/node/watcher/nsfw/watcher'; +import { IWatcherService, IWatcherRequest, IWatcherOptions } from 'vs/platform/files/node/watcher/nsfw/watcher'; import { ThrottledDelayer } from 'vs/base/common/async'; import { FileChangeType } from 'vs/platform/files/common/files'; import { normalizeNFC } from 'vs/base/common/normalization'; diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/test/nsfwWatcherService.test.ts b/src/vs/platform/files/node/watcher/nsfw/test/nsfwWatcherService.test.ts similarity index 92% rename from src/vs/workbench/services/files/node/watcher/nsfw/test/nsfwWatcherService.test.ts rename to src/vs/platform/files/node/watcher/nsfw/test/nsfwWatcherService.test.ts index 9350b8b9d68..e7c28c9d760 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/test/nsfwWatcherService.test.ts +++ b/src/vs/platform/files/node/watcher/nsfw/test/nsfwWatcherService.test.ts @@ -6,8 +6,8 @@ import * as assert from 'assert'; import * as platform from 'vs/base/common/platform'; -import { NsfwWatcherService } from 'vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService'; -import { IWatcherRequest } from 'vs/workbench/services/files/node/watcher/nsfw/watcher'; +import { NsfwWatcherService } from 'vs/platform/files/node/watcher/nsfw/nsfwWatcherService'; +import { IWatcherRequest } from 'vs/platform/files/node/watcher/nsfw/watcher'; class TestNsfwWatcherService extends NsfwWatcherService { public normalizeRoots(roots: string[]): string[] { diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcher.ts b/src/vs/platform/files/node/watcher/nsfw/watcher.ts similarity index 88% rename from src/vs/workbench/services/files/node/watcher/nsfw/watcher.ts rename to src/vs/platform/files/node/watcher/nsfw/watcher.ts index fa5d4b23335..9ced8b10538 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/watcher.ts +++ b/src/vs/platform/files/node/watcher/nsfw/watcher.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Event } from 'vs/base/common/event'; -import { IDiskFileChange, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; +import { IDiskFileChange, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; export interface IWatcherRequest { path: string; diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcherApp.ts b/src/vs/platform/files/node/watcher/nsfw/watcherApp.ts similarity index 74% rename from src/vs/workbench/services/files/node/watcher/nsfw/watcherApp.ts rename to src/vs/platform/files/node/watcher/nsfw/watcherApp.ts index 49c892fb588..69f5da0aa1d 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/watcherApp.ts +++ b/src/vs/platform/files/node/watcher/nsfw/watcherApp.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { Server } from 'vs/base/parts/ipc/node/ipc.cp'; -import { WatcherChannel } from 'vs/workbench/services/files/node/watcher/nsfw/watcherIpc'; -import { NsfwWatcherService } from 'vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService'; +import { WatcherChannel } from 'vs/platform/files/node/watcher/nsfw/watcherIpc'; +import { NsfwWatcherService } from 'vs/platform/files/node/watcher/nsfw/nsfwWatcherService'; const server = new Server('watcher'); const service = new NsfwWatcherService(); diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcherIpc.ts b/src/vs/platform/files/node/watcher/nsfw/watcherIpc.ts similarity index 94% rename from src/vs/workbench/services/files/node/watcher/nsfw/watcherIpc.ts rename to src/vs/platform/files/node/watcher/nsfw/watcherIpc.ts index 7e1d5edd7e1..72841ad037c 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/watcherIpc.ts +++ b/src/vs/platform/files/node/watcher/nsfw/watcherIpc.ts @@ -6,7 +6,7 @@ import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc'; import { IWatcherRequest, IWatcherService, IWatcherOptions } from './watcher'; import { Event } from 'vs/base/common/event'; -import { IDiskFileChange, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; +import { IDiskFileChange, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; export class WatcherChannel implements IServerChannel { diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts b/src/vs/platform/files/node/watcher/nsfw/watcherService.ts similarity index 89% rename from src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts rename to src/vs/platform/files/node/watcher/nsfw/watcherService.ts index dd4d542ccb6..8b4673d1934 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts +++ b/src/vs/platform/files/node/watcher/nsfw/watcherService.ts @@ -5,10 +5,10 @@ import { getNextTickChannel } from 'vs/base/parts/ipc/common/ipc'; import { Client } from 'vs/base/parts/ipc/node/ipc.cp'; -import { IDiskFileChange, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; -import { WatcherChannelClient } from 'vs/workbench/services/files/node/watcher/nsfw/watcherIpc'; +import { IDiskFileChange, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; +import { WatcherChannelClient } from 'vs/platform/files/node/watcher/nsfw/watcherIpc'; import { Disposable } from 'vs/base/common/lifecycle'; -import { IWatcherRequest } from 'vs/workbench/services/files/node/watcher/nsfw/watcher'; +import { IWatcherRequest } from 'vs/platform/files/node/watcher/nsfw/watcher'; import { getPathFromAmdModule } from 'vs/base/common/amd'; export class FileWatcher extends Disposable { @@ -39,7 +39,7 @@ export class FileWatcher extends Disposable { serverName: 'File Watcher (nsfw)', args: ['--type=watcherService'], env: { - AMD_ENTRYPOINT: 'vs/workbench/services/files/node/watcher/nsfw/watcherApp', + AMD_ENTRYPOINT: 'vs/platform/files/node/watcher/nsfw/watcherApp', PIPE_LOGGING: 'true', VERBOSE_LOGGING: 'true' // transmit console logs from server to client } diff --git a/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts b/src/vs/platform/files/node/watcher/unix/chokidarWatcherService.ts similarity index 99% rename from src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts rename to src/vs/platform/files/node/watcher/unix/chokidarWatcherService.ts index b88f36e4512..a03e76ba178 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts +++ b/src/vs/platform/files/node/watcher/unix/chokidarWatcherService.ts @@ -14,8 +14,8 @@ import { ThrottledDelayer } from 'vs/base/common/async'; import { normalizeNFC } from 'vs/base/common/normalization'; import { realcaseSync } from 'vs/base/node/extpath'; import { isMacintosh, isLinux } from 'vs/base/common/platform'; -import { IDiskFileChange, normalizeFileChanges, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; -import { IWatcherRequest, IWatcherService, IWatcherOptions } from 'vs/workbench/services/files/node/watcher/unix/watcher'; +import { IDiskFileChange, normalizeFileChanges, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; +import { IWatcherRequest, IWatcherService, IWatcherOptions } from 'vs/platform/files/node/watcher/unix/watcher'; import { Emitter, Event } from 'vs/base/common/event'; interface IWatcher { diff --git a/src/vs/workbench/services/files/node/watcher/unix/test/chockidarWatcherService.test.ts b/src/vs/platform/files/node/watcher/unix/test/chockidarWatcherService.test.ts similarity index 99% rename from src/vs/workbench/services/files/node/watcher/unix/test/chockidarWatcherService.test.ts rename to src/vs/platform/files/node/watcher/unix/test/chockidarWatcherService.test.ts index 974169f5148..45b05c95ed4 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/test/chockidarWatcherService.test.ts +++ b/src/vs/platform/files/node/watcher/unix/test/chockidarWatcherService.test.ts @@ -11,7 +11,7 @@ import { normalizeRoots, ChokidarWatcherService } from '../chokidarWatcherServic import { IWatcherRequest } from '../watcher'; import * as platform from 'vs/base/common/platform'; import { Delayer } from 'vs/base/common/async'; -import { IDiskFileChange } from 'vs/workbench/services/files/node/watcher/watcher'; +import { IDiskFileChange } from 'vs/platform/files/node/watcher/watcher'; import { FileChangeType } from 'vs/platform/files/common/files'; function newRequest(basePath: string, ignored: string[] = []): IWatcherRequest { diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcher.ts b/src/vs/platform/files/node/watcher/unix/watcher.ts similarity index 89% rename from src/vs/workbench/services/files/node/watcher/unix/watcher.ts rename to src/vs/platform/files/node/watcher/unix/watcher.ts index fc87e15803a..158f1e5fc21 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcher.ts +++ b/src/vs/platform/files/node/watcher/unix/watcher.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Event } from 'vs/base/common/event'; -import { IDiskFileChange, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; +import { IDiskFileChange, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; export interface IWatcherRequest { path: string; diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcherApp.ts b/src/vs/platform/files/node/watcher/unix/watcherApp.ts similarity index 74% rename from src/vs/workbench/services/files/node/watcher/unix/watcherApp.ts rename to src/vs/platform/files/node/watcher/unix/watcherApp.ts index 01473fb5c88..c921518118f 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcherApp.ts +++ b/src/vs/platform/files/node/watcher/unix/watcherApp.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { Server } from 'vs/base/parts/ipc/node/ipc.cp'; -import { WatcherChannel } from 'vs/workbench/services/files/node/watcher/unix/watcherIpc'; -import { ChokidarWatcherService } from 'vs/workbench/services/files/node/watcher/unix/chokidarWatcherService'; +import { WatcherChannel } from 'vs/platform/files/node/watcher/unix/watcherIpc'; +import { ChokidarWatcherService } from 'vs/platform/files/node/watcher/unix/chokidarWatcherService'; const server = new Server('watcher'); const service = new ChokidarWatcherService(); diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcherIpc.ts b/src/vs/platform/files/node/watcher/unix/watcherIpc.ts similarity index 94% rename from src/vs/workbench/services/files/node/watcher/unix/watcherIpc.ts rename to src/vs/platform/files/node/watcher/unix/watcherIpc.ts index e59a0958b22..18bbeeaa64f 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcherIpc.ts +++ b/src/vs/platform/files/node/watcher/unix/watcherIpc.ts @@ -6,7 +6,7 @@ import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc'; import { IWatcherRequest, IWatcherService, IWatcherOptions } from './watcher'; import { Event } from 'vs/base/common/event'; -import { IDiskFileChange, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; +import { IDiskFileChange, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; export class WatcherChannel implements IServerChannel { diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts b/src/vs/platform/files/node/watcher/unix/watcherService.ts similarity index 88% rename from src/vs/workbench/services/files/node/watcher/unix/watcherService.ts rename to src/vs/platform/files/node/watcher/unix/watcherService.ts index 202b505d53a..18d55aec1d8 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts +++ b/src/vs/platform/files/node/watcher/unix/watcherService.ts @@ -5,10 +5,10 @@ import { getNextTickChannel } from 'vs/base/parts/ipc/common/ipc'; import { Client } from 'vs/base/parts/ipc/node/ipc.cp'; -import { IDiskFileChange, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; -import { WatcherChannelClient } from 'vs/workbench/services/files/node/watcher/unix/watcherIpc'; +import { IDiskFileChange, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; +import { WatcherChannelClient } from 'vs/platform/files/node/watcher/unix/watcherIpc'; import { Disposable } from 'vs/base/common/lifecycle'; -import { IWatcherRequest, IWatcherOptions } from 'vs/workbench/services/files/node/watcher/unix/watcher'; +import { IWatcherRequest, IWatcherOptions } from 'vs/platform/files/node/watcher/unix/watcher'; import { getPathFromAmdModule } from 'vs/base/common/amd'; export class FileWatcher extends Disposable { @@ -40,7 +40,7 @@ export class FileWatcher extends Disposable { serverName: 'File Watcher (chokidar)', args: ['--type=watcherService'], env: { - AMD_ENTRYPOINT: 'vs/workbench/services/files/node/watcher/unix/watcherApp', + AMD_ENTRYPOINT: 'vs/platform/files/node/watcher/unix/watcherApp', PIPE_LOGGING: 'true', VERBOSE_LOGGING: 'true' // transmit console logs from server to client } diff --git a/src/vs/workbench/services/files/node/watcher/watcher.ts b/src/vs/platform/files/node/watcher/watcher.ts similarity index 100% rename from src/vs/workbench/services/files/node/watcher/watcher.ts rename to src/vs/platform/files/node/watcher/watcher.ts diff --git a/src/vs/workbench/services/files/node/watcher/win32/CodeHelper.exe b/src/vs/platform/files/node/watcher/win32/CodeHelper.exe similarity index 100% rename from src/vs/workbench/services/files/node/watcher/win32/CodeHelper.exe rename to src/vs/platform/files/node/watcher/win32/CodeHelper.exe diff --git a/src/vs/workbench/services/files/node/watcher/win32/CodeHelper.md b/src/vs/platform/files/node/watcher/win32/CodeHelper.md similarity index 100% rename from src/vs/workbench/services/files/node/watcher/win32/CodeHelper.md rename to src/vs/platform/files/node/watcher/win32/CodeHelper.md diff --git a/src/vs/workbench/services/files/node/watcher/win32/csharpWatcherService.ts b/src/vs/platform/files/node/watcher/win32/csharpWatcherService.ts similarity index 94% rename from src/vs/workbench/services/files/node/watcher/win32/csharpWatcherService.ts rename to src/vs/platform/files/node/watcher/win32/csharpWatcherService.ts index effcbc9472d..94050df7ee7 100644 --- a/src/vs/workbench/services/files/node/watcher/win32/csharpWatcherService.ts +++ b/src/vs/platform/files/node/watcher/win32/csharpWatcherService.ts @@ -7,7 +7,7 @@ import * as cp from 'child_process'; import { FileChangeType } from 'vs/platform/files/common/files'; import * as decoder from 'vs/base/node/decoder'; import * as glob from 'vs/base/common/glob'; -import { IDiskFileChange, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; +import { IDiskFileChange, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; import { getPathFromAmdModule } from 'vs/base/common/amd'; export class OutOfProcessWin32FolderWatcher { @@ -50,7 +50,7 @@ export class OutOfProcessWin32FolderWatcher { args.push('-verbose'); } - this.handle = cp.spawn(getPathFromAmdModule(require, 'vs/workbench/services/files/node/watcher/win32/CodeHelper.exe'), args); + this.handle = cp.spawn(getPathFromAmdModule(require, 'vs/platform/files/node/watcher/win32/CodeHelper.exe'), args); const stdoutLineDecoder = new decoder.LineDecoder(); diff --git a/src/vs/workbench/services/files/node/watcher/win32/watcherService.ts b/src/vs/platform/files/node/watcher/win32/watcherService.ts similarity index 91% rename from src/vs/workbench/services/files/node/watcher/win32/watcherService.ts rename to src/vs/platform/files/node/watcher/win32/watcherService.ts index bab9258c1b5..c8f0d8fdfb5 100644 --- a/src/vs/workbench/services/files/node/watcher/win32/watcherService.ts +++ b/src/vs/platform/files/node/watcher/win32/watcherService.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IDiskFileChange, ILogMessage } from 'vs/workbench/services/files/node/watcher/watcher'; -import { OutOfProcessWin32FolderWatcher } from 'vs/workbench/services/files/node/watcher/win32/csharpWatcherService'; +import { IDiskFileChange, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; +import { OutOfProcessWin32FolderWatcher } from 'vs/platform/files/node/watcher/win32/csharpWatcherService'; import { posix } from 'vs/base/common/path'; import { rtrim, endsWith } from 'vs/base/common/strings'; import { IDisposable } from 'vs/base/common/lifecycle'; diff --git a/src/vs/workbench/services/files/test/browser/fileService.test.ts b/src/vs/platform/files/test/browser/fileService.test.ts similarity index 95% rename from src/vs/workbench/services/files/test/browser/fileService.test.ts rename to src/vs/platform/files/test/browser/fileService.test.ts index 01af38d61c9..2eb366a65f0 100644 --- a/src/vs/workbench/services/files/test/browser/fileService.test.ts +++ b/src/vs/platform/files/test/browser/fileService.test.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { URI } from 'vs/base/common/uri'; import { IFileSystemProviderRegistrationEvent, FileSystemProviderCapabilities } from 'vs/platform/files/common/files'; import { IDisposable, toDisposable } from 'vs/base/common/lifecycle'; -import { NullFileSystemProvider } from 'vs/workbench/test/workbenchTestServices'; import { NullLogService } from 'vs/platform/log/common/log'; import { timeout } from 'vs/base/common/async'; +import { NullFileSystemProvider } from 'vs/platform/files/test/common/nullFileSystemProvider'; suite('File Service', () => { diff --git a/src/vs/platform/files/test/common/nullFileSystemProvider.ts b/src/vs/platform/files/test/common/nullFileSystemProvider.ts new file mode 100644 index 00000000000..b4b1c3af6fe --- /dev/null +++ b/src/vs/platform/files/test/common/nullFileSystemProvider.ts @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { URI } from 'vs/base/common/uri'; +import { FileSystemProviderCapabilities, IFileSystemProvider, IWatchOptions, IStat, FileType, FileDeleteOptions, FileOverwriteOptions, FileWriteOptions, FileOpenOptions, IFileChange } from 'vs/platform/files/common/files'; +import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; +import { Event } from 'vs/base/common/event'; + +export class NullFileSystemProvider implements IFileSystemProvider { + + capabilities: FileSystemProviderCapabilities = FileSystemProviderCapabilities.Readonly; + + onDidChangeCapabilities: Event = Event.None; + onDidChangeFile: Event = Event.None; + + constructor(private disposableFactory: () => IDisposable = () => Disposable.None) { } + + watch(resource: URI, opts: IWatchOptions): IDisposable { return this.disposableFactory(); } + stat(resource: URI): Promise { return Promise.resolve(undefined!); } + mkdir(resource: URI): Promise { return Promise.resolve(undefined!); } + readdir(resource: URI): Promise<[string, FileType][]> { return Promise.resolve(undefined!); } + delete(resource: URI, opts: FileDeleteOptions): Promise { return Promise.resolve(undefined!); } + rename(from: URI, to: URI, opts: FileOverwriteOptions): Promise { return Promise.resolve(undefined!); } + copy?(from: URI, to: URI, opts: FileOverwriteOptions): Promise { return Promise.resolve(undefined!); } + readFile?(resource: URI): Promise { return Promise.resolve(undefined!); } + writeFile?(resource: URI, content: Uint8Array, opts: FileWriteOptions): Promise { return Promise.resolve(undefined!); } + open?(resource: URI, opts: FileOpenOptions): Promise { return Promise.resolve(undefined!); } + close?(fd: number): Promise { return Promise.resolve(undefined!); } + read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise { return Promise.resolve(undefined!); } + write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise { return Promise.resolve(undefined!); } +} \ No newline at end of file diff --git a/src/vs/workbench/services/files/test/node/diskFileService.test.ts b/src/vs/platform/files/test/node/diskFileService.test.ts similarity index 99% rename from src/vs/workbench/services/files/test/node/diskFileService.test.ts rename to src/vs/platform/files/test/node/diskFileService.test.ts index 7c563ae1c9d..e1898b1b30c 100644 --- a/src/vs/workbench/services/files/test/node/diskFileService.test.ts +++ b/src/vs/platform/files/test/node/diskFileService.test.ts @@ -5,9 +5,9 @@ import * as assert from 'assert'; import { tmpdir } from 'os'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { Schemas } from 'vs/base/common/network'; -import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider'; +import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; import { getRandomTestPath } from 'vs/base/test/node/testUtils'; import { generateUuid } from 'vs/base/common/uuid'; import { join, basename, dirname, posix } from 'vs/base/common/path'; diff --git a/src/vs/workbench/services/files/test/node/fixtures/resolver/examples/company.js b/src/vs/platform/files/test/node/fixtures/resolver/examples/company.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/resolver/examples/company.js rename to src/vs/platform/files/test/node/fixtures/resolver/examples/company.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/resolver/examples/conway.js b/src/vs/platform/files/test/node/fixtures/resolver/examples/conway.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/resolver/examples/conway.js rename to src/vs/platform/files/test/node/fixtures/resolver/examples/conway.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/resolver/examples/employee.js b/src/vs/platform/files/test/node/fixtures/resolver/examples/employee.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/resolver/examples/employee.js rename to src/vs/platform/files/test/node/fixtures/resolver/examples/employee.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/resolver/examples/small.js b/src/vs/platform/files/test/node/fixtures/resolver/examples/small.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/resolver/examples/small.js rename to src/vs/platform/files/test/node/fixtures/resolver/examples/small.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/resolver/index.html b/src/vs/platform/files/test/node/fixtures/resolver/index.html similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/resolver/index.html rename to src/vs/platform/files/test/node/fixtures/resolver/index.html diff --git a/src/vs/workbench/services/files/test/node/fixtures/resolver/other/deep/company.js b/src/vs/platform/files/test/node/fixtures/resolver/other/deep/company.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/resolver/other/deep/company.js rename to src/vs/platform/files/test/node/fixtures/resolver/other/deep/company.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/resolver/other/deep/conway.js b/src/vs/platform/files/test/node/fixtures/resolver/other/deep/conway.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/resolver/other/deep/conway.js rename to src/vs/platform/files/test/node/fixtures/resolver/other/deep/conway.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/resolver/other/deep/employee.js b/src/vs/platform/files/test/node/fixtures/resolver/other/deep/employee.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/resolver/other/deep/employee.js rename to src/vs/platform/files/test/node/fixtures/resolver/other/deep/employee.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/resolver/other/deep/small.js b/src/vs/platform/files/test/node/fixtures/resolver/other/deep/small.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/resolver/other/deep/small.js rename to src/vs/platform/files/test/node/fixtures/resolver/other/deep/small.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/resolver/site.css b/src/vs/platform/files/test/node/fixtures/resolver/site.css similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/resolver/site.css rename to src/vs/platform/files/test/node/fixtures/resolver/site.css diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/binary.txt b/src/vs/platform/files/test/node/fixtures/service/binary.txt similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/service/binary.txt rename to src/vs/platform/files/test/node/fixtures/service/binary.txt diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/deep/company.js b/src/vs/platform/files/test/node/fixtures/service/deep/company.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/service/deep/company.js rename to src/vs/platform/files/test/node/fixtures/service/deep/company.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/deep/conway.js b/src/vs/platform/files/test/node/fixtures/service/deep/conway.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/service/deep/conway.js rename to src/vs/platform/files/test/node/fixtures/service/deep/conway.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/deep/employee.js b/src/vs/platform/files/test/node/fixtures/service/deep/employee.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/service/deep/employee.js rename to src/vs/platform/files/test/node/fixtures/service/deep/employee.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/deep/small.js b/src/vs/platform/files/test/node/fixtures/service/deep/small.js similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/service/deep/small.js rename to src/vs/platform/files/test/node/fixtures/service/deep/small.js diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/index.html b/src/vs/platform/files/test/node/fixtures/service/index.html similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/service/index.html rename to src/vs/platform/files/test/node/fixtures/service/index.html diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/lorem.txt b/src/vs/platform/files/test/node/fixtures/service/lorem.txt similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/service/lorem.txt rename to src/vs/platform/files/test/node/fixtures/service/lorem.txt diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/small.txt b/src/vs/platform/files/test/node/fixtures/service/small.txt similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/service/small.txt rename to src/vs/platform/files/test/node/fixtures/service/small.txt diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/small_umlaut.txt b/src/vs/platform/files/test/node/fixtures/service/small_umlaut.txt similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/service/small_umlaut.txt rename to src/vs/platform/files/test/node/fixtures/service/small_umlaut.txt diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/some_utf16le.css b/src/vs/platform/files/test/node/fixtures/service/some_utf16le.css similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/service/some_utf16le.css rename to src/vs/platform/files/test/node/fixtures/service/some_utf16le.css diff --git a/src/vs/workbench/services/files/test/node/fixtures/service/some_utf8_bom.txt b/src/vs/platform/files/test/node/fixtures/service/some_utf8_bom.txt similarity index 100% rename from src/vs/workbench/services/files/test/node/fixtures/service/some_utf8_bom.txt rename to src/vs/platform/files/test/node/fixtures/service/some_utf8_bom.txt diff --git a/src/vs/workbench/services/files/test/node/normalizer.test.ts b/src/vs/platform/files/test/node/normalizer.test.ts similarity index 99% rename from src/vs/workbench/services/files/test/node/normalizer.test.ts rename to src/vs/platform/files/test/node/normalizer.test.ts index d08747713aa..3f14bb70246 100644 --- a/src/vs/workbench/services/files/test/node/normalizer.test.ts +++ b/src/vs/platform/files/test/node/normalizer.test.ts @@ -7,7 +7,7 @@ import * as assert from 'assert'; import * as platform from 'vs/base/common/platform'; import { FileChangeType, FileChangesEvent } from 'vs/platform/files/common/files'; import { URI as uri } from 'vs/base/common/uri'; -import { IDiskFileChange, normalizeFileChanges, toFileChanges } from 'vs/workbench/services/files/node/watcher/watcher'; +import { IDiskFileChange, normalizeFileChanges, toFileChanges } from 'vs/platform/files/node/watcher/watcher'; import { Event, Emitter } from 'vs/base/common/event'; function toFileChangesEvent(changes: IDiskFileChange[]): FileChangesEvent { diff --git a/src/vs/platform/storage/test/node/storage.test.ts b/src/vs/platform/storage/test/node/storage.test.ts index 254cb427afa..7c77b9e1c08 100644 --- a/src/vs/platform/storage/test/node/storage.test.ts +++ b/src/vs/platform/storage/test/node/storage.test.ts @@ -12,9 +12,9 @@ import { rimraf, RimRafMode } from 'vs/base/node/pfs'; import { NullLogService } from 'vs/platform/log/common/log'; import { Storage } from 'vs/base/parts/storage/common/storage'; import { URI } from 'vs/base/common/uri'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { getRandomTestPath } from 'vs/base/test/node/testUtils'; -import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider'; +import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { Schemas } from 'vs/base/common/network'; diff --git a/src/vs/workbench/browser/web.main.ts b/src/vs/workbench/browser/web.main.ts index d5f9cff6493..531ec2810d0 100644 --- a/src/vs/workbench/browser/web.main.ts +++ b/src/vs/workbench/browser/web.main.ts @@ -20,7 +20,7 @@ import { RemoteAuthorityResolverService } from 'vs/platform/remote/browser/remot import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; import { IFileService, IFileSystemProvider } from 'vs/platform/files/common/files'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { Schemas } from 'vs/base/common/network'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; diff --git a/src/vs/workbench/buildfile.js b/src/vs/workbench/buildfile.js index 04e3814fa84..89939f33214 100644 --- a/src/vs/workbench/buildfile.js +++ b/src/vs/workbench/buildfile.js @@ -25,8 +25,8 @@ exports.collectModules = function () { createModuleDescription('vs/workbench/services/search/node/searchApp', []), - createModuleDescription('vs/workbench/services/files/node/watcher/unix/watcherApp', []), - createModuleDescription('vs/workbench/services/files/node/watcher/nsfw/watcherApp', []), + createModuleDescription('vs/platform/files/node/watcher/unix/watcherApp', []), + createModuleDescription('vs/platform/files/node/watcher/nsfw/watcherApp', []), createModuleDescription('vs/workbench/services/extensions/node/extensionHostProcess', []), ]; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts index a57f2f12f64..abe5d44d706 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts @@ -46,10 +46,10 @@ import { TestExperimentService } from 'vs/workbench/contrib/experiments/test/ele import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { ExtensionType } from 'vs/platform/extensions/common/extensions'; import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { NullLogService } from 'vs/platform/log/common/log'; import { Schemas } from 'vs/base/common/network'; -import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider'; +import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; import { IFileService } from 'vs/platform/files/common/files'; const mockExtensionGallery: IGalleryExtension[] = [ diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index f8aaa15b064..61c920df264 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -39,9 +39,9 @@ import { RemoteAuthorityResolverService } from 'vs/platform/remote/electron-brow import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { RemoteAgentService } from 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { IFileService } from 'vs/platform/files/common/files'; -import { DiskFileSystemProvider } from 'vs/workbench/services/files/electron-browser/diskFileSystemProvider'; +import { DiskFileSystemProvider } from 'vs/platform/files/electron-browser/diskFileSystemProvider'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; import { REMOTE_FILE_SYSTEM_CHANNEL_NAME, RemoteExtensionsFileSystemProvider } from 'vs/platform/remote/common/remoteAgentFileSystemChannel'; import { DefaultConfigurationExportHelper } from 'vs/workbench/services/configuration/node/configurationExportHelper'; diff --git a/src/vs/workbench/services/backup/test/node/backupFileService.test.ts b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts index 0bdbc59813e..990d688b3cc 100644 --- a/src/vs/workbench/services/backup/test/node/backupFileService.test.ts +++ b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts @@ -17,9 +17,9 @@ import { getRandomTestPath } from 'vs/base/test/node/testUtils'; import { DefaultEndOfLine } from 'vs/editor/common/model'; import { Schemas } from 'vs/base/common/network'; import { IWindowConfiguration } from 'vs/platform/windows/common/windows'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { NullLogService } from 'vs/platform/log/common/log'; -import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider'; +import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; import { WorkbenchEnvironmentService } from 'vs/workbench/services/environment/node/environmentService'; import { parseArgs } from 'vs/platform/environment/node/argv'; import { snapshotToString } from 'vs/workbench/services/textfile/common/textfiles'; diff --git a/src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts index 1b604be8ba7..2a75dca343d 100644 --- a/src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts @@ -32,10 +32,10 @@ import { URI } from 'vs/base/common/uri'; import { createHash } from 'crypto'; import { RemoteAgentService } from 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { NullLogService } from 'vs/platform/log/common/log'; import { Schemas } from 'vs/base/common/network'; -import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider'; +import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; import { IFileService } from 'vs/platform/files/common/files'; import { ConfigurationCache } from 'vs/workbench/services/configuration/node/configurationCache'; import { KeybindingsEditingService, IKeybindingEditingService } from 'vs/workbench/services/keybinding/common/keybindingEditing'; diff --git a/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts b/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts index 391474a310f..3c059ad069f 100644 --- a/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts +++ b/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts @@ -36,9 +36,9 @@ import { IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { RemoteAgentService } from 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; import { RemoteAuthorityResolverService } from 'vs/platform/remote/electron-browser/remoteAuthorityResolverService'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { NullLogService } from 'vs/platform/log/common/log'; -import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider'; +import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; import { ConfigurationCache } from 'vs/workbench/services/configuration/node/configurationCache'; import { IRemoteAgentEnvironment } from 'vs/platform/remote/common/remoteAgentEnvironment'; import { IConfigurationCache } from 'vs/workbench/services/configuration/common/configuration'; diff --git a/src/vs/workbench/services/editor/test/browser/editorService.test.ts b/src/vs/workbench/services/editor/test/browser/editorService.test.ts index 658a4a84e77..81cbc839a9b 100644 --- a/src/vs/workbench/services/editor/test/browser/editorService.test.ts +++ b/src/vs/workbench/services/editor/test/browser/editorService.test.ts @@ -8,7 +8,7 @@ import { IEditorModel } from 'vs/platform/editor/common/editor'; import { URI } from 'vs/base/common/uri'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { EditorInput, EditorOptions, IFileEditorInput, IEditorInput } from 'vs/workbench/common/editor'; -import { workbenchInstantiationService, TestStorageService, NullFileSystemProvider } from 'vs/workbench/test/workbenchTestServices'; +import { workbenchInstantiationService, TestStorageService } from 'vs/workbench/test/workbenchTestServices'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService'; import { EditorService, DelegatingEditorService } from 'vs/workbench/services/editor/browser/editorService'; @@ -31,6 +31,7 @@ import { IFileService } from 'vs/platform/files/common/files'; import { Disposable } from 'vs/base/common/lifecycle'; import { ModesRegistry } from 'vs/editor/common/modes/modesRegistry'; import { UntitledEditorModel } from 'vs/workbench/common/editor/untitledEditorModel'; +import { NullFileSystemProvider } from 'vs/platform/files/test/common/nullFileSystemProvider'; export class TestEditorControl extends BaseEditor { diff --git a/src/vs/workbench/services/files/common/workspaceWatcher.ts b/src/vs/workbench/services/files/common/workspaceWatcher.ts index a16c82e3594..7aa7ef157f6 100644 --- a/src/vs/workbench/services/files/common/workspaceWatcher.ts +++ b/src/vs/workbench/services/files/common/workspaceWatcher.ts @@ -16,7 +16,7 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { StorageScope, IStorageService } from 'vs/platform/storage/common/storage'; import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { localize } from 'vs/nls'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; export class WorkspaceWatcher extends Disposable { diff --git a/src/vs/workbench/services/keybinding/test/electron-browser/keybindingEditing.test.ts b/src/vs/workbench/services/keybinding/test/electron-browser/keybindingEditing.test.ts index c6599181ee5..4ae911b01ff 100644 --- a/src/vs/workbench/services/keybinding/test/electron-browser/keybindingEditing.test.ts +++ b/src/vs/workbench/services/keybinding/test/electron-browser/keybindingEditing.test.ts @@ -41,9 +41,9 @@ import { ITextFileService } from 'vs/workbench/services/textfile/common/textfile import { TextModelResolverService } from 'vs/workbench/services/textmodelResolver/common/textModelResolverService'; import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { TestBackupFileService, TestContextService, TestEditorGroupsService, TestEditorService, TestLifecycleService, TestTextFileService, TestTextResourcePropertiesService } from 'vs/workbench/test/workbenchTestServices'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { Schemas } from 'vs/base/common/network'; -import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider'; +import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; import { URI } from 'vs/base/common/uri'; import { FileUserDataProvider } from 'vs/workbench/services/userData/common/fileUserDataProvider'; import { parseArgs } from 'vs/platform/environment/node/argv'; diff --git a/src/vs/workbench/services/textfile/test/textFileService.io.test.ts b/src/vs/workbench/services/textfile/test/textFileService.io.test.ts index 8d4e1a407d1..586639b4e8e 100644 --- a/src/vs/workbench/services/textfile/test/textFileService.io.test.ts +++ b/src/vs/workbench/services/textfile/test/textFileService.io.test.ts @@ -18,11 +18,11 @@ import { Schemas } from 'vs/base/common/network'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { rimraf, RimRafMode, copy, readFile, exists } from 'vs/base/node/pfs'; import { DisposableStore } from 'vs/base/common/lifecycle'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { NullLogService } from 'vs/platform/log/common/log'; import { getRandomTestPath } from 'vs/base/test/node/testUtils'; import { tmpdir } from 'os'; -import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider'; +import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; import { generateUuid } from 'vs/base/common/uuid'; import { join, basename } from 'vs/base/common/path'; import { getPathFromAmdModule } from 'vs/base/common/amd'; diff --git a/src/vs/workbench/services/userData/test/electron-browser/fileUserDataProvider.test.ts b/src/vs/workbench/services/userData/test/electron-browser/fileUserDataProvider.test.ts index a99adf8ee1e..a53c7d3f56d 100644 --- a/src/vs/workbench/services/userData/test/electron-browser/fileUserDataProvider.test.ts +++ b/src/vs/workbench/services/userData/test/electron-browser/fileUserDataProvider.test.ts @@ -9,14 +9,14 @@ import * as path from 'vs/base/common/path'; import * as uuid from 'vs/base/common/uuid'; import * as pfs from 'vs/base/node/pfs'; import { IFileService, FileChangeType, IFileChange, IFileSystemProviderWithFileReadWriteCapability, IStat, FileType, FileSystemProviderCapabilities } from 'vs/platform/files/common/files'; -import { FileService } from 'vs/workbench/services/files/common/fileService'; +import { FileService } from 'vs/platform/files/common/fileService'; import { NullLogService } from 'vs/platform/log/common/log'; import { Schemas } from 'vs/base/common/network'; import { URI } from 'vs/base/common/uri'; import { FileUserDataProvider } from 'vs/workbench/services/userData/common/fileUserDataProvider'; import { joinPath, dirname } from 'vs/base/common/resources'; import { VSBuffer } from 'vs/base/common/buffer'; -import { DiskFileSystemProvider } from 'vs/workbench/services/files/electron-browser/diskFileSystemProvider'; +import { DiskFileSystemProvider } from 'vs/platform/files/electron-browser/diskFileSystemProvider'; import { BACKUPS } from 'vs/platform/environment/common/environment'; import { DisposableStore, IDisposable, Disposable } from 'vs/base/common/lifecycle'; import { BrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService'; diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 3a383fb6cc7..32f5ec8248d 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -1595,30 +1595,6 @@ export class TestSharedProcessService implements ISharedProcessService { registerChannel(channelName: string, channel: any): void { } } -export class NullFileSystemProvider implements IFileSystemProvider { - - capabilities: FileSystemProviderCapabilities = FileSystemProviderCapabilities.Readonly; - - onDidChangeCapabilities: Event = Event.None; - onDidChangeFile: Event = Event.None; - - constructor(private disposableFactory: () => IDisposable = () => Disposable.None) { } - - watch(resource: URI, opts: IWatchOptions): IDisposable { return this.disposableFactory(); } - stat(resource: URI): Promise { return Promise.resolve(undefined!); } - mkdir(resource: URI): Promise { return Promise.resolve(undefined!); } - readdir(resource: URI): Promise<[string, FileType][]> { return Promise.resolve(undefined!); } - delete(resource: URI, opts: FileDeleteOptions): Promise { return Promise.resolve(undefined!); } - rename(from: URI, to: URI, opts: FileOverwriteOptions): Promise { return Promise.resolve(undefined!); } - copy?(from: URI, to: URI, opts: FileOverwriteOptions): Promise { return Promise.resolve(undefined!); } - readFile?(resource: URI): Promise { return Promise.resolve(undefined!); } - writeFile?(resource: URI, content: Uint8Array, opts: FileWriteOptions): Promise { return Promise.resolve(undefined!); } - open?(resource: URI, opts: FileOpenOptions): Promise { return Promise.resolve(undefined!); } - close?(fd: number): Promise { return Promise.resolve(undefined!); } - read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise { return Promise.resolve(undefined!); } - write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise { return Promise.resolve(undefined!); } -} - export class RemoteFileSystemProvider implements IFileSystemProvider { constructor(private readonly diskFileSystemProvider: IFileSystemProvider, private readonly remoteAuthority: string) { } From a4c2fc995393499057cd778d38c16e0569713899 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 10 Jul 2019 21:36:19 +0200 Subject: [PATCH 045/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 747481e83fb..e6d8f4fec7d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "7e657e6fe4ca2f5cf276fc28a018041753765fc7", + "distro": "9a8dcbdf04e72ed28caf98144546429536d7ca5b", "author": { "name": "Microsoft Corporation" }, From 0f4c0a7bd1298c67ce07217acad67f0a53c32a03 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 10 Jul 2019 19:58:17 +0200 Subject: [PATCH 046/710] files - first cut allow stream for writeFile --- src/vs/base/common/buffer.ts | 6 ++ src/vs/platform/files/common/fileService.ts | 87 +++++++++++++------ .../files/test/node/diskFileService.test.ts | 44 +++++++++- 3 files changed, 109 insertions(+), 28 deletions(-) diff --git a/src/vs/base/common/buffer.ts b/src/vs/base/common/buffer.ts index 7b4e9cc8d66..74f51565089 100644 --- a/src/vs/base/common/buffer.ts +++ b/src/vs/base/common/buffer.ts @@ -182,6 +182,12 @@ export interface VSBufferReadableStream { destroy(): void; } +export function isVSBufferReadableStream(obj: any): obj is VSBufferReadableStream { + const candidate: VSBufferReadableStream = obj; + + return candidate && [candidate.on, candidate.pause, candidate.resume, candidate.destroy].every(fn => typeof fn === 'function'); +} + /** * Helper to fully read a VSBuffer readable into a single buffer. */ diff --git a/src/vs/platform/files/common/fileService.ts b/src/vs/platform/files/common/fileService.ts index 84cd11315cb..38063562380 100644 --- a/src/vs/platform/files/common/fileService.ts +++ b/src/vs/platform/files/common/fileService.ts @@ -14,7 +14,7 @@ import { TernarySearchTree } from 'vs/base/common/map'; import { isNonEmptyArray, coalesce } from 'vs/base/common/arrays'; import { getBaseLabel } from 'vs/base/common/labels'; import { ILogService } from 'vs/platform/log/common/log'; -import { VSBuffer, VSBufferReadable, readableToBuffer, bufferToReadable, streamToBuffer, bufferToStream, VSBufferReadableStream, writeableBufferStream, VSBufferWriteableStream } from 'vs/base/common/buffer'; +import { VSBuffer, VSBufferReadable, readableToBuffer, bufferToReadable, streamToBuffer, bufferToStream, VSBufferReadableStream, writeableBufferStream, VSBufferWriteableStream, isVSBufferReadableStream } from 'vs/base/common/buffer'; import { Queue } from 'vs/base/common/async'; import { CancellationTokenSource, CancellationToken } from 'vs/base/common/cancellation'; import { Schemas } from 'vs/base/common/network'; @@ -281,7 +281,7 @@ export class FileService extends Disposable implements IFileService { return fileStat; } - async writeFile(resource: URI, bufferOrReadable: VSBuffer | VSBufferReadable, options?: IWriteFileOptions): Promise { + async writeFile(resource: URI, bufferOrReadableOrStream: VSBuffer | VSBufferReadable | VSBufferReadableStream, options?: IWriteFileOptions): Promise { const provider = this.throwIfFileSystemIsReadonly(await this.withReadWriteProvider(resource)); try { @@ -296,12 +296,12 @@ export class FileService extends Disposable implements IFileService { // write file: buffered if (hasOpenReadWriteCloseCapability(provider)) { - await this.doWriteBuffered(provider, resource, bufferOrReadable instanceof VSBuffer ? bufferToReadable(bufferOrReadable) : bufferOrReadable); + await this.doWriteBuffered(provider, resource, bufferOrReadableOrStream instanceof VSBuffer ? bufferToReadable(bufferOrReadableOrStream) : bufferOrReadableOrStream); } // write file: unbuffered else { - await this.doWriteUnbuffered(provider, resource, bufferOrReadable); + await this.doWriteUnbuffered(provider, resource, bufferOrReadableOrStream); } } catch (error) { throw new FileOperationError(localize('err.write', "Unable to write file ({0})", this.ensureError(error).toString()), toFileOperationResult(error), options); @@ -857,29 +857,60 @@ export class FileService extends Disposable implements IFileService { return isPathCaseSensitive ? resource.toString() : resource.toString().toLowerCase(); } - private async doWriteBuffered(provider: IFileSystemProviderWithOpenReadWriteCloseCapability, resource: URI, readable: VSBufferReadable): Promise { - return this.ensureWriteQueue(provider, resource).queue(() => this.doWriteBufferedQueued(provider, resource, readable)); + private async doWriteBuffered(provider: IFileSystemProviderWithOpenReadWriteCloseCapability, resource: URI, readableOrStream: VSBufferReadable | VSBufferReadableStream): Promise { + return this.ensureWriteQueue(provider, resource).queue(async () => { + + // open handle + const handle = await provider.open(resource, { create: true }); + + // write into handle until all bytes from buffer have been written + try { + if (isVSBufferReadableStream(readableOrStream)) { + await this.doWriteStreamBufferedQueued(provider, handle, readableOrStream); + } else { + await this.doWriteReadableBufferedQueued(provider, handle, readableOrStream); + } + } catch (error) { + throw this.ensureError(error); + } finally { + + // close handle always + await provider.close(handle); + } + }); } - private async doWriteBufferedQueued(provider: IFileSystemProviderWithOpenReadWriteCloseCapability, resource: URI, readable: VSBufferReadable): Promise { - - // open handle - const handle = await provider.open(resource, { create: true }); - - // write into handle until all bytes from buffer have been written - try { + private doWriteStreamBufferedQueued(provider: IFileSystemProviderWithOpenReadWriteCloseCapability, handle: number, stream: VSBufferReadableStream): Promise { + return new Promise((resolve, reject) => { let posInFile = 0; - let chunk: VSBuffer | null; - while (chunk = readable.read()) { - await this.doWriteBuffer(provider, handle, chunk, chunk.byteLength, posInFile, 0); + stream.on('data', async chunk => { + stream.pause(); + + try { + await this.doWriteBuffer(provider, handle, chunk, chunk.byteLength, posInFile, 0); + } catch (error) { + reject(error); + } posInFile += chunk.byteLength; - } - } catch (error) { - throw this.ensureError(error); - } finally { - await provider.close(handle); + + stream.resume(); + }); + + stream.on('error', error => reject(error)); + stream.on('end', () => resolve()); + }); + } + + private async doWriteReadableBufferedQueued(provider: IFileSystemProviderWithOpenReadWriteCloseCapability, handle: number, readable: VSBufferReadable): Promise { + let posInFile = 0; + + let chunk: VSBuffer | null; + while (chunk = readable.read()) { + await this.doWriteBuffer(provider, handle, chunk, chunk.byteLength, posInFile, 0); + + posInFile += chunk.byteLength; } } @@ -891,16 +922,18 @@ export class FileService extends Disposable implements IFileService { } } - private async doWriteUnbuffered(provider: IFileSystemProviderWithFileReadWriteCapability, resource: URI, bufferOrReadable: VSBuffer | VSBufferReadable): Promise { - return this.ensureWriteQueue(provider, resource).queue(() => this.doWriteUnbufferedQueued(provider, resource, bufferOrReadable)); + private async doWriteUnbuffered(provider: IFileSystemProviderWithFileReadWriteCapability, resource: URI, bufferOrReadableOrStream: VSBuffer | VSBufferReadable | VSBufferReadableStream): Promise { + return this.ensureWriteQueue(provider, resource).queue(() => this.doWriteUnbufferedQueued(provider, resource, bufferOrReadableOrStream)); } - private async doWriteUnbufferedQueued(provider: IFileSystemProviderWithFileReadWriteCapability, resource: URI, bufferOrReadable: VSBuffer | VSBufferReadable): Promise { + private async doWriteUnbufferedQueued(provider: IFileSystemProviderWithFileReadWriteCapability, resource: URI, bufferOrReadableOrStream: VSBuffer | VSBufferReadable | VSBufferReadableStream): Promise { let buffer: VSBuffer; - if (bufferOrReadable instanceof VSBuffer) { - buffer = bufferOrReadable; + if (bufferOrReadableOrStream instanceof VSBuffer) { + buffer = bufferOrReadableOrStream; + } else if (isVSBufferReadableStream(bufferOrReadableOrStream)) { + buffer = await streamToBuffer(bufferOrReadableOrStream); } else { - buffer = readableToBuffer(bufferOrReadable); + buffer = readableToBuffer(bufferOrReadableOrStream); } return provider.writeFile(resource, buffer.buffer, { create: true, overwrite: true }); diff --git a/src/vs/platform/files/test/node/diskFileService.test.ts b/src/vs/platform/files/test/node/diskFileService.test.ts index e1898b1b30c..e89581a3107 100644 --- a/src/vs/platform/files/test/node/diskFileService.test.ts +++ b/src/vs/platform/files/test/node/diskFileService.test.ts @@ -20,7 +20,7 @@ import { NullLogService } from 'vs/platform/log/common/log'; import { isLinux, isWindows } from 'vs/base/common/platform'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { isEqual } from 'vs/base/common/resources'; -import { VSBuffer, VSBufferReadable } from 'vs/base/common/buffer'; +import { VSBuffer, VSBufferReadable, bufferToStream } from 'vs/base/common/buffer'; function getByName(root: IFileStat, name: string): IFileStat | null { if (root.children === undefined) { @@ -1545,6 +1545,48 @@ suite('Disk File Service', () => { assert.equal(readFileSync(resource.fsPath), newContent); }); + test('writeFile (large file - stream) - buffered', async () => { + setCapabilities(fileProvider, FileSystemProviderCapabilities.FileOpenReadWriteClose); + + const resource = URI.file(join(testDir, 'lorem.txt')); + + const content = readFileSync(resource.fsPath); + const newContent = content.toString() + content.toString(); + + const fileStat = await service.writeFile(resource, bufferToStream(VSBuffer.fromString(newContent))); + assert.equal(fileStat.name, 'lorem.txt'); + + assert.equal(readFileSync(resource.fsPath), newContent); + }); + + test('writeFile (stream) - unbuffered', async () => { + setCapabilities(fileProvider, FileSystemProviderCapabilities.FileReadWrite); + + const resource = URI.file(join(testDir, 'small.txt')); + + const content = readFileSync(resource.fsPath); + assert.equal(content, 'Small File'); + + const newContent = 'Updates to the small file'; + await service.writeFile(resource, bufferToStream(VSBuffer.fromString(newContent))); + + assert.equal(readFileSync(resource.fsPath), newContent); + }); + + test('writeFile (large file - stream) - unbuffered', async () => { + setCapabilities(fileProvider, FileSystemProviderCapabilities.FileReadWrite); + + const resource = URI.file(join(testDir, 'lorem.txt')); + + const content = readFileSync(resource.fsPath); + const newContent = content.toString() + content.toString(); + + const fileStat = await service.writeFile(resource, bufferToStream(VSBuffer.fromString(newContent))); + assert.equal(fileStat.name, 'lorem.txt'); + + assert.equal(readFileSync(resource.fsPath), newContent); + }); + test('writeFile (file is created including parents)', async () => { const resource = URI.file(join(testDir, 'other', 'newfile.txt')); From d57ddfa0df836eab2d73f0301cc9dd0a2b43ef68 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 10 Jul 2019 21:36:19 +0200 Subject: [PATCH 047/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 747481e83fb..e6d8f4fec7d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "7e657e6fe4ca2f5cf276fc28a018041753765fc7", + "distro": "9a8dcbdf04e72ed28caf98144546429536d7ca5b", "author": { "name": "Microsoft Corporation" }, From fe3e0cdcdeb4a7f5bc2745bda73564ba4ddc75b7 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 10 Jul 2019 22:07:44 +0200 Subject: [PATCH 048/710] Support request service in web --- src/vs/base/node/request.ts | 183 ------------------ .../sharedProcess/sharedProcessMain.ts | 17 +- src/vs/code/electron-main/app.ts | 10 + src/vs/code/electron-main/main.ts | 2 +- src/vs/code/node/cliProcessMain.ts | 2 +- .../platform/download/node/downloadService.ts | 9 +- .../node/extensionGalleryService.ts | 10 +- src/vs/platform/files/common/files.ts | 2 +- .../diskFileSystemProvider.ts | 5 - .../request/browser/requestService.ts | 97 ++++++++++ .../request/{node => common}/request.ts | 56 +++++- .../electron-browser/requestService.ts | 105 ---------- .../request/electron-main/requestService.ts | 6 +- .../{base => platform/request}/node/proxy.ts | 3 +- .../platform/request/node/requestService.ts | 124 ++++++++++-- .../electron-main/abstractUpdateService.ts | 2 +- .../electron-main/updateService.darwin.ts | 2 +- .../electron-main/updateService.linux.ts | 3 +- .../electron-main/updateService.win32.ts | 10 +- .../workbench/browser/web.simpleservices.ts | 21 -- .../electron-browser/experimentService.ts | 3 +- .../electron-browser/extensionTipsService.ts | 3 +- .../electron-browser/extensionsSlowActions.ts | 3 +- .../electron-browser/preferencesSearch.ts | 3 +- .../electron-browser/releaseNotesEditor.ts | 3 +- .../colorRegistry.releaseTest.ts | 7 +- src/vs/workbench/workbench.main.ts | 4 +- src/vs/workbench/workbench.web.main.ts | 6 +- 28 files changed, 327 insertions(+), 374 deletions(-) delete mode 100644 src/vs/base/node/request.ts create mode 100644 src/vs/platform/request/browser/requestService.ts rename src/vs/platform/request/{node => common}/request.ts (66%) delete mode 100644 src/vs/platform/request/electron-browser/requestService.ts rename src/vs/{base => platform/request}/node/proxy.ts (97%) diff --git a/src/vs/base/node/request.ts b/src/vs/base/node/request.ts deleted file mode 100644 index 17731debc5b..00000000000 --- a/src/vs/base/node/request.ts +++ /dev/null @@ -1,183 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { isBoolean, isNumber } from 'vs/base/common/types'; -import * as https from 'https'; -import * as http from 'http'; -import { Stream } from 'stream'; -import { parse as parseUrl } from 'url'; -import { createWriteStream } from 'fs'; -import { assign } from 'vs/base/common/objects'; -import { createGunzip } from 'zlib'; -import { CancellationToken } from 'vs/base/common/cancellation'; -import { canceled } from 'vs/base/common/errors'; - -export type Agent = any; - -export interface IRawRequestFunction { - (options: http.RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; -} - -export interface IRequestOptions { - type?: string; - url?: string; - user?: string; - password?: string; - headers?: any; - timeout?: number; - data?: string | Stream; - agent?: Agent; - followRedirects?: number; - strictSSL?: boolean; - getRawRequest?(options: IRequestOptions): IRawRequestFunction; -} - -export interface IRequestContext { - // req: http.ClientRequest; - // res: http.ClientResponse; - res: { - headers: { [n: string]: string }; - statusCode?: number; - }; - stream: Stream; -} - -export interface IRequestFunction { - (options: IRequestOptions, token: CancellationToken): Promise; -} - -async function getNodeRequest(options: IRequestOptions): Promise { - const endpoint = parseUrl(options.url!); - const module = endpoint.protocol === 'https:' ? await import('https') : await import('http'); - return module.request; -} - -export function request(options: IRequestOptions, token: CancellationToken): Promise { - let req: http.ClientRequest; - - const rawRequestPromise = options.getRawRequest - ? Promise.resolve(options.getRawRequest(options)) - : Promise.resolve(getNodeRequest(options)); - - return rawRequestPromise.then(rawRequest => { - - return new Promise((c, e) => { - const endpoint = parseUrl(options.url!); - - const opts: https.RequestOptions = { - hostname: endpoint.hostname, - port: endpoint.port ? parseInt(endpoint.port) : (endpoint.protocol === 'https:' ? 443 : 80), - protocol: endpoint.protocol, - path: endpoint.path, - method: options.type || 'GET', - headers: options.headers, - agent: options.agent, - rejectUnauthorized: isBoolean(options.strictSSL) ? options.strictSSL : true - }; - - if (options.user && options.password) { - opts.auth = options.user + ':' + options.password; - } - - req = rawRequest(opts, (res: http.IncomingMessage) => { - const followRedirects: number = isNumber(options.followRedirects) ? options.followRedirects : 3; - if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && followRedirects > 0 && res.headers['location']) { - request(assign({}, options, { - url: res.headers['location'], - followRedirects: followRedirects - 1 - }), token).then(c, e); - } else { - let stream: Stream = res; - - if (res.headers['content-encoding'] === 'gzip') { - stream = stream.pipe(createGunzip()); - } - - c({ res, stream } as IRequestContext); - } - }); - - req.on('error', e); - - if (options.timeout) { - req.setTimeout(options.timeout); - } - - if (options.data) { - if (typeof options.data === 'string') { - req.write(options.data); - } else { - options.data.pipe(req); - return; - } - } - - req.end(); - - token.onCancellationRequested(() => { - req.abort(); - e(canceled()); - }); - }); - }); -} - -function isSuccess(context: IRequestContext): boolean { - return (context.res.statusCode && context.res.statusCode >= 200 && context.res.statusCode < 300) || context.res.statusCode === 1223; -} - -function hasNoContent(context: IRequestContext): boolean { - return context.res.statusCode === 204; -} - -export function download(filePath: string, context: IRequestContext): Promise { - return new Promise((c, e) => { - const out = createWriteStream(filePath); - - out.once('finish', () => c(undefined)); - context.stream.once('error', e); - context.stream.pipe(out); - }); -} - -export function asText(context: IRequestContext): Promise { - return new Promise((c, e) => { - if (!isSuccess(context)) { - return e('Server returned ' + context.res.statusCode); - } - - if (hasNoContent(context)) { - return c(null); - } - - const buffer: string[] = []; - context.stream.on('data', (d: string) => buffer.push(d)); - context.stream.on('end', () => c(buffer.join(''))); - context.stream.on('error', e); - }); -} - -export function asJson(context: IRequestContext): Promise { - return new Promise((c, e) => { - if (!isSuccess(context)) { - return e('Server returned ' + context.res.statusCode); - } - - if (hasNoContent(context)) { - return c(null); - } - - const buffer: string[] = []; - context.stream.on('data', (d: string) => buffer.push(d)); - context.stream.on('end', () => { - try { - c(JSON.parse(buffer.join(''))); - } catch (err) { - e(err); - } - }); - context.stream.on('error', e); - }); -} diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts index 00acb515cb3..e713834efe6 100644 --- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts @@ -19,8 +19,8 @@ import { ExtensionManagementService } from 'vs/platform/extensionManagement/node import { ExtensionGalleryService } from 'vs/platform/extensionManagement/node/extensionGalleryService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ConfigurationService } from 'vs/platform/configuration/node/configurationService'; -import { IRequestService } from 'vs/platform/request/node/request'; -import { RequestService } from 'vs/platform/request/electron-browser/requestService'; +import { IRequestService } from 'vs/platform/request/common/request'; +import { RequestService } from 'vs/platform/request/browser/requestService'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { combinedAppender, NullTelemetryService, ITelemetryAppender, NullAppender, LogAppender } from 'vs/platform/telemetry/common/telemetryUtils'; import { resolveCommonProperties } from 'vs/platform/telemetry/node/commonProperties'; @@ -51,6 +51,10 @@ import { SpdLogService } from 'vs/platform/log/node/spdlogService'; import { DiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsService'; import { IDiagnosticsService } from 'vs/platform/diagnostics/common/diagnosticsService'; import { DiagnosticsChannel } from 'vs/platform/diagnostics/node/diagnosticsIpc'; +import { FileService } from 'vs/platform/files/common/fileService'; +import { IFileService } from 'vs/platform/files/common/files'; +import { DiskFileSystemProvider } from 'vs/platform/files/electron-browser/diskFileSystemProvider'; +import { Schemas } from 'vs/base/common/network'; export interface ISharedProcessConfiguration { readonly machineId: string; @@ -122,6 +126,15 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat const dialogChannel = server.getChannel('dialog', activeWindowRouter); services.set(IDialogService, new DialogChannelClient(dialogChannel)); + // Files + const fileService = new FileService(logService); + services.set(IFileService, fileService); + disposables.add(fileService); + + const diskFileSystemProvider = new DiskFileSystemProvider(logService); + disposables.add(diskFileSystemProvider); + fileService.registerProvider(Schemas.file, diskFileSystemProvider); + const instantiationService = new InstantiationService(services); let telemetryService: ITelemetryService; diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index d34f16ef958..f70eece8b30 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -83,6 +83,9 @@ import { statSync } from 'fs'; import { ISignService } from 'vs/platform/sign/common/sign'; import { IDiagnosticsService } from 'vs/platform/diagnostics/common/diagnosticsService'; import { DiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsIpc'; +import { FileService } from 'vs/platform/files/common/fileService'; +import { IFileService } from 'vs/platform/files/common/files'; +import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; export class CodeApplication extends Disposable { @@ -418,6 +421,13 @@ export class CodeApplication extends Disposable { private async createServices(machineId: string, sharedProcess: SharedProcess, sharedProcessClient: Promise>): Promise { const services = new ServiceCollection(); + // Files + const fileService = this._register(new FileService(this.logService)); + services.set(IFileService, fileService); + + const diskFileSystemProvider = this._register(new DiskFileSystemProvider(this.logService)); + fileService.registerProvider(Schemas.file, diskFileSystemProvider); + switch (process.platform) { case 'win32': services.set(IUpdateService, new SyncDescriptor(Win32UpdateService)); diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index e71b758a7f7..897fe6ef386 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -26,7 +26,7 @@ import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/ import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ConfigurationService } from 'vs/platform/configuration/node/configurationService'; -import { IRequestService } from 'vs/platform/request/node/request'; +import { IRequestService } from 'vs/platform/request/common/request'; import { RequestService } from 'vs/platform/request/electron-main/requestService'; import * as fs from 'fs'; import { CodeApplication } from 'vs/code/electron-main/app'; diff --git a/src/vs/code/node/cliProcessMain.ts b/src/vs/code/node/cliProcessMain.ts index 9446ef00d59..cd80057618c 100644 --- a/src/vs/code/node/cliProcessMain.ts +++ b/src/vs/code/node/cliProcessMain.ts @@ -22,7 +22,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { combinedAppender, NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; import { TelemetryService, ITelemetryServiceConfig } from 'vs/platform/telemetry/common/telemetryService'; import { resolveCommonProperties } from 'vs/platform/telemetry/node/commonProperties'; -import { IRequestService } from 'vs/platform/request/node/request'; +import { IRequestService } from 'vs/platform/request/common/request'; import { RequestService } from 'vs/platform/request/node/requestService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ConfigurationService } from 'vs/platform/configuration/node/configurationService'; diff --git a/src/vs/platform/download/node/downloadService.ts b/src/vs/platform/download/node/downloadService.ts index 7822ed2253d..e464b7ae73d 100644 --- a/src/vs/platform/download/node/downloadService.ts +++ b/src/vs/platform/download/node/downloadService.ts @@ -7,19 +7,20 @@ import { IDownloadService } from 'vs/platform/download/common/download'; import { URI } from 'vs/base/common/uri'; import { Schemas } from 'vs/base/common/network'; import { copy } from 'vs/base/node/pfs'; -import { IRequestService } from 'vs/platform/request/node/request'; -import { asText, download } from 'vs/base/node/request'; +import { IRequestService, asText } from 'vs/platform/request/common/request'; import { CancellationToken } from 'vs/base/common/cancellation'; import { join } from 'vs/base/common/path'; import { tmpdir } from 'os'; import { generateUuid } from 'vs/base/common/uuid'; +import { IFileService } from 'vs/platform/files/common/files'; export class DownloadService implements IDownloadService { _serviceBrand: any; constructor( - @IRequestService private readonly requestService: IRequestService + @IRequestService private readonly requestService: IRequestService, + @IFileService private readonly fileService: IFileService ) { } download(uri: URI, target: string = join(tmpdir(), generateUuid()), cancellationToken: CancellationToken = CancellationToken.None): Promise { @@ -30,7 +31,7 @@ export class DownloadService implements IDownloadService { return this.requestService.request(options, cancellationToken) .then(context => { if (context.res.statusCode === 200) { - return download(target, context).then(() => target); + return this.fileService.writeFile(URI.file(target), context.stream).then(() => target); } return asText(context) .then(message => Promise.reject(new Error(`Expected 200, got back ${context.res.statusCode} instead.\n\n${message}`))); diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts index 77ed9973c5d..71c67d5bda3 100644 --- a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts @@ -9,10 +9,9 @@ import { getErrorMessage, isPromiseCanceledError, canceled } from 'vs/base/commo import { StatisticType, IGalleryExtension, IExtensionGalleryService, IGalleryExtensionAsset, IQueryOptions, SortBy, SortOrder, IExtensionIdentifier, IReportedExtension, InstallOperation, ITranslation, IGalleryExtensionVersion, IGalleryExtensionAssets, isIExtensionIdentifier } from 'vs/platform/extensionManagement/common/extensionManagement'; import { getGalleryExtensionId, getGalleryExtensionTelemetryData, adoptToGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { assign, getOrDefault } from 'vs/base/common/objects'; -import { IRequestService } from 'vs/platform/request/node/request'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IPager } from 'vs/base/common/paging'; -import { IRequestOptions, IRequestContext, download, asJson, asText } from 'vs/base/node/request'; +import { IRequestService, IRequestOptions, IRequestContext, asJson, asText } from 'vs/platform/request/common/request'; import pkg from 'vs/platform/product/node/package'; import product from 'vs/platform/product/node/product'; import { isEngineValid } from 'vs/platform/extensions/node/extensionValidator'; @@ -23,6 +22,8 @@ import { values } from 'vs/base/common/map'; import { CancellationToken } from 'vs/base/common/cancellation'; import { ILogService } from 'vs/platform/log/common/log'; import { IExtensionManifest } from 'vs/platform/extensions/common/extensions'; +import { IFileService } from 'vs/platform/files/common/files'; +import { URI } from 'vs/base/common/uri'; interface IRawGalleryExtensionFile { assetType: string; @@ -336,7 +337,8 @@ export class ExtensionGalleryService implements IExtensionGalleryService { @IRequestService private readonly requestService: IRequestService, @ILogService private readonly logService: ILogService, @IEnvironmentService private readonly environmentService: IEnvironmentService, - @ITelemetryService private readonly telemetryService: ITelemetryService + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IFileService private readonly fileService: IFileService, ) { const config = product.extensionsGallery; this.extensionsGalleryUrl = config && config.serviceUrl; @@ -555,7 +557,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService { } : extension.assets.download; return this.getAsset(downloadAsset) - .then(context => download(zipPath, context)) + .then(context => this.fileService.writeFile(URI.file(zipPath), context.stream)) .then(() => log(new Date().getTime() - startTime)) .then(() => zipPath); } diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 69b1fb785d4..4b576f6de98 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -105,7 +105,7 @@ export interface IFileService { /** * Updates the content replacing its previous value. */ - writeFile(resource: URI, bufferOrReadable: VSBuffer | VSBufferReadable, options?: IWriteFileOptions): Promise; + writeFile(resource: URI, bufferOrReadable: VSBuffer | VSBufferReadable | VSBufferReadableStream, options?: IWriteFileOptions): Promise; /** * Moves the file/folder to a new path identified by the resource. diff --git a/src/vs/platform/files/electron-browser/diskFileSystemProvider.ts b/src/vs/platform/files/electron-browser/diskFileSystemProvider.ts index 68cc8ed95db..2c23af873f1 100644 --- a/src/vs/platform/files/electron-browser/diskFileSystemProvider.ts +++ b/src/vs/platform/files/electron-browser/diskFileSystemProvider.ts @@ -9,14 +9,9 @@ import { FileDeleteOptions, FileSystemProviderCapabilities } from 'vs/platform/f import { isWindows } from 'vs/base/common/platform'; import { localize } from 'vs/nls'; import { basename } from 'vs/base/common/path'; -import { ILogService } from 'vs/platform/log/common/log'; export class DiskFileSystemProvider extends NodeDiskFileSystemProvider { - constructor(logService: ILogService) { - super(logService); - } - get capabilities(): FileSystemProviderCapabilities { if (!this._capabilities) { this._capabilities = super.capabilities | FileSystemProviderCapabilities.Trash; diff --git a/src/vs/platform/request/browser/requestService.ts b/src/vs/platform/request/browser/requestService.ts new file mode 100644 index 00000000000..bb16b39afea --- /dev/null +++ b/src/vs/platform/request/browser/requestService.ts @@ -0,0 +1,97 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { IRequestOptions, IRequestContext } from 'vs/platform/request/common/request'; +import { CancellationToken } from 'vs/base/common/cancellation'; +import { canceled } from 'vs/base/common/errors'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { ILogService } from 'vs/platform/log/common/log'; +import { assign } from 'vs/base/common/objects'; +import { VSBuffer, bufferToStream } from 'vs/base/common/buffer'; + +/** + * This service exposes the `request` API, while using the global + * or configured proxy settings. + */ +export class RequestService { + + _serviceBrand: any; + + constructor( + @IConfigurationService private readonly configurationService: IConfigurationService, + @ILogService private readonly logService: ILogService + ) { + } + + request(options: IRequestOptions, token: CancellationToken): Promise { + this.logService.trace('RequestService#request', options.url); + + const authorization = this.configurationService.getValue('http.proxyAuthorization'); + if (authorization) { + options.headers = assign(options.headers || {}, { 'Proxy-Authorization': authorization }); + } + + const xhr = new XMLHttpRequest(); + return new Promise((resolve, reject) => { + + xhr.open(options.type || 'GET', options.url || '', true, options.user, options.password); + this.setRequestHeaders(xhr, options); + + xhr.responseType = 'arraybuffer'; + xhr.onerror = e => reject(new Error(xhr.statusText && ('XHR failed: ' + xhr.statusText))); + xhr.onload = (e) => { + resolve({ + res: { + statusCode: xhr.status, + headers: this.getResponseHeaders(xhr) + }, + stream: bufferToStream(VSBuffer.wrap(new Uint8Array(xhr.response))) + }); + }; + xhr.ontimeout = e => reject(new Error(`XHR timeout: ${options.timeout}ms`)); + + if (options.timeout) { + xhr.timeout = options.timeout; + } + + // TODO: remove any + xhr.send(options.data as any); + + // cancel + token.onCancellationRequested(() => { + xhr.abort(); + reject(canceled()); + }); + }); + } + + private setRequestHeaders(xhr: XMLHttpRequest, options: IRequestOptions): void { + if (options.headers) { + outer: for (let k in options.headers) { + switch (k) { + case 'User-Agent': + case 'Accept-Encoding': + case 'Content-Length': + // unsafe headers + continue outer; + } + xhr.setRequestHeader(k, options.headers[k]); + + } + } + } + + private getResponseHeaders(xhr: XMLHttpRequest): { [name: string]: string } { + const headers: { [name: string]: string } = Object.create(null); + for (const line of xhr.getAllResponseHeaders().split(/\r\n|\n|\r/g)) { + if (line) { + const idx = line.indexOf(':'); + headers[line.substr(0, idx).trim().toLowerCase()] = line.substr(idx + 1).trim(); + } + } + return headers; + } + +} \ No newline at end of file diff --git a/src/vs/platform/request/node/request.ts b/src/vs/platform/request/common/request.ts similarity index 66% rename from src/vs/platform/request/node/request.ts rename to src/vs/platform/request/common/request.ts index a19c75449f8..acb9e553824 100644 --- a/src/vs/platform/request/node/request.ts +++ b/src/vs/platform/request/common/request.ts @@ -4,20 +4,72 @@ *--------------------------------------------------------------------------------------------*/ import { localize } from 'vs/nls'; +import { CancellationToken } from 'vs/base/common/cancellation'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import { IRequestOptions, IRequestContext } from 'vs/base/node/request'; import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; import { Registry } from 'vs/platform/registry/common/platform'; -import { CancellationToken } from 'vs/base/common/cancellation'; +import { VSBufferReadableStream, streamToBuffer } from 'vs/base/common/buffer'; export const IRequestService = createDecorator('requestService'); +export interface IRequestOptions { + type?: string; + url?: string; + user?: string; + password?: string; + headers?: any; + timeout?: number; + data?: string; + followRedirects?: number; +} + +export interface IRequestContext { + // req: http.ClientRequest; + // res: http.ClientResponse; + res: { + headers: { [n: string]: string }; + statusCode?: number; + }; + stream: VSBufferReadableStream; +} + export interface IRequestService { _serviceBrand: any; request(options: IRequestOptions, token: CancellationToken): Promise; } +function isSuccess(context: IRequestContext): boolean { + return (context.res.statusCode && context.res.statusCode >= 200 && context.res.statusCode < 300) || context.res.statusCode === 1223; +} + +function hasNoContent(context: IRequestContext): boolean { + return context.res.statusCode === 204; +} + +export async function asText(context: IRequestContext): Promise { + if (!isSuccess(context)) { + throw new Error('Server returned ' + context.res.statusCode); + } + if (hasNoContent(context)) { + return null; + } + const buffer = await streamToBuffer(context.stream); + return buffer.toString(); +} + +export async function asJson(context: IRequestContext): Promise { + if (!isSuccess(context)) { + throw new Error('Server returned ' + context.res.statusCode); + } + if (hasNoContent(context)) { + return null; + } + const buffer = await streamToBuffer(context.stream); + return JSON.parse(buffer.toString()); +} + + export interface IHTTPConfiguration { http?: { proxy?: string; diff --git a/src/vs/platform/request/electron-browser/requestService.ts b/src/vs/platform/request/electron-browser/requestService.ts deleted file mode 100644 index 87636c4d4cf..00000000000 --- a/src/vs/platform/request/electron-browser/requestService.ts +++ /dev/null @@ -1,105 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { IRequestOptions, IRequestContext, IRequestFunction } from 'vs/base/node/request'; -import { Readable } from 'stream'; -import { RequestService as NodeRequestService } from 'vs/platform/request/node/requestService'; -import { CancellationToken } from 'vs/base/common/cancellation'; -import { canceled } from 'vs/base/common/errors'; - -/** - * This service exposes the `request` API, while using the global - * or configured proxy settings. - */ -export class RequestService extends NodeRequestService { - request(options: IRequestOptions, token: CancellationToken): Promise { - return super.request(options, token, xhrRequest); - } -} - -export const xhrRequest: IRequestFunction = (options: IRequestOptions, token: CancellationToken): Promise => { - - const xhr = new XMLHttpRequest(); - return new Promise((resolve, reject) => { - - xhr.open(options.type || 'GET', options.url || '', true, options.user, options.password); - setRequestHeaders(xhr, options); - - xhr.responseType = 'arraybuffer'; - xhr.onerror = e => reject(new Error(xhr.statusText && ('XHR failed: ' + xhr.statusText))); - xhr.onload = (e) => { - resolve({ - res: { - statusCode: xhr.status, - headers: getResponseHeaders(xhr) - }, - stream: new class ArrayBufferStream extends Readable { - - private _buffer: Buffer; - private _offset: number; - private _length: number; - - constructor(arraybuffer: ArrayBuffer) { - super(); - this._buffer = Buffer.from(new Uint8Array(arraybuffer)); - this._offset = 0; - this._length = this._buffer.length; - } - - _read(size: number) { - if (this._offset < this._length) { - this.push(this._buffer.slice(this._offset, (this._offset + size))); - this._offset += size; - } else { - this.push(null); - } - } - - }(xhr.response) - }); - }; - xhr.ontimeout = e => reject(new Error(`XHR timeout: ${options.timeout}ms`)); - - if (options.timeout) { - xhr.timeout = options.timeout; - } - - // TODO: remove any - xhr.send(options.data as any); - - // cancel - token.onCancellationRequested(() => { - xhr.abort(); - reject(canceled()); - }); - }); -}; - -function setRequestHeaders(xhr: XMLHttpRequest, options: IRequestOptions): void { - if (options.headers) { - outer: for (let k in options.headers) { - switch (k) { - case 'User-Agent': - case 'Accept-Encoding': - case 'Content-Length': - // unsafe headers - continue outer; - } - xhr.setRequestHeader(k, options.headers[k]); - - } - } -} - -function getResponseHeaders(xhr: XMLHttpRequest): { [name: string]: string } { - const headers: { [name: string]: string } = Object.create(null); - for (const line of xhr.getAllResponseHeaders().split(/\r\n|\n|\r/g)) { - if (line) { - const idx = line.indexOf(':'); - headers[line.substr(0, idx).trim().toLowerCase()] = line.substr(idx + 1).trim(); - } - } - return headers; -} diff --git a/src/vs/platform/request/electron-main/requestService.ts b/src/vs/platform/request/electron-main/requestService.ts index 72e2847be9e..cd27b9fbf5d 100644 --- a/src/vs/platform/request/electron-main/requestService.ts +++ b/src/vs/platform/request/electron-main/requestService.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IRequestOptions, IRequestContext, request, IRawRequestFunction } from 'vs/base/node/request'; -import { RequestService as NodeRequestService } from 'vs/platform/request/node/requestService'; +import { IRequestOptions, IRequestContext } from 'vs/platform/request/common/request'; +import { RequestService as NodeRequestService, IRawRequestFunction } from 'vs/platform/request/node/requestService'; import { assign } from 'vs/base/common/objects'; import { net } from 'electron'; import { CancellationToken } from 'vs/base/common/cancellation'; @@ -16,6 +16,6 @@ function getRawRequest(options: IRequestOptions): IRawRequestFunction { export class RequestService extends NodeRequestService { request(options: IRequestOptions, token: CancellationToken): Promise { - return super.request(options, token, options => request(assign({}, options || {}, { getRawRequest }), token)); + return super.request(assign({}, options || {}, { getRawRequest }), token); } } diff --git a/src/vs/base/node/proxy.ts b/src/vs/platform/request/node/proxy.ts similarity index 97% rename from src/vs/base/node/proxy.ts rename to src/vs/platform/request/node/proxy.ts index 2ef6c6768b2..c5932a7d10b 100644 --- a/src/vs/base/node/proxy.ts +++ b/src/vs/platform/request/node/proxy.ts @@ -5,7 +5,8 @@ import { Url, parse as parseUrl } from 'url'; import { isBoolean } from 'vs/base/common/types'; -import { Agent } from './request'; + +export type Agent = any; function getSystemProxyURI(requestURL: Url): string | null { if (requestURL.protocol === 'http:') { diff --git a/src/vs/platform/request/node/requestService.ts b/src/vs/platform/request/node/requestService.ts index c2858fe6dd0..8297dffc911 100644 --- a/src/vs/platform/request/node/requestService.ts +++ b/src/vs/platform/request/node/requestService.ts @@ -3,14 +3,31 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as https from 'https'; +import * as http from 'http'; +import { Stream } from 'stream'; +import { createGunzip } from 'zlib'; +import { parse as parseUrl } from 'url'; import { Disposable } from 'vs/base/common/lifecycle'; import { assign } from 'vs/base/common/objects'; -import { IRequestOptions, IRequestContext, IRequestFunction, request } from 'vs/base/node/request'; -import { getProxyAgent } from 'vs/base/node/proxy'; -import { IRequestService, IHTTPConfiguration } from 'vs/platform/request/node/request'; +import { isBoolean, isNumber } from 'vs/base/common/types'; +import { canceled } from 'vs/base/common/errors'; +import { CancellationToken } from 'vs/base/common/cancellation'; +import { IRequestOptions, IRequestContext, IRequestService, IHTTPConfiguration } from 'vs/platform/request/common/request'; +import { getProxyAgent, Agent } from 'vs/platform/request/node/proxy'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ILogService } from 'vs/platform/log/common/log'; -import { CancellationToken } from 'vs/base/common/cancellation'; +import { VSBuffer, VSBufferWriteableStream, writeableBufferStream } from 'vs/base/common/buffer'; + +export interface IRawRequestFunction { + (options: http.RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; +} + +export interface NodeRequestOptions extends IRequestOptions { + agent?: Agent; + strictSSL?: boolean; + getRawRequest?(options: IRequestOptions): IRawRequestFunction; +} /** * This service exposes the `request` API, while using the global @@ -20,9 +37,9 @@ export class RequestService extends Disposable implements IRequestService { _serviceBrand: any; - private proxyUrl?: string; - private strictSSL: boolean; - private authorization?: string; + protected proxyUrl?: string; + protected strictSSL: boolean; + protected authorization?: string; constructor( @IConfigurationService configurationService: IConfigurationService, @@ -39,21 +56,96 @@ export class RequestService extends Disposable implements IRequestService { this.authorization = config.http && config.http.proxyAuthorization; } - request(options: IRequestOptions, token: CancellationToken, requestFn: IRequestFunction = request): Promise { + async request(options: NodeRequestOptions, token: CancellationToken): Promise { this.logService.trace('RequestService#request', options.url); const { proxyUrl, strictSSL } = this; - const agentPromise = options.agent ? Promise.resolve(options.agent) : Promise.resolve(getProxyAgent(options.url || '', { proxyUrl, strictSSL })); + const agent = options.agent ? options.agent : await getProxyAgent(options.url || '', { proxyUrl, strictSSL }); - return agentPromise.then(agent => { - options.agent = agent; - options.strictSSL = strictSSL; + options.agent = agent; + options.strictSSL = strictSSL; - if (this.authorization) { - options.headers = assign(options.headers || {}, { 'Proxy-Authorization': this.authorization }); + if (this.authorization) { + options.headers = assign(options.headers || {}, { 'Proxy-Authorization': this.authorization }); + } + + return this._request(options, token); + } + + private async getNodeRequest(options: IRequestOptions): Promise { + const endpoint = parseUrl(options.url!); + const module = endpoint.protocol === 'https:' ? await import('https') : await import('http'); + return module.request; + } + + private _request(options: NodeRequestOptions, token: CancellationToken): Promise { + + return new Promise(async (c, e) => { + let req: http.ClientRequest; + + const endpoint = parseUrl(options.url!); + const rawRequest = options.getRawRequest + ? options.getRawRequest(options) + : await this.getNodeRequest(options); + + const opts: https.RequestOptions = { + hostname: endpoint.hostname, + port: endpoint.port ? parseInt(endpoint.port) : (endpoint.protocol === 'https:' ? 443 : 80), + protocol: endpoint.protocol, + path: endpoint.path, + method: options.type || 'GET', + headers: options.headers, + agent: options.agent, + rejectUnauthorized: isBoolean(options.strictSSL) ? options.strictSSL : true + }; + + if (options.user && options.password) { + opts.auth = options.user + ':' + options.password; } - return requestFn(options, token); + req = rawRequest(opts, (res: http.IncomingMessage) => { + const followRedirects: number = isNumber(options.followRedirects) ? options.followRedirects : 3; + if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && followRedirects > 0 && res.headers['location']) { + this._request(assign({}, options, { + url: res.headers['location'], + followRedirects: followRedirects - 1 + }), token).then(c, e); + } else { + let _stream: Stream = res; + + if (res.headers['content-encoding'] === 'gzip') { + _stream = _stream.pipe(createGunzip()); + } + + const stream: VSBufferWriteableStream = writeableBufferStream(); + _stream.on('data', (d: string) => stream.write(VSBuffer.fromString(d))); + _stream.on('error', e => stream.end(e)); + _stream.on('end', e => stream.end()); + + c({ res, stream } as IRequestContext); + } + }); + + req.on('error', e); + + if (options.timeout) { + req.setTimeout(options.timeout); + } + + if (options.data) { + if (typeof options.data === 'string') { + req.write(options.data); + } + } + + req.end(); + + token.onCancellationRequested(() => { + req.abort(); + e(canceled()); + }); }); + } -} + +} \ No newline at end of file diff --git a/src/vs/platform/update/electron-main/abstractUpdateService.ts b/src/vs/platform/update/electron-main/abstractUpdateService.ts index fcca3cbfb9f..76544db2221 100644 --- a/src/vs/platform/update/electron-main/abstractUpdateService.ts +++ b/src/vs/platform/update/electron-main/abstractUpdateService.ts @@ -11,7 +11,7 @@ import product from 'vs/platform/product/node/product'; import { IUpdateService, State, StateType, AvailableForDownload, UpdateType } from 'vs/platform/update/common/update'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ILogService } from 'vs/platform/log/common/log'; -import { IRequestService } from 'vs/platform/request/node/request'; +import { IRequestService } from 'vs/platform/request/common/request'; import { CancellationToken } from 'vs/base/common/cancellation'; export function createUpdateURL(platform: string, quality: string): string { diff --git a/src/vs/platform/update/electron-main/updateService.darwin.ts b/src/vs/platform/update/electron-main/updateService.darwin.ts index 4427e2a75eb..352d4d91633 100644 --- a/src/vs/platform/update/electron-main/updateService.darwin.ts +++ b/src/vs/platform/update/electron-main/updateService.darwin.ts @@ -14,7 +14,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ILogService } from 'vs/platform/log/common/log'; import { AbstractUpdateService, createUpdateURL } from 'vs/platform/update/electron-main/abstractUpdateService'; -import { IRequestService } from 'vs/platform/request/node/request'; +import { IRequestService } from 'vs/platform/request/common/request'; export class DarwinUpdateService extends AbstractUpdateService { diff --git a/src/vs/platform/update/electron-main/updateService.linux.ts b/src/vs/platform/update/electron-main/updateService.linux.ts index 38b022755d9..52c4ac7dc2b 100644 --- a/src/vs/platform/update/electron-main/updateService.linux.ts +++ b/src/vs/platform/update/electron-main/updateService.linux.ts @@ -6,13 +6,12 @@ import product from 'vs/platform/product/node/product'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; -import { IRequestService } from 'vs/platform/request/node/request'; import { State, IUpdate, AvailableForDownload, UpdateType } from 'vs/platform/update/common/update'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ILogService } from 'vs/platform/log/common/log'; import { createUpdateURL, AbstractUpdateService } from 'vs/platform/update/electron-main/abstractUpdateService'; -import { asJson } from 'vs/base/node/request'; +import { IRequestService, asJson } from 'vs/platform/request/common/request'; import { shell } from 'electron'; import { CancellationToken } from 'vs/base/common/cancellation'; diff --git a/src/vs/platform/update/electron-main/updateService.win32.ts b/src/vs/platform/update/electron-main/updateService.win32.ts index 8467f908dc6..cbff0bf1c74 100644 --- a/src/vs/platform/update/electron-main/updateService.win32.ts +++ b/src/vs/platform/update/electron-main/updateService.win32.ts @@ -9,20 +9,21 @@ import * as pfs from 'vs/base/node/pfs'; import { memoize } from 'vs/base/common/decorators'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; -import { IRequestService } from 'vs/platform/request/node/request'; import product from 'vs/platform/product/node/product'; import { State, IUpdate, StateType, AvailableForDownload, UpdateType } from 'vs/platform/update/common/update'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ILogService } from 'vs/platform/log/common/log'; import { createUpdateURL, AbstractUpdateService } from 'vs/platform/update/electron-main/abstractUpdateService'; -import { download, asJson } from 'vs/base/node/request'; +import { IRequestService, asJson } from 'vs/platform/request/common/request'; import { checksum } from 'vs/base/node/crypto'; import { tmpdir } from 'os'; import { spawn } from 'child_process'; import { shell } from 'electron'; import { CancellationToken } from 'vs/base/common/cancellation'; import { timeout } from 'vs/base/common/async'; +import { IFileService } from 'vs/platform/files/common/files'; +import { URI } from 'vs/base/common/uri'; async function pollUntil(fn: () => boolean, millis = 1000): Promise { while (!fn()) { @@ -64,7 +65,8 @@ export class Win32UpdateService extends AbstractUpdateService { @ITelemetryService private readonly telemetryService: ITelemetryService, @IEnvironmentService environmentService: IEnvironmentService, @IRequestService requestService: IRequestService, - @ILogService logService: ILogService + @ILogService logService: ILogService, + @IFileService private readonly fileService: IFileService ) { super(lifecycleService, configurationService, environmentService, requestService, logService); @@ -142,7 +144,7 @@ export class Win32UpdateService extends AbstractUpdateService { const downloadPath = `${updatePackagePath}.tmp`; return this.requestService.request({ url }, CancellationToken.None) - .then(context => download(downloadPath, context)) + .then(context => this.fileService.writeFile(URI.file(downloadPath), context.stream)) .then(hash ? () => checksum(downloadPath, update.hash) : () => undefined) .then(() => pfs.rename(downloadPath, updatePackagePath)) .then(() => updatePackagePath); diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index 34905fba1a2..dc0f272fbcb 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -455,27 +455,6 @@ export class SimpleMultiExtensionsManagementService implements IExtensionManagem //#endregion -//#region Request - -export const IRequestService = createDecorator('requestService'); - -export interface IRequestService { - _serviceBrand: any; - - request(options: any, token: CancellationToken): Promise; -} - -export class SimpleRequestService implements IRequestService { - - _serviceBrand: any; - - request(options: any, token: CancellationToken): Promise { - return Promise.resolve(Object.create(null)); - } -} - -//#endregion - //#region Telemetry export class SimpleTelemetryService implements ITelemetryService { diff --git a/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts b/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts index 0deb24c7201..9a0aad7548b 100644 --- a/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts +++ b/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts @@ -12,11 +12,10 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IRequestService } from 'vs/platform/request/node/request'; import { language } from 'vs/base/common/platform'; import { Disposable, IDisposable, dispose } from 'vs/base/common/lifecycle'; import { match } from 'vs/base/common/glob'; -import { asJson } from 'vs/base/node/request'; +import { IRequestService, asJson } from 'vs/platform/request/common/request'; import { Emitter, Event } from 'vs/base/common/event'; import { ITextFileService, StateChange } from 'vs/workbench/services/textfile/common/textfiles'; import { WorkspaceStats } from 'vs/workbench/contrib/stats/electron-browser/workspaceStats'; diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts index f192f1c16d9..853db02ca8d 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts @@ -32,8 +32,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { guessMimeTypes, MIME_UNKNOWN } from 'vs/base/common/mime'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; import { getHashedRemotesFromUri } from 'vs/workbench/contrib/stats/electron-browser/workspaceStats'; -import { IRequestService } from 'vs/platform/request/node/request'; -import { asJson } from 'vs/base/node/request'; +import { IRequestService, asJson } from 'vs/platform/request/common/request'; import { isNumber } from 'vs/base/common/types'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { INotificationService } from 'vs/platform/notification/common/notification'; diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts index fece37e6a35..3b81b03291c 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts @@ -11,9 +11,8 @@ import { URI } from 'vs/base/common/uri'; import { IExtensionHostProfile } from 'vs/workbench/services/extensions/common/extensions'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { localize } from 'vs/nls'; -import { IRequestService } from 'vs/platform/request/node/request'; import { CancellationToken } from 'vs/base/common/cancellation'; -import { asText } from 'vs/base/node/request'; +import { IRequestService, asText } from 'vs/platform/request/common/request'; import { join } from 'vs/base/common/path'; import { onUnexpectedError } from 'vs/base/common/errors'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; diff --git a/src/vs/workbench/contrib/preferences/electron-browser/preferencesSearch.ts b/src/vs/workbench/contrib/preferences/electron-browser/preferencesSearch.ts index a31aa422474..829d560a6ad 100644 --- a/src/vs/workbench/contrib/preferences/electron-browser/preferencesSearch.ts +++ b/src/vs/workbench/contrib/preferences/electron-browser/preferencesSearch.ts @@ -8,8 +8,7 @@ import { top } from 'vs/base/common/arrays'; import * as strings from 'vs/base/common/strings'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IRequestService } from 'vs/platform/request/node/request'; -import { asJson } from 'vs/base/node/request'; +import { IRequestService, asJson } from 'vs/platform/request/common/request'; import { IExtensionManagementService, ILocalExtension, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ILogService } from 'vs/platform/log/common/log'; import { IPreferencesSearchService, ISearchProvider, IWorkbenchSettingsConfiguration } from 'vs/workbench/contrib/preferences/common/preferences'; diff --git a/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts b/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts index 95c3f16b960..273eaec4fce 100644 --- a/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts +++ b/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts @@ -7,7 +7,6 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import * as marked from 'vs/base/common/marked/marked'; import { OS } from 'vs/base/common/platform'; import { URI } from 'vs/base/common/uri'; -import { asText } from 'vs/base/node/request'; import { TokenizationRegistry, ITokenizationSupport } from 'vs/editor/common/modes'; import { generateTokensCSSForColorMap } from 'vs/editor/common/modes/supports/tokenization'; import { tokenizeToString } from 'vs/editor/common/modes/textToHtmlTokenizer'; @@ -17,7 +16,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IOpenerService } from 'vs/platform/opener/common/opener'; -import { IRequestService } from 'vs/platform/request/node/request'; +import { IRequestService, asText } from 'vs/platform/request/common/request'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { addGAParameters } from 'vs/platform/telemetry/node/telemetryNodeUtils'; import { IWebviewEditorService } from 'vs/workbench/contrib/webview/browser/webviewEditorService'; diff --git a/src/vs/workbench/test/electron-browser/colorRegistry.releaseTest.ts b/src/vs/workbench/test/electron-browser/colorRegistry.releaseTest.ts index 40eb17f7d9a..c61f19b0d58 100644 --- a/src/vs/workbench/test/electron-browser/colorRegistry.releaseTest.ts +++ b/src/vs/workbench/test/electron-browser/colorRegistry.releaseTest.ts @@ -12,12 +12,15 @@ import { debugExceptionWidgetBackground } from 'vs/workbench/contrib/debug/brows import { debugToolBarBackground } from 'vs/workbench/contrib/debug/browser/debugToolBar'; import { buttonBackground } from 'vs/workbench/contrib/welcome/page/browser/welcomePage'; import { embeddedEditorBackground } from 'vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart'; -import { request, asText } from 'vs/base/node/request'; +import { asText } from 'vs/platform/request/common/request'; import * as pfs from 'vs/base/node/pfs'; import * as path from 'vs/base/common/path'; import * as assert from 'assert'; import { getPathFromAmdModule } from 'vs/base/common/amd'; import { CancellationToken } from 'vs/base/common/cancellation'; +import { RequestService } from 'vs/platform/request/node/requestService'; +import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; +import { NullLogService } from 'vs/platform/log/common/log'; interface ColorInfo { @@ -40,7 +43,7 @@ export const experimental: string[] = []; // 'settings.modifiedItemForeground', suite('Color Registry', function () { test('all colors documented', async function () { - const reqContext = await request({ url: 'https://raw.githubusercontent.com/Microsoft/vscode-docs/vnext/docs/getstarted/theme-color-reference.md' }, CancellationToken.None); + const reqContext = await new RequestService(new TestConfigurationService(), new NullLogService()).request({ url: 'https://raw.githubusercontent.com/Microsoft/vscode-docs/vnext/docs/getstarted/theme-color-reference.md' }, CancellationToken.None); const content = (await asText(reqContext))!; const expression = /\-\s*\`([\w\.]+)\`: (.*)/g; diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index dc3e95c613d..f039eb03b56 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -68,8 +68,8 @@ import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'; import { ExtensionGalleryService } from 'vs/platform/extensionManagement/node/extensionGalleryService'; -import { IRequestService } from 'vs/platform/request/node/request'; -import { RequestService } from 'vs/platform/request/electron-browser/requestService'; +import { IRequestService } from 'vs/platform/request/common/request'; +import { RequestService } from 'vs/platform/request/browser/requestService'; import { LifecycleService } from 'vs/platform/lifecycle/electron-browser/lifecycleService'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { ILocalizationsService } from 'vs/platform/localizations/common/localizations'; diff --git a/src/vs/workbench/workbench.web.main.ts b/src/vs/workbench/workbench.web.main.ts index bba70ef3eab..8ce24a1b1b4 100644 --- a/src/vs/workbench/workbench.web.main.ts +++ b/src/vs/workbench/workbench.web.main.ts @@ -66,8 +66,8 @@ import { BrowserAccessibilityService } from 'vs/platform/accessibility/common/ac // import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'; // import { ExtensionGalleryService } from 'vs/platform/extensionManagement/node/extensionGalleryService'; -// import { IRequestService } from 'vs/platform/request/node/request'; -// import { RequestService } from 'vs/platform/request/electron-browser/requestService'; +import { IRequestService } from 'vs/platform/request/common/request'; +import { RequestService } from 'vs/platform/request/browser/requestService'; import { BrowserLifecycleService } from 'vs/platform/lifecycle/browser/lifecycleService'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; @@ -156,7 +156,7 @@ registerSingleton(ITextResourceConfigurationService, TextResourceConfigurationSe registerSingleton(IAccessibilityService, BrowserAccessibilityService, true); registerSingleton(IContextViewService, ContextViewService, true); // registerSingleton(IExtensionGalleryService, ExtensionGalleryService, true); -// registerSingleton(IRequestService, RequestService, true); +registerSingleton(IRequestService, RequestService, true); registerSingleton(ILifecycleService, BrowserLifecycleService); // registerSingleton(ILocalizationsService, LocalizationsService); // registerSingleton(ISharedProcessService, SharedProcessService, true); From 094bea4cb8ef879ffd5c82fe66b96a4fe559b9a2 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 10 Jul 2019 22:20:25 +0200 Subject: [PATCH 049/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e6d8f4fec7d..e84b1fd5c6c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "9a8dcbdf04e72ed28caf98144546429536d7ca5b", + "distro": "e9bfe9df1705bec02061c3aedf46c14504fc98a0", "author": { "name": "Microsoft Corporation" }, From 2c895cf8391a01bd004f3e3a477a81e2224d948d Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 10 Jul 2019 22:28:45 +0200 Subject: [PATCH 050/710] 2. update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e84b1fd5c6c..f600630a339 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "e9bfe9df1705bec02061c3aedf46c14504fc98a0", + "distro": "3c319811459f451676c3ccb148f96c49d342dbdc", "author": { "name": "Microsoft Corporation" }, From 24cd503cbd6f4a859fe6630a73303970b0233a69 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 Jul 2019 13:56:21 -0700 Subject: [PATCH 051/710] Add slight delay + fade in for quick fix message --- src/vs/editor/contrib/hover/modesContentHover.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vs/editor/contrib/hover/modesContentHover.ts b/src/vs/editor/contrib/hover/modesContentHover.ts index f3590e2f3c4..5e8ccc2801d 100644 --- a/src/vs/editor/contrib/hover/modesContentHover.ts +++ b/src/vs/editor/contrib/hover/modesContentHover.ts @@ -531,12 +531,19 @@ export class ModesContentHoverWidget extends ContentHoverWidget { } const quickfixPlaceholderElement = dom.append(actionsElement, $('div')); + quickfixPlaceholderElement.style.opacity = '0'; + quickfixPlaceholderElement.style.transition = 'opacity 0.2s'; + setTimeout(() => quickfixPlaceholderElement.style.opacity = '1', 200); quickfixPlaceholderElement.textContent = nls.localize('checkingForQuickFixes', "Checking for quick fixes..."); disposables.add(toDisposable(() => quickfixPlaceholderElement.remove())); + const codeActionsPromise = this.getCodeActions(markerHover.marker); disposables.add(toDisposable(() => codeActionsPromise.cancel())); codeActionsPromise.then(actions => { + quickfixPlaceholderElement.style.transition = ''; + quickfixPlaceholderElement.style.opacity = '1'; + if (!actions.actions.length) { actions.dispose(); quickfixPlaceholderElement.textContent = nls.localize('noQuickFixes', "No quick fixes available"); From edb3d8dbed66d320e183d23629cd90d6c8d8760a Mon Sep 17 00:00:00 2001 From: Ovcharenko Dmitriy Date: Thu, 11 Jul 2019 00:52:22 +0300 Subject: [PATCH 052/710] Changed id to displayName, fixes #77141 --- .../contrib/extensions/electron-browser/extensionsActions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionsActions.ts index fe4f91ede5c..288629c5987 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionsActions.ts @@ -2875,8 +2875,8 @@ export class InstallVSIXAction extends Action { .then(extensions => { for (const extension of extensions) { const requireReload = !(extension.local && this.extensionService.canAddExtension(toExtensionDescription(extension.local))); - const message = requireReload ? localize('InstallVSIXAction.successReload', "Please reload Visual Studio Code to complete installing the extension {0}.", extension.identifier.id) - : localize('InstallVSIXAction.success', "Completed installing the extension {0}.", extension.identifier.id); + const message = requireReload ? localize('InstallVSIXAction.successReload', "Please reload Visual Studio Code to complete installing the extension {0}.", extension.displayName || extension.name) + : localize('InstallVSIXAction.success', "Completed installing the extension {0}.", extension.displayName || extension.name); const actions = requireReload ? [{ label: localize('InstallVSIXAction.reloadNow', "Reload Now"), run: () => this.windowService.reloadWindow() From 706bf643622d5d521df4597fe03102b72b5bfaed Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 Jul 2019 15:06:22 -0700 Subject: [PATCH 053/710] Use DisposableStore in terminal Switches some places in the terminal code to use a DisposableStore instead of an array of IDisposables --- .../tasks/browser/terminalTaskSystem.ts | 9 ++++---- .../terminal/browser/terminalInstance.ts | 23 +++++++++---------- .../contrib/terminal/browser/terminalTab.ts | 14 +++++------ .../terminal/browser/terminalWidgetManager.ts | 11 +++++---- 4 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts index 3dc54054450..9cb1bee17a4 100644 --- a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts +++ b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts @@ -14,7 +14,7 @@ import { IStringDictionary, values } from 'vs/base/common/collections'; import { LinkedMap, Touch } from 'vs/base/common/map'; import Severity from 'vs/base/common/severity'; import { Event, Emitter } from 'vs/base/common/event'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { DisposableStore } from 'vs/base/common/lifecycle'; import { isUNC } from 'vs/base/common/extpath'; import { IFileService } from 'vs/platform/files/common/files'; @@ -518,9 +518,9 @@ export class TerminalTaskSystem implements ITaskSystem { if (task.configurationProperties.isBackground) { const problemMatchers = this.resolveMatchers(resolver, task.configurationProperties.problemMatchers); let watchingProblemMatcher = new WatchingProblemCollector(problemMatchers, this.markerService, this.modelService, this.fileService); - let toDispose: IDisposable[] | undefined = []; + const toDispose = new DisposableStore(); let eventCounter: number = 0; - toDispose.push(watchingProblemMatcher.onDidStateChange((event) => { + toDispose.add(watchingProblemMatcher.onDidStateChange((event) => { if (event.kind === ProblemCollectorEventKind.BackgroundProcessingBegins) { eventCounter++; this._onDidStateChange.fire(TaskEvent.create(TaskEventKind.Active, task)); @@ -618,8 +618,7 @@ export class TerminalTaskSystem implements ITaskSystem { } eventCounter = 0; this._onDidStateChange.fire(TaskEvent.create(TaskEventKind.End, task)); - toDispose = dispose(toDispose!); - toDispose = undefined; + toDispose.dispose(); resolve({ exitCode }); }); }); diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index 76c6127aa99..7d028f8a55a 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -180,7 +180,7 @@ export class TerminalInstance implements ITerminalInstance { private _titleReadyPromise: Promise; private _titleReadyComplete: (title: string) => any; - private _disposables: lifecycle.IDisposable[]; + private readonly _disposables = new lifecycle.DisposableStore(); private _messageTitleDisposable: lifecycle.IDisposable | undefined; private _widgetManager: TerminalWidgetManager; @@ -257,7 +257,6 @@ export class TerminalInstance implements ITerminalInstance { @IStorageService private readonly _storageService: IStorageService, @IAccessibilityService private readonly _accessibilityService: IAccessibilityService ) { - this._disposables = []; this._skipTerminalCommands = []; this._isExiting = false; this._hadFocusOnExit = false; @@ -304,7 +303,7 @@ export class TerminalInstance implements ITerminalInstance { } public addDisposable(disposable: lifecycle.IDisposable): void { - this._disposables.push(disposable); + this._disposables.add(disposable); } private _initDimensions(): void { @@ -494,7 +493,7 @@ export class TerminalInstance implements ITerminalInstance { } this._commandTracker = new TerminalCommandTracker(this._xterm); - this._disposables.push(this._themeService.onThemeChange(theme => this._updateTheme(theme))); + this._disposables.add(this._themeService.onThemeChange(theme => this._updateTheme(theme))); } private _isScreenReaderOptimized(): boolean { @@ -576,7 +575,7 @@ export class TerminalInstance implements ITerminalInstance { return true; }); - this._disposables.push(dom.addDisposableListener(this._xterm.element, 'mousedown', () => { + this._disposables.add(dom.addDisposableListener(this._xterm.element, 'mousedown', () => { // We need to listen to the mouseup event on the document since the user may release // the mouse button anywhere outside of _xterm.element. const listener = dom.addDisposableListener(document, 'mouseup', () => { @@ -588,7 +587,7 @@ export class TerminalInstance implements ITerminalInstance { })); // xterm.js currently drops selection on keyup as we need to handle this case. - this._disposables.push(dom.addDisposableListener(this._xterm.element, 'keyup', () => { + this._disposables.add(dom.addDisposableListener(this._xterm.element, 'keyup', () => { // Wait until keyup has propagated through the DOM before evaluating // the new selection state. setTimeout(() => this._refreshSelectionContextKey(), 0); @@ -598,7 +597,7 @@ export class TerminalInstance implements ITerminalInstance { const focusTrap: HTMLElement = document.createElement('div'); focusTrap.setAttribute('tabindex', '0'); dom.addClass(focusTrap, 'focus-trap'); - this._disposables.push(dom.addDisposableListener(focusTrap, 'focus', () => { + this._disposables.add(dom.addDisposableListener(focusTrap, 'focus', () => { let currentElement = focusTrap; while (!dom.hasClass(currentElement, 'part')) { currentElement = currentElement.parentElement!; @@ -608,18 +607,18 @@ export class TerminalInstance implements ITerminalInstance { })); xtermHelper.insertBefore(focusTrap, this._xterm.textarea); - this._disposables.push(dom.addDisposableListener(this._xterm.textarea, 'focus', () => { + this._disposables.add(dom.addDisposableListener(this._xterm.textarea, 'focus', () => { this._terminalFocusContextKey.set(true); this._onFocused.fire(this); })); - this._disposables.push(dom.addDisposableListener(this._xterm.textarea, 'blur', () => { + this._disposables.add(dom.addDisposableListener(this._xterm.textarea, 'blur', () => { this._terminalFocusContextKey.reset(); this._refreshSelectionContextKey(); })); - this._disposables.push(dom.addDisposableListener(this._xterm.element, 'focus', () => { + this._disposables.add(dom.addDisposableListener(this._xterm.element, 'focus', () => { this._terminalFocusContextKey.set(true); })); - this._disposables.push(dom.addDisposableListener(this._xterm.element, 'blur', () => { + this._disposables.add(dom.addDisposableListener(this._xterm.element, 'blur', () => { this._terminalFocusContextKey.reset(); this._refreshSelectionContextKey(); })); @@ -798,7 +797,7 @@ export class TerminalInstance implements ITerminalInstance { this._isDisposed = true; this._onDisposed.fire(this); } - this._disposables = lifecycle.dispose(this._disposables); + this._disposables.dispose(); } public rendererExit(exitCode: number): void { diff --git a/src/vs/workbench/contrib/terminal/browser/terminalTab.ts b/src/vs/workbench/contrib/terminal/browser/terminalTab.ts index 42b1a59d7c2..23d85afde8e 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalTab.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalTab.ts @@ -7,7 +7,7 @@ import * as nls from 'vs/nls'; import { ITerminalInstance, IShellLaunchConfig, ITerminalTab, Direction, ITerminalService, ITerminalConfigHelper } from 'vs/workbench/contrib/terminal/common/terminal'; import { IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { Event, Emitter } from 'vs/base/common/event'; -import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; +import { IDisposable, Disposable, DisposableStore } from 'vs/base/common/lifecycle'; import { SplitView, Orientation, IView, Sizing } from 'vs/base/browser/ui/splitview/splitview'; import { IWorkbenchLayoutService, Parts, Position } from 'vs/workbench/services/layout/browser/layoutService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -15,11 +15,11 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti const SPLIT_PANE_MIN_SIZE = 120; const TERMINAL_MIN_USEFUL_SIZE = 250; -class SplitPaneContainer { +class SplitPaneContainer extends Disposable { private _height: number; private _width: number; private _splitView: SplitView; - private _splitViewDisposables: IDisposable[]; + private readonly _splitViewDisposables = this._register(new DisposableStore()); private _children: SplitPane[] = []; private _onDidChange: Event = Event.None; @@ -30,6 +30,7 @@ class SplitPaneContainer { public orientation: Orientation, @IWorkbenchLayoutService private readonly _layoutService: IWorkbenchLayoutService ) { + super(); this._width = this._container.offsetWidth; this._height = this._container.offsetHeight; this._createSplitView(); @@ -38,8 +39,8 @@ class SplitPaneContainer { private _createSplitView(): void { this._splitView = new SplitView(this._container, { orientation: this.orientation }); - this._splitViewDisposables = []; - this._splitViewDisposables.push(this._splitView.onDidSashReset(() => this._splitView.distributeViewSizes())); + this._splitViewDisposables.clear(); + this._splitViewDisposables.add(this._splitView.onDidSashReset(() => this._splitView.distributeViewSizes())); } public split(instance: ITerminalInstance, index: number = this._children.length): void { @@ -149,8 +150,7 @@ class SplitPaneContainer { while (this._container.children.length > 0) { this._container.removeChild(this._container.children[0]); } - this._splitViewDisposables.forEach(d => d.dispose()); - this._splitViewDisposables = []; + this._splitViewDisposables.clear(); this._splitView.dispose(); // Create new split view with updated orientation diff --git a/src/vs/workbench/contrib/terminal/browser/terminalWidgetManager.ts b/src/vs/workbench/contrib/terminal/browser/terminalWidgetManager.ts index 9fb22f4deb3..8beb67cb689 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalWidgetManager.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalWidgetManager.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose, DisposableStore } from 'vs/base/common/lifecycle'; const WIDGET_HEIGHT = 29; @@ -12,7 +12,7 @@ export class TerminalWidgetManager implements IDisposable { private _xtermViewport: HTMLElement | null; private _messageWidget: MessageWidget; - private _messageListeners: IDisposable[] = []; + private readonly _messageListeners = new DisposableStore(); constructor( terminalWrapper: HTMLElement @@ -30,6 +30,7 @@ export class TerminalWidgetManager implements IDisposable { this._container = null; } this._xtermViewport = null; + this._messageListeners.dispose(); } private _initTerminalHeightWatcher(terminalWrapper: HTMLElement) { @@ -47,14 +48,14 @@ export class TerminalWidgetManager implements IDisposable { return; } dispose(this._messageWidget); - this._messageListeners = dispose(this._messageListeners); + this._messageListeners.clear(); this._messageWidget = new MessageWidget(this._container, left, top, text); } public closeMessage(): void { - this._messageListeners = dispose(this._messageListeners); + this._messageListeners.clear(); if (this._messageWidget) { - this._messageListeners.push(MessageWidget.fadeOut(this._messageWidget)); + this._messageListeners.add(MessageWidget.fadeOut(this._messageWidget)); } } From 924cda47bddf9844b7834b02795082a3536c8019 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 Jul 2019 15:37:33 -0700 Subject: [PATCH 054/710] Make sure we handle the Disposable returned from showActivity --- src/vs/workbench/contrib/markers/browser/markers.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/markers/browser/markers.ts b/src/vs/workbench/contrib/markers/browser/markers.ts index a8eeb539c22..4b27488a458 100644 --- a/src/vs/workbench/contrib/markers/browser/markers.ts +++ b/src/vs/workbench/contrib/markers/browser/markers.ts @@ -5,7 +5,7 @@ import { createDecorator, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { MarkersModel, compareMarkersByUri } from './markersModel'; -import { Disposable } from 'vs/base/common/lifecycle'; +import { Disposable, MutableDisposable, IDisposable } from 'vs/base/common/lifecycle'; import { IMarkerService, MarkerSeverity, IMarker } from 'vs/platform/markers/common/markers'; import { IActivityService, NumberBadge } from 'vs/workbench/services/activity/common/activity'; import { localize } from 'vs/nls'; @@ -59,6 +59,8 @@ export class MarkersWorkbenchService extends Disposable implements IMarkersWorkb export class ActivityUpdater extends Disposable implements IWorkbenchContribution { + private readonly activity = this._register(new MutableDisposable()); + constructor( @IActivityService private readonly activityService: IActivityService, @IMarkerService private readonly markerService: IMarkerService @@ -72,6 +74,6 @@ export class ActivityUpdater extends Disposable implements IWorkbenchContributio const { errors, warnings, infos } = this.markerService.getStatistics(); const total = errors + warnings + infos; const message = localize('totalProblems', 'Total {0} Problems', total); - this.activityService.showActivity(Constants.MARKERS_PANEL_ID, new NumberBadge(total, () => message)); + this.activity.value = this.activityService.showActivity(Constants.MARKERS_PANEL_ID, new NumberBadge(total, () => message)); } } \ No newline at end of file From 4278033408310514dd485fdd09740b833ab405e1 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 Jul 2019 16:25:17 -0700 Subject: [PATCH 055/710] Avoid using untracked IDisposables in workbench/contrib/extensions - Use DisposableStore for tracking lists of disposables - Use MutableDisposable to track a value that should be disposed of when the value changes - Extend Disposable where it makes sense or use existing `_register` method - Remove unused disposable member --- .../extensionProfileService.ts | 11 ++-- .../electron-browser/extensionTipsService.ts | 9 +--- .../electron-browser/extensionsViewlet.ts | 54 ++++++------------- .../electron-browser/extensionsWidgets.ts | 28 ++++------ 4 files changed, 32 insertions(+), 70 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts index 65cbc3a44b1..283c3406d8f 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts @@ -7,7 +7,7 @@ import * as nls from 'vs/nls'; import { Event, Emitter } from 'vs/base/common/event'; import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { IExtensionHostProfile, ProfileSession, IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; -import { Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { Disposable, toDisposable, MutableDisposable } from 'vs/base/common/lifecycle'; import { onUnexpectedError } from 'vs/base/common/errors'; import { StatusbarAlignment, IStatusbarService, IStatusbarEntryAccessor, IStatusbarEntry } from 'vs/platform/statusbar/common/statusbar'; import { IExtensionHostProfileService, ProfileSessionState } from 'vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor'; @@ -37,7 +37,7 @@ export class ExtensionHostProfileService extends Disposable implements IExtensio private _state: ProfileSessionState; private profilingStatusBarIndicator: IStatusbarEntryAccessor | undefined; - private profilingStatusBarIndicatorLabelUpdater: IDisposable | undefined; + private readonly profilingStatusBarIndicatorLabelUpdater = this._register(new MutableDisposable()); public get state() { return this._state; } public get lastProfile() { return this._profile; } @@ -77,10 +77,7 @@ export class ExtensionHostProfileService extends Disposable implements IExtensio } private updateProfilingStatusBarIndicator(visible: boolean): void { - if (this.profilingStatusBarIndicatorLabelUpdater) { - this.profilingStatusBarIndicatorLabelUpdater.dispose(); - this.profilingStatusBarIndicatorLabelUpdater = undefined; - } + this.profilingStatusBarIndicatorLabelUpdater.clear(); if (visible) { const indicator: IStatusbarEntry = { @@ -95,7 +92,7 @@ export class ExtensionHostProfileService extends Disposable implements IExtensio this.profilingStatusBarIndicator.update({ ...indicator, text: nls.localize('profilingExtensionHostTime', "$(sync~spin) Profiling Extension Host ({0} sec)", Math.round((new Date().getTime() - timeStarted) / 1000)), }); } }, 1000); - this.profilingStatusBarIndicatorLabelUpdater = toDisposable(() => clearInterval(handle)); + this.profilingStatusBarIndicatorLabelUpdater.value = toDisposable(() => clearInterval(handle)); if (!this.profilingStatusBarIndicator) { this.profilingStatusBarIndicator = this._statusbarService.addEntry(indicator, 'status.profiler', nls.localize('status.profiler', "Extension Profiler"), StatusbarAlignment.RIGHT); diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts index f192f1c16d9..32c06169ab1 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts @@ -6,7 +6,7 @@ import { localize } from 'vs/nls'; import { join } from 'vs/base/common/path'; import { forEach } from 'vs/base/common/collections'; -import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; +import { Disposable } from 'vs/base/common/lifecycle'; import { match } from 'vs/base/common/glob'; import * as json from 'vs/base/common/json'; import { @@ -83,7 +83,6 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe private _globallyIgnoredRecommendations: string[] = []; private _workspaceIgnoredRecommendations: string[] = []; private _extensionsRecommendationsUrl: string; - private _disposables: IDisposable[] = []; public loadWorkspaceConfigPromise: Promise; private proactiveRecommendationsFetched: boolean = false; @@ -135,7 +134,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe this.loadWorkspaceConfigPromise = this.getWorkspaceRecommendations().then(() => { this.promptWorkspaceRecommendations(); - this._modelService.onModelAdded(this.promptFiletypeBasedRecommendations, this, this._disposables); + this._register(this._modelService.onModelAdded(this.promptFiletypeBasedRecommendations, this)); this._modelService.getModels().forEach(model => this.promptFiletypeBasedRecommendations(model)); }); @@ -1035,8 +1034,4 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe private isExtensionAllowedToBeRecommended(id: string): boolean { return this._allIgnoredRecommendations.indexOf(id.toLowerCase()) === -1; } - - dispose() { - this._disposables = dispose(this._disposables); - } } diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionsViewlet.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionsViewlet.ts index 3523014aa0b..08345f64cf9 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionsViewlet.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionsViewlet.ts @@ -8,7 +8,7 @@ import { localize } from 'vs/nls'; import { timeout, Delayer } from 'vs/base/common/async'; import { isPromiseCanceledError } from 'vs/base/common/errors'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { Disposable, MutableDisposable } from 'vs/base/common/lifecycle'; import { Event as EventOf, Emitter } from 'vs/base/common/event'; import { IAction } from 'vs/base/common/actions'; import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; @@ -339,7 +339,6 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio private extensionsBox: HTMLElement; private primaryActions: IAction[]; private secondaryActions: IAction[] | null; - private disposables: IDisposable[] = []; private readonly searchViewletState: MementoObject; constructor( @@ -374,14 +373,14 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio this.recommendedExtensionsContextKey = RecommendedExtensionsContext.bindTo(contextKeyService); this.defaultRecommendedExtensionsContextKey = DefaultRecommendedExtensionsContext.bindTo(contextKeyService); this.defaultRecommendedExtensionsContextKey.set(!this.configurationService.getValue(ShowRecommendationsOnlyOnDemandKey)); - this.disposables.push(this.viewletService.onDidViewletOpen(this.onViewletOpen, this, this.disposables)); + this._register(this.viewletService.onDidViewletOpen(this.onViewletOpen, this)); this.searchViewletState = this.getMemento(StorageScope.WORKSPACE); this.extensionManagementService.getInstalled(ExtensionType.User).then(result => { this.hasInstalledExtensionsContextKey.set(result.length > 0); }); - this.configurationService.onDidChangeConfiguration(e => { + this._register(this.configurationService.onDidChangeConfiguration(e => { if (e.affectsConfiguration(AutoUpdateConfigurationKey)) { this.secondaryActions = null; this.updateTitleArea(); @@ -389,7 +388,7 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio if (e.affectedKeys.indexOf(ShowRecommendationsOnlyOnDemandKey) > -1) { this.defaultRecommendedExtensionsContextKey.set(!this.configurationService.getValue(ShowRecommendationsOnlyOnDemandKey)); } - }, this, this.disposables); + }, this)); } create(parent: HTMLElement): void { @@ -401,7 +400,7 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio const placeholder = localize('searchExtensions', "Search Extensions in Marketplace"); const searchValue = this.searchViewletState['query.value'] ? this.searchViewletState['query.value'] : ''; - this.searchBox = this.instantiationService.createInstance(SuggestEnabledInput, `${VIEWLET_ID}.searchbox`, header, { + this.searchBox = this._register(this.instantiationService.createInstance(SuggestEnabledInput, `${VIEWLET_ID}.searchbox`, header, { triggerCharacters: ['@'], sortKey: (item: string) => { if (item.indexOf(':') === -1) { return 'a'; } @@ -410,24 +409,22 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio else { return 'd'; } }, provideResults: (query: string) => Query.suggestions(query) - }, placeholder, 'extensions:searchinput', { placeholderText: placeholder, value: searchValue }); + }, placeholder, 'extensions:searchinput', { placeholderText: placeholder, value: searchValue })); if (this.searchBox.getValue()) { this.triggerSearch(); } - this.disposables.push(attachSuggestEnabledInputBoxStyler(this.searchBox, this.themeService)); - - this.disposables.push(this.searchBox); + this._register(attachSuggestEnabledInputBoxStyler(this.searchBox, this.themeService)); const _searchChange = new Emitter(); this.onSearchChange = _searchChange.event; - this.searchBox.onInputDidChange(() => { + this._register(this.searchBox.onInputDidChange(() => { this.triggerSearch(); _searchChange.fire(this.searchBox.getValue()); - }, this, this.disposables); + }, this)); - this.searchBox.onShouldFocusResults(() => this.focusListView(), this, this.disposables); + this._register(this.searchBox.onShouldFocusResults(() => this.focusListView(), this)); this._register(this.onDidChangeVisibility(visible => { if (visible) { @@ -614,52 +611,39 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio this.notificationService.error(err); } - - dispose(): void { - this.disposables = dispose(this.disposables); - super.dispose(); - } } -export class StatusUpdater implements IWorkbenchContribution { +export class StatusUpdater extends Disposable implements IWorkbenchContribution { - private disposables: IDisposable[]; - private badgeHandle: IDisposable; + private readonly badgeHandle = this._register(new MutableDisposable()); constructor( @IActivityService private readonly activityService: IActivityService, @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService ) { - extensionsWorkbenchService.onChange(this.onServiceChange, this, this.disposables); + super(); + this._register(extensionsWorkbenchService.onChange(this.onServiceChange, this)); } private onServiceChange(): void { - - dispose(this.badgeHandle); + this.badgeHandle.clear(); if (this.extensionsWorkbenchService.local.some(e => e.state === ExtensionState.Installing)) { - this.badgeHandle = this.activityService.showActivity(VIEWLET_ID, new ProgressBadge(() => localize('extensions', "Extensions")), 'extensions-badge progress-badge'); + this.badgeHandle.value = this.activityService.showActivity(VIEWLET_ID, new ProgressBadge(() => localize('extensions', "Extensions")), 'extensions-badge progress-badge'); return; } const outdated = this.extensionsWorkbenchService.outdated.reduce((r, e) => r + (this.extensionEnablementService.isEnabled(e.local!) ? 1 : 0), 0); if (outdated > 0) { const badge = new NumberBadge(outdated, n => localize('outdatedExtensions', '{0} Outdated Extensions', n)); - this.badgeHandle = this.activityService.showActivity(VIEWLET_ID, badge, 'extensions-badge count-badge'); + this.badgeHandle.value = this.activityService.showActivity(VIEWLET_ID, badge, 'extensions-badge count-badge'); } } - - dispose(): void { - this.disposables = dispose(this.disposables); - dispose(this.badgeHandle); - } } export class MaliciousExtensionChecker implements IWorkbenchContribution { - private disposables: IDisposable[]; - constructor( @IExtensionManagementService private readonly extensionsManagementService: IExtensionManagementService, @IWindowService private readonly windowService: IWindowService, @@ -704,8 +688,4 @@ export class MaliciousExtensionChecker implements IWorkbenchContribution { }).then(() => undefined); }, err => this.logService.error(err)); } - - dispose(): void { - this.disposables = dispose(this.disposables); - } } diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionsWidgets.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionsWidgets.ts index c34a342320f..71dff9e58e8 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionsWidgets.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionsWidgets.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import 'vs/css!./media/extensionsWidgets'; -import { Disposable, IDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle'; +import { Disposable, toDisposable, DisposableStore, MutableDisposable } from 'vs/base/common/lifecycle'; import { IExtension, IExtensionsWorkbenchService, IExtensionContainer, ExtensionState } from '../common/extensions'; import { append, $, addClass } from 'vs/base/browser/dom'; import * as platform from 'vs/base/common/platform'; @@ -196,7 +196,7 @@ export class TooltipWidget extends ExtensionWidget { export class RecommendationWidget extends ExtensionWidget { private element?: HTMLElement; - private disposables: IDisposable[] = []; + private readonly disposables = this._register(new DisposableStore()); private _tooltip: string; get tooltip(): string { return this._tooltip; } @@ -227,7 +227,7 @@ export class RecommendationWidget extends ExtensionWidget { this.parent.removeChild(this.element); } this.element = undefined; - this.disposables = dispose(this.disposables); + this.disposables.clear(); } render(): void { @@ -256,8 +256,7 @@ export class RecommendationWidget extends ExtensionWidget { export class RemoteBadgeWidget extends ExtensionWidget { - private remoteBadge: RemoteBadge | null; - private disposables: IDisposable[] = []; + private readonly remoteBadge = this._register(new MutableDisposable()); private element: HTMLElement; @@ -274,12 +273,10 @@ export class RemoteBadgeWidget extends ExtensionWidget { } private clear(): void { - if (this.remoteBadge) { - this.element.removeChild(this.remoteBadge.element); - this.remoteBadge.dispose(); + if (this.remoteBadge.value) { + this.element.removeChild(this.remoteBadge.value.element); } - this.remoteBadge = null; - this.disposables = dispose(this.disposables); + this.remoteBadge.clear(); } render(): void { @@ -288,17 +285,10 @@ export class RemoteBadgeWidget extends ExtensionWidget { return; } if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer) { - this.remoteBadge = this.instantiationService.createInstance(RemoteBadge, this.tooltip); - append(this.element, this.remoteBadge.element); + this.remoteBadge.value = this.instantiationService.createInstance(RemoteBadge, this.tooltip); + append(this.element, this.remoteBadge.value.element); } } - - dispose(): void { - if (this.remoteBadge) { - this.remoteBadge.dispose(); - } - super.dispose(); - } } class RemoteBadge extends Disposable { From 390ab6ec48975c9880d085bbb555901a7169a65e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 Jul 2019 16:30:49 -0700 Subject: [PATCH 056/710] Use DisposableStore in breadcrumbs Replace uses of `IDisposable[]` with a `DisposableStore` --- .../ui/breadcrumbs/breadcrumbsWidget.ts | 17 ++++++----- .../browser/parts/editor/breadcrumbsPicker.ts | 28 +++++++++---------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.ts b/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.ts index bdbce4e9e30..13e4b9c34be 100644 --- a/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.ts +++ b/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.ts @@ -57,7 +57,7 @@ export interface IBreadcrumbsItemEvent { export class BreadcrumbsWidget { - private readonly _disposables = new Array(); + private readonly _disposables = new DisposableStore(); private readonly _domNode: HTMLDivElement; private readonly _styleElement: HTMLStyleElement; private readonly _scrollable: DomScrollableElement; @@ -94,26 +94,25 @@ export class BreadcrumbsWidget { useShadows: false, scrollYToX: true }); - this._disposables.push(this._scrollable); - this._disposables.push(dom.addStandardDisposableListener(this._domNode, 'click', e => this._onClick(e))); + this._disposables.add(this._scrollable); + this._disposables.add(dom.addStandardDisposableListener(this._domNode, 'click', e => this._onClick(e))); container.appendChild(this._scrollable.getDomNode()); this._styleElement = dom.createStyleSheet(this._domNode); - let focusTracker = dom.trackFocus(this._domNode); - this._disposables.push(focusTracker); - this._disposables.push(focusTracker.onDidBlur(_ => this._onDidChangeFocus.fire(false))); - this._disposables.push(focusTracker.onDidFocus(_ => this._onDidChangeFocus.fire(true))); + const focusTracker = dom.trackFocus(this._domNode); + this._disposables.add(focusTracker); + this._disposables.add(focusTracker.onDidBlur(_ => this._onDidChangeFocus.fire(false))); + this._disposables.add(focusTracker.onDidFocus(_ => this._onDidChangeFocus.fire(true))); } dispose(): void { - dispose(this._disposables); + this._disposables.dispose(); dispose(this._pendingLayout); this._onDidSelectItem.dispose(); this._onDidFocusItem.dispose(); this._onDidChangeFocus.dispose(); this._domNode.remove(); - this._disposables.length = 0; this._nodes.length = 0; this._freeNodes.length = 0; } diff --git a/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts b/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts index 7d0376877c1..365faea190f 100644 --- a/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts +++ b/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts @@ -9,7 +9,7 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { Emitter, Event } from 'vs/base/common/event'; import { createMatches, FuzzyScore } from 'vs/base/common/filters'; import * as glob from 'vs/base/common/glob'; -import { dispose, IDisposable } from 'vs/base/common/lifecycle'; +import { DisposableStore } from 'vs/base/common/lifecycle'; import { posix } from 'vs/base/common/path'; import { basename, dirname, isEqual } from 'vs/base/common/resources'; import { URI } from 'vs/base/common/uri'; @@ -55,7 +55,7 @@ export interface SelectEvent { export abstract class BreadcrumbsPicker { - protected readonly _disposables = new Array(); + protected readonly _disposables = new DisposableStore(); protected readonly _domNode: HTMLDivElement; protected _arrow: HTMLDivElement; protected _treeContainer: HTMLDivElement; @@ -81,7 +81,7 @@ export abstract class BreadcrumbsPicker { } dispose(): void { - dispose(this._disposables); + this._disposables.dispose(); this._onDidPickElement.dispose(); this._tree.dispose(); } @@ -105,7 +105,7 @@ export abstract class BreadcrumbsPicker { this._layoutInfo = { maxHeight, width, arrowSize, arrowOffset, inputHeight: 0 }; this._tree = this._createTree(this._treeContainer); - this._disposables.push(this._tree.onDidChangeSelection(e => { + this._disposables.add(this._tree.onDidChangeSelection(e => { if (e.browserEvent !== this._fakeEvent) { const target = this._getTargetFromEvent(e.elements[0]); if (target) { @@ -115,13 +115,13 @@ export abstract class BreadcrumbsPicker { } } })); - this._disposables.push(this._tree.onDidChangeFocus(e => { + this._disposables.add(this._tree.onDidChangeFocus(e => { const target = this._getTargetFromEvent(e.elements[0]); if (target) { this._onDidFocusElement.fire({ target, browserEvent: e.browserEvent || new UIEvent('fake') }); } })); - this._disposables.push(this._tree.onDidChangeContentHeight(() => { + this._disposables.add(this._tree.onDidChangeContentHeight(() => { this._layout(); })); @@ -276,7 +276,7 @@ class FileNavigationLabelProvider implements IKeyboardNavigationLabelProvider { private readonly _cachedExpressions = new Map(); - private readonly _disposables: IDisposable[] = []; + private readonly _disposables = new DisposableStore(); constructor( @IWorkspaceContextService private readonly _workspaceService: IWorkspaceContextService, @@ -306,15 +306,13 @@ class FileFilter implements ITreeFilter { }); }; update(); - this._disposables.push( - config, - config.onDidChange(update), - _workspaceService.onDidChangeWorkspaceFolders(update) - ); + this._disposables.add(config); + this._disposables.add(config.onDidChange(update)); + this._disposables.add(_workspaceService.onDidChangeWorkspaceFolders(update)); } dispose(): void { - dispose(this._disposables); + this._disposables.dispose(); } filter(element: IWorkspaceFolder | IFileStat, _parentVisibility: TreeVisibility): boolean { @@ -371,11 +369,11 @@ export class BreadcrumbsFilePicker extends BreadcrumbsPicker { dom.toggleClass(this._treeContainer, 'align-icons-and-twisties', fileIconTheme.hasFileIcons && !fileIconTheme.hasFolderIcons); dom.toggleClass(this._treeContainer, 'hide-arrows', fileIconTheme.hidesExplorerArrows === true); }; - this._disposables.push(this._themeService.onDidFileIconThemeChange(onFileIconThemeChange)); + this._disposables.add(this._themeService.onDidFileIconThemeChange(onFileIconThemeChange)); onFileIconThemeChange(this._themeService.getFileIconTheme()); const labels = this._instantiationService.createInstance(ResourceLabels, DEFAULT_LABELS_CONTAINER /* TODO@Jo visibility propagation */); - this._disposables.push(labels); + this._disposables.add(labels); return this._instantiationService.createInstance(WorkbenchAsyncDataTree, container, new FileVirtualDelegate(), [this._instantiationService.createInstance(FileRenderer, labels)], this._instantiationService.createInstance(FileDataSource), { multipleSelectionSupport: false, From c41ecdf384dc3e6dcad12beecb5bd09fd6f6bd95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Thu, 11 Jul 2019 07:47:15 +0200 Subject: [PATCH 057/710] Update .cachesalt --- build/.cachesalt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/.cachesalt b/build/.cachesalt index d9e527ad8ae..105ce86ae3c 100644 --- a/build/.cachesalt +++ b/build/.cachesalt @@ -1 +1 @@ -2019-07-10T05:02:42.950Z +2019-07-11T05:47:05.444Z From bd087c156a8e6bdbd3a7402fca87abb973786956 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 11 Jul 2019 08:06:31 +0200 Subject: [PATCH 058/710] sash: debug --- src/vs/base/browser/ui/sash/sash.ts | 2 +- test/splitview/public/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/base/browser/ui/sash/sash.ts b/src/vs/base/browser/ui/sash/sash.ts index 3e0efee82c9..fb76ba6bd9a 100644 --- a/src/vs/base/browser/ui/sash/sash.ts +++ b/src/vs/base/browser/ui/sash/sash.ts @@ -14,7 +14,7 @@ import { Event, Emitter } from 'vs/base/common/event'; import { getElementsByTagName, EventHelper, createStyleSheet, addDisposableListener, append, $, addClass, removeClass, toggleClass } from 'vs/base/browser/dom'; import { domEvent } from 'vs/base/browser/event'; -const DEBUG = false; +const DEBUG = true; export interface ISashLayoutProvider { } diff --git a/test/splitview/public/index.html b/test/splitview/public/index.html index dfb7e88bd4b..c1a7fcfca89 100644 --- a/test/splitview/public/index.html +++ b/test/splitview/public/index.html @@ -2,7 +2,7 @@ - SplitView + Splitview \ No newline at end of file diff --git a/src/vs/editor/contrib/suggest/media/Misc_inverse_16x.svg b/src/vs/editor/contrib/suggest/media/Misc_inverse_16x.svg deleted file mode 100755 index 50a038657b2..00000000000 --- a/src/vs/editor/contrib/suggest/media/Misc_inverse_16x.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/editor/contrib/suggest/media/boolean-dark.svg b/src/vs/editor/contrib/suggest/media/boolean-dark.svg deleted file mode 100644 index e009568b131..00000000000 --- a/src/vs/editor/contrib/suggest/media/boolean-dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/vs/editor/contrib/suggest/media/boolean-light.svg b/src/vs/editor/contrib/suggest/media/boolean-light.svg deleted file mode 100644 index 06613f8bedd..00000000000 --- a/src/vs/editor/contrib/suggest/media/boolean-light.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/vs/editor/contrib/suggest/media/indexer-dark.svg b/src/vs/editor/contrib/suggest/media/indexer-dark.svg deleted file mode 100644 index e92131d3d02..00000000000 --- a/src/vs/editor/contrib/suggest/media/indexer-dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/vs/editor/contrib/suggest/media/indexer-light.svg b/src/vs/editor/contrib/suggest/media/indexer-light.svg deleted file mode 100644 index 207899642c8..00000000000 --- a/src/vs/editor/contrib/suggest/media/indexer-light.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/vs/editor/contrib/suggest/media/numeric-dark.svg b/src/vs/editor/contrib/suggest/media/numeric-dark.svg deleted file mode 100644 index a1573df0107..00000000000 --- a/src/vs/editor/contrib/suggest/media/numeric-dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/vs/editor/contrib/suggest/media/numeric-light.svg b/src/vs/editor/contrib/suggest/media/numeric-light.svg deleted file mode 100644 index ea0e56e0225..00000000000 --- a/src/vs/editor/contrib/suggest/media/numeric-light.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/vs/editor/contrib/suggest/media/suggest.css b/src/vs/editor/contrib/suggest/media/suggest.css index 23f9e36ad30..09594abb493 100644 --- a/src/vs/editor/contrib/suggest/media/suggest.css +++ b/src/vs/editor/contrib/suggest/media/suggest.css @@ -179,7 +179,6 @@ .monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.suggest-icon::before { content: ' '; - background-image: url('Misc_16x.svg'); background-repeat: no-repeat; background-position: center; background-size: 75%; @@ -306,9 +305,6 @@ background-image: url('./info-dark.svg'); } -.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .suggest-icon::before, -.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .suggest-icon::before { background-image: url('Misc_inverse_16x.svg'); } - .monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .suggest-icon.method::before, .monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .suggest-icon.method::before, .monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .suggest-icon.function::before, diff --git a/src/vs/workbench/browser/parts/notifications/media/error.svg b/src/vs/workbench/browser/parts/notifications/media/error.svg deleted file mode 100755 index 04b66689011..00000000000 --- a/src/vs/workbench/browser/parts/notifications/media/error.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/vs/workbench/browser/parts/notifications/media/info.svg b/src/vs/workbench/browser/parts/notifications/media/info.svg deleted file mode 100755 index 3c603528a74..00000000000 --- a/src/vs/workbench/browser/parts/notifications/media/info.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - diff --git a/src/vs/workbench/browser/parts/notifications/media/warning.svg b/src/vs/workbench/browser/parts/notifications/media/warning.svg deleted file mode 100755 index 6d8cffe913e..00000000000 --- a/src/vs/workbench/browser/parts/notifications/media/warning.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - -StatusWarning_16x - - - - - From 08e8d4633f5284de9a1115bccb314620d0a5a06b Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 15 Jul 2019 11:25:57 -0700 Subject: [PATCH 222/710] Update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eea7bad8051..46ab96c10c0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "a76f8ddb784119243aa004071cea17c5a74b1e60", + "distro": "d679b3a96ff63c9a5bdf13c8da3659810fbc2a2d", "author": { "name": "Microsoft Corporation" }, From afe2da7ed6bfa7b8208d713667f870132940fbef Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 11:02:49 -0700 Subject: [PATCH 223/710] Use a map instead of a object to store editors --- .../browser/mainThreadDocumentsAndEditors.ts | 18 +++++----- .../api/browser/mainThreadEditors.ts | 35 +++++++++++-------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts b/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts index 575e7448869..804349ee484 100644 --- a/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts +++ b/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts @@ -306,7 +306,7 @@ export class MainThreadDocumentsAndEditors { private readonly _toDispose = new DisposableStore(); private readonly _proxy: ExtHostDocumentsAndEditorsShape; - private _textEditors = <{ [id: string]: MainThreadTextEditor }>Object.create(null); + private readonly _textEditors = new Map(); private _onTextEditorAdd = new Emitter(); private _onTextEditorRemove = new Emitter(); @@ -368,16 +368,16 @@ export class MainThreadDocumentsAndEditors { const mainThreadEditor = new MainThreadTextEditor(apiEditor.id, apiEditor.editor.getModel(), apiEditor.editor, { onGainedFocus() { }, onLostFocus() { } }, this._modelService); - this._textEditors[apiEditor.id] = mainThreadEditor; + this._textEditors.set(apiEditor.id, mainThreadEditor); addedEditors.push(mainThreadEditor); } // removed editors for (const { id } of delta.removedEditors) { - const mainThreadEditor = this._textEditors[id]; + const mainThreadEditor = this._textEditors.get(id); if (mainThreadEditor) { mainThreadEditor.dispose(); - delete this._textEditors[id]; + this._textEditors.delete(id); removedEditors.push(id); } } @@ -448,16 +448,16 @@ export class MainThreadDocumentsAndEditors { return undefined; } - findTextEditorIdFor(editor: IWorkbenchEditor): string | undefined { - for (const id in this._textEditors) { - if (this._textEditors[id].matches(editor)) { + findTextEditorIdFor(inputEditor: IWorkbenchEditor): string | undefined { + for (const [id, editor] of this._textEditors) { + if (editor.matches(inputEditor)) { return id; } } return undefined; } - getEditor(id: string): MainThreadTextEditor { - return this._textEditors[id]; + getEditor(id: string): MainThreadTextEditor | undefined { + return this._textEditors.get(id); } } diff --git a/src/vs/workbench/api/browser/mainThreadEditors.ts b/src/vs/workbench/api/browser/mainThreadEditors.ts index 25f4a8e1e9c..c63aa1bb7a6 100644 --- a/src/vs/workbench/api/browser/mainThreadEditors.ts +++ b/src/vs/workbench/api/browser/mainThreadEditors.ts @@ -160,52 +160,58 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape { } $trySetSelections(id: string, selections: ISelection[]): Promise { - if (!this._documentsAndEditors.getEditor(id)) { + const editor = this._documentsAndEditors.getEditor(id); + if (!editor) { return Promise.reject(disposed(`TextEditor(${id})`)); } - this._documentsAndEditors.getEditor(id).setSelections(selections); + editor.setSelections(selections); return Promise.resolve(undefined); } $trySetDecorations(id: string, key: string, ranges: IDecorationOptions[]): Promise { key = `${this._instanceId}-${key}`; - if (!this._documentsAndEditors.getEditor(id)) { + const editor = this._documentsAndEditors.getEditor(id); + if (!editor) { return Promise.reject(disposed(`TextEditor(${id})`)); } - this._documentsAndEditors.getEditor(id).setDecorations(key, ranges); + editor.setDecorations(key, ranges); return Promise.resolve(undefined); } $trySetDecorationsFast(id: string, key: string, ranges: number[]): Promise { key = `${this._instanceId}-${key}`; - if (!this._documentsAndEditors.getEditor(id)) { + const editor = this._documentsAndEditors.getEditor(id); + if (!editor) { return Promise.reject(disposed(`TextEditor(${id})`)); } - this._documentsAndEditors.getEditor(id).setDecorationsFast(key, ranges); + editor.setDecorationsFast(key, ranges); return Promise.resolve(undefined); } $tryRevealRange(id: string, range: IRange, revealType: TextEditorRevealType): Promise { - if (!this._documentsAndEditors.getEditor(id)) { + const editor = this._documentsAndEditors.getEditor(id); + if (!editor) { return Promise.reject(disposed(`TextEditor(${id})`)); } - this._documentsAndEditors.getEditor(id).revealRange(range, revealType); + editor.revealRange(range, revealType); return Promise.resolve(); } $trySetOptions(id: string, options: ITextEditorConfigurationUpdate): Promise { - if (!this._documentsAndEditors.getEditor(id)) { + const editor = this._documentsAndEditors.getEditor(id); + if (!editor) { return Promise.reject(disposed(`TextEditor(${id})`)); } - this._documentsAndEditors.getEditor(id).setConfiguration(options); + editor.setConfiguration(options); return Promise.resolve(undefined); } $tryApplyEdits(id: string, modelVersionId: number, edits: ISingleEditOperation[], opts: IApplyEditsOptions): Promise { - if (!this._documentsAndEditors.getEditor(id)) { + const editor = this._documentsAndEditors.getEditor(id); + if (!editor) { return Promise.reject(disposed(`TextEditor(${id})`)); } - return Promise.resolve(this._documentsAndEditors.getEditor(id).applyEdits(modelVersionId, edits, opts)); + return Promise.resolve(editor.applyEdits(modelVersionId, edits, opts)); } $tryApplyWorkspaceEdit(dto: WorkspaceEditDto): Promise { @@ -214,10 +220,11 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape { } $tryInsertSnippet(id: string, template: string, ranges: readonly IRange[], opts: IUndoStopOptions): Promise { - if (!this._documentsAndEditors.getEditor(id)) { + const editor = this._documentsAndEditors.getEditor(id); + if (!editor) { return Promise.reject(disposed(`TextEditor(${id})`)); } - return Promise.resolve(this._documentsAndEditors.getEditor(id).insertSnippet(template, ranges, opts)); + return Promise.resolve(editor.insertSnippet(template, ranges, opts)); } $registerTextEditorDecorationType(key: string, options: IDecorationRenderOptions): void { From 6ae3384011cd3a838a2c5f78705012796af8874a Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 11:13:42 -0700 Subject: [PATCH 224/710] getEditor() return null instead of undefined --- .../workbench/browser/parts/editor/editorCommands.ts | 4 ++-- .../workbench/browser/parts/editor/editorGroupView.ts | 2 +- .../workbench/browser/parts/editor/tabsTitleControl.ts | 2 +- src/vs/workbench/common/editor/editorGroup.ts | 10 +++++----- .../services/editor/common/editorGroupsService.ts | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index ae8928e6b49..638c44e147e 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -443,11 +443,11 @@ export function splitEditor(editorGroupService: IEditorGroupsService, direction: const newGroup = editorGroupService.addGroup(sourceGroup, direction); // Split editor (if it can be split) - let editorToCopy: IEditorInput | null; + let editorToCopy: IEditorInput | undefined; if (context && typeof context.editorIndex === 'number') { editorToCopy = sourceGroup.getEditor(context.editorIndex); } else { - editorToCopy = sourceGroup.activeEditor; + editorToCopy = types.withNullAsUndefined(sourceGroup.activeEditor); } if (editorToCopy && (editorToCopy as EditorInput).supportsSplitEditor()) { diff --git a/src/vs/workbench/browser/parts/editor/editorGroupView.ts b/src/vs/workbench/browser/parts/editor/editorGroupView.ts index a1c4176be56..1f25c41cb90 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupView.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupView.ts @@ -729,7 +729,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { return this.editors; } - getEditor(index: number): EditorInput | null { + getEditor(index: number): EditorInput | undefined { return this._group.getEditor(index); } diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 7af89021113..00f4b30dc1e 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -695,7 +695,7 @@ export class TabsTitleControl extends TitleControl { private updateDropFeedback(element: HTMLElement, isDND: boolean, index?: number): void { const isTab = (typeof index === 'number'); - const editor = typeof index === 'number' ? this.group.getEditor(index) : null; + const editor = typeof index === 'number' ? this.group.getEditor(index) : undefined; const isActiveTab = isTab && !!editor && this.group.isActive(editor); // Background diff --git a/src/vs/workbench/common/editor/editorGroup.ts b/src/vs/workbench/common/editor/editorGroup.ts index 7d4ca0c5e52..e5b47924916 100644 --- a/src/vs/workbench/common/editor/editorGroup.ts +++ b/src/vs/workbench/common/editor/editorGroup.ts @@ -138,16 +138,16 @@ export class EditorGroup extends Disposable { return mru ? this.mru.slice(0) : this.editors.slice(0); } - getEditor(index: number): EditorInput | null; - getEditor(resource: URI): EditorInput | null; - getEditor(arg1: number | URI): EditorInput | null { + getEditor(index: number): EditorInput | undefined; + getEditor(resource: URI): EditorInput | undefined; + getEditor(arg1: number | URI): EditorInput | undefined { if (typeof arg1 === 'number') { return this.editors[arg1]; } const resource: URI = arg1; if (!this.contains(resource)) { - return null; // fast check for resource opened or not + return undefined; // fast check for resource opened or not } for (const editor of this.editors) { @@ -157,7 +157,7 @@ export class EditorGroup extends Disposable { } } - return null; + return undefined; } get activeEditor(): EditorInput | null { diff --git a/src/vs/workbench/services/editor/common/editorGroupsService.ts b/src/vs/workbench/services/editor/common/editorGroupsService.ts index ac6ff2b537c..c91173e5514 100644 --- a/src/vs/workbench/services/editor/common/editorGroupsService.ts +++ b/src/vs/workbench/services/editor/common/editorGroupsService.ts @@ -411,7 +411,7 @@ export interface IEditorGroup { /** * Returns the editor at a specific index of the group. */ - getEditor(index: number): IEditorInput | null; + getEditor(index: number): IEditorInput | undefined; /** * Get all editors that are currently opened in the group optionally From 38439280fcf970f121029eb0701c3392a5c87157 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 11:28:32 -0700 Subject: [PATCH 225/710] Use set instead of object literal to track activation events --- .../extensions/common/abstractExtensionService.ts | 11 +++++------ .../extensions/electron-browser/extensionService.ts | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts index d57fa8b1801..f19abf44e9b 100644 --- a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts +++ b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts @@ -51,7 +51,7 @@ export abstract class AbstractExtensionService extends Disposable implements IEx private readonly _installedExtensionsReady: Barrier; protected readonly _isDev: boolean; private readonly _extensionsMessages: Map; - protected readonly _allRequestedActivateEvents: { [activationEvent: string]: boolean; }; + protected readonly _allRequestedActivateEvents = new Set(); private readonly _proposedApiController: ProposedApiController; private readonly _isExtensionDevHost: boolean; protected readonly _isExtensionDevTestFromCli: boolean; @@ -82,7 +82,6 @@ export abstract class AbstractExtensionService extends Disposable implements IEx this._installedExtensionsReady = new Barrier(); this._isDev = !this._environmentService.isBuilt || this._environmentService.isExtensionDevelopment; this._extensionsMessages = new Map(); - this._allRequestedActivateEvents = Object.create(null); this._proposedApiController = new ProposedApiController(this._environmentService, this._productService); this._extensionHostProcessManagers = []; @@ -168,11 +167,11 @@ export abstract class AbstractExtensionService extends Disposable implements IEx public restartExtensionHost(): void { this._stopExtensionHostProcess(); - this._startExtensionHostProcess(false, Object.keys(this._allRequestedActivateEvents)); + this._startExtensionHostProcess(false, Array.from(this._allRequestedActivateEvents.keys())); } public startExtensionHost(): void { - this._startExtensionHostProcess(false, Object.keys(this._allRequestedActivateEvents)); + this._startExtensionHostProcess(false, Array.from(this._allRequestedActivateEvents.keys())); } public stopExtensionHost(): void { @@ -184,7 +183,7 @@ export abstract class AbstractExtensionService extends Disposable implements IEx // Extensions have been scanned and interpreted // Record the fact that this activationEvent was requested (in case of a restart) - this._allRequestedActivateEvents[activationEvent] = true; + this._allRequestedActivateEvents.add(activationEvent); if (!this._registry.containsActivationEvent(activationEvent)) { // There is no extension that is interested in this activation event @@ -196,7 +195,7 @@ export abstract class AbstractExtensionService extends Disposable implements IEx // Extensions have not been scanned yet. // Record the fact that this activationEvent was requested (in case of a restart) - this._allRequestedActivateEvents[activationEvent] = true; + this._allRequestedActivateEvents.add(activationEvent); return this._installedExtensionsReady.wait().then(() => this._activateByEvent(activationEvent)); } diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index 98b5cf01ba1..4d8357796eb 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -294,7 +294,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten activationEvent = `onUri:${ExtensionIdentifier.toKey(extensionDescription.identifier)}`; } - if (this._allRequestedActivateEvents[activationEvent]) { + if (this._allRequestedActivateEvents.has(activationEvent)) { // This activation event was fired before the extension was added shouldActivate = true; shouldActivateReason = activationEvent; From 7ed88bd70c970c665c74d53a182a763e786af07e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 11:39:10 -0700 Subject: [PATCH 226/710] Use set to track synced values instead of object literal --- .../workbench/api/browser/mainThreadDocuments.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadDocuments.ts b/src/vs/workbench/api/browser/mainThreadDocuments.ts index adfef42555b..30c8a366e90 100644 --- a/src/vs/workbench/api/browser/mainThreadDocuments.ts +++ b/src/vs/workbench/api/browser/mainThreadDocuments.ts @@ -76,7 +76,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { private readonly _toDispose = new DisposableStore(); private _modelToDisposeMap: { [modelUrl: string]: IDisposable; }; private readonly _proxy: ExtHostDocumentsShape; - private readonly _modelIsSynced: { [modelId: string]: boolean; }; + private readonly _modelIsSynced = new Set(); private _modelReferenceCollection = new BoundModelReferenceCollection(); constructor( @@ -98,7 +98,6 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { this._environmentService = environmentService; this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDocuments); - this._modelIsSynced = {}; this._toDispose.add(documentsAndEditors.onDocumentAdd(models => models.forEach(this._onModelAdded, this))); this._toDispose.add(documentsAndEditors.onDocumentRemove(urls => urls.forEach(this._onModelRemoved, this))); @@ -144,7 +143,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { return; } const modelUrl = model.uri; - this._modelIsSynced[modelUrl.toString()] = true; + this._modelIsSynced.add(modelUrl.toString()); this._modelToDisposeMap[modelUrl.toString()] = model.onDidChangeContent((e) => { this._proxy.$acceptModelChanged(modelUrl, e, this._textFileService.isDirty(modelUrl)); }); @@ -153,7 +152,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { private _onModelModeChanged(event: { model: ITextModel; oldModeId: string; }): void { let { model, oldModeId } = event; const modelUrl = model.uri; - if (!this._modelIsSynced[modelUrl.toString()]) { + if (!this._modelIsSynced.has(modelUrl.toString())) { return; } this._proxy.$acceptModelModeChanged(model.uri, oldModeId, model.getLanguageIdentifier().language); @@ -161,10 +160,10 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { private _onModelRemoved(modelUrl: URI): void { const strModelUrl = modelUrl.toString(); - if (!this._modelIsSynced[strModelUrl]) { + if (!this._modelIsSynced.has(strModelUrl)) { return; } - delete this._modelIsSynced[strModelUrl]; + this._modelIsSynced.delete(strModelUrl); this._modelToDisposeMap[strModelUrl].dispose(); delete this._modelToDisposeMap[strModelUrl]; } @@ -195,7 +194,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { return promise.then(success => { if (!success) { return Promise.reject(new Error('cannot open ' + uri.toString())); - } else if (!this._modelIsSynced[uri.toString()]) { + } else if (!this._modelIsSynced.has(uri.toString())) { return Promise.reject(new Error('cannot open ' + uri.toString() + '. Detail: Files above 50MB cannot be synchronized with extensions.')); } else { return undefined; @@ -236,7 +235,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { }).then(model => { const resource = model.getResource(); - if (!this._modelIsSynced[resource.toString()]) { + if (!this._modelIsSynced.has(resource.toString())) { throw new Error(`expected URI ${resource.toString()} to have come to LIFE`); } From f729a996c603a5f96aed0ffb8740b47dcba4fc13 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 11:46:11 -0700 Subject: [PATCH 227/710] Use map to track registrations --- .../api/browser/mainThreadLanguageFeatures.ts | 100 +++++++++--------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts b/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts index d54e01d9a9b..75af9eebf01 100644 --- a/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts +++ b/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts @@ -27,7 +27,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha private readonly _proxy: ExtHostLanguageFeaturesShape; private readonly _modeService: IModeService; - private readonly _registrations: { [handle: number]: IDisposable; } = Object.create(null); + private readonly _registrations = new Map(); constructor( extHostContext: IExtHostContext, @@ -38,16 +38,17 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha } dispose(): void { - for (const key in this._registrations) { - this._registrations[key].dispose(); + for (const registration of this._registrations.values()) { + registration.dispose(); } + this._registrations.clear(); } $unregister(handle: number): void { - const registration = this._registrations[handle]; + const registration = this._registrations.get(handle); if (registration) { registration.dispose(); - delete this._registrations[handle]; + this._registrations.delete(handle); } } @@ -122,12 +123,12 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha // --- outline $registerDocumentSymbolProvider(handle: number, selector: ISerializedDocumentFilter[], displayName: string): void { - this._registrations[handle] = modes.DocumentSymbolProviderRegistry.register(selector, { + this._registrations.set(handle, modes.DocumentSymbolProviderRegistry.register(selector, { displayName, provideDocumentSymbols: (model: ITextModel, token: CancellationToken): Promise => { return this._proxy.$provideDocumentSymbols(handle, model.uri, token); } - }); + })); } // --- code lens @@ -153,15 +154,15 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha if (typeof eventHandle === 'number') { const emitter = new Emitter(); - this._registrations[eventHandle] = emitter; + this._registrations.set(eventHandle, emitter); provider.onDidChange = emitter.event; } - this._registrations[handle] = modes.CodeLensProviderRegistry.register(selector, provider); + this._registrations.set(handle, modes.CodeLensProviderRegistry.register(selector, provider)); } $emitCodeLensEvent(eventHandle: number, event?: any): void { - const obj = this._registrations[eventHandle]; + const obj = this._registrations.get(eventHandle); if (obj instanceof Emitter) { obj.fire(event); } @@ -170,71 +171,71 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha // --- declaration $registerDefinitionSupport(handle: number, selector: ISerializedDocumentFilter[]): void { - this._registrations[handle] = modes.DefinitionProviderRegistry.register(selector, { + this._registrations.set(handle, modes.DefinitionProviderRegistry.register(selector, { provideDefinition: (model, position, token): Promise => { return this._proxy.$provideDefinition(handle, model.uri, position, token).then(MainThreadLanguageFeatures._reviveLocationLinkDto); } - }); + })); } $registerDeclarationSupport(handle: number, selector: ISerializedDocumentFilter[]): void { - this._registrations[handle] = modes.DeclarationProviderRegistry.register(selector, { + this._registrations.set(handle, modes.DeclarationProviderRegistry.register(selector, { provideDeclaration: (model, position, token) => { return this._proxy.$provideDeclaration(handle, model.uri, position, token).then(MainThreadLanguageFeatures._reviveLocationLinkDto); } - }); + })); } $registerImplementationSupport(handle: number, selector: ISerializedDocumentFilter[]): void { - this._registrations[handle] = modes.ImplementationProviderRegistry.register(selector, { + this._registrations.set(handle, modes.ImplementationProviderRegistry.register(selector, { provideImplementation: (model, position, token): Promise => { return this._proxy.$provideImplementation(handle, model.uri, position, token).then(MainThreadLanguageFeatures._reviveLocationLinkDto); } - }); + })); } $registerTypeDefinitionSupport(handle: number, selector: ISerializedDocumentFilter[]): void { - this._registrations[handle] = modes.TypeDefinitionProviderRegistry.register(selector, { + this._registrations.set(handle, modes.TypeDefinitionProviderRegistry.register(selector, { provideTypeDefinition: (model, position, token): Promise => { return this._proxy.$provideTypeDefinition(handle, model.uri, position, token).then(MainThreadLanguageFeatures._reviveLocationLinkDto); } - }); + })); } // --- extra info $registerHoverProvider(handle: number, selector: ISerializedDocumentFilter[]): void { - this._registrations[handle] = modes.HoverProviderRegistry.register(selector, { + this._registrations.set(handle, modes.HoverProviderRegistry.register(selector, { provideHover: (model: ITextModel, position: EditorPosition, token: CancellationToken): Promise => { return this._proxy.$provideHover(handle, model.uri, position, token); } - }); + })); } // --- occurrences $registerDocumentHighlightProvider(handle: number, selector: ISerializedDocumentFilter[]): void { - this._registrations[handle] = modes.DocumentHighlightProviderRegistry.register(selector, { + this._registrations.set(handle, modes.DocumentHighlightProviderRegistry.register(selector, { provideDocumentHighlights: (model: ITextModel, position: EditorPosition, token: CancellationToken): Promise => { return this._proxy.$provideDocumentHighlights(handle, model.uri, position, token); } - }); + })); } // --- references $registerReferenceSupport(handle: number, selector: ISerializedDocumentFilter[]): void { - this._registrations[handle] = modes.ReferenceProviderRegistry.register(selector, { + this._registrations.set(handle, modes.ReferenceProviderRegistry.register(selector, { provideReferences: (model: ITextModel, position: EditorPosition, context: modes.ReferenceContext, token: CancellationToken): Promise => { return this._proxy.$provideReferences(handle, model.uri, position, context, token).then(MainThreadLanguageFeatures._reviveLocationDto); } - }); + })); } // --- quick fix $registerQuickFixSupport(handle: number, selector: ISerializedDocumentFilter[], providedCodeActionKinds?: string[]): void { - this._registrations[handle] = modes.CodeActionProviderRegistry.register(selector, { + this._registrations.set(handle, modes.CodeActionProviderRegistry.register(selector, { provideCodeActions: async (model: ITextModel, rangeOrSelection: EditorRange | Selection, context: modes.CodeActionContext, token: CancellationToken): Promise => { const listDto = await this._proxy.$provideCodeActions(handle, model.uri, rangeOrSelection, context, token); if (!listDto) { @@ -250,46 +251,46 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha }; }, providedCodeActionKinds - }); + })); } // --- formatting $registerDocumentFormattingSupport(handle: number, selector: ISerializedDocumentFilter[], extensionId: ExtensionIdentifier, displayName: string): void { - this._registrations[handle] = modes.DocumentFormattingEditProviderRegistry.register(selector, { + this._registrations.set(handle, modes.DocumentFormattingEditProviderRegistry.register(selector, { extensionId, displayName, provideDocumentFormattingEdits: (model: ITextModel, options: modes.FormattingOptions, token: CancellationToken): Promise => { return this._proxy.$provideDocumentFormattingEdits(handle, model.uri, options, token); } - }); + })); } $registerRangeFormattingSupport(handle: number, selector: ISerializedDocumentFilter[], extensionId: ExtensionIdentifier, displayName: string): void { - this._registrations[handle] = modes.DocumentRangeFormattingEditProviderRegistry.register(selector, { + this._registrations.set(handle, modes.DocumentRangeFormattingEditProviderRegistry.register(selector, { extensionId, displayName, provideDocumentRangeFormattingEdits: (model: ITextModel, range: EditorRange, options: modes.FormattingOptions, token: CancellationToken): Promise => { return this._proxy.$provideDocumentRangeFormattingEdits(handle, model.uri, range, options, token); } - }); + })); } $registerOnTypeFormattingSupport(handle: number, selector: ISerializedDocumentFilter[], autoFormatTriggerCharacters: string[], extensionId: ExtensionIdentifier): void { - this._registrations[handle] = modes.OnTypeFormattingEditProviderRegistry.register(selector, { + this._registrations.set(handle, modes.OnTypeFormattingEditProviderRegistry.register(selector, { extensionId, autoFormatTriggerCharacters, provideOnTypeFormattingEdits: (model: ITextModel, position: EditorPosition, ch: string, options: modes.FormattingOptions, token: CancellationToken): Promise => { return this._proxy.$provideOnTypeFormattingEdits(handle, model.uri, position, ch, options, token); } - }); + })); } // --- navigate type $registerNavigateTypeSupport(handle: number): void { let lastResultId: number | undefined; - this._registrations[handle] = search.WorkspaceSymbolProviderRegistry.register({ + this._registrations.set(handle, search.WorkspaceSymbolProviderRegistry.register({ provideWorkspaceSymbols: (search: string, token: CancellationToken): Promise => { return this._proxy.$provideWorkspaceSymbols(handle, search, token).then(result => { if (lastResultId !== undefined) { @@ -307,21 +308,20 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha return undefined; }); } - }); + })); } // --- rename $registerRenameSupport(handle: number, selector: ISerializedDocumentFilter[], supportResolveLocation: boolean): void { - - this._registrations[handle] = modes.RenameProviderRegistry.register(selector, { + this._registrations.set(handle, modes.RenameProviderRegistry.register(selector, { provideRenameEdits: (model: ITextModel, position: EditorPosition, newName: string, token: CancellationToken): Promise => { return this._proxy.$provideRenameEdits(handle, model.uri, position, newName, token).then(reviveWorkspaceEditDto); }, resolveRenameLocation: supportResolveLocation ? (model: ITextModel, position: EditorPosition, token: CancellationToken): Promise => this._proxy.$resolveRenameLocation(handle, model.uri, position, token) : undefined - }); + })); } // --- suggest @@ -374,13 +374,13 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha }); }; } - this._registrations[handle] = modes.CompletionProviderRegistry.register(selector, provider); + this._registrations.set(handle, modes.CompletionProviderRegistry.register(selector, provider)); } // --- parameter hints $registerSignatureHelpProvider(handle: number, selector: ISerializedDocumentFilter[], metadata: ISerializedSignatureHelpProviderMetadata): void { - this._registrations[handle] = modes.SignatureHelpProviderRegistry.register(selector, { + this._registrations.set(handle, modes.SignatureHelpProviderRegistry.register(selector, { signatureHelpTriggerCharacters: metadata.triggerCharacters, signatureHelpRetriggerCharacters: metadata.retriggerCharacters, @@ -397,7 +397,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha } }; } - }); + })); } // --- links @@ -431,14 +431,14 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha }); }; } - this._registrations[handle] = modes.LinkProviderRegistry.register(selector, provider); + this._registrations.set(handle, modes.LinkProviderRegistry.register(selector, provider)); } // --- colors $registerDocumentColorProvider(handle: number, selector: ISerializedDocumentFilter[]): void { const proxy = this._proxy; - this._registrations[handle] = modes.ColorProviderRegistry.register(selector, { + this._registrations.set(handle, modes.ColorProviderRegistry.register(selector, { provideDocumentColors: (model, token) => { return proxy.$provideDocumentColors(handle, model.uri, token) .then(documentColors => { @@ -465,34 +465,34 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha range: colorInfo.range }, token); } - }); + })); } // --- folding $registerFoldingRangeProvider(handle: number, selector: ISerializedDocumentFilter[]): void { const proxy = this._proxy; - this._registrations[handle] = modes.FoldingRangeProviderRegistry.register(selector, { + this._registrations.set(handle, modes.FoldingRangeProviderRegistry.register(selector, { provideFoldingRanges: (model, context, token) => { return proxy.$provideFoldingRanges(handle, model.uri, context, token); } - }); + })); } // -- smart select $registerSelectionRangeProvider(handle: number, selector: ISerializedDocumentFilter[]): void { - this._registrations[handle] = modes.SelectionRangeRegistry.register(selector, { + this._registrations.set(handle, modes.SelectionRangeRegistry.register(selector, { provideSelectionRanges: (model, positions, token) => { return this._proxy.$provideSelectionRanges(handle, model.uri, positions, token); } - }); + })); } // --- call hierarchy $registerCallHierarchyProvider(handle: number, selector: ISerializedDocumentFilter[]): void { - this._registrations[handle] = callh.CallHierarchyProviderRegistry.register(selector, { + this._registrations.set(handle, callh.CallHierarchyProviderRegistry.register(selector, { provideCallHierarchyItem: (document, position, token) => { return this._proxy.$provideCallHierarchyItem(handle, document.uri, position, token).then(MainThreadLanguageFeatures._reviveCallHierarchyItemDto); }, @@ -510,7 +510,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha return data as [callh.CallHierarchyItem, modes.Location[]][]; }); } - }); + })); } // --- configuration @@ -571,7 +571,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha const languageIdentifier = this._modeService.getLanguageIdentifier(languageId); if (languageIdentifier) { - this._registrations[handle] = LanguageConfigurationRegistry.register(languageIdentifier, configuration); + this._registrations.set(handle, LanguageConfigurationRegistry.register(languageIdentifier, configuration)); } } From f907a8c987b43aeaacdf18458212059f567be371 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 11:46:51 -0700 Subject: [PATCH 228/710] Update js/ts grammar --- .../syntaxes/JavaScript.tmLanguage.json | 64 +++++++++--------- .../syntaxes/JavaScriptReact.tmLanguage.json | 64 +++++++++--------- extensions/typescript-basics/cgmanifest.json | 2 +- .../syntaxes/TypeScript.tmLanguage.json | 66 +++++++++---------- .../syntaxes/TypeScriptReact.tmLanguage.json | 64 +++++++++--------- 5 files changed, 130 insertions(+), 130 deletions(-) diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index 9ea6c3cec1b..71cf0a91c20 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3508c88a4ac6112934e0c34de7942c67682b2321", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/f698a9826cad8235e92b7c298a5f8c9c298d8ada", "name": "JavaScript (with React support)", "scopeName": "source.js", "patterns": [ @@ -286,7 +286,7 @@ { "name": "meta.var.expr.js", "begin": "(?=(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js entity.name.function.js" @@ -435,7 +435,7 @@ "name": "keyword.operator.definiteassignment.js" } }, - "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js variable.other.constant.js entity.name.function.js" } }, - "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js" @@ -1108,7 +1108,7 @@ "include": "#comment" }, { - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "meta.definition.property.js entity.name.function.js" @@ -1144,7 +1144,7 @@ "name": "keyword.operator.assignment.js" } }, - "end": "(?=$|^|[,);}\\]]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[,);}\\]]|((?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.js" @@ -1318,7 +1318,7 @@ }, { "name": "meta.method.declaration.js", - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.js" @@ -1350,7 +1350,7 @@ }, "object-literal-method-declaration": { "name": "meta.method.declaration.js", - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -1371,7 +1371,7 @@ "include": "#function-body" }, { - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -1431,7 +1431,7 @@ }, { "name": "meta.arrow.js", - "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -2604,7 +2604,7 @@ }, { "name": "meta.object.member.js", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.js" @@ -2695,7 +2695,7 @@ "end": "(?=,|\\})", "patterns": [ { - "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)\\(\\s*([\\{\\[]\\s*)?$)", + "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*([\\{\\[]\\s*)?$)", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -2869,7 +2869,7 @@ "paren-expression-possibly-arrow": { "patterns": [ { - "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?\\(\\s*[\\{\\[]\\s*$)", + "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*[\\{\\[]\\s*$)", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -2883,7 +2883,7 @@ ] }, { - "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?\\()|(<))\\s*$)", + "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<))\\s*$)", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -2953,7 +2953,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js" @@ -3469,7 +3469,7 @@ } }, { - "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", + "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", "captures": { "1": { "name": "punctuation.accessor.js" @@ -3541,7 +3541,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.js" diff --git a/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json b/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json index 627882de1e0..2f830d70beb 100644 --- a/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3508c88a4ac6112934e0c34de7942c67682b2321", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/f698a9826cad8235e92b7c298a5f8c9c298d8ada", "name": "JavaScript (with React support)", "scopeName": "source.js.jsx", "patterns": [ @@ -286,7 +286,7 @@ { "name": "meta.var.expr.js.jsx", "begin": "(?=(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js.jsx entity.name.function.js.jsx" @@ -435,7 +435,7 @@ "name": "keyword.operator.definiteassignment.js.jsx" } }, - "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js.jsx variable.other.constant.js.jsx entity.name.function.js.jsx" } }, - "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js.jsx" @@ -1108,7 +1108,7 @@ "include": "#comment" }, { - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "meta.definition.property.js.jsx entity.name.function.js.jsx" @@ -1144,7 +1144,7 @@ "name": "keyword.operator.assignment.js.jsx" } }, - "end": "(?=$|^|[,);}\\]]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[,);}\\]]|((?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.js.jsx" @@ -1318,7 +1318,7 @@ }, { "name": "meta.method.declaration.js.jsx", - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.js.jsx" @@ -1350,7 +1350,7 @@ }, "object-literal-method-declaration": { "name": "meta.method.declaration.js.jsx", - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.async.js.jsx" @@ -1371,7 +1371,7 @@ "include": "#function-body" }, { - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.async.js.jsx" @@ -1431,7 +1431,7 @@ }, { "name": "meta.arrow.js.jsx", - "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.js.jsx" @@ -2604,7 +2604,7 @@ }, { "name": "meta.object.member.js.jsx", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.js.jsx" @@ -2695,7 +2695,7 @@ "end": "(?=,|\\})", "patterns": [ { - "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)\\(\\s*([\\{\\[]\\s*)?$)", + "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*([\\{\\[]\\s*)?$)", "beginCaptures": { "1": { "name": "storage.modifier.async.js.jsx" @@ -2869,7 +2869,7 @@ "paren-expression-possibly-arrow": { "patterns": [ { - "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?\\(\\s*[\\{\\[]\\s*$)", + "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*[\\{\\[]\\s*$)", "beginCaptures": { "1": { "name": "storage.modifier.async.js.jsx" @@ -2883,7 +2883,7 @@ ] }, { - "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?\\()|(<))\\s*$)", + "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<))\\s*$)", "beginCaptures": { "1": { "name": "storage.modifier.async.js.jsx" @@ -2953,7 +2953,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js.jsx" @@ -3469,7 +3469,7 @@ } }, { - "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", + "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", "captures": { "1": { "name": "punctuation.accessor.js.jsx" @@ -3541,7 +3541,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.js.jsx" diff --git a/extensions/typescript-basics/cgmanifest.json b/extensions/typescript-basics/cgmanifest.json index ffd4150e68a..0f20c256fda 100644 --- a/extensions/typescript-basics/cgmanifest.json +++ b/extensions/typescript-basics/cgmanifest.json @@ -6,7 +6,7 @@ "git": { "name": "TypeScript-TmLanguage", "repositoryUrl": "https://github.com/Microsoft/TypeScript-TmLanguage", - "commitHash": "3508c88a4ac6112934e0c34de7942c67682b2321" + "commitHash": "f698a9826cad8235e92b7c298a5f8c9c298d8ada" } }, "license": "MIT", diff --git a/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json b/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json index a3d9b24fe96..0f5c3ba241e 100644 --- a/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json +++ b/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3508c88a4ac6112934e0c34de7942c67682b2321", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/f698a9826cad8235e92b7c298a5f8c9c298d8ada", "name": "TypeScript", "scopeName": "source.ts", "patterns": [ @@ -283,7 +283,7 @@ { "name": "meta.var.expr.ts", "begin": "(?=(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.ts entity.name.function.ts" @@ -432,7 +432,7 @@ "name": "keyword.operator.definiteassignment.ts" } }, - "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts" } }, - "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.ts" @@ -1105,7 +1105,7 @@ "include": "#comment" }, { - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "meta.definition.property.ts entity.name.function.ts" @@ -1141,7 +1141,7 @@ "name": "keyword.operator.assignment.ts" } }, - "end": "(?=$|^|[,);}\\]]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[,);}\\]]|((?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.ts" @@ -1315,7 +1315,7 @@ }, { "name": "meta.method.declaration.ts", - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.ts" @@ -1347,7 +1347,7 @@ }, "object-literal-method-declaration": { "name": "meta.method.declaration.ts", - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -1368,7 +1368,7 @@ "include": "#function-body" }, { - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -1428,7 +1428,7 @@ }, { "name": "meta.arrow.ts", - "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -2601,7 +2601,7 @@ }, { "name": "meta.object.member.ts", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.ts" @@ -2692,7 +2692,7 @@ "end": "(?=,|\\})", "patterns": [ { - "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)\\(\\s*([\\{\\[]\\s*)?$)", + "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*([\\{\\[]\\s*)?$)", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -2866,7 +2866,7 @@ "paren-expression-possibly-arrow": { "patterns": [ { - "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?\\(\\s*[\\{\\[]\\s*$)", + "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*[\\{\\[]\\s*$)", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -2880,7 +2880,7 @@ ] }, { - "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?\\()|(<))\\s*$)", + "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<))\\s*$)", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -2950,7 +2950,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.ts" @@ -3518,7 +3518,7 @@ } }, { - "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", + "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", "captures": { "1": { "name": "punctuation.accessor.ts" @@ -3590,7 +3590,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.ts" @@ -4103,7 +4103,7 @@ }, "patterns": [ { - "match": "(?x)(?:(?)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))))", + "match": "(?x)(?:(?)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))))", "captures": { "1": { "name": "storage.modifier.ts" diff --git a/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json b/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json index 3560a374b9d..59f4e80a93c 100644 --- a/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json +++ b/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3508c88a4ac6112934e0c34de7942c67682b2321", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/f698a9826cad8235e92b7c298a5f8c9c298d8ada", "name": "TypeScriptReact", "scopeName": "source.tsx", "patterns": [ @@ -286,7 +286,7 @@ { "name": "meta.var.expr.tsx", "begin": "(?=(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.tsx entity.name.function.tsx" @@ -435,7 +435,7 @@ "name": "keyword.operator.definiteassignment.tsx" } }, - "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx" } }, - "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.tsx" @@ -1108,7 +1108,7 @@ "include": "#comment" }, { - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "meta.definition.property.tsx entity.name.function.tsx" @@ -1144,7 +1144,7 @@ "name": "keyword.operator.assignment.tsx" } }, - "end": "(?=$|^|[,);}\\]]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[,);}\\]]|((?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.tsx" @@ -1318,7 +1318,7 @@ }, { "name": "meta.method.declaration.tsx", - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.tsx" @@ -1350,7 +1350,7 @@ }, "object-literal-method-declaration": { "name": "meta.method.declaration.tsx", - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -1371,7 +1371,7 @@ "include": "#function-body" }, { - "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?[\\(])", + "begin": "(?x)(?]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -1431,7 +1431,7 @@ }, { "name": "meta.arrow.tsx", - "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -2604,7 +2604,7 @@ }, { "name": "meta.object.member.tsx", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.tsx" @@ -2695,7 +2695,7 @@ "end": "(?=,|\\})", "patterns": [ { - "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)\\(\\s*([\\{\\[]\\s*)?$)", + "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*([\\{\\[]\\s*)?$)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -2869,7 +2869,7 @@ "paren-expression-possibly-arrow": { "patterns": [ { - "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?\\(\\s*[\\{\\[]\\s*$)", + "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*[\\{\\[]\\s*$)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -2883,7 +2883,7 @@ ] }, { - "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*))?\\()|(<))\\s*$)", + "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<))\\s*$)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -2953,7 +2953,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.tsx" @@ -3469,7 +3469,7 @@ } }, { - "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", + "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", "captures": { "1": { "name": "punctuation.accessor.tsx" @@ -3541,7 +3541,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.tsx" From 3589100317a9b6f6e06b60080e931e8b8233e41c Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Mon, 15 Jul 2019 11:51:44 -0700 Subject: [PATCH 229/710] Update Win menu icons --- src/vs/base/browser/ui/menu/check.svg | 4 +++- src/vs/base/browser/ui/menu/ellipsis.svg | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vs/base/browser/ui/menu/check.svg b/src/vs/base/browser/ui/menu/check.svg index 3f365c4800e..865cc83c347 100644 --- a/src/vs/base/browser/ui/menu/check.svg +++ b/src/vs/base/browser/ui/menu/check.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/vs/base/browser/ui/menu/ellipsis.svg b/src/vs/base/browser/ui/menu/ellipsis.svg index e3f85623356..2c52e359f61 100644 --- a/src/vs/base/browser/ui/menu/ellipsis.svg +++ b/src/vs/base/browser/ui/menu/ellipsis.svg @@ -1 +1,5 @@ -Ellipsis_bold_16x \ No newline at end of file + + + + + From b7fbc3e35cb88932801605b5c8e575e5e4fdd41b Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Mon, 15 Jul 2019 11:52:04 -0700 Subject: [PATCH 230/710] Update diff close icons --- src/vs/editor/browser/widget/media/close-dark.svg | 3 +++ src/vs/editor/browser/widget/media/close-inverse.svg | 1 - src/vs/editor/browser/widget/media/close-light.svg | 3 +++ src/vs/editor/browser/widget/media/close.svg | 1 - src/vs/editor/browser/widget/media/diffReview.css | 4 ++-- 5 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 src/vs/editor/browser/widget/media/close-dark.svg delete mode 100644 src/vs/editor/browser/widget/media/close-inverse.svg create mode 100644 src/vs/editor/browser/widget/media/close-light.svg delete mode 100644 src/vs/editor/browser/widget/media/close.svg diff --git a/src/vs/editor/browser/widget/media/close-dark.svg b/src/vs/editor/browser/widget/media/close-dark.svg new file mode 100644 index 00000000000..6d16d212ae5 --- /dev/null +++ b/src/vs/editor/browser/widget/media/close-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/vs/editor/browser/widget/media/close-inverse.svg b/src/vs/editor/browser/widget/media/close-inverse.svg deleted file mode 100644 index 751e89b3b02..00000000000 --- a/src/vs/editor/browser/widget/media/close-inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/close-light.svg b/src/vs/editor/browser/widget/media/close-light.svg new file mode 100644 index 00000000000..742fcae4ae7 --- /dev/null +++ b/src/vs/editor/browser/widget/media/close-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/vs/editor/browser/widget/media/close.svg b/src/vs/editor/browser/widget/media/close.svg deleted file mode 100644 index fde34404d4e..00000000000 --- a/src/vs/editor/browser/widget/media/close.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/diffReview.css b/src/vs/editor/browser/widget/media/diffReview.css index edb9317dd80..4cf9f7b83a4 100644 --- a/src/vs/editor/browser/widget/media/diffReview.css +++ b/src/vs/editor/browser/widget/media/diffReview.css @@ -62,9 +62,9 @@ margin: 2px 0; } .monaco-diff-editor .action-label.icon.close-diff-review { - background: url('close.svg') center center no-repeat; + background: url('close-light.svg') center center no-repeat; } .monaco-diff-editor.hc-black .action-label.icon.close-diff-review, .monaco-diff-editor.vs-dark .action-label.icon.close-diff-review { - background: url('close-inverse.svg') center center no-repeat; + background: url('close-dark.svg') center center no-repeat; } \ No newline at end of file From ca98b5994f0f71433f5d1fb7800b5bc47d16b66c Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Mon, 15 Jul 2019 11:54:35 -0700 Subject: [PATCH 231/710] Remove unused icons --- src/vs/workbench/contrib/files/browser/media/CollapseAll.svg | 1 - .../contrib/files/browser/media/CollapseAll_inverse.svg | 1 - 2 files changed, 2 deletions(-) delete mode 100644 src/vs/workbench/contrib/files/browser/media/CollapseAll.svg delete mode 100644 src/vs/workbench/contrib/files/browser/media/CollapseAll_inverse.svg diff --git a/src/vs/workbench/contrib/files/browser/media/CollapseAll.svg b/src/vs/workbench/contrib/files/browser/media/CollapseAll.svg deleted file mode 100644 index 7d11a30f6e0..00000000000 --- a/src/vs/workbench/contrib/files/browser/media/CollapseAll.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/contrib/files/browser/media/CollapseAll_inverse.svg b/src/vs/workbench/contrib/files/browser/media/CollapseAll_inverse.svg deleted file mode 100644 index 46a65fff71a..00000000000 --- a/src/vs/workbench/contrib/files/browser/media/CollapseAll_inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 618da5875289281ea2b243c17d6d51e8fe532335 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 12:00:37 -0700 Subject: [PATCH 232/710] Use map instead of object literals in mainThreadTerminalService Replaces a few uses of object literals with regular maps, which better enforce type correctness --- .../api/browser/mainThreadTerminalService.ts | 62 +++++++++++-------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadTerminalService.ts b/src/vs/workbench/api/browser/mainThreadTerminalService.ts index bc8349ab47c..ab865cc5224 100644 --- a/src/vs/workbench/api/browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/browser/mainThreadTerminalService.ts @@ -18,10 +18,10 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape private _proxy: ExtHostTerminalServiceShape; private _remoteAuthority: string | null; private readonly _toDispose = new DisposableStore(); - private _terminalProcesses: { [id: number]: Promise } = {}; - private _terminalProcessesReady: { [id: number]: (proxy: ITerminalProcessExtHostProxy) => void } = {}; - private _terminalOnDidWriteDataListeners: { [id: number]: IDisposable } = {}; - private _terminalOnDidAcceptInputListeners: { [id: number]: IDisposable } = {}; + private readonly _terminalProcesses = new Map>(); + private readonly _terminalProcessesReady = new Map void>(); + private readonly _terminalOnDidWriteDataListeners = new Map(); + private readonly _terminalOnDidAcceptInputListeners = new Map(); constructor( extHostContext: IExtHostContext, @@ -93,7 +93,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape isVirtualProcess: launchConfig.isVirtualProcess }; const terminal = this._terminalService.createTerminal(shellLaunchConfig); - this._terminalProcesses[terminal.id] = new Promise(r => this._terminalProcessesReady[terminal.id] = r); + this._terminalProcesses.set(terminal.id, new Promise(r => this._terminalProcessesReady.set(terminal.id, r))); return Promise.resolve({ id: terminal.id, name: terminal.title @@ -155,13 +155,14 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape } // Listener already registered - if (this._terminalOnDidAcceptInputListeners.hasOwnProperty(terminalId)) { + if (this._terminalOnDidAcceptInputListeners.has(terminalId)) { return; } // Register - this._terminalOnDidAcceptInputListeners[terminalId] = terminalInstance.onRendererInput(data => this._onTerminalRendererInput(terminalId, data)); - terminalInstance.addDisposable(this._terminalOnDidAcceptInputListeners[terminalId]); + const listener = terminalInstance.onRendererInput(data => this._onTerminalRendererInput(terminalId, data)); + this._terminalOnDidAcceptInputListeners.set(terminalId, listener); + terminalInstance.addDisposable(listener); } public $sendText(terminalId: number, text: string, addNewLine: boolean): void { @@ -178,15 +179,16 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape } // Listener already registered - if (this._terminalOnDidWriteDataListeners[terminalId]) { + if (this._terminalOnDidWriteDataListeners.has(terminalId)) { return; } // Register - this._terminalOnDidWriteDataListeners[terminalId] = terminalInstance.onData(data => { + const listener = terminalInstance.onData(data => { this._onTerminalData(terminalId, data); }); - terminalInstance.addDisposable(this._terminalOnDidWriteDataListeners[terminalId]); + this._terminalOnDidWriteDataListeners.set(terminalId, listener); + terminalInstance.addDisposable(listener); } private _onActiveTerminalChanged(terminalId: number | null): void { @@ -245,12 +247,12 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape } const proxy = request.proxy; - const ready = this._terminalProcessesReady[proxy.terminalId]; + const ready = this._terminalProcessesReady.get(proxy.terminalId); if (ready) { ready(proxy); - delete this._terminalProcessesReady[proxy.terminalId]; + this._terminalProcessesReady.delete(proxy.terminalId); } else { - this._terminalProcesses[proxy.terminalId] = Promise.resolve(proxy); + this._terminalProcesses.set(proxy.terminalId, Promise.resolve(proxy)); } const shellLaunchConfigDto: ShellLaunchConfigDto = { name: request.shellLaunchConfig.name, @@ -270,12 +272,12 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape private _onTerminalRequestVirtualProcess(request: ITerminalVirtualProcessRequest): void { const proxy = request.proxy; - const ready = this._terminalProcessesReady[proxy.terminalId]; + const ready = this._terminalProcessesReady.get(proxy.terminalId); if (!ready) { - this._terminalProcesses[proxy.terminalId] = Promise.resolve(proxy); + this._terminalProcesses.set(proxy.terminalId, Promise.resolve(proxy)); } else { ready(proxy); - delete this._terminalProcessesReady[proxy.terminalId]; + this._terminalProcessesReady.delete(proxy.terminalId); } // Note that onReisze is not being listened to here as it needs to fire when max dimensions @@ -293,32 +295,32 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape } public $sendProcessTitle(terminalId: number, title: string): void { - this._terminalProcesses[terminalId].then(e => e.emitTitle(title)); + this._getTerminalProcess(terminalId).then(e => e.emitTitle(title)); } public $sendProcessData(terminalId: number, data: string): void { - this._terminalProcesses[terminalId].then(e => e.emitData(data)); + this._getTerminalProcess(terminalId).then(e => e.emitData(data)); } public $sendProcessReady(terminalId: number, pid: number, cwd: string): void { - this._terminalProcesses[terminalId].then(e => e.emitReady(pid, cwd)); + this._getTerminalProcess(terminalId).then(e => e.emitReady(pid, cwd)); } public $sendProcessExit(terminalId: number, exitCode: number): void { - this._terminalProcesses[terminalId].then(e => e.emitExit(exitCode)); - delete this._terminalProcesses[terminalId]; + this._getTerminalProcess(terminalId).then(e => e.emitExit(exitCode)); + this._terminalProcesses.delete(terminalId); } public $sendOverrideDimensions(terminalId: number, dimensions: ITerminalDimensions | undefined): void { - this._terminalProcesses[terminalId].then(e => e.emitOverrideDimensions(dimensions)); + this._getTerminalProcess(terminalId).then(e => e.emitOverrideDimensions(dimensions)); } public $sendProcessInitialCwd(terminalId: number, initialCwd: string): void { - this._terminalProcesses[terminalId].then(e => e.emitInitialCwd(initialCwd)); + this._getTerminalProcess(terminalId).then(e => e.emitInitialCwd(initialCwd)); } public $sendProcessCwd(terminalId: number, cwd: string): void { - this._terminalProcesses[terminalId].then(e => e.emitCwd(cwd)); + this._getTerminalProcess(terminalId).then(e => e.emitCwd(cwd)); } private async _onRequestLatency(terminalId: number): Promise { @@ -330,7 +332,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape sw.stop(); sum += sw.elapsed(); } - this._terminalProcesses[terminalId].then(e => e.emitLatency(sum / COUNT)); + this._getTerminalProcess(terminalId).then(e => e.emitLatency(sum / COUNT)); } private _isPrimaryExtHost(): boolean { @@ -353,4 +355,12 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape this._proxy.$requestDefaultShellAndArgs().then(e => request(e.shell, e.args)); } } + + private _getTerminalProcess(terminalId: number): Promise { + const terminal = this._terminalProcesses.get(terminalId); + if (!terminal) { + throw new Error(`Unknown terminal: ${terminalId}`); + } + return terminal; + } } From 7db5f72fff7c783f3607ed5da2826c38e23eb3cc Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Mon, 15 Jul 2019 12:47:31 -0700 Subject: [PATCH 233/710] Update keyboard icon --- .../browser/iPadShowKeyboard/iPadShowKeyboard.css | 4 ++-- .../browser/iPadShowKeyboard/keyboard-dark.svg | 10 ++++++++++ .../browser/iPadShowKeyboard/keyboard-inverse.svg | 1 - .../browser/iPadShowKeyboard/keyboard-light.svg | 10 ++++++++++ .../standalone/browser/iPadShowKeyboard/keyboard.svg | 1 - 5 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-dark.svg delete mode 100644 src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-inverse.svg create mode 100644 src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-light.svg delete mode 100644 src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard.svg diff --git a/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css b/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css index 34cb14546d3..7579f789060 100644 --- a/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css +++ b/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css @@ -13,12 +13,12 @@ position: absolute; resize: none; overflow: hidden; - background: url('keyboard.svg') center center no-repeat; + background: url('keyboard-light.svg') center center no-repeat; border: 4px solid #F6F6F6; border-radius: 4px; } .monaco-editor.vs-dark .iPadShowKeyboard { - background: url('keyboard-inverse.svg') center center no-repeat; + background: url('keyboard-dark.svg') center center no-repeat; border: 4px solid #252526; } \ No newline at end of file diff --git a/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-dark.svg b/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-dark.svg new file mode 100644 index 00000000000..308c5331695 --- /dev/null +++ b/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-dark.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-inverse.svg b/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-inverse.svg deleted file mode 100644 index 40bfc47424e..00000000000 --- a/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-light.svg b/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-light.svg new file mode 100644 index 00000000000..152bf777f62 --- /dev/null +++ b/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-light.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard.svg b/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard.svg deleted file mode 100644 index bd13224272a..00000000000 --- a/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From fdf1a1aa5605687badd6ddb97571ccb0c65500ff Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 Jul 2019 18:16:55 +0200 Subject: [PATCH 234/710] wip --- src/vs/base/browser/ui/grid/grid.ts | 14 +- src/vs/base/browser/ui/grid/gridview.ts | 45 +++++- src/vs/base/browser/ui/splitview/splitview.ts | 116 ++++++++++----- .../browser/parts/panel/panelPart.ts | 1 - .../browser/parts/sidebar/sidebarPart.ts | 1 - test/splitview/public/index.html | 132 +++++++++++++----- 6 files changed, 229 insertions(+), 80 deletions(-) diff --git a/src/vs/base/browser/ui/grid/grid.ts b/src/vs/base/browser/ui/grid/grid.ts index 8297b231ced..602d60e844c 100644 --- a/src/vs/base/browser/ui/grid/grid.ts +++ b/src/vs/base/browser/ui/grid/grid.ts @@ -12,7 +12,7 @@ import { Event, Emitter } from 'vs/base/common/event'; import { $ } from 'vs/base/browser/dom'; import { LayoutPriority } from 'vs/base/browser/ui/splitview/splitview'; -export { Orientation } from './gridview'; +export { Orientation, Sizing as GridViewSizing } from './gridview'; export const enum Direction { Up, @@ -317,6 +317,16 @@ export class Grid extends Disposable { this.gridview.distributeViewSizes(); } + isViewVisible(view: T): boolean { + const location = this.getViewLocation(view); + return this.gridview.isViewVisible(location); + } + + setViewVisible(view: T, visible: boolean): void { + const location = this.getViewLocation(view); + this.gridview.setViewVisible(location, visible); + } + getViews(): GridBranchNode { return this.gridview.getViews() as GridBranchNode; } @@ -653,7 +663,7 @@ export class View implements IView { readonly onDidChange: Event<{ width: number; height: number; } | undefined>; get priority(): LayoutPriority | undefined { return this.view.priority; } - get snapSize(): number | undefined { return this.visible ? this.view.snapSize : undefined; } + get snap(): boolean | undefined { return this.view.snap; } constructor(private view: IView) { this.show(); diff --git a/src/vs/base/browser/ui/grid/gridview.ts b/src/vs/base/browser/ui/grid/gridview.ts index 8b1a39d02d9..de91f923dc7 100644 --- a/src/vs/base/browser/ui/grid/gridview.ts +++ b/src/vs/base/browser/ui/grid/gridview.ts @@ -28,8 +28,9 @@ export interface IView { readonly maximumHeight: number; readonly onDidChange: Event; readonly priority?: LayoutPriority; - readonly snapSize?: number; + readonly snap?: boolean; layout(width: number, height: number, orientation: Orientation): void; + setVisible?(visible: boolean): void; } export function orthogonal(orientation: Orientation): Orientation { @@ -304,6 +305,22 @@ class BranchNode implements ISplitView, IDisposable { return this.splitview.getViewSize(index); } + isChildVisible(index: number): boolean { + if (index < 0 || index >= this.children.length) { + throw new Error('Invalid index'); + } + + return this.splitview.isViewVisible(index); + } + + setChildVisible(index: number, visible: boolean): void { + if (index < 0 || index >= this.children.length) { + throw new Error('Invalid index'); + } + + this.splitview.setViewVisible(index, visible); + } + private onDidChildrenChange(): void { const onDidChildrenChange = Event.map(Event.any(...this.children.map(c => c.onDidChange)), () => undefined); this.childrenChangeDisposable.dispose(); @@ -463,8 +480,8 @@ class LeafNode implements ISplitView, IDisposable { return this.view.priority; } - get snapSize(): number | undefined { - return this.view.snapSize; + get snap(): boolean | undefined { + return this.view.snap; } get minimumOrthogonalSize(): number { @@ -810,6 +827,28 @@ export class GridView implements IDisposable { node.distributeViewSizes(); } + isViewVisible(location: number[]): boolean { + const [rest, index] = tail(location); + const [, parent] = this.getNode(rest); + + if (!(parent instanceof BranchNode)) { + throw new Error('Invalid from location'); + } + + return parent.isChildVisible(index); + } + + setViewVisible(location: number[], visible: boolean): void { + const [rest, index] = tail(location); + const [, parent] = this.getNode(rest); + + if (!(parent instanceof BranchNode)) { + throw new Error('Invalid from location'); + } + + parent.setChildVisible(index, visible); + } + getViews(): GridBranchNode { return this._getViews(this.root, this.orientation, { top: 0, left: 0, width: this.width, height: this.height }) as GridBranchNode; } diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 278366152b4..979d0d9694b 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -97,8 +97,10 @@ abstract class ViewItem { get minimumSize(): number { return this.visible ? this.view.minimumSize : 0; } get viewMinimumSize(): number { return this.view.minimumSize; } + get maximumSize(): number { return this.visible ? this.view.maximumSize : 0; } get viewMaximumSize(): number { return this.view.maximumSize; } + get priority(): LayoutPriority | undefined { return this.view.priority; } get snap(): boolean { return !!this.view.snap; } @@ -139,6 +141,11 @@ interface ISashItem { disposable: IDisposable; } +interface ISashDragSnapState { + readonly index: number; + readonly limitDelta: number; +} + interface ISashDragState { index: number; start: number; @@ -147,8 +154,8 @@ interface ISashDragState { minDelta: number; maxDelta: number; alt: boolean; - snapIndex: number | undefined; - snapLimitDelta: number | undefined; + snapBefore: ISashDragSnapState | undefined; + snapAfter: ISashDragSnapState | undefined; disposable: IDisposable; } @@ -486,55 +493,78 @@ export class SplitView extends Disposable { } } - let snapIndex: number | undefined; - let snapLimitDelta: number | undefined; + let snapBefore: ISashDragSnapState | undefined; + let snapAfter: ISashDragSnapState | undefined; if (!alt) { const upIndexes = range(index, -1); const downIndexes = range(index + 1, this.viewItems.length); const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].minimumSize - sizes[i]), 0); - const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].maximumSize - sizes[i]), 0); + const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].viewMaximumSize - sizes[i]), 0); const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].minimumSize), 0); - const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].maximumSize), 0); + const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].viewMaximumSize), 0); const minDelta = Math.max(minDeltaUp, minDeltaDown); const maxDelta = Math.min(maxDeltaDown, maxDeltaUp); - const snapBefore = this.viewItems[index].snap; - const snapAfter = this.viewItems[index + 1].snap; + const findSnapIndex = (indexes: number[]): number | undefined => { + // visible views first + for (const index of indexes) { + if (!this.viewItems[index].visible) { + continue; + } - if (snapBefore && snapAfter) { - snapIndex = index + 1 < (this.viewItems.length - index - 1) ? index : index + 1; - } else if (snapBefore) { - snapIndex = index; - } else if (snapAfter) { - snapIndex = index + 1; + if (this.viewItems[index].snap) { + return index; + } + } + + // then, hidden views + for (const index of indexes) { + if (!this.viewItems[index].visible && this.viewItems[index].snap) { + return index; + } + } + + return undefined; + }; + + const snapBeforeIndex = findSnapIndex(upIndexes); + + if (typeof snapBeforeIndex === 'number') { + const viewItem = this.viewItems[snapBeforeIndex]; + const halfSize = Math.floor(viewItem.viewMinimumSize / 2); + + snapBefore = { + index: snapBeforeIndex, + limitDelta: viewItem.visible ? minDelta - halfSize : minDelta + halfSize + }; } - if (typeof snapIndex === 'number') { - if (this.viewItems[snapIndex].visible) { - snapLimitDelta = snapIndex === index - ? minDelta - (this.viewItems[index].viewMinimumSize / 2) - : maxDelta + (this.viewItems[index + 1].viewMinimumSize / 2); - } else { - snapLimitDelta = snapIndex === index - ? minDelta + (this.viewItems[index].viewMinimumSize / 2) - : maxDelta - (this.viewItems[index + 1].viewMinimumSize / 2); - } + const snapAfterIndex = findSnapIndex(downIndexes); + + if (typeof snapAfterIndex === 'number') { + const viewItem = this.viewItems[snapAfterIndex]; + const halfSize = Math.floor(viewItem.viewMinimumSize / 2); + + snapAfter = { + index: snapAfterIndex, + limitDelta: viewItem.visible ? maxDelta + halfSize : maxDelta - halfSize + }; } } - this.sashDragState = { start, current: start, index, sizes, minDelta, maxDelta, alt, snapIndex, snapLimitDelta, disposable }; + this.sashDragState = { start, current: start, index, sizes, minDelta, maxDelta, alt, snapBefore, snapAfter, disposable }; }; resetSashDragState(start, alt); } private onSashChange({ current }: ISashEvent): void { - const { index, start, sizes, alt, minDelta, maxDelta, snapIndex, snapLimitDelta } = this.sashDragState; + const { index, start, sizes, alt, minDelta, maxDelta, snapBefore, snapAfter } = this.sashDragState; this.sashDragState.current = current; const delta = current - start; - const newDelta = this.resize(index, delta, sizes, undefined, undefined, minDelta, maxDelta, snapIndex, snapLimitDelta); + const newDelta = this.resize(index, delta, sizes, undefined, undefined, minDelta, maxDelta, snapBefore, snapAfter); if (alt) { const isLastSash = index === this.sashItems.length - 1; @@ -645,8 +675,8 @@ export class SplitView extends Disposable { highPriorityIndexes?: number[], overloadMinDelta: number = Number.NEGATIVE_INFINITY, overloadMaxDelta: number = Number.POSITIVE_INFINITY, - snapIndex?: number, - snapLimitDelta?: number + snapBefore?: ISashDragSnapState, + snapAfter?: ISashDragSnapState ): number { if (index < 0 || index >= this.viewItems.length) { return 0; @@ -682,13 +712,23 @@ export class SplitView extends Disposable { const minDelta = Math.max(minDeltaUp, minDeltaDown, overloadMinDelta); const maxDelta = Math.min(maxDeltaDown, maxDeltaUp, overloadMaxDelta); - if (typeof snapIndex === 'number' && typeof snapLimitDelta === 'number') { - const snapView = this.viewItems[snapIndex]; + let snapped = false; - snapView.visible = snapIndex === index - ? delta >= snapLimitDelta // up - : delta < snapLimitDelta; // down + if (snapBefore) { + const snapView = this.viewItems[snapBefore.index]; + const visible = delta >= snapBefore.limitDelta; + snapped = visible !== snapView.visible; + snapView.visible = visible; + } + if (!snapped && snapAfter) { + const snapView = this.viewItems[snapAfter.index]; + const visible = delta < snapAfter.limitDelta; + snapped = visible !== snapView.visible; + snapView.visible = visible; + } + + if (snapped) { return this.resize(index, delta, sizes, lowPriorityIndexes, highPriorityIndexes, overloadMinDelta, overloadMaxDelta); } @@ -759,9 +799,15 @@ export class SplitView extends Disposable { previous = false; const expandsUp = reverseViews.map(i => previous = (i.maximumSize - i.size > 0) || previous).reverse(); + const firstVisibleViewIndex = firstIndex(this.viewItems, viewItem => viewItem.visible); + this.sashItems.forEach((s, i) => { if (!this.viewItems[i].visible) { - s.sash.state = SashState.Disabled; + if (i === firstVisibleViewIndex - 1) { + s.sash.state = SashState.Minimum; + } else { + s.sash.state = SashState.Disabled; + } } else { const min = !(collapsesDown[i] && expandsUp[i + 1]); const max = !(expandsDown[i] && collapsesUp[i + 1]); diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 506e6f876d7..d20c01e6620 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -58,7 +58,6 @@ export class PanelPart extends CompositePart implements IPanelService { readonly minimumHeight: number = 77; readonly maximumHeight: number = Number.POSITIVE_INFINITY; - readonly snapSize: number = 50; readonly priority: LayoutPriority = LayoutPriority.Low; //#endregion diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index e8bc995e65a..ef0d2b4890f 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -46,7 +46,6 @@ export class SidebarPart extends CompositePart implements IViewletServi readonly minimumHeight: number = 0; readonly maximumHeight: number = Number.POSITIVE_INFINITY; - readonly snapSize: number = 50; readonly priority: LayoutPriority = LayoutPriority.Low; //#endregion diff --git a/test/splitview/public/index.html b/test/splitview/public/index.html index 73ced374c02..81bec11778f 100644 --- a/test/splitview/public/index.html +++ b/test/splitview/public/index.html @@ -5,7 +5,7 @@ Splitview @@ -31,51 +31,107 @@ From c836dfa08083858eb42eedd9e5a84827ceaf74a1 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 Jul 2019 20:44:40 +0200 Subject: [PATCH 235/710] grid: propagate setVisible --- src/vs/base/browser/ui/grid/gridview.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/vs/base/browser/ui/grid/gridview.ts b/src/vs/base/browser/ui/grid/gridview.ts index de91f923dc7..bb1d17a1687 100644 --- a/src/vs/base/browser/ui/grid/gridview.ts +++ b/src/vs/base/browser/ui/grid/gridview.ts @@ -179,6 +179,12 @@ class BranchNode implements ISplitView, IDisposable { } } + setVisible(visible: boolean): void { + for (const child of this.children) { + child.setVisible(visible); + } + } + orthogonalLayout(size: number): void { this._size = size; this.splitview.layout(size); @@ -505,6 +511,12 @@ class LeafNode implements ISplitView, IDisposable { return this.view.layout(this.width, this.height, orthogonal(this.orientation)); } + setVisible(visible: boolean): void { + if (this.view.setVisible) { + this.view.setVisible(visible); + } + } + orthogonalLayout(size: number): void { this._orthogonalSize = size; return this.view.layout(this.width, this.height, orthogonal(this.orientation)); From cfdc5898cb8f8db9f9b8cdd90d334ea6ba93fba9 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 Jul 2019 21:45:22 +0200 Subject: [PATCH 236/710] splitview: fix snap enablement --- src/vs/base/browser/ui/splitview/splitview.ts | 97 +++++++++---------- test/splitview/public/index.html | 2 +- 2 files changed, 45 insertions(+), 54 deletions(-) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 979d0d9694b..9584ce7d4ae 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -505,30 +505,8 @@ export class SplitView extends Disposable { const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].viewMaximumSize), 0); const minDelta = Math.max(minDeltaUp, minDeltaDown); const maxDelta = Math.min(maxDeltaDown, maxDeltaUp); - - const findSnapIndex = (indexes: number[]): number | undefined => { - // visible views first - for (const index of indexes) { - if (!this.viewItems[index].visible) { - continue; - } - - if (this.viewItems[index].snap) { - return index; - } - } - - // then, hidden views - for (const index of indexes) { - if (!this.viewItems[index].visible && this.viewItems[index].snap) { - return index; - } - } - - return undefined; - }; - - const snapBeforeIndex = findSnapIndex(upIndexes); + const snapBeforeIndex = this.findFirstSnapIndex(upIndexes); + const snapAfterIndex = this.findFirstSnapIndex(downIndexes); if (typeof snapBeforeIndex === 'number') { const viewItem = this.viewItems[snapBeforeIndex]; @@ -540,8 +518,6 @@ export class SplitView extends Disposable { }; } - const snapAfterIndex = findSnapIndex(downIndexes); - if (typeof snapAfterIndex === 'number') { const viewItem = this.viewItems[snapAfterIndex]; const halfSize = Math.floor(viewItem.viewMinimumSize / 2); @@ -799,38 +775,31 @@ export class SplitView extends Disposable { previous = false; const expandsUp = reverseViews.map(i => previous = (i.maximumSize - i.size > 0) || previous).reverse(); - const firstVisibleViewIndex = firstIndex(this.viewItems, viewItem => viewItem.visible); + this.sashItems.forEach(({ sash }, index) => { + const min = !(collapsesDown[index] && expandsUp[index + 1]); + const max = !(expandsDown[index] && collapsesUp[index + 1]); - this.sashItems.forEach((s, i) => { - if (!this.viewItems[i].visible) { - if (i === firstVisibleViewIndex - 1) { - s.sash.state = SashState.Minimum; + if (min && max) { + const upIndexes = range(index, -1); + const downIndexes = range(index + 1, this.viewItems.length); + const snapBeforeIndex = this.findFirstSnapIndex(upIndexes); + const snapAfterIndex = this.findFirstSnapIndex(downIndexes); + + if (typeof snapBeforeIndex === 'number' && !this.viewItems[snapBeforeIndex].visible) { + sash.state = SashState.Minimum; + } else if (typeof snapAfterIndex === 'number' && !this.viewItems[snapAfterIndex].visible) { + sash.state = SashState.Maximum; } else { - s.sash.state = SashState.Disabled; + sash.state = SashState.Disabled; } + } else if (min && !max) { + sash.state = SashState.Minimum; + } else if (!min && max) { + sash.state = SashState.Maximum; } else { - const min = !(collapsesDown[i] && expandsUp[i + 1]); - const max = !(expandsDown[i] && collapsesUp[i + 1]); - - if (min && max) { - const before = !range(0, i + 1).some(i => !this.viewItems[i].snap || this.viewItems[i].visible); - const after = !range(i + 1, this.viewItems.length).some(i => !this.viewItems[i].snap || this.viewItems[i].visible); - - if (before) { - s.sash.state = SashState.Minimum; - } else if (after) { - s.sash.state = SashState.Maximum; - } else { - s.sash.state = SashState.Disabled; - } - } else if (min && !max) { - s.sash.state = SashState.Minimum; - } else if (!min && max) { - s.sash.state = SashState.Maximum; - } else { - s.sash.state = SashState.Enabled; - } + sash.state = SashState.Enabled; } + // } }); } @@ -848,6 +817,28 @@ export class SplitView extends Disposable { return 0; } + private findFirstSnapIndex(indexes: number[]): number | undefined { + // visible views first + for (const index of indexes) { + if (!this.viewItems[index].visible) { + continue; + } + + if (this.viewItems[index].snap) { + return index; + } + } + + // then, hidden views + for (const index of indexes) { + if (!this.viewItems[index].visible && this.viewItems[index].snap) { + return index; + } + } + + return undefined; + } + dispose(): void { super.dispose(); diff --git a/test/splitview/public/index.html b/test/splitview/public/index.html index 81bec11778f..602682d6aab 100644 --- a/test/splitview/public/index.html +++ b/test/splitview/public/index.html @@ -103,7 +103,7 @@ this.minimumSize = typeof minimumSize === 'number' ? minimumSize : 100; this.maximumSize = typeof maximumSize === 'number' ? maximumSize : Number.POSITIVE_INFINITY; this.onDidChange = Event.None; - this.snap = true; + this.snap = !minimumSize && !maximumSize; this.button = document.createElement('button'); this.button.onclick = () => splitview.setViewVisible(this.id, !splitview.isViewVisible(this.id)); From ca76092b18904e04d75021b91ea94436dfaa286b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 Jul 2019 22:02:38 +0200 Subject: [PATCH 237/710] delete Grid.View --- src/vs/base/browser/ui/grid/grid.ts | 66 +------------------ src/vs/workbench/browser/layout.ts | 55 ++++++++-------- .../browser/parts/panel/panelPart.ts | 1 + .../browser/parts/sidebar/sidebarPart.ts | 1 + 4 files changed, 32 insertions(+), 91 deletions(-) diff --git a/src/vs/base/browser/ui/grid/grid.ts b/src/vs/base/browser/ui/grid/grid.ts index 602d60e844c..3a22b6b825f 100644 --- a/src/vs/base/browser/ui/grid/grid.ts +++ b/src/vs/base/browser/ui/grid/grid.ts @@ -8,9 +8,7 @@ import { Orientation } from 'vs/base/browser/ui/sash/sash'; import { Disposable } from 'vs/base/common/lifecycle'; import { tail2 as tail, equals } from 'vs/base/common/arrays'; import { orthogonal, IView, GridView, Sizing as GridViewSizing, Box, IGridViewStyles, IViewSize } from './gridview'; -import { Event, Emitter } from 'vs/base/common/event'; -import { $ } from 'vs/base/browser/dom'; -import { LayoutPriority } from 'vs/base/browser/ui/splitview/splitview'; +import { Event } from 'vs/base/common/event'; export { Orientation, Sizing as GridViewSizing } from './gridview'; @@ -187,7 +185,7 @@ export interface IGridOptions { proportionalLayout?: boolean; } -export class Grid extends Disposable { +export class Grid extends Disposable { protected gridview: GridView; private views = new Map(); @@ -644,63 +642,3 @@ export function createSerializedGrid(gridDescriptor: GridDescriptor): ISerialize height: height || 1 }; } - -export class View implements IView { - - readonly element = $('.grid-view-view'); - - private visible = false; - private width: number | undefined; - private height: number | undefined; - private orientation: Orientation = Orientation.HORIZONTAL; - - get minimumWidth(): number { return this.visible ? this.view.minimumWidth : 0; } - get maximumWidth(): number { return this.visible ? this.view.maximumWidth : (this.orientation === Orientation.HORIZONTAL ? 0 : Number.POSITIVE_INFINITY); } - get minimumHeight(): number { return this.visible ? this.view.minimumHeight : 0; } - get maximumHeight(): number { return this.visible ? this.view.maximumHeight : (this.orientation === Orientation.VERTICAL ? 0 : Number.POSITIVE_INFINITY); } - - private onDidChangeVisibility = new Emitter<{ width: number; height: number; } | undefined>(); - readonly onDidChange: Event<{ width: number; height: number; } | undefined>; - - get priority(): LayoutPriority | undefined { return this.view.priority; } - get snap(): boolean | undefined { return this.view.snap; } - - constructor(private view: IView) { - this.show(); - this.onDidChange = Event.any(this.onDidChangeVisibility.event, Event.filter(view.onDidChange, () => this.visible)); - } - - show(): void { - if (this.visible) { - return; - } - - this.visible = true; - - this.element.appendChild(this.view.element); - this.onDidChangeVisibility.fire(typeof this.width === 'number' ? { width: this.width, height: this.height! } : undefined); - } - - hide(): void { - if (!this.visible) { - return; - } - - this.visible = false; - - this.element.removeChild(this.view.element); - this.onDidChangeVisibility.fire(undefined); - } - - layout(width: number, height: number, orientation: Orientation): void { - this.orientation = orientation; - - if (!this.visible) { - return; - } - - this.view.layout(width, height, orientation); - this.width = width; - this.height = height; - } -} \ No newline at end of file diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index c6c65edb28a..b478adbb976 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -27,13 +27,14 @@ import { IWindowService, MenuBarVisibility, getTitleBarStyle } from 'vs/platform import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; -import { Sizing, Direction, Grid, View } from 'vs/base/browser/ui/grid/grid'; +import { Sizing, Direction, Grid } from 'vs/base/browser/ui/grid/grid'; import { WorkbenchLegacyLayout } from 'vs/workbench/browser/legacyLayout'; import { IDimension } from 'vs/platform/layout/browser/layoutService'; import { Part } from 'vs/workbench/browser/part'; import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar'; import { IActivityBarService } from 'vs/workbench/services/activityBar/browser/activityBarService'; import { IFileService } from 'vs/platform/files/common/files'; +import { IView } from 'vs/base/browser/ui/grid/gridview'; enum Settings { MENUBAR_VISIBLE = 'window.menuBarVisibility', @@ -87,16 +88,16 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi private parts: Map = new Map(); - private workbenchGrid: Grid | WorkbenchLegacyLayout; + private workbenchGrid: Grid | WorkbenchLegacyLayout; private disposed: boolean; - private titleBarPartView: View; - private activityBarPartView: View; - private sideBarPartView: View; - private panelPartView: View; - private editorPartView: View; - private statusBarPartView: View; + private titleBarPartView: IView; + private activityBarPartView: IView; + private sideBarPartView: IView; + private panelPartView: IView; + private editorPartView: IView; + private statusBarPartView: IView; private environmentService: IWorkbenchEnvironmentService; private configurationService: IConfigurationService; @@ -701,12 +702,12 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi if (this.configurationService.getValue('workbench.useExperimentalGridLayout')) { // Create view wrappers for all parts - this.titleBarPartView = new View(titleBar); - this.sideBarPartView = new View(sideBar); - this.activityBarPartView = new View(activityBar); - this.editorPartView = new View(editorPart); - this.panelPartView = new View(panelPart); - this.statusBarPartView = new View(statusBar); + this.titleBarPartView = titleBar; + this.sideBarPartView = sideBar; + this.activityBarPartView = activityBar; + this.editorPartView = editorPart; + this.panelPartView = panelPart; + this.statusBarPartView = statusBar; this.workbenchGrid = new Grid(this.editorPartView, { proportionalLayout: false }); @@ -789,52 +790,52 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi // Hide parts if (this.state.panel.hidden) { - this.panelPartView.hide(); + this.workbenchGrid.setViewVisible(this.panelPartView, false); } if (this.state.statusBar.hidden) { - this.statusBarPartView.hide(); + this.workbenchGrid.setViewVisible(this.statusBarPartView, false); } - if (!this.isVisible(Parts.TITLEBAR_PART)) { - this.titleBarPartView.hide(); + if (titlebarInGrid && !this.isVisible(Parts.TITLEBAR_PART)) { + this.workbenchGrid.setViewVisible(this.titleBarPartView, false); } if (this.state.activityBar.hidden) { - this.activityBarPartView.hide(); + this.workbenchGrid.setViewVisible(this.activityBarPartView, false); } if (this.state.sideBar.hidden) { - this.sideBarPartView.hide(); + this.workbenchGrid.setViewVisible(this.sideBarPartView, false); } if (this.state.editor.hidden) { - this.editorPartView.hide(); + this.workbenchGrid.setViewVisible(this.editorPartView, false); } // Show visible parts if (!this.state.editor.hidden) { - this.editorPartView.show(); + this.workbenchGrid.setViewVisible(this.editorPartView, true); } if (!this.state.statusBar.hidden) { - this.statusBarPartView.show(); + this.workbenchGrid.setViewVisible(this.statusBarPartView, true); } if (this.isVisible(Parts.TITLEBAR_PART)) { - this.titleBarPartView.show(); + this.workbenchGrid.setViewVisible(this.titleBarPartView, true); } if (!this.state.activityBar.hidden) { - this.activityBarPartView.show(); + this.workbenchGrid.setViewVisible(this.activityBarPartView, true); } if (!this.state.sideBar.hidden) { - this.sideBarPartView.show(); + this.workbenchGrid.setViewVisible(this.sideBarPartView, true); } if (!this.state.panel.hidden) { - this.panelPartView.show(); + this.workbenchGrid.setViewVisible(this.panelPartView, true); } } diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index d20c01e6620..c073de7d9b3 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -59,6 +59,7 @@ export class PanelPart extends CompositePart implements IPanelService { readonly maximumHeight: number = Number.POSITIVE_INFINITY; readonly priority: LayoutPriority = LayoutPriority.Low; + readonly snap = true; //#endregion diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index ef0d2b4890f..ed6463b04ba 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -47,6 +47,7 @@ export class SidebarPart extends CompositePart implements IViewletServi readonly maximumHeight: number = Number.POSITIVE_INFINITY; readonly priority: LayoutPriority = LayoutPriority.Low; + readonly snap = true; //#endregion From 4ca45c209b5667e3c74f5c9a0d1d2204dc8703d5 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 Jul 2019 22:03:00 +0200 Subject: [PATCH 238/710] cleanup layout priorites --- src/vs/workbench/browser/parts/panel/panelPart.ts | 2 -- src/vs/workbench/browser/parts/sidebar/sidebarPart.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index c073de7d9b3..6d67a653be8 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -32,7 +32,6 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { isUndefinedOrNull, withUndefinedAsNull, withNullAsUndefined } from 'vs/base/common/types'; import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; -import { LayoutPriority } from 'vs/base/browser/ui/grid/gridview'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; interface ICachedPanel { @@ -58,7 +57,6 @@ export class PanelPart extends CompositePart implements IPanelService { readonly minimumHeight: number = 77; readonly maximumHeight: number = Number.POSITIVE_INFINITY; - readonly priority: LayoutPriority = LayoutPriority.Low; readonly snap = true; //#endregion diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index ed6463b04ba..65f81f7be9b 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -30,7 +30,6 @@ import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { AnchorAlignment } from 'vs/base/browser/ui/contextview/contextview'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; -import { LayoutPriority } from 'vs/base/browser/ui/grid/gridview'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; export class SidebarPart extends CompositePart implements IViewletService { @@ -46,7 +45,6 @@ export class SidebarPart extends CompositePart implements IViewletServi readonly minimumHeight: number = 0; readonly maximumHeight: number = Number.POSITIVE_INFINITY; - readonly priority: LayoutPriority = LayoutPriority.Low; readonly snap = true; //#endregion From 923e40b1335a7edec876a10e6d5b8909fb0a9bad Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Mon, 15 Jul 2019 14:35:22 -0700 Subject: [PATCH 239/710] Update 'vs-minimal' file icon theme --- .../fileicons/images/Document_16x.svg | 1 - .../fileicons/images/Document_16x_inverse.svg | 1 - .../fileicons/images/FolderOpen_16x.svg | 1 - .../images/FolderOpen_16x_inverse.svg | 1 - .../fileicons/images/Folder_16x.svg | 1 - .../fileicons/images/Folder_16x_inverse.svg | 1 - .../fileicons/images/RootFolderOpen_16x.svg | 1 - .../images/RootFolderOpen_16x_inverse.svg | 1 - .../fileicons/images/RootFolder_16x.svg | 1 - .../images/RootFolder_16x_inverse.svg | 1 - .../fileicons/images/document-dark.svg | 3 +++ .../fileicons/images/document-light.svg | 3 +++ .../fileicons/images/folder-dark.svg | 3 +++ .../fileicons/images/folder-light.svg | 3 +++ .../fileicons/images/folder-open-dark.svg | 4 ++++ .../fileicons/images/folder-open-light.svg | 4 ++++ .../fileicons/images/root-folder-dark.svg | 5 +++++ .../fileicons/images/root-folder-light.svg | 5 +++++ .../images/root-folder-open-dark.svg | 5 +++++ .../images/root-folder-open-light.svg | 5 +++++ .../fileicons/vs_minimal-icon-theme.json | 20 +++++++++---------- 21 files changed, 50 insertions(+), 20 deletions(-) delete mode 100644 extensions/theme-defaults/fileicons/images/Document_16x.svg delete mode 100755 extensions/theme-defaults/fileicons/images/Document_16x_inverse.svg delete mode 100644 extensions/theme-defaults/fileicons/images/FolderOpen_16x.svg delete mode 100755 extensions/theme-defaults/fileicons/images/FolderOpen_16x_inverse.svg delete mode 100644 extensions/theme-defaults/fileicons/images/Folder_16x.svg delete mode 100755 extensions/theme-defaults/fileicons/images/Folder_16x_inverse.svg delete mode 100755 extensions/theme-defaults/fileicons/images/RootFolderOpen_16x.svg delete mode 100755 extensions/theme-defaults/fileicons/images/RootFolderOpen_16x_inverse.svg delete mode 100755 extensions/theme-defaults/fileicons/images/RootFolder_16x.svg delete mode 100755 extensions/theme-defaults/fileicons/images/RootFolder_16x_inverse.svg create mode 100644 extensions/theme-defaults/fileicons/images/document-dark.svg create mode 100644 extensions/theme-defaults/fileicons/images/document-light.svg create mode 100644 extensions/theme-defaults/fileicons/images/folder-dark.svg create mode 100644 extensions/theme-defaults/fileicons/images/folder-light.svg create mode 100644 extensions/theme-defaults/fileicons/images/folder-open-dark.svg create mode 100644 extensions/theme-defaults/fileicons/images/folder-open-light.svg create mode 100644 extensions/theme-defaults/fileicons/images/root-folder-dark.svg create mode 100644 extensions/theme-defaults/fileicons/images/root-folder-light.svg create mode 100644 extensions/theme-defaults/fileicons/images/root-folder-open-dark.svg create mode 100644 extensions/theme-defaults/fileicons/images/root-folder-open-light.svg diff --git a/extensions/theme-defaults/fileicons/images/Document_16x.svg b/extensions/theme-defaults/fileicons/images/Document_16x.svg deleted file mode 100644 index 46a9f38cc88..00000000000 --- a/extensions/theme-defaults/fileicons/images/Document_16x.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/theme-defaults/fileicons/images/Document_16x_inverse.svg b/extensions/theme-defaults/fileicons/images/Document_16x_inverse.svg deleted file mode 100755 index 14abfb51077..00000000000 --- a/extensions/theme-defaults/fileicons/images/Document_16x_inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ 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 deleted file mode 100644 index 1a3933d6351..00000000000 --- a/extensions/theme-defaults/fileicons/images/FolderOpen_16x.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/theme-defaults/fileicons/images/FolderOpen_16x_inverse.svg b/extensions/theme-defaults/fileicons/images/FolderOpen_16x_inverse.svg deleted file mode 100755 index fbf57c927f2..00000000000 --- a/extensions/theme-defaults/fileicons/images/FolderOpen_16x_inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ 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 deleted file mode 100644 index 3d64ae71db4..00000000000 --- a/extensions/theme-defaults/fileicons/images/Folder_16x.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/theme-defaults/fileicons/images/Folder_16x_inverse.svg b/extensions/theme-defaults/fileicons/images/Folder_16x_inverse.svg deleted file mode 100755 index 13b18d18016..00000000000 --- a/extensions/theme-defaults/fileicons/images/Folder_16x_inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/theme-defaults/fileicons/images/RootFolderOpen_16x.svg b/extensions/theme-defaults/fileicons/images/RootFolderOpen_16x.svg deleted file mode 100755 index 20460ec997b..00000000000 --- a/extensions/theme-defaults/fileicons/images/RootFolderOpen_16x.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/extensions/theme-defaults/fileicons/images/RootFolderOpen_16x_inverse.svg b/extensions/theme-defaults/fileicons/images/RootFolderOpen_16x_inverse.svg deleted file mode 100755 index d1a0fb04b70..00000000000 --- a/extensions/theme-defaults/fileicons/images/RootFolderOpen_16x_inverse.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/extensions/theme-defaults/fileicons/images/RootFolder_16x.svg b/extensions/theme-defaults/fileicons/images/RootFolder_16x.svg deleted file mode 100755 index 9a049f6237a..00000000000 --- a/extensions/theme-defaults/fileicons/images/RootFolder_16x.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/extensions/theme-defaults/fileicons/images/RootFolder_16x_inverse.svg b/extensions/theme-defaults/fileicons/images/RootFolder_16x_inverse.svg deleted file mode 100755 index 03721272942..00000000000 --- a/extensions/theme-defaults/fileicons/images/RootFolder_16x_inverse.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/extensions/theme-defaults/fileicons/images/document-dark.svg b/extensions/theme-defaults/fileicons/images/document-dark.svg new file mode 100644 index 00000000000..5ed5762a1f0 --- /dev/null +++ b/extensions/theme-defaults/fileicons/images/document-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/extensions/theme-defaults/fileicons/images/document-light.svg b/extensions/theme-defaults/fileicons/images/document-light.svg new file mode 100644 index 00000000000..ad54e13b1b1 --- /dev/null +++ b/extensions/theme-defaults/fileicons/images/document-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/extensions/theme-defaults/fileicons/images/folder-dark.svg b/extensions/theme-defaults/fileicons/images/folder-dark.svg new file mode 100644 index 00000000000..43d454e7e5a --- /dev/null +++ b/extensions/theme-defaults/fileicons/images/folder-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/extensions/theme-defaults/fileicons/images/folder-light.svg b/extensions/theme-defaults/fileicons/images/folder-light.svg new file mode 100644 index 00000000000..8daecdac6a3 --- /dev/null +++ b/extensions/theme-defaults/fileicons/images/folder-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/extensions/theme-defaults/fileicons/images/folder-open-dark.svg b/extensions/theme-defaults/fileicons/images/folder-open-dark.svg new file mode 100644 index 00000000000..6bc1c584e48 --- /dev/null +++ b/extensions/theme-defaults/fileicons/images/folder-open-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/extensions/theme-defaults/fileicons/images/folder-open-light.svg b/extensions/theme-defaults/fileicons/images/folder-open-light.svg new file mode 100644 index 00000000000..0a50339b6c8 --- /dev/null +++ b/extensions/theme-defaults/fileicons/images/folder-open-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/extensions/theme-defaults/fileicons/images/root-folder-dark.svg b/extensions/theme-defaults/fileicons/images/root-folder-dark.svg new file mode 100644 index 00000000000..cdb770c86a8 --- /dev/null +++ b/extensions/theme-defaults/fileicons/images/root-folder-dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/extensions/theme-defaults/fileicons/images/root-folder-light.svg b/extensions/theme-defaults/fileicons/images/root-folder-light.svg new file mode 100644 index 00000000000..82a0294696f --- /dev/null +++ b/extensions/theme-defaults/fileicons/images/root-folder-light.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/extensions/theme-defaults/fileicons/images/root-folder-open-dark.svg b/extensions/theme-defaults/fileicons/images/root-folder-open-dark.svg new file mode 100644 index 00000000000..472def3daa1 --- /dev/null +++ b/extensions/theme-defaults/fileicons/images/root-folder-open-dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/extensions/theme-defaults/fileicons/images/root-folder-open-light.svg b/extensions/theme-defaults/fileicons/images/root-folder-open-light.svg new file mode 100644 index 00000000000..d2363bfae35 --- /dev/null +++ b/extensions/theme-defaults/fileicons/images/root-folder-open-light.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json b/extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json index 9c9f60b6efc..7a178065380 100644 --- a/extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json +++ b/extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json @@ -1,34 +1,34 @@ { "iconDefinitions": { "_root_folder_dark": { - "iconPath": "./images/RootFolder_16x_inverse.svg" + "iconPath": "./images/root-folder-dark.svg" }, "_root_folder_open_dark": { - "iconPath": "./images/RootFolderOpen_16x_inverse.svg" + "iconPath": "./images/root-folder-open-dark.svg" }, "_folder_dark": { - "iconPath": "./images/Folder_16x_inverse.svg" + "iconPath": "./images/folder-dark.svg" }, "_folder_open_dark": { - "iconPath": "./images/FolderOpen_16x_inverse.svg" + "iconPath": "./images/folder-open-dark.svg" }, "_file_dark": { - "iconPath": "./images/Document_16x_inverse.svg" + "iconPath": "./images/document-dark.svg" }, "_root_folder": { - "iconPath": "./images/RootFolder_16x.svg" + "iconPath": "./images/root-folder-light.svg" }, "_root_folder_open": { - "iconPath": "./images/RootFolderOpen_16x.svg" + "iconPath": "./images/root-folder-open-light.svg" }, "_folder_light": { - "iconPath": "./images/Folder_16x.svg" + "iconPath": "./images/folder-light.svg" }, "_folder_open_light": { - "iconPath": "./images/FolderOpen_16x.svg" + "iconPath": "./images/folder-open-light.svg" }, "_file_light": { - "iconPath": "./images/Document_16x.svg" + "iconPath": "./images/document-light.svg" } }, From c952a8876d6010a85ba66dc46864405d8ae441c3 Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Mon, 15 Jul 2019 21:57:36 +0000 Subject: [PATCH 240/710] fixes #68663 --- src/vs/workbench/browser/layout.ts | 8 ++++++++ src/vs/workbench/browser/parts/panel/panelPart.ts | 9 ++++++++- src/vs/workbench/browser/parts/sidebar/sidebarPart.ts | 7 +++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index b478adbb976..88e9676f1e7 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -712,6 +712,14 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi this.workbenchGrid = new Grid(this.editorPartView, { proportionalLayout: false }); this.container.prepend(this.workbenchGrid.element); + + this._register((this.sideBarPartView as SidebarPart).onDidVisibilityChange((visible) => { + this.setSideBarHidden(!visible, true); + })); + + this._register((this.panelPartView as PanelPart).onDidVisibilityChange((visible) => { + this.setPanelHidden(!visible, true); + })); } else { this.workbenchGrid = instantiationService.createInstance( WorkbenchLegacyLayout, diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 6d67a653be8..88eb05032e8 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -5,7 +5,7 @@ import 'vs/css!./media/panelpart'; import { IAction } from 'vs/base/common/actions'; -import { Event } from 'vs/base/common/event'; +import { Event, Emitter } from 'vs/base/common/event'; import { Registry } from 'vs/platform/registry/common/platform'; import { ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar'; import { IPanel, ActivePanelContext, PanelFocusContext } from 'vs/workbench/common/panel'; @@ -64,6 +64,9 @@ export class PanelPart extends CompositePart implements IPanelService { get onDidPanelOpen(): Event<{ panel: IPanel, focus: boolean }> { return Event.map(this.onDidCompositeOpen.event, compositeOpen => ({ panel: compositeOpen.composite, focus: compositeOpen.focus })); } get onDidPanelClose(): Event { return this.onDidCompositeClose.event; } + private _onDidVisibilityChange = this._register(new Emitter()); + get onDidVisibilityChange(): Event { return this._onDidVisibilityChange.event; } + private activePanelContextKey: IContextKey; private panelFocusContextKey: IContextKey; @@ -433,6 +436,10 @@ export class PanelPart extends CompositePart implements IPanelService { this.storageService.store(PanelPart.PINNED_PANELS, value, StorageScope.GLOBAL); } + setVisible(visible: boolean): void { + this._onDidVisibilityChange.fire(visible); + } + toJSON(): object { return { type: Parts.PANEL_PART diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index 65f81f7be9b..942257ef3e9 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -51,6 +51,9 @@ export class SidebarPart extends CompositePart implements IViewletServi get onDidViewletRegister(): Event { return >this.viewletRegistry.onDidRegister; } + private _onDidVisibilityChange = this._register(new Emitter()); + get onDidVisibilityChange(): Event { return this._onDidVisibilityChange.event; } + private _onDidViewletDeregister = this._register(new Emitter()); get onDidViewletDeregister(): Event { return this._onDidViewletDeregister.event; } @@ -253,6 +256,10 @@ export class SidebarPart extends CompositePart implements IViewletServi } } + setVisible(visible: boolean): void { + this._onDidVisibilityChange.fire(visible); + } + toJSON(): object { return { type: Parts.SIDEBAR_PART From facc5e44517152ca3f0611ba25c065e671259ad0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 13:53:56 -0700 Subject: [PATCH 241/710] Documentation --- src/vs/vscode.proposed.d.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 1c9fb3974c8..46b57f913c2 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1292,11 +1292,25 @@ declare module 'vscode' { export interface Webview { /** * Convert a uri for the local file system to one that can be used inside webviews. + * + * Webviews cannot directly load resoruces from the workspace or local file system using `file:` uris. The + * `toWebviewResource` function takes a local `file:` uri and converts it into a uri that can be used inside of + * a webview to load the same resource: + * + * ```ts + * webview.html = `` + * ``` */ toWebviewResource(localResource: Uri): Uri; /** - * Content security policy rule for webview resources. + * Content security policy source for webview resources. + * + * This is origin used in a content security policy rule: + * + * ``` + * img-src https: ${webview.cspSource} ...; + * ```` */ readonly cspSource: string; } From e93afe173796c78df0532532e2a5091e1dab6bcf Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 14:46:16 -0700 Subject: [PATCH 242/710] Use _register from base class --- .../suggestEnabledInput.ts | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts b/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts index b949e001a30..5fac853caaa 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts @@ -9,7 +9,7 @@ import { Widget } from 'vs/base/browser/ui/widget'; import { Color } from 'vs/base/common/color'; import { Emitter, Event } from 'vs/base/common/event'; import { KeyCode } from 'vs/base/common/keyCodes'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { IDisposable } from 'vs/base/common/lifecycle'; import { mixin } from 'vs/base/common/objects'; import { isMacintosh } from 'vs/base/common/platform'; import { URI as uri } from 'vs/base/common/uri'; @@ -103,7 +103,6 @@ export class SuggestEnabledInput extends Widget implements IThemable { private _onInputDidChange = new Emitter(); readonly onInputDidChange: Event = this._onInputDidChange.event; - private disposables: IDisposable[] = []; private readonly inputWidget: CodeEditorWidget; private readonly inputModel: ITextModel; private stylingContainer: HTMLDivElement; @@ -134,31 +133,31 @@ export class SuggestEnabledInput extends Widget implements IThemable { contributions: [SuggestController, SnippetController2, ContextMenuController, MenuPreventer, SelectionClipboard], isSimpleWidget: true, }); - this.disposables.push(this.inputWidget); + this._register(this.inputWidget); let scopeHandle = uri.parse(resourceHandle); this.inputModel = modelService.createModel('', null, scopeHandle, true); this.inputWidget.setModel(this.inputModel); - this.disposables.push(this.inputWidget.onDidPaste(() => this.setValue(this.getValue()))); // setter cleanses + this._register(this.inputWidget.onDidPaste(() => this.setValue(this.getValue()))); // setter cleanses - this.disposables.push((this.inputWidget.onDidFocusEditorText(() => { + this._register((this.inputWidget.onDidFocusEditorText(() => { if (options.focusContextKey) { options.focusContextKey.set(true); } addClass(this.stylingContainer, 'synthetic-focus'); }))); - this.disposables.push((this.inputWidget.onDidBlurEditorText(() => { + this._register((this.inputWidget.onDidBlurEditorText(() => { if (options.focusContextKey) { options.focusContextKey.set(false); } removeClass(this.stylingContainer, 'synthetic-focus'); }))); const onKeyDownMonaco = Event.chain(this.inputWidget.onKeyDown); - onKeyDownMonaco.filter(e => e.keyCode === KeyCode.Enter).on(e => { e.preventDefault(); this._onEnter.fire(); }, this, this.disposables); - onKeyDownMonaco.filter(e => e.keyCode === KeyCode.DownArrow && (isMacintosh ? e.metaKey : e.ctrlKey)).on(() => this._onShouldFocusResults.fire(), this, this.disposables); + this._register(onKeyDownMonaco.filter(e => e.keyCode === KeyCode.Enter).on(e => { e.preventDefault(); this._onEnter.fire(); }, this)); + this._register(onKeyDownMonaco.filter(e => e.keyCode === KeyCode.DownArrow && (isMacintosh ? e.metaKey : e.ctrlKey)).on(() => this._onShouldFocusResults.fire(), this)); let preexistingContent = this.getValue(); const inputWidgetModel = this.inputWidget.getModel(); if (inputWidgetModel) { - this.disposables.push(inputWidgetModel.onDidChangeContent(() => { + this._register(inputWidgetModel.onDidChangeContent(() => { let content = this.getValue(); this.placeholderText.style.visibility = content ? 'hidden' : 'visible'; if (preexistingContent.trim() === content.trim()) { return; } @@ -175,7 +174,7 @@ export class SuggestEnabledInput extends Widget implements IThemable { this.setValue(options.value || ''); - this.disposables.push(modes.CompletionProviderRegistry.register({ scheme: scopeHandle.scheme, pattern: '**/' + scopeHandle.path, hasAccessToAllModels: true }, { + this._register(modes.CompletionProviderRegistry.register({ scheme: scopeHandle.scheme, pattern: '**/' + scopeHandle.path, hasAccessToAllModels: true }, { triggerCharacters: validatedSuggestProvider.triggerCharacters, provideCompletionItems: (model: ITextModel, position: Position, _context: modes.CompletionContext) => { let query = model.getValue(); @@ -249,11 +248,6 @@ export class SuggestEnabledInput extends Widget implements IThemable { private selectAll(): void { this.inputWidget.setSelection(new Range(1, 1, 1, this.getValue().length + 1)); } - - dispose(): void { - this.disposables = dispose(this.disposables); - super.dispose(); - } } // Override styles in selections.ts From 4eb2bf393b7ce9223467063c59c8f867491120c8 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 14:55:09 -0700 Subject: [PATCH 243/710] Use DisposableStore --- src/vs/base/browser/ui/sash/sash.ts | 4 ++-- src/vs/workbench/api/node/extHostTask.ts | 12 ++++++------ .../browser/views/explorerDecorationsProvider.ts | 14 +++++++------- .../contrib/scm/browser/dirtydiffDecorator.ts | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/vs/base/browser/ui/sash/sash.ts b/src/vs/base/browser/ui/sash/sash.ts index 70ddb045301..874bc9482e1 100644 --- a/src/vs/base/browser/ui/sash/sash.ts +++ b/src/vs/base/browser/ui/sash/sash.ts @@ -260,7 +260,7 @@ export class Sash extends Disposable { style.innerHTML = `* { cursor: ${cursor} !important; }`; }; - const disposables: IDisposable[] = []; + const disposables = new DisposableStore(); updateStyle(); @@ -284,7 +284,7 @@ export class Sash extends Disposable { removeClass(this.el, 'active'); this._onDidEnd.fire(); - dispose(disposables); + disposables.dispose(); for (const iframe of iframes) { iframe.style.pointerEvents = 'auto'; diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index a682a2a4575..4d97792f198 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -31,7 +31,7 @@ import { ExtHostConfiguration } from 'vs/workbench/api/common/extHostConfigurati import { ExtHostTerminalService, ExtHostTerminal } from 'vs/workbench/api/node/extHostTerminalService'; import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { IDisposable, DisposableStore } from 'vs/base/common/lifecycle'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; namespace TaskDefinitionDTO { @@ -377,7 +377,7 @@ class CustomExecutionData implements IDisposable { private static waitForDimensionsTimeoutInMs: number = 5000; private _cancellationSource?: CancellationTokenSource; private readonly _onTaskExecutionComplete: Emitter = new Emitter(); - private readonly _disposables: IDisposable[] = []; + private readonly _disposables = new DisposableStore(); private terminal?: vscode.Terminal; private terminalId?: number; public result: number | undefined; @@ -389,7 +389,7 @@ class CustomExecutionData implements IDisposable { public dispose(): void { this._cancellationSource = undefined; - dispose(this._disposables); + this._disposables.dispose(); } public get onTaskExecutionComplete(): Event { @@ -426,7 +426,7 @@ class CustomExecutionData implements IDisposable { const callbackTerminals: vscode.Terminal[] = this.terminalService.terminals.filter((terminal) => terminal._id === terminalId); if (!callbackTerminals || callbackTerminals.length === 0) { - this._disposables.push(this.terminalService.onDidOpenTerminal(this.onDidOpenTerminal.bind(this))); + this._disposables.add(this.terminalService.onDidOpenTerminal(this.onDidOpenTerminal.bind(this))); return; } @@ -462,9 +462,9 @@ class CustomExecutionData implements IDisposable { } this._cancellationSource = new CancellationTokenSource(); - this._disposables.push(this._cancellationSource); + this._disposables.add(this._cancellationSource); - this._disposables.push(this.terminalService.onDidCloseTerminal(this.onDidCloseTerminal.bind(this))); + this._disposables.add(this.terminalService.onDidCloseTerminal(this.onDidCloseTerminal.bind(this))); // Regardless of how the task completes, we are done with this custom execution task. this.customExecution.callback(terminalRenderer, this._cancellationSource.token).then( diff --git a/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.ts b/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.ts index eec3045543e..f1708ff4d49 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.ts @@ -9,23 +9,23 @@ import { localize } from 'vs/nls'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IDecorationsProvider, IDecorationData } from 'vs/workbench/services/decorations/browser/decorations'; import { listInvalidItemForeground } from 'vs/platform/theme/common/colorRegistry'; -import { dispose, IDisposable } from 'vs/base/common/lifecycle'; +import { DisposableStore } from 'vs/base/common/lifecycle'; import { IExplorerService } from 'vs/workbench/contrib/files/common/files'; export class ExplorerDecorationsProvider implements IDecorationsProvider { readonly label: string = localize('label', "Explorer"); private _onDidChange = new Emitter(); - private toDispose: IDisposable[]; + private readonly toDispose = new DisposableStore(); constructor( @IExplorerService private explorerService: IExplorerService, @IWorkspaceContextService contextService: IWorkspaceContextService ) { - this.toDispose = []; - this.toDispose.push(contextService.onDidChangeWorkspaceFolders(e => { + this.toDispose.add(this._onDidChange); + this.toDispose.add(contextService.onDidChangeWorkspaceFolders(e => { this._onDidChange.fire(e.changed.concat(e.added).map(wf => wf.uri)); })); - this.toDispose.push(explorerService.onDidChangeItem(change => { + this.toDispose.add(explorerService.onDidChangeItem(change => { if (change.item) { this._onDidChange.fire([change.item.resource]); } @@ -55,7 +55,7 @@ export class ExplorerDecorationsProvider implements IDecorationsProvider { return undefined; } - dispose(): IDisposable[] { - return dispose(this.toDispose); + dispose(): void { + this.toDispose.dispose(); } } diff --git a/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts b/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts index 6f90e69127a..97539eb481f 100644 --- a/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts @@ -1158,7 +1158,7 @@ export class DirtyDiffWorkbenchController extends Disposable implements ext.IWor private enabled = false; private models: ITextModel[] = []; private items: { [modelId: string]: DirtyDiffItem; } = Object.create(null); - private transientDisposables: IDisposable[] = []; + private readonly transientDisposables = this._register(new DisposableStore()); private stylesheet: HTMLStyleElement; constructor( @@ -1204,7 +1204,7 @@ export class DirtyDiffWorkbenchController extends Disposable implements ext.IWor this.disable(); } - this.transientDisposables.push(this.editorService.onDidVisibleEditorsChange(() => this.onEditorsChanged())); + this.transientDisposables.add(this.editorService.onDidVisibleEditorsChange(() => this.onEditorsChanged())); this.onEditorsChanged(); this.enabled = true; } @@ -1214,7 +1214,7 @@ export class DirtyDiffWorkbenchController extends Disposable implements ext.IWor return; } - this.transientDisposables = dispose(this.transientDisposables); + this.transientDisposables.clear(); this.models.forEach(m => this.items[m.id].dispose()); this.models = []; this.items = Object.create(null); From 47e54aef5de9ccbf75ae0a03fee11eaa9ef7989e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 14:57:49 -0700 Subject: [PATCH 244/710] Return undefined instead of null --- src/vs/workbench/browser/editor.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/browser/editor.ts b/src/vs/workbench/browser/editor.ts index a7f3c099ea2..5a7209fb226 100644 --- a/src/vs/workbench/browser/editor.ts +++ b/src/vs/workbench/browser/editor.ts @@ -34,14 +34,14 @@ export interface IEditorRegistry { registerEditor(descriptor: IEditorDescriptor, editorInputDescriptor: SyncDescriptor[]): void; /** - * Returns the editor descriptor for the given input or null if none. + * Returns the editor descriptor for the given input or `undefined` if none. */ - getEditor(input: EditorInput): IEditorDescriptor | null; + getEditor(input: EditorInput): IEditorDescriptor | undefined; /** * Returns the editor descriptor for the given identifier or null if none. */ - getEditorById(editorId: string): IEditorDescriptor | null; + getEditorById(editorId: string): IEditorDescriptor | undefined; /** * Returns an array of registered editors known to the platform. @@ -104,12 +104,12 @@ class EditorRegistry implements IEditorRegistry { this.editors.push(descriptor); } - getEditor(input: EditorInput): EditorDescriptor | null { + getEditor(input: EditorInput): EditorDescriptor | undefined { const findEditorDescriptors = (input: EditorInput, byInstanceOf?: boolean): EditorDescriptor[] => { const matchingDescriptors: EditorDescriptor[] = []; for (const editor of this.editors) { - const inputDescriptors: SyncDescriptor[] | undefined = this.mapEditorToInputs.get(editor); + const inputDescriptors = this.mapEditorToInputs.get(editor); if (inputDescriptors) { for (const inputDescriptor of inputDescriptors) { const inputClass = inputDescriptor.ctor; @@ -154,17 +154,17 @@ class EditorRegistry implements IEditorRegistry { return descriptors[0]; } - return null; + return undefined; } - getEditorById(editorId: string): EditorDescriptor | null { + getEditorById(editorId: string): EditorDescriptor | undefined { for (const editor of this.editors) { if (editor.getId() === editorId) { return editor; } } - return null; + return undefined; } getEditors(): EditorDescriptor[] { From e5e29375f036bc189409d5af1523d20ae1f434a7 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 14:59:43 -0700 Subject: [PATCH 245/710] Remove extra conditional --- src/vs/workbench/browser/editor.ts | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/browser/editor.ts b/src/vs/workbench/browser/editor.ts index 5a7209fb226..0fd80573223 100644 --- a/src/vs/workbench/browser/editor.ts +++ b/src/vs/workbench/browser/editor.ts @@ -109,22 +109,20 @@ class EditorRegistry implements IEditorRegistry { const matchingDescriptors: EditorDescriptor[] = []; for (const editor of this.editors) { - const inputDescriptors = this.mapEditorToInputs.get(editor); - if (inputDescriptors) { - for (const inputDescriptor of inputDescriptors) { - const inputClass = inputDescriptor.ctor; + const inputDescriptors = this.mapEditorToInputs.get(editor) || []; + for (const inputDescriptor of inputDescriptors) { + const inputClass = inputDescriptor.ctor; - // Direct check on constructor type (ignores prototype chain) - if (!byInstanceOf && input.constructor === inputClass) { - matchingDescriptors.push(editor); - break; - } + // Direct check on constructor type (ignores prototype chain) + if (!byInstanceOf && input.constructor === inputClass) { + matchingDescriptors.push(editor); + break; + } - // Normal instanceof check - else if (byInstanceOf && input instanceof inputClass) { - matchingDescriptors.push(editor); - break; - } + // Normal instanceof check + else if (byInstanceOf && input instanceof inputClass) { + matchingDescriptors.push(editor); + break; } } } From 711eca07d1379364f0a580a1ceea4baf0716f3e5 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 15:02:23 -0700 Subject: [PATCH 246/710] Remove extra checks that are not needed --- src/vs/workbench/browser/editor.ts | 2 +- src/vs/workbench/common/editor.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/editor.ts b/src/vs/workbench/browser/editor.ts index 0fd80573223..f2c559ee20c 100644 --- a/src/vs/workbench/browser/editor.ts +++ b/src/vs/workbench/browser/editor.ts @@ -140,7 +140,7 @@ class EditorRegistry implements IEditorRegistry { }; const descriptors = findEditorDescriptors(input); - if (descriptors && descriptors.length > 0) { + if (descriptors.length > 0) { // Ask the input for its preferred Editor const preferredEditorId = input.getPreferredEditorId(descriptors.map(d => d.getId())); diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 93dacfeacde..48aa2c77ac4 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -381,7 +381,7 @@ export abstract class EditorInput extends Disposable implements IEditorInput { * for the input. This allows subclasses to decide late which editor to use for the input on a case by case basis. */ getPreferredEditorId(candidates: string[]): string | null { - if (candidates && candidates.length > 0) { + if (candidates.length > 0) { return candidates[0]; } From 2b07856867eb8614d5bfa9d87cf45f3d0ff883e4 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 15:03:33 -0700 Subject: [PATCH 247/710] getPreferredEditorId return undefined instead of null --- src/vs/workbench/common/editor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 48aa2c77ac4..22088d08cb8 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -380,12 +380,12 @@ export abstract class EditorInput extends Disposable implements IEditorInput { * Returns the preferred editor for this input. A list of candidate editors is passed in that whee registered * for the input. This allows subclasses to decide late which editor to use for the input on a case by case basis. */ - getPreferredEditorId(candidates: string[]): string | null { + getPreferredEditorId(candidates: string[]): string | undefined { if (candidates.length > 0) { return candidates[0]; } - return null; + return undefined; } /** From 8b451a25ef9bb95821f91b0ef636a2d1ea564408 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 15:15:20 -0700 Subject: [PATCH 248/710] getDescription(), return undefined instead of null --- src/vs/workbench/browser/labels.ts | 2 +- .../browser/parts/editor/editor.contribution.ts | 3 ++- src/vs/workbench/browser/parts/editor/editorPicker.ts | 2 +- .../workbench/browser/parts/editor/tabsTitleControl.ts | 4 ++-- .../browser/parts/quickopen/quickOpenController.ts | 2 +- src/vs/workbench/common/editor.ts | 10 +++++----- src/vs/workbench/common/editor/dataUriEditorInput.ts | 4 ++-- src/vs/workbench/common/editor/diffEditorInput.ts | 2 +- src/vs/workbench/common/editor/resourceEditorInput.ts | 4 ++-- src/vs/workbench/common/editor/untitledEditorInput.ts | 4 ++-- .../performance/electron-browser/perfviewEditor.ts | 2 +- .../contrib/webview/browser/webviewEditorInput.ts | 2 +- .../workbench/services/editor/browser/editorService.ts | 4 ++-- 13 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/vs/workbench/browser/labels.ts b/src/vs/workbench/browser/labels.ts index 8742e98d27e..4c0ccf3809e 100644 --- a/src/vs/workbench/browser/labels.ts +++ b/src/vs/workbench/browser/labels.ts @@ -366,7 +366,7 @@ class ResourceLabelWidget extends IconLabel { this.setResource({ resource: toResource(editor, { supportSideBySide: SideBySideEditor.MASTER }), name: withNullAsUndefined(editor.getName()), - description: withNullAsUndefined(editor.getDescription(options ? options.descriptionVerbosity : undefined)) + description: editor.getDescription(options ? options.descriptionVerbosity : undefined) }, options); } diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index c10e7979ba0..53629222ca3 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -51,6 +51,7 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/ import { toLocalResource } from 'vs/base/common/resources'; import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; +import { withNullAsUndefined } from 'vs/base/common/types'; // Register String Editor Registry.as(EditorExtensions.Editors).registerEditor( @@ -205,7 +206,7 @@ class SideBySideEditorInputFactory implements IEditorInputFactory { const masterInput = masterInputFactory.deserialize(instantiationService, deserialized.masterSerialized); if (detailsInput && masterInput) { - return new SideBySideEditorInput(deserialized.name, deserialized.description, detailsInput, masterInput); + return new SideBySideEditorInput(deserialized.name, withNullAsUndefined(deserialized.description), detailsInput, masterInput); } } diff --git a/src/vs/workbench/browser/parts/editor/editorPicker.ts b/src/vs/workbench/browser/parts/editor/editorPicker.ts index 6b30c32d092..a3d495473f5 100644 --- a/src/vs/workbench/browser/parts/editor/editorPicker.ts +++ b/src/vs/workbench/browser/parts/editor/editorPicker.ts @@ -59,7 +59,7 @@ export class EditorPickerEntry extends QuickOpenEntryGroup { } getDescription() { - return withNullAsUndefined(this.editor.getDescription()); + return this.editor.getDescription(); } run(mode: Mode, context: IEntryRunContext): boolean { diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 00f4b30dc1e..6a8daa4b094 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -725,7 +725,7 @@ export class TabsTitleControl extends TitleControl { const labels = this.group.editors.map(editor => ({ editor, name: editor.getName()!, - description: withNullAsUndefined(editor.getDescription(verbosity)), + description: editor.getDescription(verbosity), title: withNullAsUndefined(editor.getTitle(Verbosity.LONG)) })); @@ -778,7 +778,7 @@ export class TabsTitleControl extends TitleControl { if (useLongDescriptions) { mapDescriptionToDuplicates.clear(); duplicateTitles.forEach(label => { - label.description = withNullAsUndefined(label.editor.getDescription(Verbosity.LONG)); + label.description = label.editor.getDescription(Verbosity.LONG); getOrSet(mapDescriptionToDuplicates, label.description, []).push(label); }); } diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 5851bdb62ce..5cfc04c3743 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -745,7 +745,7 @@ export class EditorHistoryEntry extends EditorQuickOpenEntry { if (input instanceof EditorInput) { this.resource = resourceForEditorHistory(input, fileService); this.label = types.withNullAsUndefined(input.getName()); - this.description = types.withNullAsUndefined(input.getDescription()); + this.description = input.getDescription(); this.dirty = input.isDirty(); } else { const resourceInput = input as IResourceInput; diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 22088d08cb8..dca1d783821 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -295,7 +295,7 @@ export interface IEditorInput extends IDisposable { /** * Returns the display description of this input. */ - getDescription(verbosity?: Verbosity): string | null; + getDescription(verbosity?: Verbosity): string | undefined; /** * Returns the display title of this input. @@ -364,8 +364,8 @@ export abstract class EditorInput extends Disposable implements IEditorInput { * Returns the description of this input that can be shown to the user. Examples include showing the description of * the input above the editor area to the side of the name of the input. */ - getDescription(verbosity?: Verbosity): string | null { - return null; + getDescription(verbosity?: Verbosity): string | undefined { + return undefined; } /** @@ -552,7 +552,7 @@ export class SideBySideEditorInput extends EditorInput { constructor( private readonly name: string, - private readonly description: string | null, + private readonly description: string | undefined, private readonly _details: EditorInput, private readonly _master: EditorInput ) { @@ -625,7 +625,7 @@ export class SideBySideEditorInput extends EditorInput { return this.name; } - getDescription(): string | null { + getDescription(): string | undefined { return this.description; } diff --git a/src/vs/workbench/common/editor/dataUriEditorInput.ts b/src/vs/workbench/common/editor/dataUriEditorInput.ts index 7c82702e21c..f75c3d04103 100644 --- a/src/vs/workbench/common/editor/dataUriEditorInput.ts +++ b/src/vs/workbench/common/editor/dataUriEditorInput.ts @@ -55,8 +55,8 @@ export class DataUriEditorInput extends EditorInput { return withUndefinedAsNull(this.name); } - getDescription(): string | null { - return withUndefinedAsNull(this.description); + getDescription(): string | undefined { + return this.description; } resolve(): Promise { diff --git a/src/vs/workbench/common/editor/diffEditorInput.ts b/src/vs/workbench/common/editor/diffEditorInput.ts index bd4aea9a15b..477d54e754c 100644 --- a/src/vs/workbench/common/editor/diffEditorInput.ts +++ b/src/vs/workbench/common/editor/diffEditorInput.ts @@ -18,7 +18,7 @@ export class DiffEditorInput extends SideBySideEditorInput { private cachedModel: DiffEditorModel | null; - constructor(name: string, description: string | null, original: EditorInput, modified: EditorInput, private readonly forceOpenAsBinary?: boolean) { + constructor(name: string, description: string | undefined, original: EditorInput, modified: EditorInput, private readonly forceOpenAsBinary?: boolean) { super(name, description, original, modified); } diff --git a/src/vs/workbench/common/editor/resourceEditorInput.ts b/src/vs/workbench/common/editor/resourceEditorInput.ts index 6d652b4e8ca..8ea157dffc2 100644 --- a/src/vs/workbench/common/editor/resourceEditorInput.ts +++ b/src/vs/workbench/common/editor/resourceEditorInput.ts @@ -22,7 +22,7 @@ export class ResourceEditorInput extends EditorInput implements IModeSupport { constructor( private name: string, - private description: string | null, + private description: string | undefined, private readonly resource: URI, private preferredMode: string | undefined, @ITextModelService private readonly textModelResolverService: ITextModelService @@ -53,7 +53,7 @@ export class ResourceEditorInput extends EditorInput implements IModeSupport { } } - getDescription(): string | null { + getDescription(): string | undefined { return this.description; } diff --git a/src/vs/workbench/common/editor/untitledEditorInput.ts b/src/vs/workbench/common/editor/untitledEditorInput.ts index 16f96244129..2d89afb0bb0 100644 --- a/src/vs/workbench/common/editor/untitledEditorInput.ts +++ b/src/vs/workbench/common/editor/untitledEditorInput.ts @@ -77,9 +77,9 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport return this.labelService.getUriLabel(dirname(this.resource)); } - getDescription(verbosity: Verbosity = Verbosity.MEDIUM): string | null { + getDescription(verbosity: Verbosity = Verbosity.MEDIUM): string | undefined { if (!this.hasAssociatedFilePath) { - return null; + return undefined; } switch (verbosity) { diff --git a/src/vs/workbench/contrib/performance/electron-browser/perfviewEditor.ts b/src/vs/workbench/contrib/performance/electron-browser/perfviewEditor.ts index d1c09cbce4f..052e4bd2f5c 100644 --- a/src/vs/workbench/contrib/performance/electron-browser/perfviewEditor.ts +++ b/src/vs/workbench/contrib/performance/electron-browser/perfviewEditor.ts @@ -49,7 +49,7 @@ export class PerfviewInput extends ResourceEditorInput { ) { super( localize('name', "Startup Performance"), - null, + undefined, PerfviewInput.Uri, undefined, textModelResolverService diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts index e882669a573..d6133b09e04 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts @@ -130,7 +130,7 @@ export class WebviewEditorInput extends EditorInput { } public getDescription() { - return null; + return undefined; } public setName(value: string): void { diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index 3211d6adeb4..791daaa36fa 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -27,7 +27,7 @@ import { isCodeEditor, isDiffEditor, ICodeEditor, IDiffEditor } from 'vs/editor/ import { IEditorGroupView, IEditorOpeningEvent, EditorServiceImpl } from 'vs/workbench/browser/parts/editor/editor'; import { ILabelService } from 'vs/platform/label/common/label'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { withNullAsUndefined, withUndefinedAsNull } from 'vs/base/common/types'; +import { withNullAsUndefined } from 'vs/base/common/types'; type ICachedEditorInput = ResourceEditorInput | IFileEditorInput | DataUriEditorInput; @@ -524,7 +524,7 @@ export class EditorService extends Disposable implements EditorServiceImpl { const rightInput = this.createInput({ resource: resourceDiffInput.rightResource, forceFile: resourceDiffInput.forceFile }); const label = resourceDiffInput.label || localize('compareLabels', "{0} ↔ {1}", this.toDiffLabel(leftInput), this.toDiffLabel(rightInput)); - return new DiffEditorInput(label, withUndefinedAsNull(resourceDiffInput.description), leftInput, rightInput); + return new DiffEditorInput(label, resourceDiffInput.description, leftInput, rightInput); } // Untitled file support From f66743a804cb40f97ef14833dcb47816c17c91ec Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 15:19:02 -0700 Subject: [PATCH 249/710] Use asArray --- src/vs/workbench/browser/editor.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/browser/editor.ts b/src/vs/workbench/browser/editor.ts index f2c559ee20c..fb795a9d842 100644 --- a/src/vs/workbench/browser/editor.ts +++ b/src/vs/workbench/browser/editor.ts @@ -8,7 +8,7 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { Registry } from 'vs/platform/registry/common/platform'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { IConstructorSignature0, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { isArray } from 'vs/base/common/types'; +import { asArray } from 'vs/base/common/arrays'; export interface IEditorDescriptor { instantiate(instantiationService: IInstantiationService): BaseEditor; @@ -90,13 +90,7 @@ class EditorRegistry implements IEditorRegistry { registerEditor(descriptor: EditorDescriptor, editorInputDescriptor: SyncDescriptor[]): void; registerEditor(descriptor: EditorDescriptor, editorInputDescriptor: SyncDescriptor | SyncDescriptor[]): void { - // Support both non-array and array parameter - let inputDescriptors: SyncDescriptor[] = []; - if (!isArray(editorInputDescriptor)) { - inputDescriptors.push(editorInputDescriptor); - } else { - inputDescriptors = editorInputDescriptor; - } + const inputDescriptors: SyncDescriptor[] = asArray(editorInputDescriptor); // Register (Support multiple Editors per Input) this.mapEditorToInputs.set(descriptor, inputDescriptors); From 23b74291af64f43d30120b0cc1f0c606809649fb Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 15:23:45 -0700 Subject: [PATCH 250/710] Marking fields readonly --- src/vs/workbench/browser/editor.ts | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/browser/editor.ts b/src/vs/workbench/browser/editor.ts index fb795a9d842..1f31ed7eafd 100644 --- a/src/vs/workbench/browser/editor.ts +++ b/src/vs/workbench/browser/editor.ts @@ -46,7 +46,7 @@ export interface IEditorRegistry { /** * Returns an array of registered editors known to the platform. */ - getEditors(): IEditorDescriptor[]; + getEditors(): readonly IEditorDescriptor[]; } /** @@ -54,15 +54,12 @@ export interface IEditorRegistry { * can load lazily in the workbench. */ export class EditorDescriptor implements IEditorDescriptor { - private ctor: IConstructorSignature0; - private id: string; - private name: string; - constructor(ctor: IConstructorSignature0, id: string, name: string) { - this.ctor = ctor; - this.id = id; - this.name = name; - } + constructor( + private readonly ctor: IConstructorSignature0, + private readonly id: string, + private readonly name: string + ) { } instantiate(instantiationService: IInstantiationService): BaseEditor { return instantiationService.createInstance(this.ctor); @@ -84,7 +81,7 @@ export class EditorDescriptor implements IEditorDescriptor { class EditorRegistry implements IEditorRegistry { private editors: EditorDescriptor[] = []; - private readonly mapEditorToInputs = new Map[]>(); + private readonly mapEditorToInputs = new Map[]>(); registerEditor(descriptor: EditorDescriptor, editorInputDescriptor: SyncDescriptor): void; registerEditor(descriptor: EditorDescriptor, editorInputDescriptor: SyncDescriptor[]): void; @@ -159,7 +156,7 @@ class EditorRegistry implements IEditorRegistry { return undefined; } - getEditors(): EditorDescriptor[] { + getEditors(): readonly EditorDescriptor[] { return this.editors.slice(0); } @@ -170,7 +167,7 @@ class EditorRegistry implements IEditorRegistry { getEditorInputs(): SyncDescriptor[] { const inputClasses: SyncDescriptor[] = []; for (const editor of this.editors) { - const editorInputDescriptors: SyncDescriptor[] | undefined = this.mapEditorToInputs.get(editor); + const editorInputDescriptors = this.mapEditorToInputs.get(editor); if (editorInputDescriptors) { inputClasses.push(...editorInputDescriptors.map(descriptor => descriptor.ctor)); } From be5a4fa940121461aa023e7605557dc3b64125d9 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 15:42:48 -0700 Subject: [PATCH 251/710] :lipstick: --- src/vs/workbench/api/browser/mainThreadEditors.ts | 4 ++-- .../browser/parts/editor/editorGroupView.ts | 14 +++++++------- .../services/editor/browser/editorService.ts | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadEditors.ts b/src/vs/workbench/api/browser/mainThreadEditors.ts index c63aa1bb7a6..fc4d7286c14 100644 --- a/src/vs/workbench/api/browser/mainThreadEditors.ts +++ b/src/vs/workbench/api/browser/mainThreadEditors.ts @@ -15,7 +15,7 @@ import { ISelection } from 'vs/editor/common/core/selection'; import { IDecorationOptions, IDecorationRenderOptions, ILineChange } from 'vs/editor/common/editorCommon'; import { ISingleEditOperation } from 'vs/editor/common/model'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; -import { IEditorOptions, ITextEditorOptions } from 'vs/platform/editor/common/editor'; +import { IEditorOptions, ITextEditorOptions, IResourceInput } from 'vs/platform/editor/common/editor'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { MainThreadDocumentsAndEditors } from 'vs/workbench/api/browser/mainThreadDocumentsAndEditors'; @@ -121,7 +121,7 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape { selection: options.selection }; - const input = { + const input: IResourceInput = { resource: uri, options: editorOptions }; diff --git a/src/vs/workbench/browser/parts/editor/editorGroupView.ts b/src/vs/workbench/browser/parts/editor/editorGroupView.ts index 1f25c41cb90..c38cf579a7a 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupView.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupView.ts @@ -44,7 +44,7 @@ import { createAndFillInContextMenuActions } from 'vs/platform/actions/browser/m import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { isErrorWithActions, IErrorWithActions } from 'vs/base/common/errorsWithActions'; import { IVisibleEditor } from 'vs/workbench/services/editor/common/editorService'; -import { withNullAsUndefined } from 'vs/base/common/types'; +import { withNullAsUndefined, withUndefinedAsNull } from 'vs/base/common/types'; import { hash } from 'vs/base/common/hash'; import { guessMimeTypes } from 'vs/base/common/mime'; import { extname } from 'vs/base/common/resources'; @@ -789,10 +789,10 @@ export class EditorGroupView extends Themable implements IEditorGroupView { } // Proceed with opening - return this.doOpenEditor(editor, options); + return this.doOpenEditor(editor, options).then(withUndefinedAsNull); } - private doOpenEditor(editor: EditorInput, options?: EditorOptions): Promise { + private doOpenEditor(editor: EditorInput, options?: EditorOptions): Promise { // Determine options const openEditorOptions: IEditorOpenOptions = { @@ -833,10 +833,10 @@ export class EditorGroupView extends Themable implements IEditorGroupView { return this.doShowEditor(editor, !!openEditorOptions.active, options); } - private async doShowEditor(editor: EditorInput, active: boolean, options?: EditorOptions): Promise { + private async doShowEditor(editor: EditorInput, active: boolean, options?: EditorOptions): Promise { // Show in editor control if the active editor changed - let openEditorPromise: Promise; + let openEditorPromise: Promise; if (active) { openEditorPromise = (async () => { try { @@ -853,11 +853,11 @@ export class EditorGroupView extends Themable implements IEditorGroupView { // Handle errors but do not bubble them up this.doHandleOpenEditorError(error, editor, options); - return null; // error: return NULL as result to signal this + return undefined; // error: return undefined as result to signal this } })(); } else { - openEditorPromise = Promise.resolve(null); // inactive: return NULL as result to signal this + openEditorPromise = Promise.resolve(undefined); // inactive: return undefined as result to signal this } // Show in title control after editor control because some actions depend on it diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index 791daaa36fa..039e5b9624c 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -503,7 +503,7 @@ export class EditorService extends Disposable implements EditorServiceImpl { } // Side by Side Support - const resourceSideBySideInput = input; + const resourceSideBySideInput = input as IResourceSideBySideInput; if (resourceSideBySideInput.masterResource && resourceSideBySideInput.detailResource) { const masterInput = this.createInput({ resource: resourceSideBySideInput.masterResource, forceFile: resourceSideBySideInput.forceFile }); const detailInput = this.createInput({ resource: resourceSideBySideInput.detailResource, forceFile: resourceSideBySideInput.forceFile }); @@ -518,7 +518,7 @@ export class EditorService extends Disposable implements EditorServiceImpl { } // Diff Editor Support - const resourceDiffInput = input; + const resourceDiffInput = input as IResourceDiffInput; if (resourceDiffInput.leftResource && resourceDiffInput.rightResource) { const leftInput = this.createInput({ resource: resourceDiffInput.leftResource, forceFile: resourceDiffInput.forceFile }); const rightInput = this.createInput({ resource: resourceDiffInput.rightResource, forceFile: resourceDiffInput.forceFile }); @@ -528,13 +528,13 @@ export class EditorService extends Disposable implements EditorServiceImpl { } // Untitled file support - const untitledInput = input; + const untitledInput = input as IUntitledResourceInput; if (untitledInput.forceUntitled || !untitledInput.resource || (untitledInput.resource && untitledInput.resource.scheme === Schemas.untitled)) { return this.untitledEditorService.createOrGet(untitledInput.resource, untitledInput.mode, untitledInput.contents, untitledInput.encoding); } // Resource Editor Support - const resourceInput = input; + const resourceInput = input as IResourceInput; if (resourceInput.resource instanceof URI) { let label = resourceInput.label; if (!label && resourceInput.resource.scheme !== Schemas.data) { From 20d2018d1832574f173458f1d754fbacb070771f Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 15:44:16 -0700 Subject: [PATCH 252/710] Convert to async --- .../api/browser/mainThreadEditors.ts | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadEditors.ts b/src/vs/workbench/api/browser/mainThreadEditors.ts index fc4d7286c14..8601055aeeb 100644 --- a/src/vs/workbench/api/browser/mainThreadEditors.ts +++ b/src/vs/workbench/api/browser/mainThreadEditors.ts @@ -112,7 +112,7 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape { // --- from extension host process - $tryShowTextDocument(resource: UriComponents, options: ITextDocumentShowOptions): Promise { + async $tryShowTextDocument(resource: UriComponents, options: ITextDocumentShowOptions): Promise { const uri = URI.revive(resource); const editorOptions: ITextEditorOptions = { @@ -126,37 +126,35 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape { options: editorOptions }; - return this._editorService.openEditor(input, viewColumnToEditorGroup(this._editorGroupService, options.position)).then(editor => { - if (!editor) { - return undefined; - } - return this._documentsAndEditors.findTextEditorIdFor(editor); - }); + const editor = await this._editorService.openEditor(input, viewColumnToEditorGroup(this._editorGroupService, options.position)); + if (!editor) { + return undefined; + } + return this._documentsAndEditors.findTextEditorIdFor(editor); } - $tryShowEditor(id: string, position?: EditorViewColumn): Promise { + async $tryShowEditor(id: string, position?: EditorViewColumn): Promise { const mainThreadEditor = this._documentsAndEditors.getEditor(id); if (mainThreadEditor) { const model = mainThreadEditor.getModel(); - return this._editorService.openEditor({ + await this._editorService.openEditor({ resource: model.uri, options: { preserveFocus: false } - }, viewColumnToEditorGroup(this._editorGroupService, position)).then(() => { return; }); + }, viewColumnToEditorGroup(this._editorGroupService, position)); + return; } - return Promise.resolve(); } - $tryHideEditor(id: string): Promise { + async $tryHideEditor(id: string): Promise { const mainThreadEditor = this._documentsAndEditors.getEditor(id); if (mainThreadEditor) { const editors = this._editorService.visibleControls; for (let editor of editors) { if (mainThreadEditor.matches(editor)) { - return editor.group.closeEditor(editor.input).then(() => { return; }); + return editor.group.closeEditor(editor.input); } } } - return Promise.resolve(); } $trySetSelections(id: string, selections: ISelection[]): Promise { From 7411e3f3412b04616c987e110aba2320bd9bd0a0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 16:12:25 -0700 Subject: [PATCH 253/710] Convert many simple getters for events into readonly properties We seem to use the readonly property way of exposing these values more widely. Standardizing this a bit across the codebase --- src/vs/base/browser/ui/actionbar/actionbar.ts | 8 ++++---- src/vs/base/browser/ui/checkbox/checkbox.ts | 4 ++-- src/vs/base/browser/ui/list/listWidget.ts | 4 ++-- src/vs/base/parts/storage/common/storage.ts | 2 +- src/vs/base/parts/tree/browser/treeView.ts | 6 +++--- src/vs/editor/contrib/find/findState.ts | 5 ++--- src/vs/editor/contrib/folding/foldingModel.ts | 2 +- .../contextview/browser/contextMenuService.ts | 2 +- src/vs/platform/files/common/fileService.ts | 10 +++++----- .../files/node/diskFileSystemProvider.ts | 2 +- .../lifecycle/common/lifecycleService.ts | 6 +++--- .../notification/common/notification.ts | 2 +- .../common/remoteAgentFileSystemChannel.ts | 2 +- .../platform/storage/browser/storageService.ts | 4 ++-- src/vs/platform/storage/common/storage.ts | 2 +- src/vs/platform/storage/node/storageIpc.ts | 4 ++-- .../storage/node/storageMainService.ts | 4 ++-- src/vs/platform/storage/node/storageService.ts | 4 ++-- .../update/electron-browser/updateService.ts | 2 +- .../electron-main/abstractUpdateService.ts | 2 +- .../update/electron-main/updateService.snap.ts | 2 +- .../electron-main/workspacesMainService.ts | 2 +- .../api/browser/mainThreadComments.ts | 2 +- src/vs/workbench/api/browser/mainThreadSCM.ts | 8 ++++---- .../api/node/extHostTerminalService.ts | 6 +++--- src/vs/workbench/browser/composite.ts | 4 ++-- src/vs/workbench/browser/labels.ts | 2 +- src/vs/workbench/browser/layout.ts | 12 ++++++------ .../browser/parts/compositeBarActions.ts | 4 ++-- .../browser/parts/editor/binaryEditor.ts | 4 ++-- .../browser/parts/editor/editorControl.ts | 2 +- .../browser/parts/editor/editorGroupView.ts | 14 +++++++------- .../browser/parts/editor/editorPart.ts | 16 ++++++++-------- .../browser/parts/editor/editorWidgets.ts | 2 +- .../browser/parts/editor/rangeDecorations.ts | 2 +- .../parts/notifications/notificationsCenter.ts | 2 +- .../workbench/browser/parts/panel/panelPart.ts | 4 ++-- .../parts/quickopen/quickOpenController.ts | 4 ++-- .../browser/parts/sidebar/sidebarPart.ts | 4 ++-- .../browser/parts/titlebar/titlebarPart.ts | 2 +- .../browser/parts/views/customView.ts | 2 +- src/vs/workbench/browser/workbench.ts | 4 ++-- src/vs/workbench/common/editor.ts | 8 ++++---- src/vs/workbench/common/editor/editorGroup.ts | 18 +++++++++--------- .../common/editor/untitledEditorInput.ts | 4 ++-- .../common/editor/untitledEditorModel.ts | 6 +++--- src/vs/workbench/common/notifications.ts | 16 ++++++++-------- src/vs/workbench/common/resources.ts | 2 +- .../browser/preferencesRenderers.ts | 2 +- .../preferences/browser/preferencesWidgets.ts | 2 +- .../workbench/contrib/scm/common/scmService.ts | 12 ++++++------ .../contrib/tasks/common/problemMatcher.ts | 2 +- .../contrib/terminal/browser/terminalTab.ts | 4 ++-- .../contrib/webview/browser/webviewEditor.ts | 2 +- .../webview/electron-browser/webviewElement.ts | 2 +- .../electron-browser/contextmenuService.ts | 2 +- .../services/editor/browser/editorService.ts | 8 ++++---- .../textfile/common/textFileEditorModel.ts | 4 ++-- .../common/textFileEditorModelManager.ts | 16 ++++++++-------- .../textfile/common/textFileService.ts | 6 +++--- .../services/themes/common/colorThemeStore.ts | 6 ++---- .../untitled/common/untitledEditorService.ts | 8 ++++---- 62 files changed, 154 insertions(+), 157 deletions(-) diff --git a/src/vs/base/browser/ui/actionbar/actionbar.ts b/src/vs/base/browser/ui/actionbar/actionbar.ts index ffef9180cc6..413a256483f 100644 --- a/src/vs/base/browser/ui/actionbar/actionbar.ts +++ b/src/vs/base/browser/ui/actionbar/actionbar.ts @@ -405,16 +405,16 @@ export class ActionBar extends Disposable implements IActionRunner { protected actionsList: HTMLElement; private _onDidBlur = this._register(new Emitter()); - get onDidBlur(): Event { return this._onDidBlur.event; } + readonly onDidBlur: Event = this._onDidBlur.event; private _onDidCancel = this._register(new Emitter()); - get onDidCancel(): Event { return this._onDidCancel.event; } + readonly onDidCancel: Event = this._onDidCancel.event; private _onDidRun = this._register(new Emitter()); - get onDidRun(): Event { return this._onDidRun.event; } + readonly onDidRun: Event = this._onDidRun.event; private _onDidBeforeRun = this._register(new Emitter()); - get onDidBeforeRun(): Event { return this._onDidBeforeRun.event; } + readonly onDidBeforeRun: Event = this._onDidBeforeRun.event; constructor(container: HTMLElement, options: IActionBarOptions = defaultOptions) { super(); diff --git a/src/vs/base/browser/ui/checkbox/checkbox.ts b/src/vs/base/browser/ui/checkbox/checkbox.ts index 21580062e5b..40dcdfbb9ab 100644 --- a/src/vs/base/browser/ui/checkbox/checkbox.ts +++ b/src/vs/base/browser/ui/checkbox/checkbox.ts @@ -72,10 +72,10 @@ export class CheckboxActionViewItem extends BaseActionViewItem { export class Checkbox extends Widget { private readonly _onChange = this._register(new Emitter()); - get onChange(): Event { return this._onChange.event; } + readonly onChange: Event = this._onChange.event; private readonly _onKeyDown = this._register(new Emitter()); - get onKeyDown(): Event { return this._onKeyDown.event; } + readonly onKeyDown: Event = this._onKeyDown.event; private readonly _opts: ICheckboxOpts; readonly domNode: HTMLElement; diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index 7e4aa5fb5b4..08728828e58 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -111,7 +111,7 @@ class Trait implements ISpliceable, IDisposable { private sortedIndexes: number[] = []; private _onChange = new Emitter(); - get onChange(): Event { return this._onChange.event; } + readonly onChange: Event = this._onChange.event; get trait(): string { return this._trait; } @@ -1165,7 +1165,7 @@ export class List implements ISpliceable, IDisposable { readonly onDidBlur: Event; private _onDidDispose = new Emitter(); - get onDidDispose(): Event { return this._onDidDispose.event; } + readonly onDidDispose: Event = this._onDidDispose.event; constructor( container: HTMLElement, diff --git a/src/vs/base/parts/storage/common/storage.ts b/src/vs/base/parts/storage/common/storage.ts index 3f3892a8e19..03dedeca57f 100644 --- a/src/vs/base/parts/storage/common/storage.ts +++ b/src/vs/base/parts/storage/common/storage.ts @@ -74,7 +74,7 @@ export class Storage extends Disposable implements IStorage { private static readonly DEFAULT_FLUSH_DELAY = 100; private readonly _onDidChangeStorage: Emitter = this._register(new Emitter()); - get onDidChangeStorage(): Event { return this._onDidChangeStorage.event; } + readonly onDidChangeStorage: Event = this._onDidChangeStorage.event; private state = StorageState.None; diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 6852c0c727e..2042f576d55 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -447,13 +447,13 @@ export class TreeView extends HeightMap { private onHiddenScrollTop: number | null = null; private readonly _onDOMFocus = new Emitter(); - get onDOMFocus(): Event { return this._onDOMFocus.event; } + readonly onDOMFocus: Event = this._onDOMFocus.event; private readonly _onDOMBlur = new Emitter(); - get onDOMBlur(): Event { return this._onDOMBlur.event; } + readonly onDOMBlur: Event = this._onDOMBlur.event; private readonly _onDidScroll = new Emitter(); - get onDidScroll(): Event { return this._onDidScroll.event; } + readonly onDidScroll: Event = this._onDidScroll.event; constructor(context: _.ITreeContext, container: HTMLElement) { super(); diff --git a/src/vs/editor/contrib/find/findState.ts b/src/vs/editor/contrib/find/findState.ts index 0af1b84cd30..96f1078f130 100644 --- a/src/vs/editor/contrib/find/findState.ts +++ b/src/vs/editor/contrib/find/findState.ts @@ -69,7 +69,7 @@ export class FindReplaceState implements IDisposable { private _matchesPosition: number; private _matchesCount: number; private _currentMatch: Range | null; - private readonly _onFindReplaceStateChange: Emitter; + private readonly _onFindReplaceStateChange = new Emitter(); public get searchString(): string { return this._searchString; } public get replaceString(): string { return this._replaceString; } @@ -87,7 +87,7 @@ export class FindReplaceState implements IDisposable { public get matchesPosition(): number { return this._matchesPosition; } public get matchesCount(): number { return this._matchesCount; } public get currentMatch(): Range | null { return this._currentMatch; } - public get onFindReplaceStateChange(): Event { return this._onFindReplaceStateChange.event; } + public readonly onFindReplaceStateChange: Event = this._onFindReplaceStateChange.event; constructor() { this._searchString = ''; @@ -104,7 +104,6 @@ export class FindReplaceState implements IDisposable { this._matchesPosition = 0; this._matchesCount = 0; this._currentMatch = null; - this._onFindReplaceStateChange = new Emitter(); } public dispose(): void { diff --git a/src/vs/editor/contrib/folding/foldingModel.ts b/src/vs/editor/contrib/folding/foldingModel.ts index 70906b653eb..e81b529d061 100644 --- a/src/vs/editor/contrib/folding/foldingModel.ts +++ b/src/vs/editor/contrib/folding/foldingModel.ts @@ -29,9 +29,9 @@ export class FoldingModel { private _isInitialized: boolean; private _updateEventEmitter = new Emitter(); + public readonly onDidChange: Event = this._updateEventEmitter.event; public get regions(): FoldingRegions { return this._regions; } - public get onDidChange(): Event { return this._updateEventEmitter.event; } public get textModel() { return this._textModel; } public get isInitialized() { return this._isInitialized; } diff --git a/src/vs/platform/contextview/browser/contextMenuService.ts b/src/vs/platform/contextview/browser/contextMenuService.ts index e2fc80ef4ec..bb76d44886a 100644 --- a/src/vs/platform/contextview/browser/contextMenuService.ts +++ b/src/vs/platform/contextview/browser/contextMenuService.ts @@ -17,7 +17,7 @@ export class ContextMenuService extends Disposable implements IContextMenuServic _serviceBrand: any; private _onDidContextMenu = this._register(new Emitter()); - get onDidContextMenu(): Event { return this._onDidContextMenu.event; } + readonly onDidContextMenu: Event = this._onDidContextMenu.event; private contextMenuHandler: ContextMenuHandler; diff --git a/src/vs/platform/files/common/fileService.ts b/src/vs/platform/files/common/fileService.ts index 67dd28f9bbb..5beb3a1c8b8 100644 --- a/src/vs/platform/files/common/fileService.ts +++ b/src/vs/platform/files/common/fileService.ts @@ -32,10 +32,10 @@ export class FileService extends Disposable implements IFileService { //#region File System Provider private _onDidChangeFileSystemProviderRegistrations: Emitter = this._register(new Emitter()); - get onDidChangeFileSystemProviderRegistrations(): Event { return this._onDidChangeFileSystemProviderRegistrations.event; } + readonly onDidChangeFileSystemProviderRegistrations: Event = this._onDidChangeFileSystemProviderRegistrations.event; private _onWillActivateFileSystemProvider: Emitter = this._register(new Emitter()); - get onWillActivateFileSystemProvider(): Event { return this._onWillActivateFileSystemProvider.event; } + readonly onWillActivateFileSystemProvider: Event = this._onWillActivateFileSystemProvider.event; private readonly provider = new Map(); @@ -132,10 +132,10 @@ export class FileService extends Disposable implements IFileService { //#endregion private _onAfterOperation: Emitter = this._register(new Emitter()); - get onAfterOperation(): Event { return this._onAfterOperation.event; } + readonly onAfterOperation: Event = this._onAfterOperation.event; private _onError: Emitter = this._register(new Emitter()); - get onError(): Event { return this._onError.event; } + readonly onError: Event = this._onError.event; //#region File Metadata Resolving @@ -763,7 +763,7 @@ export class FileService extends Disposable implements IFileService { //#region File Watching private _onFileChanges: Emitter = this._register(new Emitter()); - get onFileChanges(): Event { return this._onFileChanges.event; } + readonly onFileChanges: Event = this._onFileChanges.event; private activeWatchers = new Map(); diff --git a/src/vs/platform/files/node/diskFileSystemProvider.ts b/src/vs/platform/files/node/diskFileSystemProvider.ts index 1a7534ffe08..8ef39ec23f0 100644 --- a/src/vs/platform/files/node/diskFileSystemProvider.ts +++ b/src/vs/platform/files/node/diskFileSystemProvider.ts @@ -367,7 +367,7 @@ export class DiskFileSystemProvider extends Disposable implements IFileSystemPro //#region File Watching private _onDidWatchErrorOccur: Emitter = this._register(new Emitter()); - get onDidErrorOccur(): Event { return this._onDidWatchErrorOccur.event; } + readonly onDidErrorOccur: Event = this._onDidWatchErrorOccur.event; private _onDidChangeFile: Emitter = this._register(new Emitter()); get onDidChangeFile(): Event { return this._onDidChangeFile.event; } diff --git a/src/vs/platform/lifecycle/common/lifecycleService.ts b/src/vs/platform/lifecycle/common/lifecycleService.ts index b325cde418a..2225c04ca99 100644 --- a/src/vs/platform/lifecycle/common/lifecycleService.ts +++ b/src/vs/platform/lifecycle/common/lifecycleService.ts @@ -16,13 +16,13 @@ export abstract class AbstractLifecycleService extends Disposable implements ILi _serviceBrand: ServiceIdentifier; protected readonly _onBeforeShutdown = this._register(new Emitter()); - get onBeforeShutdown(): Event { return this._onBeforeShutdown.event; } + readonly onBeforeShutdown: Event = this._onBeforeShutdown.event; protected readonly _onWillShutdown = this._register(new Emitter()); - get onWillShutdown(): Event { return this._onWillShutdown.event; } + readonly onWillShutdown: Event = this._onWillShutdown.event; protected readonly _onShutdown = this._register(new Emitter()); - get onShutdown(): Event { return this._onShutdown.event; } + readonly onShutdown: Event = this._onShutdown.event; protected _startupKind: StartupKind; get startupKind(): StartupKind { return this._startupKind; } diff --git a/src/vs/platform/notification/common/notification.ts b/src/vs/platform/notification/common/notification.ts index 75549c25f55..173b575822e 100644 --- a/src/vs/platform/notification/common/notification.ts +++ b/src/vs/platform/notification/common/notification.ts @@ -254,7 +254,7 @@ export class NoOpNotification implements INotificationHandle { readonly progress = new NoOpProgress(); private readonly _onDidClose: Emitter = new Emitter(); - get onDidClose(): Event { return this._onDidClose.event; } + readonly onDidClose: Event = this._onDidClose.event; updateSeverity(severity: Severity): void { } updateMessage(message: NotificationMessage): void { } diff --git a/src/vs/platform/remote/common/remoteAgentFileSystemChannel.ts b/src/vs/platform/remote/common/remoteAgentFileSystemChannel.ts index edc89fb407e..cefb3518ba0 100644 --- a/src/vs/platform/remote/common/remoteAgentFileSystemChannel.ts +++ b/src/vs/platform/remote/common/remoteAgentFileSystemChannel.ts @@ -28,7 +28,7 @@ export class RemoteExtensionsFileSystemProvider extends Disposable implements IF readonly onDidChangeFile: Event = this._onDidChange.event; private _onDidWatchErrorOccur: Emitter = this._register(new Emitter()); - get onDidErrorOccur(): Event { return this._onDidWatchErrorOccur.event; } + readonly onDidErrorOccur: Event = this._onDidWatchErrorOccur.event; private readonly _onDidChangeCapabilities = this._register(new Emitter()); readonly onDidChangeCapabilities: Event = this._onDidChangeCapabilities.event; diff --git a/src/vs/platform/storage/browser/storageService.ts b/src/vs/platform/storage/browser/storageService.ts index 734397a9f16..7e18f2ba09d 100644 --- a/src/vs/platform/storage/browser/storageService.ts +++ b/src/vs/platform/storage/browser/storageService.ts @@ -20,10 +20,10 @@ export class BrowserStorageService extends Disposable implements IStorageService _serviceBrand: ServiceIdentifier; private readonly _onDidChangeStorage: Emitter = this._register(new Emitter()); - get onDidChangeStorage(): Event { return this._onDidChangeStorage.event; } + readonly onDidChangeStorage: Event = this._onDidChangeStorage.event; private readonly _onWillSaveState: Emitter = this._register(new Emitter()); - get onWillSaveState(): Event { return this._onWillSaveState.event; } + readonly onWillSaveState: Event = this._onWillSaveState.event; private globalStorage: IStorage; private workspaceStorage: IStorage; diff --git a/src/vs/platform/storage/common/storage.ts b/src/vs/platform/storage/common/storage.ts index 443cf4a0131..5f6e2b6673f 100644 --- a/src/vs/platform/storage/common/storage.ts +++ b/src/vs/platform/storage/common/storage.ts @@ -126,7 +126,7 @@ export class InMemoryStorageService extends Disposable implements IStorageServic _serviceBrand = null as any; private readonly _onDidChangeStorage: Emitter = this._register(new Emitter()); - get onDidChangeStorage(): Event { return this._onDidChangeStorage.event; } + readonly onDidChangeStorage: Event = this._onDidChangeStorage.event; readonly onWillSaveState = Event.None; diff --git a/src/vs/platform/storage/node/storageIpc.ts b/src/vs/platform/storage/node/storageIpc.ts index d317e31a55b..aaba475a269 100644 --- a/src/vs/platform/storage/node/storageIpc.ts +++ b/src/vs/platform/storage/node/storageIpc.ts @@ -32,7 +32,7 @@ export class GlobalStorageDatabaseChannel extends Disposable implements IServerC private static STORAGE_CHANGE_DEBOUNCE_TIME = 100; private readonly _onDidChangeItems: Emitter = this._register(new Emitter()); - get onDidChangeItems(): Event { return this._onDidChangeItems.event; } + readonly onDidChangeItems: Event = this._onDidChangeItems.event; private whenReady: Promise; @@ -150,7 +150,7 @@ export class GlobalStorageDatabaseChannelClient extends Disposable implements IS _serviceBrand: any; private readonly _onDidChangeItemsExternal: Emitter = this._register(new Emitter()); - get onDidChangeItemsExternal(): Event { return this._onDidChangeItemsExternal.event; } + readonly onDidChangeItemsExternal: Event = this._onDidChangeItemsExternal.event; private onDidChangeItemsOnMainListener: IDisposable; diff --git a/src/vs/platform/storage/node/storageMainService.ts b/src/vs/platform/storage/node/storageMainService.ts index ccb16988860..8c76782626a 100644 --- a/src/vs/platform/storage/node/storageMainService.ts +++ b/src/vs/platform/storage/node/storageMainService.ts @@ -80,10 +80,10 @@ export class StorageMainService extends Disposable implements IStorageMainServic private static STORAGE_NAME = 'state.vscdb'; private readonly _onDidChangeStorage: Emitter = this._register(new Emitter()); - get onDidChangeStorage(): Event { return this._onDidChangeStorage.event; } + readonly onDidChangeStorage: Event = this._onDidChangeStorage.event; private readonly _onWillSaveState: Emitter = this._register(new Emitter()); - get onWillSaveState(): Event { return this._onWillSaveState.event; } + readonly onWillSaveState: Event = this._onWillSaveState.event; get items(): Map { return this.storage.items; } diff --git a/src/vs/platform/storage/node/storageService.ts b/src/vs/platform/storage/node/storageService.ts index 27d30af0527..caff11a3483 100644 --- a/src/vs/platform/storage/node/storageService.ts +++ b/src/vs/platform/storage/node/storageService.ts @@ -25,10 +25,10 @@ export class StorageService extends Disposable implements IStorageService { private static WORKSPACE_META_NAME = 'workspace.json'; private readonly _onDidChangeStorage: Emitter = this._register(new Emitter()); - get onDidChangeStorage(): Event { return this._onDidChangeStorage.event; } + readonly onDidChangeStorage: Event = this._onDidChangeStorage.event; private readonly _onWillSaveState: Emitter = this._register(new Emitter()); - get onWillSaveState(): Event { return this._onWillSaveState.event; } + readonly onWillSaveState: Event = this._onWillSaveState.event; private globalStorage: IStorage; diff --git a/src/vs/platform/update/electron-browser/updateService.ts b/src/vs/platform/update/electron-browser/updateService.ts index 023ea3ea7da..952c39cdbed 100644 --- a/src/vs/platform/update/electron-browser/updateService.ts +++ b/src/vs/platform/update/electron-browser/updateService.ts @@ -14,7 +14,7 @@ export class UpdateService implements IUpdateService { _serviceBrand: ServiceIdentifier; private _onStateChange = new Emitter(); - get onStateChange(): Event { return this._onStateChange.event; } + readonly onStateChange: Event = this._onStateChange.event; private _state: State = State.Uninitialized; get state(): State { return this._state; } diff --git a/src/vs/platform/update/electron-main/abstractUpdateService.ts b/src/vs/platform/update/electron-main/abstractUpdateService.ts index 76544db2221..f8059fb04b6 100644 --- a/src/vs/platform/update/electron-main/abstractUpdateService.ts +++ b/src/vs/platform/update/electron-main/abstractUpdateService.ts @@ -27,7 +27,7 @@ export abstract class AbstractUpdateService implements IUpdateService { private _state: State = State.Uninitialized; private _onStateChange = new Emitter(); - get onStateChange(): Event { return this._onStateChange.event; } + readonly onStateChange: Event = this._onStateChange.event; get state(): State { return this._state; diff --git a/src/vs/platform/update/electron-main/updateService.snap.ts b/src/vs/platform/update/electron-main/updateService.snap.ts index 33dac322927..ad64d8adfe0 100644 --- a/src/vs/platform/update/electron-main/updateService.snap.ts +++ b/src/vs/platform/update/electron-main/updateService.snap.ts @@ -21,7 +21,7 @@ abstract class AbstractUpdateService2 implements IUpdateService { private _state: State = State.Uninitialized; private _onStateChange = new Emitter(); - get onStateChange(): Event { return this._onStateChange.event; } + readonly onStateChange: Event = this._onStateChange.event; get state(): State { return this._state; diff --git a/src/vs/platform/workspaces/electron-main/workspacesMainService.ts b/src/vs/platform/workspaces/electron-main/workspacesMainService.ts index 58107e613f2..54d6757842a 100644 --- a/src/vs/platform/workspaces/electron-main/workspacesMainService.ts +++ b/src/vs/platform/workspaces/electron-main/workspacesMainService.ts @@ -31,7 +31,7 @@ export class WorkspacesMainService extends Disposable implements IWorkspacesMain private readonly untitledWorkspacesHome: URI; // local URI that contains all untitled workspaces private readonly _onUntitledWorkspaceDeleted = this._register(new Emitter()); - get onUntitledWorkspaceDeleted(): Event { return this._onUntitledWorkspaceDeleted.event; } + readonly onUntitledWorkspaceDeleted: Event = this._onUntitledWorkspaceDeleted.event; constructor( @IEnvironmentService private readonly environmentService: IEnvironmentService, diff --git a/src/vs/workbench/api/browser/mainThreadComments.ts b/src/vs/workbench/api/browser/mainThreadComments.ts index 7bce8f98dee..77c2e1052a7 100644 --- a/src/vs/workbench/api/browser/mainThreadComments.ts +++ b/src/vs/workbench/api/browser/mainThreadComments.ts @@ -57,7 +57,7 @@ export class MainThreadCommentThread implements modes.CommentThread { } private _onDidChangeLabel = new Emitter(); - get onDidChangeLabel(): Event { return this._onDidChangeLabel.event; } + readonly onDidChangeLabel: Event = this._onDidChangeLabel.event; private _comments: modes.Comment[] | undefined; diff --git a/src/vs/workbench/api/browser/mainThreadSCM.ts b/src/vs/workbench/api/browser/mainThreadSCM.ts index b0a25696935..089cb517b45 100644 --- a/src/vs/workbench/api/browser/mainThreadSCM.ts +++ b/src/vs/workbench/api/browser/mainThreadSCM.ts @@ -24,7 +24,7 @@ class MainThreadSCMResourceGroup implements ISCMResourceGroup { get hideWhenEmpty(): boolean { return !!this.features.hideWhenEmpty; } private _onDidChange = new Emitter(); - get onDidChange(): Event { return this._onDidChange.event; } + readonly onDidChange: Event = this._onDidChange.event; constructor( private readonly sourceControlHandle: number, @@ -105,7 +105,7 @@ class MainThreadSCMProvider implements ISCMProvider { // } private _onDidChangeResources = new Emitter(); - get onDidChangeResources(): Event { return this._onDidChangeResources.event; } + readonly onDidChangeResources: Event = this._onDidChangeResources.event; private features: SCMProviderFeatures = {}; @@ -120,13 +120,13 @@ class MainThreadSCMProvider implements ISCMProvider { get count(): number | undefined { return this.features.count; } private _onDidChangeCommitTemplate = new Emitter(); - get onDidChangeCommitTemplate(): Event { return this._onDidChangeCommitTemplate.event; } + readonly onDidChangeCommitTemplate: Event = this._onDidChangeCommitTemplate.event; private _onDidChangeStatusBarCommands = new Emitter(); get onDidChangeStatusBarCommands(): Event { return this._onDidChangeStatusBarCommands.event; } private _onDidChange = new Emitter(); - get onDidChange(): Event { return this._onDidChange.event; } + readonly onDidChange: Event = this._onDidChange.event; constructor( private readonly proxy: ExtHostSCMShape, diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 87657c7e6f1..56d11496bb0 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -726,13 +726,13 @@ class ExtHostVirtualProcess implements ITerminalChildProcess { private _queueDisposables: IDisposable[] | undefined; private readonly _onProcessData = new Emitter(); - public get onProcessData(): Event { return this._onProcessData.event; } + public readonly onProcessData: Event = this._onProcessData.event; private readonly _onProcessExit = new Emitter(); - public get onProcessExit(): Event { return this._onProcessExit.event; } + public readonly onProcessExit: Event = this._onProcessExit.event; private readonly _onProcessReady = new Emitter<{ pid: number, cwd: string }>(); public get onProcessReady(): Event<{ pid: number, cwd: string }> { return this._onProcessReady.event; } private readonly _onProcessTitleChanged = new Emitter(); - public get onProcessTitleChanged(): Event { return this._onProcessTitleChanged.event; } + public readonly onProcessTitleChanged: Event = this._onProcessTitleChanged.event; private readonly _onProcessOverrideDimensions = new Emitter(); public get onProcessOverrideDimensions(): Event { return this._onProcessOverrideDimensions.event; } diff --git a/src/vs/workbench/browser/composite.ts b/src/vs/workbench/browser/composite.ts index 84bf4619b0e..123e9a9b692 100644 --- a/src/vs/workbench/browser/composite.ts +++ b/src/vs/workbench/browser/composite.ts @@ -30,10 +30,10 @@ import { Disposable } from 'vs/base/common/lifecycle'; export abstract class Composite extends Component implements IComposite { private readonly _onTitleAreaUpdate: Emitter = this._register(new Emitter()); - get onTitleAreaUpdate(): Event { return this._onTitleAreaUpdate.event; } + readonly onTitleAreaUpdate: Event = this._onTitleAreaUpdate.event; private readonly _onDidChangeVisibility: Emitter = this._register(new Emitter()); - get onDidChangeVisibility(): Event { return this._onDidChangeVisibility.event; } + readonly onDidChangeVisibility: Event = this._onDidChangeVisibility.event; private _onDidFocus: Emitter; get onDidFocus(): Event { diff --git a/src/vs/workbench/browser/labels.ts b/src/vs/workbench/browser/labels.ts index 4c0ccf3809e..9db4979a3aa 100644 --- a/src/vs/workbench/browser/labels.ts +++ b/src/vs/workbench/browser/labels.ts @@ -239,7 +239,7 @@ enum Redraw { class ResourceLabelWidget extends IconLabel { private _onDidRender = this._register(new Emitter()); - get onDidRender(): Event { return this._onDidRender.event; } + readonly onDidRender: Event = this._onDidRender.event; private label?: IResourceLabelProps; private options?: IResourceLabelOptions; diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 88e9676f1e7..a70593c4390 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -63,22 +63,22 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi _serviceBrand: ServiceIdentifier; private readonly _onTitleBarVisibilityChange: Emitter = this._register(new Emitter()); - get onTitleBarVisibilityChange(): Event { return this._onTitleBarVisibilityChange.event; } + readonly onTitleBarVisibilityChange: Event = this._onTitleBarVisibilityChange.event; private readonly _onZenModeChange: Emitter = this._register(new Emitter()); - get onZenModeChange(): Event { return this._onZenModeChange.event; } + readonly onZenModeChange: Event = this._onZenModeChange.event; private readonly _onFullscreenChange: Emitter = this._register(new Emitter()); - get onFullscreenChange(): Event { return this._onFullscreenChange.event; } + readonly onFullscreenChange: Event = this._onFullscreenChange.event; private readonly _onCenteredLayoutChange: Emitter = this._register(new Emitter()); - get onCenteredLayoutChange(): Event { return this._onCenteredLayoutChange.event; } + readonly onCenteredLayoutChange: Event = this._onCenteredLayoutChange.event; private readonly _onPanelPositionChange: Emitter = this._register(new Emitter()); - get onPanelPositionChange(): Event { return this._onPanelPositionChange.event; } + readonly onPanelPositionChange: Event = this._onPanelPositionChange.event; private readonly _onLayout = this._register(new Emitter()); - get onLayout(): Event { return this._onLayout.event; } + readonly onLayout: Event = this._onLayout.event; private _dimension: IDimension; get dimension(): IDimension { return this._dimension; } diff --git a/src/vs/workbench/browser/parts/compositeBarActions.ts b/src/vs/workbench/browser/parts/compositeBarActions.ts index fe21d315410..d3445a9bbb6 100644 --- a/src/vs/workbench/browser/parts/compositeBarActions.ts +++ b/src/vs/workbench/browser/parts/compositeBarActions.ts @@ -52,10 +52,10 @@ export interface ICompositeBar { export class ActivityAction extends Action { private _onDidChangeActivity = new Emitter(); - get onDidChangeActivity(): Event { return this._onDidChangeActivity.event; } + readonly onDidChangeActivity: Event = this._onDidChangeActivity.event; private _onDidChangeBadge = new Emitter(); - get onDidChangeBadge(): Event { return this._onDidChangeBadge.event; } + readonly onDidChangeBadge: Event = this._onDidChangeBadge.event; private badge?: IBadge; private clazz: string | undefined; diff --git a/src/vs/workbench/browser/parts/editor/binaryEditor.ts b/src/vs/workbench/browser/parts/editor/binaryEditor.ts index b2d51bde13c..81a6096128b 100644 --- a/src/vs/workbench/browser/parts/editor/binaryEditor.ts +++ b/src/vs/workbench/browser/parts/editor/binaryEditor.ts @@ -33,10 +33,10 @@ export interface IOpenCallbacks { export abstract class BaseBinaryResourceEditor extends BaseEditor { private readonly _onMetadataChanged: Emitter = this._register(new Emitter()); - get onMetadataChanged(): Event { return this._onMetadataChanged.event; } + readonly onMetadataChanged: Event = this._onMetadataChanged.event; private readonly _onDidOpenInPlace: Emitter = this._register(new Emitter()); - get onDidOpenInPlace(): Event { return this._onDidOpenInPlace.event; } + readonly onDidOpenInPlace: Event = this._onDidOpenInPlace.event; private callbacks: IOpenCallbacks; private metadata: string | undefined; diff --git a/src/vs/workbench/browser/parts/editor/editorControl.ts b/src/vs/workbench/browser/parts/editor/editorControl.ts index 3db5b69060b..726b84c97db 100644 --- a/src/vs/workbench/browser/parts/editor/editorControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorControl.ts @@ -30,7 +30,7 @@ export class EditorControl extends Disposable { get maximumHeight() { return this._activeControl ? this._activeControl.maximumHeight : DEFAULT_EDITOR_MAX_DIMENSIONS.height; } private readonly _onDidFocus: Emitter = this._register(new Emitter()); - get onDidFocus(): Event { return this._onDidFocus.event; } + readonly onDidFocus: Event = this._onDidFocus.event; private _onDidSizeConstraintsChange = this._register(new Emitter<{ width: number; height: number; } | undefined>()); get onDidSizeConstraintsChange(): Event<{ width: number; height: number; } | undefined> { return this._onDidSizeConstraintsChange.event; } diff --git a/src/vs/workbench/browser/parts/editor/editorGroupView.ts b/src/vs/workbench/browser/parts/editor/editorGroupView.ts index c38cf579a7a..e5cc3843429 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupView.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupView.ts @@ -71,25 +71,25 @@ export class EditorGroupView extends Themable implements IEditorGroupView { //#region events private readonly _onDidFocus: Emitter = this._register(new Emitter()); - get onDidFocus(): Event { return this._onDidFocus.event; } + readonly onDidFocus: Event = this._onDidFocus.event; private readonly _onWillDispose: Emitter = this._register(new Emitter()); - get onWillDispose(): Event { return this._onWillDispose.event; } + readonly onWillDispose: Event = this._onWillDispose.event; private readonly _onDidGroupChange: Emitter = this._register(new Emitter()); - get onDidGroupChange(): Event { return this._onDidGroupChange.event; } + readonly onDidGroupChange: Event = this._onDidGroupChange.event; private readonly _onWillOpenEditor: Emitter = this._register(new Emitter()); - get onWillOpenEditor(): Event { return this._onWillOpenEditor.event; } + readonly onWillOpenEditor: Event = this._onWillOpenEditor.event; private readonly _onDidOpenEditorFail: Emitter = this._register(new Emitter()); - get onDidOpenEditorFail(): Event { return this._onDidOpenEditorFail.event; } + readonly onDidOpenEditorFail: Event = this._onDidOpenEditorFail.event; private readonly _onWillCloseEditor: Emitter = this._register(new Emitter()); - get onWillCloseEditor(): Event { return this._onWillCloseEditor.event; } + readonly onWillCloseEditor: Event = this._onWillCloseEditor.event; private readonly _onDidCloseEditor: Emitter = this._register(new Emitter()); - get onDidCloseEditor(): Event { return this._onDidCloseEditor.event; } + readonly onDidCloseEditor: Event = this._onDidCloseEditor.event; //#endregion diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 5bb777ae85f..dc894921aaa 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -91,29 +91,29 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro //#region Events private readonly _onDidLayout: Emitter = this._register(new Emitter()); - get onDidLayout(): Event { return this._onDidLayout.event; } + readonly onDidLayout: Event = this._onDidLayout.event; private readonly _onDidActiveGroupChange: Emitter = this._register(new Emitter()); - get onDidActiveGroupChange(): Event { return this._onDidActiveGroupChange.event; } + readonly onDidActiveGroupChange: Event = this._onDidActiveGroupChange.event; private readonly _onDidActivateGroup: Emitter = this._register(new Emitter()); - get onDidActivateGroup(): Event { return this._onDidActivateGroup.event; } + readonly onDidActivateGroup: Event = this._onDidActivateGroup.event; private readonly _onDidAddGroup: Emitter = this._register(new Emitter()); - get onDidAddGroup(): Event { return this._onDidAddGroup.event; } + readonly onDidAddGroup: Event = this._onDidAddGroup.event; private readonly _onDidRemoveGroup: Emitter = this._register(new Emitter()); - get onDidRemoveGroup(): Event { return this._onDidRemoveGroup.event; } + readonly onDidRemoveGroup: Event = this._onDidRemoveGroup.event; private readonly _onDidMoveGroup: Emitter = this._register(new Emitter()); - get onDidMoveGroup(): Event { return this._onDidMoveGroup.event; } + readonly onDidMoveGroup: Event = this._onDidMoveGroup.event; private onDidSetGridWidget = this._register(new Emitter<{ width: number; height: number; } | undefined>()); private _onDidSizeConstraintsChange = this._register(new Relay<{ width: number; height: number; } | undefined>()); get onDidSizeConstraintsChange(): Event<{ width: number; height: number; } | undefined> { return Event.any(this.onDidSetGridWidget.event, this._onDidSizeConstraintsChange.event); } private readonly _onDidPreferredSizeChange: Emitter = this._register(new Emitter()); - get onDidPreferredSizeChange(): Event { return this._onDidPreferredSizeChange.event; } + readonly onDidPreferredSizeChange: Event = this._onDidPreferredSizeChange.event; //#endregion @@ -162,7 +162,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro private enforcedPartOptions: IEditorPartOptions[] = []; private readonly _onDidEditorPartOptionsChange: Emitter = this._register(new Emitter()); - get onDidEditorPartOptionsChange(): Event { return this._onDidEditorPartOptionsChange.event; } + readonly onDidEditorPartOptionsChange: Event = this._onDidEditorPartOptionsChange.event; private registerListeners(): void { this._register(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(e))); diff --git a/src/vs/workbench/browser/parts/editor/editorWidgets.ts b/src/vs/workbench/browser/parts/editor/editorWidgets.ts index de5aacf5354..d0595046aaa 100644 --- a/src/vs/workbench/browser/parts/editor/editorWidgets.ts +++ b/src/vs/workbench/browser/parts/editor/editorWidgets.ts @@ -24,7 +24,7 @@ import { IFileService } from 'vs/platform/files/common/files'; export class FloatingClickWidget extends Widget implements IOverlayWidget { private readonly _onClick: Emitter = this._register(new Emitter()); - get onClick(): Event { return this._onClick.event; } + readonly onClick: Event = this._onClick.event; private _domNode: HTMLElement; diff --git a/src/vs/workbench/browser/parts/editor/rangeDecorations.ts b/src/vs/workbench/browser/parts/editor/rangeDecorations.ts index 0e994f72c34..4c52be6ca69 100644 --- a/src/vs/workbench/browser/parts/editor/rangeDecorations.ts +++ b/src/vs/workbench/browser/parts/editor/rangeDecorations.ts @@ -26,7 +26,7 @@ export class RangeHighlightDecorations extends Disposable { private readonly editorDisposables = this._register(new DisposableStore()); private readonly _onHighlightRemoved: Emitter = this._register(new Emitter()); - get onHighlightRemoved(): Event { return this._onHighlightRemoved.event; } + readonly onHighlightRemoved: Event = this._onHighlightRemoved.event; constructor(@IEditorService private readonly editorService: IEditorService) { super(); diff --git a/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts b/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts index e06e38cde64..adef1d21348 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts @@ -28,7 +28,7 @@ export class NotificationsCenter extends Themable { private static MAX_DIMENSIONS = new Dimension(450, 400); private readonly _onDidChangeVisibility: Emitter = this._register(new Emitter()); - get onDidChangeVisibility(): Event { return this._onDidChangeVisibility.event; } + readonly onDidChangeVisibility: Event = this._onDidChangeVisibility.event; private notificationsCenterContainer: HTMLElement; private notificationsCenterHeader: HTMLElement; diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 88eb05032e8..874d81baddb 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -62,10 +62,10 @@ export class PanelPart extends CompositePart implements IPanelService { //#endregion get onDidPanelOpen(): Event<{ panel: IPanel, focus: boolean }> { return Event.map(this.onDidCompositeOpen.event, compositeOpen => ({ panel: compositeOpen.composite, focus: compositeOpen.focus })); } - get onDidPanelClose(): Event { return this.onDidCompositeClose.event; } + readonly onDidPanelClose: Event = this.onDidCompositeClose.event; private _onDidVisibilityChange = this._register(new Emitter()); - get onDidVisibilityChange(): Event { return this._onDidVisibilityChange.event; } + readonly onDidVisibilityChange: Event = this._onDidVisibilityChange.event; private activePanelContextKey: IContextKey; private panelFocusContextKey: IContextKey; diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 5cfc04c3743..f31bd9d480e 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -64,10 +64,10 @@ export class QuickOpenController extends Component implements IQuickOpenService _serviceBrand: ServiceIdentifier; private readonly _onShow: Emitter = this._register(new Emitter()); - get onShow(): Event { return this._onShow.event; } + readonly onShow: Event = this._onShow.event; private readonly _onHide: Emitter = this._register(new Emitter()); - get onHide(): Event { return this._onHide.event; } + readonly onHide: Event = this._onHide.event; private preserveInput: boolean; private isQuickOpen: boolean; diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index 942257ef3e9..88c40e827ae 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -52,10 +52,10 @@ export class SidebarPart extends CompositePart implements IViewletServi get onDidViewletRegister(): Event { return >this.viewletRegistry.onDidRegister; } private _onDidVisibilityChange = this._register(new Emitter()); - get onDidVisibilityChange(): Event { return this._onDidVisibilityChange.event; } + readonly onDidVisibilityChange: Event = this._onDidVisibilityChange.event; private _onDidViewletDeregister = this._register(new Emitter()); - get onDidViewletDeregister(): Event { return this._onDidViewletDeregister.event; } + readonly onDidViewletDeregister: Event = this._onDidViewletDeregister.event; get onDidViewletOpen(): Event { return Event.map(this.onDidCompositeOpen.event, compositeEvent => compositeEvent.composite); } get onDidViewletClose(): Event { return this.onDidCompositeClose.event as Event; } diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts index 83457d8a39f..f6b0a6849f9 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts @@ -56,7 +56,7 @@ export class TitlebarPart extends Part implements ITitleService { //#endregion private _onMenubarVisibilityChange = this._register(new Emitter()); - get onMenubarVisibilityChange(): Event { return this._onMenubarVisibilityChange.event; } + readonly onMenubarVisibilityChange: Event = this._onMenubarVisibilityChange.event; _serviceBrand: ServiceIdentifier; diff --git a/src/vs/workbench/browser/parts/views/customView.ts b/src/vs/workbench/browser/parts/views/customView.ts index ee1ae6612f9..99a141b9b3a 100644 --- a/src/vs/workbench/browser/parts/views/customView.ts +++ b/src/vs/workbench/browser/parts/views/customView.ts @@ -108,7 +108,7 @@ class TitleMenus extends Disposable { private titleSecondaryActions: IAction[] = []; private _onDidChangeTitle = this._register(new Emitter()); - get onDidChangeTitle(): Event { return this._onDidChangeTitle.event; } + readonly onDidChangeTitle: Event = this._onDidChangeTitle.event; constructor( id: string, diff --git a/src/vs/workbench/browser/workbench.ts b/src/vs/workbench/browser/workbench.ts index 3fae12549dd..634655ffa84 100644 --- a/src/vs/workbench/browser/workbench.ts +++ b/src/vs/workbench/browser/workbench.ts @@ -48,10 +48,10 @@ import { Layout } from 'vs/workbench/browser/layout'; export class Workbench extends Layout { private readonly _onShutdown = this._register(new Emitter()); - get onShutdown(): Event { return this._onShutdown.event; } + readonly onShutdown: Event = this._onShutdown.event; private readonly _onWillShutdown = this._register(new Emitter()); - get onWillShutdown(): Event { return this._onWillShutdown.event; } + readonly onWillShutdown: Event = this._onWillShutdown.event; constructor( parent: HTMLElement, diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index dca1d783821..4cd3bb02e5d 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -330,13 +330,13 @@ export interface IEditorInput extends IDisposable { export abstract class EditorInput extends Disposable implements IEditorInput { protected readonly _onDidChangeDirty: Emitter = this._register(new Emitter()); - get onDidChangeDirty(): Event { return this._onDidChangeDirty.event; } + readonly onDidChangeDirty: Event = this._onDidChangeDirty.event; protected readonly _onDidChangeLabel: Emitter = this._register(new Emitter()); - get onDidChangeLabel(): Event { return this._onDidChangeLabel.event; } + readonly onDidChangeLabel: Event = this._onDidChangeLabel.event; private readonly _onDispose: Emitter = this._register(new Emitter()); - get onDispose(): Event { return this._onDispose.event; } + readonly onDispose: Event = this._onDispose.event; private disposed: boolean = false; @@ -658,7 +658,7 @@ export interface ITextEditorModel extends IEditorModel { export class EditorModel extends Disposable implements IEditorModel { private readonly _onDispose: Emitter = this._register(new Emitter()); - get onDispose(): Event { return this._onDispose.event; } + readonly onDispose: Event = this._onDispose.event; /** * Causes this model to load returning a promise when loading is completed. diff --git a/src/vs/workbench/common/editor/editorGroup.ts b/src/vs/workbench/common/editor/editorGroup.ts index e5b47924916..5b207d4a79d 100644 --- a/src/vs/workbench/common/editor/editorGroup.ts +++ b/src/vs/workbench/common/editor/editorGroup.ts @@ -60,31 +60,31 @@ export class EditorGroup extends Disposable { //#region events private readonly _onDidEditorActivate = this._register(new Emitter()); - get onDidEditorActivate(): Event { return this._onDidEditorActivate.event; } + readonly onDidEditorActivate: Event = this._onDidEditorActivate.event; private readonly _onDidEditorOpen = this._register(new Emitter()); - get onDidEditorOpen(): Event { return this._onDidEditorOpen.event; } + readonly onDidEditorOpen: Event = this._onDidEditorOpen.event; private readonly _onDidEditorClose = this._register(new Emitter()); - get onDidEditorClose(): Event { return this._onDidEditorClose.event; } + readonly onDidEditorClose: Event = this._onDidEditorClose.event; private readonly _onDidEditorDispose = this._register(new Emitter()); - get onDidEditorDispose(): Event { return this._onDidEditorDispose.event; } + readonly onDidEditorDispose: Event = this._onDidEditorDispose.event; private readonly _onDidEditorBecomeDirty = this._register(new Emitter()); - get onDidEditorBecomeDirty(): Event { return this._onDidEditorBecomeDirty.event; } + readonly onDidEditorBecomeDirty: Event = this._onDidEditorBecomeDirty.event; private readonly _onDidEditorLabelChange = this._register(new Emitter()); - get onDidEditorLabelChange(): Event { return this._onDidEditorLabelChange.event; } + readonly onDidEditorLabelChange: Event = this._onDidEditorLabelChange.event; private readonly _onDidEditorMove = this._register(new Emitter()); - get onDidEditorMove(): Event { return this._onDidEditorMove.event; } + readonly onDidEditorMove: Event = this._onDidEditorMove.event; private readonly _onDidEditorPin = this._register(new Emitter()); - get onDidEditorPin(): Event { return this._onDidEditorPin.event; } + readonly onDidEditorPin: Event = this._onDidEditorPin.event; private readonly _onDidEditorUnpin = this._register(new Emitter()); - get onDidEditorUnpin(): Event { return this._onDidEditorUnpin.event; } + readonly onDidEditorUnpin: Event = this._onDidEditorUnpin.event; //#endregion diff --git a/src/vs/workbench/common/editor/untitledEditorInput.ts b/src/vs/workbench/common/editor/untitledEditorInput.ts index 2d89afb0bb0..561b5cb6f87 100644 --- a/src/vs/workbench/common/editor/untitledEditorInput.ts +++ b/src/vs/workbench/common/editor/untitledEditorInput.ts @@ -28,10 +28,10 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport private modelResolve: Promise | null; private readonly _onDidModelChangeContent: Emitter = this._register(new Emitter()); - get onDidModelChangeContent(): Event { return this._onDidModelChangeContent.event; } + readonly onDidModelChangeContent: Event = this._onDidModelChangeContent.event; private readonly _onDidModelChangeEncoding: Emitter = this._register(new Emitter()); - get onDidModelChangeEncoding(): Event { return this._onDidModelChangeEncoding.event; } + readonly onDidModelChangeEncoding: Event = this._onDidModelChangeEncoding.event; constructor( private readonly resource: URI, diff --git a/src/vs/workbench/common/editor/untitledEditorModel.ts b/src/vs/workbench/common/editor/untitledEditorModel.ts index 8b2c38d28f6..57a77b7267b 100644 --- a/src/vs/workbench/common/editor/untitledEditorModel.ts +++ b/src/vs/workbench/common/editor/untitledEditorModel.ts @@ -22,13 +22,13 @@ export class UntitledEditorModel extends BaseTextEditorModel implements IEncodin static DEFAULT_CONTENT_CHANGE_BUFFER_DELAY = CONTENT_CHANGE_EVENT_BUFFER_DELAY; private readonly _onDidChangeContent: Emitter = this._register(new Emitter()); - get onDidChangeContent(): Event { return this._onDidChangeContent.event; } + readonly onDidChangeContent: Event = this._onDidChangeContent.event; private readonly _onDidChangeDirty: Emitter = this._register(new Emitter()); - get onDidChangeDirty(): Event { return this._onDidChangeDirty.event; } + readonly onDidChangeDirty: Event = this._onDidChangeDirty.event; private readonly _onDidChangeEncoding: Emitter = this._register(new Emitter()); - get onDidChangeEncoding(): Event { return this._onDidChangeEncoding.event; } + readonly onDidChangeEncoding: Event = this._onDidChangeEncoding.event; private dirty: boolean = false; private versionId: number = 0; diff --git a/src/vs/workbench/common/notifications.ts b/src/vs/workbench/common/notifications.ts index e4718e06f67..b83f9599436 100644 --- a/src/vs/workbench/common/notifications.ts +++ b/src/vs/workbench/common/notifications.ts @@ -86,7 +86,7 @@ export interface IStatusMessageChangeEvent { export class NotificationHandle implements INotificationHandle { private readonly _onDidClose: Emitter = new Emitter(); - get onDidClose(): Event { return this._onDidClose.event; } + readonly onDidClose: Event = this._onDidClose.event; constructor(private readonly item: INotificationViewItem, private readonly closeItem: (item: INotificationViewItem) => void) { this.registerListeners(); @@ -126,10 +126,10 @@ export class NotificationsModel extends Disposable implements INotificationsMode private static NO_OP_NOTIFICATION = new NoOpNotification(); private readonly _onDidNotificationChange: Emitter = this._register(new Emitter()); - get onDidNotificationChange(): Event { return this._onDidNotificationChange.event; } + readonly onDidNotificationChange: Event = this._onDidNotificationChange.event; private readonly _onDidStatusMessageChange: Emitter = this._register(new Emitter()); - get onDidStatusMessageChange(): Event { return this._onDidStatusMessageChange.event; } + readonly onDidStatusMessageChange: Event = this._onDidStatusMessageChange.event; private readonly _notifications: INotificationViewItem[] = []; get notifications(): INotificationViewItem[] { return this._notifications; } @@ -301,7 +301,7 @@ export class NotificationViewItemProgress extends Disposable implements INotific private readonly _state: INotificationViewItemProgressState; private readonly _onDidChange: Emitter = this._register(new Emitter()); - get onDidChange(): Event { return this._onDidChange.event; } + readonly onDidChange: Event = this._onDidChange.event; constructor() { super(); @@ -397,13 +397,13 @@ export class NotificationViewItem extends Disposable implements INotificationVie private _progress: NotificationViewItemProgress; private readonly _onDidExpansionChange: Emitter = this._register(new Emitter()); - get onDidExpansionChange(): Event { return this._onDidExpansionChange.event; } + readonly onDidExpansionChange: Event = this._onDidExpansionChange.event; private readonly _onDidClose: Emitter = this._register(new Emitter()); - get onDidClose(): Event { return this._onDidClose.event; } + readonly onDidClose: Event = this._onDidClose.event; private readonly _onDidLabelChange: Emitter = this._register(new Emitter()); - get onDidLabelChange(): Event { return this._onDidLabelChange.event; } + readonly onDidLabelChange: Event = this._onDidLabelChange.event; static create(notification: INotification): INotificationViewItem | null { if (!notification || !notification.message || isPromiseCanceledError(notification.message)) { @@ -654,7 +654,7 @@ export class NotificationViewItem extends Disposable implements INotificationVie export class ChoiceAction extends Action { private readonly _onDidRun = new Emitter(); - get onDidRun(): Event { return this._onDidRun.event; } + readonly onDidRun: Event = this._onDidRun.event; private readonly _keepOpen: boolean; diff --git a/src/vs/workbench/common/resources.ts b/src/vs/workbench/common/resources.ts index 1b1e64b5992..53de865d8f1 100644 --- a/src/vs/workbench/common/resources.ts +++ b/src/vs/workbench/common/resources.ts @@ -107,7 +107,7 @@ export class ResourceGlobMatcher extends Disposable { private static readonly NO_ROOT: string | null = null; private readonly _onExpressionChange: Emitter = this._register(new Emitter()); - get onExpressionChange(): Event { return this._onExpressionChange.event; } + readonly onExpressionChange: Event = this._onExpressionChange.event; private readonly mapRootToParsedExpression: Map = new Map(); private readonly mapRootToExpressionConfig: Map = new Map(); diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts index e353af16e13..360bc205add 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts @@ -437,7 +437,7 @@ class DefaultSettingsHeaderRenderer extends Disposable { export class SettingsGroupTitleRenderer extends Disposable implements HiddenAreasProvider { private readonly _onHiddenAreasChanged = this._register(new Emitter()); - get onHiddenAreasChanged(): Event { return this._onHiddenAreasChanged.event; } + readonly onHiddenAreasChanged: Event = this._onHiddenAreasChanged.event; private settingsGroups: ISettingsGroup[]; private hiddenGroups: ISettingsGroup[] = []; diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts index f45d098fb72..7eeb9c15120 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts @@ -745,7 +745,7 @@ export class EditPreferenceWidget extends Disposable { private _editPreferenceDecoration: string[]; private readonly _onClick = this._register(new Emitter()); - get onClick(): Event { return this._onClick.event; } + readonly onClick: Event = this._onClick.event; constructor(private editor: ICodeEditor ) { diff --git a/src/vs/workbench/contrib/scm/common/scmService.ts b/src/vs/workbench/contrib/scm/common/scmService.ts index 4b5e9e6d10b..e75d7df468e 100644 --- a/src/vs/workbench/contrib/scm/common/scmService.ts +++ b/src/vs/workbench/contrib/scm/common/scmService.ts @@ -23,7 +23,7 @@ class SCMInput implements ISCMInput { } private _onDidChange = new Emitter(); - get onDidChange(): Event { return this._onDidChange.event; } + readonly onDidChange: Event = this._onDidChange.event; private _placeholder = ''; @@ -37,7 +37,7 @@ class SCMInput implements ISCMInput { } private _onDidChangePlaceholder = new Emitter(); - get onDidChangePlaceholder(): Event { return this._onDidChangePlaceholder.event; } + readonly onDidChangePlaceholder: Event = this._onDidChangePlaceholder.event; private _visible = true; @@ -51,7 +51,7 @@ class SCMInput implements ISCMInput { } private _onDidChangeVisibility = new Emitter(); - get onDidChangeVisibility(): Event { return this._onDidChangeVisibility.event; } + readonly onDidChangeVisibility: Event = this._onDidChangeVisibility.event; private _validateInput: IInputValidator = () => Promise.resolve(undefined); @@ -65,7 +65,7 @@ class SCMInput implements ISCMInput { } private _onDidChangeValidateInput = new Emitter(); - get onDidChangeValidateInput(): Event { return this._onDidChangeValidateInput.event; } + readonly onDidChangeValidateInput: Event = this._onDidChangeValidateInput.event; } class SCMRepository implements ISCMRepository { @@ -118,10 +118,10 @@ export class SCMService implements ISCMService { readonly onDidChangeSelectedRepositories: Event = this._onDidChangeSelectedRepositories.event; private _onDidAddProvider = new Emitter(); - get onDidAddRepository(): Event { return this._onDidAddProvider.event; } + readonly onDidAddRepository: Event = this._onDidAddProvider.event; private _onDidRemoveProvider = new Emitter(); - get onDidRemoveRepository(): Event { return this._onDidRemoveProvider.event; } + readonly onDidRemoveRepository: Event = this._onDidRemoveProvider.event; constructor(@ILogService private readonly logService: ILogService) { } diff --git a/src/vs/workbench/contrib/tasks/common/problemMatcher.ts b/src/vs/workbench/contrib/tasks/common/problemMatcher.ts index 30c10b277a6..1c4f457c5b9 100644 --- a/src/vs/workbench/contrib/tasks/common/problemMatcher.ts +++ b/src/vs/workbench/contrib/tasks/common/problemMatcher.ts @@ -1718,7 +1718,7 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { private matchers: IStringDictionary; private readyPromise: Promise; private readonly _onMatchersChanged: Emitter = new Emitter(); - public get onMatcherChanged(): Event { return this._onMatchersChanged.event; } + public readonly onMatcherChanged: Event = this._onMatchersChanged.event; constructor() { diff --git a/src/vs/workbench/contrib/terminal/browser/terminalTab.ts b/src/vs/workbench/contrib/terminal/browser/terminalTab.ts index 23d85afde8e..a984ba56232 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalTab.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalTab.ts @@ -223,9 +223,9 @@ export class TerminalTab extends Disposable implements ITerminalTab { public get terminalInstances(): ITerminalInstance[] { return this._terminalInstances; } private readonly _onDisposed: Emitter; - public get onDisposed(): Event { return this._onDisposed.event; } + public readonly onDisposed: Event = this._onDisposed.event; private readonly _onInstancesChanged: Emitter; - public get onInstancesChanged(): Event { return this._onInstancesChanged.event; } + public readonly onInstancesChanged: Event = this._onInstancesChanged.event; constructor( terminalFocusContextKey: IContextKey, diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts index 9dfa9721021..889766333d3 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts @@ -37,7 +37,7 @@ export class WebviewEditor extends BaseEditor { private readonly _onFocusWindowHandler = this._register(new MutableDisposable()); private readonly _onDidFocusWebview = this._register(new Emitter()); - public get onDidFocus(): Event { return this._onDidFocusWebview.event; } + public readonly onDidFocus: Event = this._onDidFocusWebview.event; private pendingMessages: any[] = []; diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts index 32d4b8d25f0..e0c1d79deb1 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts @@ -296,7 +296,7 @@ export class WebviewElement extends Disposable implements Webview { private _focused = false; private readonly _onDidFocus = this._register(new Emitter()); - public get onDidFocus(): Event { return this._onDidFocus.event; } + public readonly onDidFocus: Event = this._onDidFocus.event; constructor( private readonly _options: WebviewOptions, diff --git a/src/vs/workbench/services/contextmenu/electron-browser/contextmenuService.ts b/src/vs/workbench/services/contextmenu/electron-browser/contextmenuService.ts index f0a715d5868..37d10c4d8fd 100644 --- a/src/vs/workbench/services/contextmenu/electron-browser/contextmenuService.ts +++ b/src/vs/workbench/services/contextmenu/electron-browser/contextmenuService.ts @@ -66,7 +66,7 @@ class NativeContextMenuService extends Disposable implements IContextMenuService _serviceBrand: any; private _onDidContextMenu = this._register(new Emitter()); - get onDidContextMenu(): Event { return this._onDidContextMenu.event; } + readonly onDidContextMenu: Event = this._onDidContextMenu.event; constructor( @INotificationService private readonly notificationService: INotificationService, diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index 039e5b9624c..444045e8825 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -40,16 +40,16 @@ export class EditorService extends Disposable implements EditorServiceImpl { //#region events private readonly _onDidActiveEditorChange: Emitter = this._register(new Emitter()); - get onDidActiveEditorChange(): Event { return this._onDidActiveEditorChange.event; } + readonly onDidActiveEditorChange: Event = this._onDidActiveEditorChange.event; private readonly _onDidVisibleEditorsChange: Emitter = this._register(new Emitter()); - get onDidVisibleEditorsChange(): Event { return this._onDidVisibleEditorsChange.event; } + readonly onDidVisibleEditorsChange: Event = this._onDidVisibleEditorsChange.event; private readonly _onDidCloseEditor: Emitter = this._register(new Emitter()); - get onDidCloseEditor(): Event { return this._onDidCloseEditor.event; } + readonly onDidCloseEditor: Event = this._onDidCloseEditor.event; private readonly _onDidOpenEditorFail: Emitter = this._register(new Emitter()); - get onDidOpenEditorFail(): Event { return this._onDidOpenEditorFail.event; } + readonly onDidOpenEditorFail: Event = this._onDidOpenEditorFail.event; //#endregion diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index e860bcd6048..819e2a1fc08 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -70,10 +70,10 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil static setSaveParticipant(handler: ISaveParticipant | null): void { TextFileEditorModel.saveParticipant = handler; } private readonly _onDidContentChange: Emitter = this._register(new Emitter()); - get onDidContentChange(): Event { return this._onDidContentChange.event; } + readonly onDidContentChange: Event = this._onDidContentChange.event; private readonly _onDidStateChange: Emitter = this._register(new Emitter()); - get onDidStateChange(): Event { return this._onDidStateChange.event; } + readonly onDidStateChange: Event = this._onDidStateChange.event; private resource: URI; diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts index af67898ef69..8afe2d46768 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts @@ -15,28 +15,28 @@ import { ResourceMap } from 'vs/base/common/map'; export class TextFileEditorModelManager extends Disposable implements ITextFileEditorModelManager { private readonly _onModelDisposed: Emitter = this._register(new Emitter()); - get onModelDisposed(): Event { return this._onModelDisposed.event; } + readonly onModelDisposed: Event = this._onModelDisposed.event; private readonly _onModelContentChanged: Emitter = this._register(new Emitter()); - get onModelContentChanged(): Event { return this._onModelContentChanged.event; } + readonly onModelContentChanged: Event = this._onModelContentChanged.event; private readonly _onModelDirty: Emitter = this._register(new Emitter()); - get onModelDirty(): Event { return this._onModelDirty.event; } + readonly onModelDirty: Event = this._onModelDirty.event; private readonly _onModelSaveError: Emitter = this._register(new Emitter()); - get onModelSaveError(): Event { return this._onModelSaveError.event; } + readonly onModelSaveError: Event = this._onModelSaveError.event; private readonly _onModelSaved: Emitter = this._register(new Emitter()); - get onModelSaved(): Event { return this._onModelSaved.event; } + readonly onModelSaved: Event = this._onModelSaved.event; private readonly _onModelReverted: Emitter = this._register(new Emitter()); - get onModelReverted(): Event { return this._onModelReverted.event; } + readonly onModelReverted: Event = this._onModelReverted.event; private readonly _onModelEncodingChanged: Emitter = this._register(new Emitter()); - get onModelEncodingChanged(): Event { return this._onModelEncodingChanged.event; } + readonly onModelEncodingChanged: Event = this._onModelEncodingChanged.event; private readonly _onModelOrphanedChanged: Emitter = this._register(new Emitter()); - get onModelOrphanedChanged(): Event { return this._onModelOrphanedChanged.event; } + readonly onModelOrphanedChanged: Event = this._onModelOrphanedChanged.event; private _onModelsDirtyEvent: Event; private _onModelsSaveError: Event; diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index 34ac606235f..33870009b83 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -49,13 +49,13 @@ export abstract class TextFileService extends Disposable implements ITextFileSer _serviceBrand: ServiceIdentifier; private readonly _onAutoSaveConfigurationChange: Emitter = this._register(new Emitter()); - get onAutoSaveConfigurationChange(): Event { return this._onAutoSaveConfigurationChange.event; } + readonly onAutoSaveConfigurationChange: Event = this._onAutoSaveConfigurationChange.event; private readonly _onFilesAssociationChange: Emitter = this._register(new Emitter()); - get onFilesAssociationChange(): Event { return this._onFilesAssociationChange.event; } + readonly onFilesAssociationChange: Event = this._onFilesAssociationChange.event; private readonly _onWillMove = this._register(new Emitter()); - get onWillMove(): Event { return this._onWillMove.event; } + readonly onWillMove: Event = this._onWillMove.event; private _models: TextFileEditorModelManager; get models(): ITextFileEditorModelManager { return this._models; } diff --git a/src/vs/workbench/services/themes/common/colorThemeStore.ts b/src/vs/workbench/services/themes/common/colorThemeStore.ts index a803474e606..272338755fc 100644 --- a/src/vs/workbench/services/themes/common/colorThemeStore.ts +++ b/src/vs/workbench/services/themes/common/colorThemeStore.ts @@ -53,17 +53,15 @@ export interface ColorThemeChangeEvent { export class ColorThemeStore { private extensionsColorThemes: ColorThemeData[]; - private readonly onDidChangeEmitter: Emitter; - public get onDidChange(): Event { return this.onDidChangeEmitter.event; } + private readonly onDidChangeEmitter = new Emitter(); + public readonly onDidChange: Event = this.onDidChangeEmitter.event; constructor(@IExtensionService private readonly extensionService: IExtensionService, defaultTheme: ColorThemeData) { this.extensionsColorThemes = [defaultTheme]; - this.onDidChangeEmitter = new Emitter(); this.initialize(); } - private initialize() { themesExtPoint.setHandler((extensions, delta) => { const previousIds: { [key: string]: boolean } = {}; diff --git a/src/vs/workbench/services/untitled/common/untitledEditorService.ts b/src/vs/workbench/services/untitled/common/untitledEditorService.ts index 5996ee18648..ad0498407ff 100644 --- a/src/vs/workbench/services/untitled/common/untitledEditorService.ts +++ b/src/vs/workbench/services/untitled/common/untitledEditorService.ts @@ -118,16 +118,16 @@ export class UntitledEditorService extends Disposable implements IUntitledEditor private mapResourceToAssociatedFilePath = new ResourceMap(); private readonly _onDidChangeContent: Emitter = this._register(new Emitter()); - get onDidChangeContent(): Event { return this._onDidChangeContent.event; } + readonly onDidChangeContent: Event = this._onDidChangeContent.event; private readonly _onDidChangeDirty: Emitter = this._register(new Emitter()); - get onDidChangeDirty(): Event { return this._onDidChangeDirty.event; } + readonly onDidChangeDirty: Event = this._onDidChangeDirty.event; private readonly _onDidChangeEncoding: Emitter = this._register(new Emitter()); - get onDidChangeEncoding(): Event { return this._onDidChangeEncoding.event; } + readonly onDidChangeEncoding: Event = this._onDidChangeEncoding.event; private readonly _onDidDisposeModel: Emitter = this._register(new Emitter()); - get onDidDisposeModel(): Event { return this._onDidDisposeModel.event; } + readonly onDidDisposeModel: Event = this._onDidDisposeModel.event; constructor( @IInstantiationService private readonly instantiationService: IInstantiationService, From 57f3bc13cbfce31c28c5db8d9aea485c6e7537e9 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 16:19:58 -0700 Subject: [PATCH 254/710] Use enum to track force open mode --- .../files/common/editors/fileEditorInput.ts | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts b/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts index c9d15e680c1..2d25923a2c2 100644 --- a/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts +++ b/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts @@ -19,6 +19,12 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { FILE_EDITOR_INPUT_ID, TEXT_FILE_EDITOR_ID, BINARY_FILE_EDITOR_ID } from 'vs/workbench/contrib/files/common/files'; import { ILabelService } from 'vs/platform/label/common/label'; +const enum ForceOpenAs { + None, + Text, + Binary +} + /** * A file editor input is the input type for the file editor of file system resources. */ @@ -26,8 +32,7 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { private preferredEncoding: string; private preferredMode: string; - private forceOpenAsBinary: boolean; - private forceOpenAsText: boolean; + private forceOpenAs: ForceOpenAs = ForceOpenAs.None; private textModelReference: Promise> | null; private name: string; @@ -107,7 +112,7 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { setPreferredEncoding(encoding: string): void { this.preferredEncoding = encoding; - this.forceOpenAsText = true; // encoding is a good hint to open the file as text + this.forceOpenAs = ForceOpenAs.Text; // encoding is a good hint to open the file as text } getPreferredMode(): string | undefined { @@ -125,17 +130,15 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { setPreferredMode(mode: string): void { this.preferredMode = mode; - this.forceOpenAsText = true; // mode is a good hint to open the file as text + this.forceOpenAs = ForceOpenAs.Text; // mode is a good hint to open the file as text } setForceOpenAsText(): void { - this.forceOpenAsText = true; - this.forceOpenAsBinary = false; + this.forceOpenAs = ForceOpenAs.Text; } setForceOpenAsBinary(): void { - this.forceOpenAsBinary = true; - this.forceOpenAsText = false; + this.forceOpenAs = ForceOpenAs.Binary; } getTypeId(): string { @@ -256,13 +259,13 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { } getPreferredEditorId(candidates: string[]): string { - return this.forceOpenAsBinary ? BINARY_FILE_EDITOR_ID : TEXT_FILE_EDITOR_ID; + return this.forceOpenAs === ForceOpenAs.Binary ? BINARY_FILE_EDITOR_ID : TEXT_FILE_EDITOR_ID; } resolve(): Promise { // Resolve as binary - if (this.forceOpenAsBinary) { + if (this.forceOpenAs === ForceOpenAs.Binary) { return this.doResolveAsBinary(); } @@ -278,7 +281,7 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { mode: this.preferredMode, encoding: this.preferredEncoding, reload: { async: true }, // trigger a reload of the model if it exists already but do not wait to show the model - allowBinary: this.forceOpenAsText, + allowBinary: this.forceOpenAs === ForceOpenAs.Text, reason: LoadReason.EDITOR }); From c975752a85031eef6c40b03221c8625cfb50be00 Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Mon, 15 Jul 2019 17:30:29 -0700 Subject: [PATCH 255/710] fixes #77430 --- src/vs/base/browser/ui/dialog/dialog.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/vs/base/browser/ui/dialog/dialog.ts b/src/vs/base/browser/ui/dialog/dialog.ts index a33545b641e..2e95c5955ac 100644 --- a/src/vs/base/browser/ui/dialog/dialog.ts +++ b/src/vs/base/browser/ui/dialog/dialog.ts @@ -99,6 +99,14 @@ export class Dialog extends Disposable { let focusedButton = 0; const buttonGroup = this.buttonGroup = new ButtonGroup(this.buttonsContainer, this.buttons.length, { title: true }); const buttonMap = this.rearrangeButtons(this.buttons, this.options.cancelId); + + // Set focused button to UI index + buttonMap.forEach((value, index) => { + if (value.index === 0) { + focusedButton = index; + } + }); + buttonGroup.buttons.forEach((button, index) => { button.label = mnemonicButtonLabel(buttonMap[index].label, true); @@ -190,11 +198,7 @@ export class Dialog extends Disposable { show(this.element); // Focus first element - buttonMap.forEach((value, index) => { - if (value.index === focusedButton) { - buttonGroup.buttons[index].focus(); - } - }); + buttonGroup.buttons[focusedButton].focus(); }); } From 7bce874d1bc823a2c871eb8e819669802afb129e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 17:25:17 -0700 Subject: [PATCH 256/710] Mark fields private --- .../contrib/webview/browser/webviewEditor.ts | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts index 889766333d3..ba0782158e4 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts @@ -24,8 +24,8 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic export class WebviewEditor extends BaseEditor { - protected _webview: Webview | undefined; - protected findWidgetVisible: IContextKey; + private _webview: Webview | undefined; + private _findWidgetVisible: IContextKey; public static readonly ID = 'WebviewEditor'; @@ -39,7 +39,7 @@ export class WebviewEditor extends BaseEditor { private readonly _onDidFocusWebview = this._register(new Emitter()); public readonly onDidFocus: Event = this._onDidFocusWebview.event; - private pendingMessages: any[] = []; + private _pendingMessages: any[] = []; constructor( @ITelemetryService telemetryService: ITelemetryService, @@ -53,7 +53,7 @@ export class WebviewEditor extends BaseEditor { ) { super(WebviewEditor.ID, telemetryService, themeService, storageService); if (_contextKeyService) { - this.findWidgetVisible = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(_contextKeyService); + this._findWidgetVisible = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(_contextKeyService); } } @@ -78,7 +78,7 @@ export class WebviewEditor extends BaseEditor { } public dispose(): void { - this.pendingMessages = []; + this._pendingMessages = []; // Let the editor input dispose of the webview. this._webview = undefined; @@ -96,18 +96,18 @@ export class WebviewEditor extends BaseEditor { if (this._webview) { this._webview.sendMessage(data); } else { - this.pendingMessages.push(data); + this._pendingMessages.push(data); } } public showFind() { if (this._webview) { this._webview.showFind(); - this.findWidgetVisible.set(true); + this._findWidgetVisible.set(true); } } public hideFind() { - this.findWidgetVisible.reset(); + this._findWidgetVisible.reset(); if (this._webview) { this._webview.hideFind(); } @@ -178,7 +178,7 @@ export class WebviewEditor extends BaseEditor { this._webview = undefined; this._webviewContent = undefined; - this.pendingMessages = []; + this._pendingMessages = []; super.clearInput(); } @@ -189,7 +189,7 @@ export class WebviewEditor extends BaseEditor { this._webview = undefined; this._webviewContent = undefined; } - this.pendingMessages = []; + this._pendingMessages = []; return super.setInput(input, options, token) .then(() => input.resolve()) .then(() => { @@ -240,7 +240,7 @@ export class WebviewEditor extends BaseEditor { } else { if (input.options.enableFindWidget) { this._contextKeyService = this._register(this._contextKeyService.createScoped(this._webviewContent)); - this.findWidgetVisible = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(this._contextKeyService); + this._findWidgetVisible = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(this._contextKeyService); } this._webview = this._webviewService.createWebview(input.id, @@ -263,10 +263,10 @@ export class WebviewEditor extends BaseEditor { this.doUpdateContainer(); } - for (const message of this.pendingMessages) { + for (const message of this._pendingMessages) { this._webview.sendMessage(message); } - this.pendingMessages = []; + this._pendingMessages = []; this.trackFocus(); From 6eab67ec20375b4b68293d91c64048205c535367 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 17:40:22 -0700 Subject: [PATCH 257/710] Fix webview focus event --- src/vs/workbench/contrib/webview/browser/webviewEditor.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts index ba0782158e4..b128f150afb 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts @@ -24,11 +24,11 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic export class WebviewEditor extends BaseEditor { + public static readonly ID = 'WebviewEditor'; + private _webview: Webview | undefined; private _findWidgetVisible: IContextKey; - public static readonly ID = 'WebviewEditor'; - private _editorFrame: HTMLElement; private _content?: HTMLElement; private _webviewContent: HTMLElement | undefined; @@ -37,7 +37,7 @@ export class WebviewEditor extends BaseEditor { private readonly _onFocusWindowHandler = this._register(new MutableDisposable()); private readonly _onDidFocusWebview = this._register(new Emitter()); - public readonly onDidFocus: Event = this._onDidFocusWebview.event; + public get onDidFocus(): Event { return this._onDidFocusWebview.event; } private _pendingMessages: any[] = []; From a7bc93f0be95fa7b3c21505ecd957bdb6ba7bd5c Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 18:01:54 -0700 Subject: [PATCH 258/710] Remove overload for registerEditor The non-array version of `registerEditor` was only being used in tests --- src/vs/workbench/browser/editor.ts | 13 +++---------- .../editor/test/browser/editorGroupsService.test.ts | 2 +- .../editor/test/browser/editorService.test.ts | 2 +- .../test/browser/parts/editor/baseEditor.test.ts | 8 ++++---- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/vs/workbench/browser/editor.ts b/src/vs/workbench/browser/editor.ts index 1f31ed7eafd..41d46524d9a 100644 --- a/src/vs/workbench/browser/editor.ts +++ b/src/vs/workbench/browser/editor.ts @@ -8,7 +8,6 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { Registry } from 'vs/platform/registry/common/platform'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { IConstructorSignature0, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { asArray } from 'vs/base/common/arrays'; export interface IEditorDescriptor { instantiate(instantiationService: IInstantiationService): BaseEditor; @@ -27,11 +26,10 @@ export interface IEditorRegistry { * input, the input itself will be asked which editor it prefers if this method is provided. Otherwise * the first editor in the list will be returned. * - * @param editorInputDescriptor a constructor function that returns an instance of EditorInput for which the + * @param inputDescriptors A set of constructor functions that returns an instance of EditorInput for which the * registered editor should be used for. */ - registerEditor(descriptor: IEditorDescriptor, editorInputDescriptor: SyncDescriptor): void; - registerEditor(descriptor: IEditorDescriptor, editorInputDescriptor: SyncDescriptor[]): void; + registerEditor(descriptor: IEditorDescriptor, inputDescriptors: readonly SyncDescriptor[]): void; /** * Returns the editor descriptor for the given input or `undefined` if none. @@ -83,12 +81,7 @@ class EditorRegistry implements IEditorRegistry { private editors: EditorDescriptor[] = []; private readonly mapEditorToInputs = new Map[]>(); - registerEditor(descriptor: EditorDescriptor, editorInputDescriptor: SyncDescriptor): void; - registerEditor(descriptor: EditorDescriptor, editorInputDescriptor: SyncDescriptor[]): void; - registerEditor(descriptor: EditorDescriptor, editorInputDescriptor: SyncDescriptor | SyncDescriptor[]): void { - - const inputDescriptors: SyncDescriptor[] = asArray(editorInputDescriptor); - + registerEditor(descriptor: EditorDescriptor, inputDescriptors: readonly SyncDescriptor[]): void { // Register (Support multiple Editors per Input) this.mapEditorToInputs.set(descriptor, inputDescriptors); diff --git a/src/vs/workbench/services/editor/test/browser/editorGroupsService.test.ts b/src/vs/workbench/services/editor/test/browser/editorGroupsService.test.ts index 28720257840..b577d40f181 100644 --- a/src/vs/workbench/services/editor/test/browser/editorGroupsService.test.ts +++ b/src/vs/workbench/services/editor/test/browser/editorGroupsService.test.ts @@ -80,7 +80,7 @@ suite('EditorGroupsService', () => { } (Registry.as(EditorExtensions.EditorInputFactories)).registerEditorInputFactory('testEditorInputForGroupsService', TestEditorInputFactory); - (Registry.as(Extensions.Editors)).registerEditor(new EditorDescriptor(TestEditorControl, 'MyTestEditorForGroupsService', 'My Test File Editor'), new SyncDescriptor(TestEditorInput)); + (Registry.as(Extensions.Editors)).registerEditor(new EditorDescriptor(TestEditorControl, 'MyTestEditorForGroupsService', 'My Test File Editor'), [new SyncDescriptor(TestEditorInput)]); } registerTestEditorInput(); diff --git a/src/vs/workbench/services/editor/test/browser/editorService.test.ts b/src/vs/workbench/services/editor/test/browser/editorService.test.ts index 81cbc839a9b..913a95d4aa1 100644 --- a/src/vs/workbench/services/editor/test/browser/editorService.test.ts +++ b/src/vs/workbench/services/editor/test/browser/editorService.test.ts @@ -83,7 +83,7 @@ class FileServiceProvider extends Disposable { suite('EditorService', () => { function registerTestEditorInput(): void { - Registry.as(Extensions.Editors).registerEditor(new EditorDescriptor(TestEditorControl, 'MyTestEditorForEditorService', 'My Test Editor For Next Editor Service'), new SyncDescriptor(TestEditorInput)); + Registry.as(Extensions.Editors).registerEditor(new EditorDescriptor(TestEditorControl, 'MyTestEditorForEditorService', 'My Test Editor For Next Editor Service'), [new SyncDescriptor(TestEditorInput)]); } registerTestEditorInput(); diff --git a/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts b/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts index c1ab20f2573..5b5fa096f9d 100644 --- a/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts @@ -127,7 +127,7 @@ suite('Workbench base editor', () => { let oldEditorsCnt = EditorRegistry.getEditors().length; let oldInputCnt = (EditorRegistry).getEditorInputs().length; - EditorRegistry.registerEditor(d1, new SyncDescriptor(MyInput)); + EditorRegistry.registerEditor(d1, [new SyncDescriptor(MyInput)]); EditorRegistry.registerEditor(d2, [new SyncDescriptor(MyInput), new SyncDescriptor(MyOtherInput)]); assert.equal(EditorRegistry.getEditors().length, oldEditorsCnt + 2); @@ -148,8 +148,8 @@ suite('Workbench base editor', () => { let oldEditors = EditorRegistry.getEditors(); (EditorRegistry).setEditors([]); - EditorRegistry.registerEditor(d2, new SyncDescriptor(ResourceEditorInput)); - EditorRegistry.registerEditor(d1, new SyncDescriptor(MyResourceInput)); + EditorRegistry.registerEditor(d2, [new SyncDescriptor(ResourceEditorInput)]); + EditorRegistry.registerEditor(d1, [new SyncDescriptor(MyResourceInput)]); let inst = new TestInstantiationService(); @@ -168,7 +168,7 @@ suite('Workbench base editor', () => { let oldEditors = EditorRegistry.getEditors(); (EditorRegistry).setEditors([]); - EditorRegistry.registerEditor(d1, new SyncDescriptor(ResourceEditorInput)); + EditorRegistry.registerEditor(d1, [new SyncDescriptor(ResourceEditorInput)]); let inst = new TestInstantiationService(); From 606f487fa4c0c6ef3ba9cf106672ca6c679ec8b3 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 18:04:11 -0700 Subject: [PATCH 259/710] Fix comments --- src/vs/workbench/browser/editor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/editor.ts b/src/vs/workbench/browser/editor.ts index 41d46524d9a..e4add229a83 100644 --- a/src/vs/workbench/browser/editor.ts +++ b/src/vs/workbench/browser/editor.ts @@ -26,7 +26,7 @@ export interface IEditorRegistry { * input, the input itself will be asked which editor it prefers if this method is provided. Otherwise * the first editor in the list will be returned. * - * @param inputDescriptors A set of constructor functions that returns an instance of EditorInput for which the + * @param inputDescriptors A set of constructor functions that return an instance of EditorInput for which the * registered editor should be used for. */ registerEditor(descriptor: IEditorDescriptor, inputDescriptors: readonly SyncDescriptor[]): void; @@ -37,7 +37,7 @@ export interface IEditorRegistry { getEditor(input: EditorInput): IEditorDescriptor | undefined; /** - * Returns the editor descriptor for the given identifier or null if none. + * Returns the editor descriptor for the given identifier or `undefined` if none. */ getEditorById(editorId: string): IEditorDescriptor | undefined; From 02fdb59938f1b52a193e27f5518e40f8d3bdd4fa Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 15 Jul 2019 18:12:55 -0700 Subject: [PATCH 260/710] Make sure we set emitter before getting event --- src/vs/workbench/contrib/terminal/browser/terminalTab.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalTab.ts b/src/vs/workbench/contrib/terminal/browser/terminalTab.ts index a984ba56232..20259f39e08 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalTab.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalTab.ts @@ -222,9 +222,9 @@ export class TerminalTab extends Disposable implements ITerminalTab { public get terminalInstances(): ITerminalInstance[] { return this._terminalInstances; } - private readonly _onDisposed: Emitter; + private readonly _onDisposed: Emitter = new Emitter(); public readonly onDisposed: Event = this._onDisposed.event; - private readonly _onInstancesChanged: Emitter; + private readonly _onInstancesChanged: Emitter = new Emitter(); public readonly onInstancesChanged: Event = this._onInstancesChanged.event; constructor( @@ -237,8 +237,6 @@ export class TerminalTab extends Disposable implements ITerminalTab { @IInstantiationService private readonly _instantiationService: IInstantiationService ) { super(); - this._onDisposed = new Emitter(); - this._onInstancesChanged = new Emitter(); let instance: ITerminalInstance; if ('id' in shellLaunchConfigOrInstance) { From 8e0f348413f4f616c23a88ae30030efa85811973 Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Tue, 16 Jul 2019 01:35:01 +0000 Subject: [PATCH 261/710] fixes #67212 --- src/vs/workbench/browser/layout.ts | 35 ++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index a70593c4390..20b51a70e76 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -53,6 +53,7 @@ enum Storage { PANEL_HIDDEN = 'workbench.panel.hidden', PANEL_POSITION = 'workbench.panel.location', + PANEL_SIZE_BEFORE_MAXIMIZED = 'workbench.panel.sizeBeforeMaximized', ZEN_MODE_ENABLED = 'workbench.zenmode.active', CENTERED_LAYOUT_ENABLED = 'workbench.centerededitorlayout.active', @@ -141,6 +142,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi panel: { hidden: false, + sizeBeforeMaximize: 0, position: Position.BOTTOM, height: 350, width: 350, @@ -397,6 +399,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi } } + // Panel size before maximized + this.state.panel.sizeBeforeMaximize = this.storageService.getNumber(Storage.PANEL_SIZE_BEFORE_MAXIMIZED, StorageScope.GLOBAL, 0); + // Statusbar visibility this.state.statusBar.hidden = !this.configurationService.getValue(Settings.STATUSBAR_VISIBLE); @@ -1069,7 +1074,28 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi toggleMaximizedPanel(): void { if (this.workbenchGrid instanceof Grid) { - this.workbenchGrid.maximizeViewSize(this.panelPartView); + const curSize = this.workbenchGrid.getViewSize2(this.panelPartView); + const size = { ...curSize }; + + if (!this.isPanelMaximized()) { + if (this.state.panel.position === Position.BOTTOM) { + size.height = this.panelPartView.maximumHeight; + this.state.panel.sizeBeforeMaximize = curSize.height; + } else { + size.width = this.panelPartView.maximumWidth; + this.state.panel.sizeBeforeMaximize = curSize.width; + } + + this.storageService.store(Storage.PANEL_SIZE_BEFORE_MAXIMIZED, this.state.panel.sizeBeforeMaximize, StorageScope.GLOBAL); + } else { + if (this.state.panel.position === Position.BOTTOM) { + size.height = this.state.panel.sizeBeforeMaximize; + } else { + size.width = this.state.panel.sizeBeforeMaximize; + } + } + + this.workbenchGrid.resizeView(this.panelPartView, size); } else { this.workbenchGrid.layout({ toggleMaximizedPanel: true, source: Parts.PANEL_PART }); } @@ -1078,7 +1104,12 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi isPanelMaximized(): boolean { if (this.workbenchGrid instanceof Grid) { try { - return this.workbenchGrid.getViewSize2(this.panelPartView).height === this.getPart(Parts.PANEL_PART).maximumHeight; + // The panel is maximum when the editor is minimum + if (this.state.panel.position === Position.BOTTOM) { + return this.workbenchGrid.getViewSize2(this.editorPartView).height <= this.editorPartView.minimumHeight; + } else { + return this.workbenchGrid.getViewSize2(this.editorPartView).width <= this.editorPartView.minimumWidth; + } } catch (e) { return false; } From c64f42b841427e72e8c1bc82cd6cb266064669eb Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 16 Jul 2019 08:14:12 +0200 Subject: [PATCH 262/710] distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 46ab96c10c0..46667dd4119 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "d679b3a96ff63c9a5bdf13c8da3659810fbc2a2d", + "distro": "18f781db7cf104b1156ee97a29d4938296ea4616", "author": { "name": "Microsoft Corporation" }, From 08b3fd579751373b7438ddd5e870f6d97b88470f Mon Sep 17 00:00:00 2001 From: skprabhanjan Date: Tue, 16 Jul 2019 11:51:09 +0530 Subject: [PATCH 263/710] Changed Filer to File Match only --- .../workbench/contrib/search/browser/search.contribution.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/search/browser/search.contribution.ts b/src/vs/workbench/contrib/search/browser/search.contribution.ts index cc180c7f64c..49878f159b1 100644 --- a/src/vs/workbench/contrib/search/browser/search.contribution.ts +++ b/src/vs/workbench/contrib/search/browser/search.contribution.ts @@ -50,7 +50,7 @@ import { registerContributions as searchWidgetContributions } from 'vs/workbench import * as Constants from 'vs/workbench/contrib/search/common/constants'; import { getWorkspaceSymbols } from 'vs/workbench/contrib/search/common/search'; import { ISearchHistoryService, SearchHistoryService } from 'vs/workbench/contrib/search/common/searchHistoryService'; -import { FileMatchOrMatch, ISearchWorkbenchService, RenderableMatch, SearchWorkbenchService, FileMatch, FolderMatch } from 'vs/workbench/contrib/search/common/searchModel'; +import { FileMatchOrMatch, ISearchWorkbenchService, RenderableMatch, SearchWorkbenchService, FileMatch } from 'vs/workbench/contrib/search/common/searchModel'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { ISearchConfiguration, ISearchConfigurationProperties, PANEL_ID, VIEWLET_ID, VIEW_CONTAINER, VIEW_ID } from 'vs/workbench/services/search/common/search'; @@ -215,7 +215,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ CommandsRegistry.registerCommand({ id: Constants.RevealInSideBarForSearchResults, - handler: (accessor, fileMatch: FileMatch | FolderMatch) => { + handler: (accessor, fileMatch: FileMatch) => { const viewletService = accessor.get(IViewletService); const explorerService = accessor.get(IExplorerService); const contextService = accessor.get(IWorkspaceContextService); @@ -240,7 +240,7 @@ const RevealInSideBarForSearchResultsCommand: ICommandAction = { MenuRegistry.appendMenuItem(MenuId.SearchContext, { command: RevealInSideBarForSearchResultsCommand, - when: ContextKeyExpr.and(Constants.FileMatchOrFolderMatchFocusKey, Constants.HasSearchResults), + when: ContextKeyExpr.and(Constants.FileFocusKey, Constants.HasSearchResults), group: '2_files', }); From 57aca202fae8449161cf739cd9bf5e15199ebb7e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 16 Jul 2019 08:39:12 +0200 Subject: [PATCH 264/710] splitview: fix resize priority in distributeEmptySpace --- src/vs/base/browser/ui/splitview/splitview.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 9584ce7d4ae..78f46feb865 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -736,6 +736,16 @@ export class SplitView extends Disposable { let emptyDelta = this.size - contentSize; const indexes = range(this.viewItems.length - 1, -1); + const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === LayoutPriority.Low); + const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === LayoutPriority.High); + + for (const index of highPriorityIndexes) { + pushToStart(indexes, index); + } + + for (const index of lowPriorityIndexes) { + pushToEnd(indexes, index); + } if (typeof lowPriorityIndex === 'number') { pushToEnd(indexes, lowPriorityIndex); From d90c3e2c60a64df83869b8ee996d35dfa0c46b38 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 16 Jul 2019 08:48:08 +0200 Subject: [PATCH 265/710] missing event wiring fixes #67210 --- src/vs/base/browser/ui/centered/centeredViewLayout.ts | 3 ++- src/vs/workbench/browser/part.ts | 5 +++-- src/vs/workbench/browser/parts/editor/editorPart.ts | 7 ++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/vs/base/browser/ui/centered/centeredViewLayout.ts b/src/vs/base/browser/ui/centered/centeredViewLayout.ts index ff349b87bd4..b40384018f1 100644 --- a/src/vs/base/browser/ui/centered/centeredViewLayout.ts +++ b/src/vs/base/browser/ui/centered/centeredViewLayout.ts @@ -6,7 +6,7 @@ import { SplitView, Orientation, ISplitViewStyles, IView as ISplitViewView } from 'vs/base/browser/ui/splitview/splitview'; import { $ } from 'vs/base/browser/dom'; import { Event } from 'vs/base/common/event'; -import { IView } from 'vs/base/browser/ui/grid/gridview'; +import { IView, IViewSize } from 'vs/base/browser/ui/grid/gridview'; import { IDisposable, DisposableStore } from 'vs/base/common/lifecycle'; import { Color } from 'vs/base/common/color'; @@ -68,6 +68,7 @@ export class CenteredViewLayout implements IDisposable { get maximumWidth(): number { return this.splitView ? this.splitView.maximumSize : this.view.maximumWidth; } get minimumHeight(): number { return this.view.minimumHeight; } get maximumHeight(): number { return this.view.maximumHeight; } + get onDidChange(): Event { return this.view.onDidChange; } layout(width: number, height: number): void { this.width = width; diff --git a/src/vs/workbench/browser/part.ts b/src/vs/workbench/browser/part.ts index 3822e23e4ea..f80e4545957 100644 --- a/src/vs/workbench/browser/part.ts +++ b/src/vs/workbench/browser/part.ts @@ -12,6 +12,7 @@ import { IDimension } from 'vs/platform/layout/browser/layoutService'; import { ISerializableView, Orientation } from 'vs/base/browser/ui/grid/grid'; import { Event, Emitter } from 'vs/base/common/event'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; +import { IViewSize } from 'vs/base/browser/ui/grid/gridview'; export interface IPartOptions { hasTitle?: boolean; @@ -117,8 +118,8 @@ export abstract class Part extends Component implements ISerializableView { //#region ISerializableView - private _onDidChange = this._register(new Emitter<{ width: number; height: number; }>()); - get onDidChange(): Event<{ width: number, height: number }> { return this._onDidChange.event; } + private _onDidChange = this._register(new Emitter()); + get onDidChange(): Event { return this._onDidChange.event; } element: HTMLElement; diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index dc894921aaa..b7872b6731e 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -27,7 +27,7 @@ import { EditorDropTarget } from 'vs/workbench/browser/parts/editor/editorDropTa import { localize } from 'vs/nls'; import { Color } from 'vs/base/common/color'; import { CenteredViewLayout } from 'vs/base/browser/ui/centered/centeredViewLayout'; -import { IView, orthogonal, LayoutPriority } from 'vs/base/browser/ui/grid/gridview'; +import { IView, orthogonal, LayoutPriority, IViewSize } from 'vs/base/browser/ui/grid/gridview'; import { onUnexpectedError } from 'vs/base/common/errors'; import { Parts, IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; @@ -756,13 +756,14 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro //#region Part - readonly priority: LayoutPriority = LayoutPriority.High; - get minimumWidth(): number { return this.centeredLayoutWidget.minimumWidth; } get maximumWidth(): number { return this.centeredLayoutWidget.maximumWidth; } get minimumHeight(): number { return this.centeredLayoutWidget.minimumHeight; } get maximumHeight(): number { return this.centeredLayoutWidget.maximumHeight; } + get onDidChange(): Event { return this.centeredLayoutWidget.onDidChange; } + readonly priority: LayoutPriority = LayoutPriority.High; + get preferredSize(): Dimension { if (!this._preferredSize) { this._preferredSize = new Dimension(this.gridWidget.minimumWidth, this.gridWidget.minimumHeight); From 8580cf0edbfcf70cdb4e6ae4b0c7e9fd26451269 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 16 Jul 2019 09:16:17 +0200 Subject: [PATCH 266/710] cleanup TODO --- src/vs/base/browser/ui/grid/grid.ts | 6 ------ src/vs/workbench/browser/layout.ts | 6 +++--- src/vs/workbench/browser/parts/editor/editorPart.ts | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/vs/base/browser/ui/grid/grid.ts b/src/vs/base/browser/ui/grid/grid.ts index 3a22b6b825f..0fc6d389e81 100644 --- a/src/vs/base/browser/ui/grid/grid.ts +++ b/src/vs/base/browser/ui/grid/grid.ts @@ -300,12 +300,6 @@ export class Grid extends Disposable { return this.gridview.getViewSize(location); } - // TODO@joao cleanup - getViewSize2(view: T): { width: number; height: number; } { - const location = this.getViewLocation(view); - return this.gridview.getViewSize(location); - } - maximizeViewSize(view: T): void { const location = this.getViewLocation(view); this.gridview.maximizeViewSize(location); diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 20b51a70e76..1b23d3a42e3 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -1074,7 +1074,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi toggleMaximizedPanel(): void { if (this.workbenchGrid instanceof Grid) { - const curSize = this.workbenchGrid.getViewSize2(this.panelPartView); + const curSize = this.workbenchGrid.getViewSize(this.panelPartView); const size = { ...curSize }; if (!this.isPanelMaximized()) { @@ -1106,9 +1106,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi try { // The panel is maximum when the editor is minimum if (this.state.panel.position === Position.BOTTOM) { - return this.workbenchGrid.getViewSize2(this.editorPartView).height <= this.editorPartView.minimumHeight; + return this.workbenchGrid.getViewSize(this.editorPartView).height <= this.editorPartView.minimumHeight; } else { - return this.workbenchGrid.getViewSize2(this.editorPartView).width <= this.editorPartView.minimumWidth; + return this.workbenchGrid.getViewSize(this.editorPartView).width <= this.editorPartView.minimumWidth; } } catch (e) { return false; diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index b7872b6731e..a42cf0aed2f 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -564,7 +564,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro // Maximize the group if it is currently minimized if (this.gridWidget) { - const viewSize = this.gridWidget.getViewSize2(group); + const viewSize = this.gridWidget.getViewSize(group); if (viewSize.width === group.minimumWidth || viewSize.height === group.minimumHeight) { this.arrangeGroups(GroupsArrangement.MINIMIZE_OTHERS); } From eb265bbd466206515b0dfe8930bd92b9acec5a14 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 16 Jul 2019 11:52:51 +0200 Subject: [PATCH 267/710] Adopt latest istanbul for coverage information --- package.json | 9 +- test/all.js | 111 +-------- test/coverage.js | 86 +++++++ test/electron/renderer.js | 74 +----- yarn.lock | 499 +++++++++++++++++--------------------- 5 files changed, 325 insertions(+), 454 deletions(-) create mode 100644 test/coverage.js diff --git a/package.json b/package.json index 46667dd4119..c27f0802eeb 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,11 @@ "husky": "^0.13.1", "innosetup": "5.6.1", "is": "^3.1.0", - "istanbul": "^0.3.17", + "istanbul-lib-coverage": "^2.0.5", + "istanbul-lib-instrument": "^3.3.0", + "istanbul-lib-report": "^2.0.8", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^2.2.6", "jsdom-no-contextify": "^3.1.0", "lazy.js": "^0.4.2", "merge-options": "^1.0.1", @@ -122,7 +126,6 @@ "pump": "^1.0.1", "queue": "3.0.6", "rcedit": "^1.1.0", - "remap-istanbul": "^0.13.0", "rimraf": "^2.2.8", "sinon": "^1.17.2", "source-map": "^0.4.4", @@ -155,4 +158,4 @@ "windows-mutex": "0.2.1", "windows-process-tree": "0.2.4" } -} \ No newline at end of file +} diff --git a/test/all.js b/test/all.js index 350e8606800..834d63250bb 100644 --- a/test/all.js +++ b/test/all.js @@ -6,16 +6,12 @@ /*eslint-env mocha*/ /*global define,run*/ -var assert = require('assert'); -var path = require('path'); -var glob = require('glob'); -var istanbul = require('istanbul'); -var i_remap = require('remap-istanbul/lib/remap'); -var jsdom = require('jsdom-no-contextify'); -var minimatch = require('minimatch'); -var fs = require('fs'); -var vm = require('vm'); -var TEST_GLOB = '**/test/**/*.test.js'; +const assert = require('assert'); +const path = require('path'); +const glob = require('glob'); +const jsdom = require('jsdom-no-contextify'); +const TEST_GLOB = '**/test/**/*.test.js'; +const coverage = require('./coverage'); var optimist = require('optimist') .usage('Run the Code tests. All mocha options apply.') @@ -23,7 +19,6 @@ var optimist = require('optimist') .describe('run', 'Run a single file').string('run') .describe('coverage', 'Generate a coverage report').boolean('coverage') .describe('only-monaco-editor', 'Run only monaco editor tests').boolean('only-monaco-editor') - .describe('forceLoad', 'Force loading').boolean('forceLoad') .describe('browser', 'Run tests in a browser').boolean('browser') .alias('h', 'help').boolean('h') .describe('h', 'Show help'); @@ -58,103 +53,13 @@ function main() { }; if (argv.coverage) { - var instrumenter = new istanbul.Instrumenter(); - - var seenSources = {}; - - loaderConfig.nodeInstrumenter = function (contents, source) { - seenSources[source] = true; - - if (minimatch(source, TEST_GLOB)) { - return contents; - } - - return instrumenter.instrumentSync(contents, source); - }; + coverage.initialize(loaderConfig); process.on('exit', function (code) { if (code !== 0) { return; } - - if (argv.forceLoad) { - var allFiles = glob.sync(out + '/vs/**/*.js'); - allFiles = allFiles.map(function (source) { - return path.join(__dirname, '..', source); - }); - allFiles = allFiles.filter(function (source) { - if (seenSources[source]) { - return false; - } - if (minimatch(source, TEST_GLOB)) { - return false; - } - if (/fixtures/.test(source)) { - return false; - } - return true; - }); - allFiles.forEach(function (source, index) { - var contents = fs.readFileSync(source).toString(); - contents = instrumenter.instrumentSync(contents, source); - var stopAt = contents.indexOf('}\n__cov'); - stopAt = contents.indexOf('}\n__cov', stopAt + 1); - - var str = '(function() {' + contents.substr(0, stopAt + 1) + '});'; - var r = vm.runInThisContext(str, source); - r.call(global); - }); - } - - let remapIgnores = /\b((marked)|(raw\.marked)|(nls)|(css))\.js$/; - - var remappedCoverage = i_remap(global.__coverage__, { exclude: remapIgnores }).getFinalCoverage(); - - // The remapped coverage comes out with broken paths - var toUpperDriveLetter = function (str) { - if (/^[a-z]:/.test(str)) { - return str.charAt(0).toUpperCase() + str.substr(1); - } - return str; - }; - var toLowerDriveLetter = function (str) { - if (/^[A-Z]:/.test(str)) { - return str.charAt(0).toLowerCase() + str.substr(1); - } - return str; - }; - - var REPO_PATH = toUpperDriveLetter(path.join(__dirname, '..')); - var fixPath = function (brokenPath) { - var startIndex = brokenPath.indexOf(REPO_PATH); - if (startIndex === -1) { - return toLowerDriveLetter(brokenPath); - } - return toLowerDriveLetter(brokenPath.substr(startIndex)); - }; - - var finalCoverage = {}; - for (var entryKey in remappedCoverage) { - var entry = remappedCoverage[entryKey]; - entry.path = fixPath(entry.path); - finalCoverage[fixPath(entryKey)] = entry; - } - - var collector = new istanbul.Collector(); - collector.add(finalCoverage); - - var coveragePath = path.join(path.dirname(__dirname), '.build', 'coverage'); - var reportTypes = []; - if (argv.run || argv.runGlob) { - // single file running - coveragePath += '-single'; - reportTypes = ['lcovonly']; - } else { - reportTypes = ['json', 'lcov', 'html']; - } - var reporter = new istanbul.Reporter(null, coveragePath); - reporter.addAll(reportTypes); - reporter.write(collector, true, function () { }); + coverage.createReport(argv.run || argv.runGlob); }); } diff --git a/test/coverage.js b/test/coverage.js new file mode 100644 index 00000000000..bf7e7aa3f95 --- /dev/null +++ b/test/coverage.js @@ -0,0 +1,86 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +const minimatch = require('minimatch'); +const fs = require('fs'); +const path = require('path'); +const iLibInstrument = require('istanbul-lib-instrument'); +const iLibCoverage = require('istanbul-lib-coverage'); +const iLibSourceMaps = require('istanbul-lib-source-maps'); +const iLibReport = require('istanbul-lib-report'); +const iReports = require('istanbul-reports'); + +const REPO_PATH = toUpperDriveLetter(path.join(__dirname, '..')); + +exports.initialize = function (loaderConfig) { + const instrumenter = iLibInstrument.createInstrumenter(); + loaderConfig.nodeInstrumenter = function (contents, source) { + if (minimatch(source, '**/test/**/*.test.js')) { + // tests don't get instrumented + return contents; + } + // Try to find a .map file + let map = null; + try { + map = JSON.parse(fs.readFileSync(`${source}.map`).toString()); + } catch (err) { + // missing source map... + } + return instrumenter.instrumentSync(contents, source, map); + }; +}; + +exports.createReport = function (isSingle) { + const mapStore = iLibSourceMaps.createSourceMapStore(); + const coverageMap = iLibCoverage.createCoverageMap(global.__coverage__); + const transformed = mapStore.transformCoverage(coverageMap); + + // Paths come out all broken + let newData = Object.create(null); + Object.keys(transformed.map.data).forEach((file) => { + const entry = transformed.map.data[file]; + const fixedPath = fixPath(entry.path); + entry.data.path = fixedPath; + newData[fixedPath] = entry; + }); + transformed.map.data = newData; + + const tree = iLibReport.summarizers.flat(transformed.map); + const context = iLibReport.createContext({ + dir: path.join(__dirname, `../.build/coverage${isSingle ? '-single' : ''}`) + }); + + let reports = []; + if (isSingle) { + reports.push(iReports.create('lcovonly')); + } else { + reports.push(iReports.create('json')); + reports.push(iReports.create('lcov')); + reports.push(iReports.create('html')); + } + reports.forEach(report => tree.visit(report, context)); +}; + +function toUpperDriveLetter(str) { + if (/^[a-z]:/.test(str)) { + return str.charAt(0).toUpperCase() + str.substr(1); + } + return str; +} + +function toLowerDriveLetter(str) { + if (/^[A-Z]:/.test(str)) { + return str.charAt(0).toLowerCase() + str.substr(1); + } + return str; +} + +function fixPath(brokenPath) { + const startIndex = brokenPath.lastIndexOf(REPO_PATH); + if (startIndex === -1) { + return toLowerDriveLetter(brokenPath); + } + return toLowerDriveLetter(brokenPath.substr(startIndex)); +} diff --git a/test/electron/renderer.js b/test/electron/renderer.js index 4d5a7f0f1ee..36668cd53b3 100644 --- a/test/electron/renderer.js +++ b/test/electron/renderer.js @@ -9,11 +9,9 @@ const { ipcRenderer } = require('electron'); const assert = require('assert'); const path = require('path'); const glob = require('glob'); -const minimatch = require('minimatch'); -const istanbul = require('istanbul'); -const i_remap = require('remap-istanbul/lib/remap'); const util = require('util'); const bootstrap = require('../../src/bootstrap'); +const coverage = require('../coverage'); // Disabled custom inspect. See #38847 if (util.inspect && util.inspect['defaultOptions']) { @@ -42,77 +40,19 @@ function initLoader(opts) { } }; - // nodeInstrumenter when coverage is requested if (opts.coverage) { - const instrumenter = new istanbul.Instrumenter(); - - loaderConfig.nodeInstrumenter = function (contents, source) { - return minimatch(source, _tests_glob) - ? contents // don't instrument tests itself - : instrumenter.instrumentSync(contents, source); - }; + // initialize coverage if requested + coverage.initialize(loaderConfig); } loader.require.config(loaderConfig); } function createCoverageReport(opts) { - return new Promise(resolve => { - - if (!opts.coverage) { - return resolve(undefined); - } - - const exclude = /\b((marked)|(raw\.marked)|(nls)|(css))\.js$/; - const remappedCoverage = i_remap(global.__coverage__, { exclude: exclude }).getFinalCoverage(); - - // The remapped coverage comes out with broken paths - function toUpperDriveLetter(str) { - if (/^[a-z]:/.test(str)) { - return str.charAt(0).toUpperCase() + str.substr(1); - } - return str; - } - function toLowerDriveLetter(str) { - if (/^[A-Z]:/.test(str)) { - return str.charAt(0).toLowerCase() + str.substr(1); - } - return str; - } - - const REPO_PATH = toUpperDriveLetter(path.join(__dirname, '../..')); - const fixPath = function (brokenPath) { - const startIndex = brokenPath.indexOf(REPO_PATH); - if (startIndex === -1) { - return toLowerDriveLetter(brokenPath); - } - return toLowerDriveLetter(brokenPath.substr(startIndex)); - }; - - const finalCoverage = Object.create(null); - for (const entryKey in remappedCoverage) { - const entry = remappedCoverage[entryKey]; - entry.path = fixPath(entry.path); - finalCoverage[fixPath(entryKey)] = entry; - } - - const collector = new istanbul.Collector(); - collector.add(finalCoverage); - - let coveragePath = path.join(path.dirname(__dirname), '../.build/coverage'); - let reportTypes = []; - if (opts.run || opts.runGlob) { - // single file running - coveragePath += '-single'; - reportTypes = ['lcovonly']; - } else { - reportTypes = ['json', 'lcov', 'html']; - } - - const reporter = new istanbul.Reporter(null, coveragePath); - reporter.addAll(reportTypes); - reporter.write(collector, true, resolve); - }); + if (opts.coverage) { + coverage.createReport(opts.run || opts.runGlob); + } + return Promise.resolve(undefined); } function loadTestModules(opts) { diff --git a/yarn.lock b/yarn.lock index c8559584760..574bd317d96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14,6 +14,40 @@ dependencies: "@babel/highlight" "^7.0.0" +"@babel/generator@^7.4.0", "@babel/generator@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.0.tgz#f20e4b7a91750ee8b63656073d843d2a736dca4a" + integrity sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA== + dependencies: + "@babel/types" "^7.5.0" + jsesc "^2.5.1" + lodash "^4.17.11" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== + dependencies: + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-split-export-declaration@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" + integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q== + dependencies: + "@babel/types" "^7.4.4" + "@babel/highlight@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" @@ -23,6 +57,44 @@ esutils "^2.0.2" js-tokens "^4.0.0" +"@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.0.tgz#3e0713dff89ad6ae37faec3b29dcfc5c979770b7" + integrity sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA== + +"@babel/template@^7.1.0", "@babel/template@^7.4.0": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" + integrity sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.4.4" + "@babel/types" "^7.4.4" + +"@babel/traverse@^7.4.3": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.0.tgz#4216d6586854ef5c3c4592dab56ec7eb78485485" + integrity sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.5.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.5.0" + "@babel/types" "^7.5.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.11" + +"@babel/types@^7.0.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.0.tgz#e47d43840c2e7f9105bc4d3a2c371b4d0c7832ab" + integrity sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ== + dependencies: + esutils "^2.0.2" + lodash "^4.17.11" + to-fast-properties "^2.0.0" + "@types/commander@^2.11.0": version "2.12.2" resolved "https://registry.yarnpkg.com/@types/commander/-/commander-2.12.2.tgz#183041a23842d4281478fa5d23c5ca78e6fd08ae" @@ -261,11 +333,6 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abbrev@1.0.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" - integrity sha1-kbR5JYinc4wl813W9jdSovh3YTU= - accepts@~1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" @@ -377,15 +444,6 @@ ajv@^6.5.3, ajv@^6.6.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" @@ -749,7 +807,7 @@ async-settle@^1.0.0: dependencies: async-done "^1.2.2" -async@1.x, async@^1.4.0, async@^1.5.2: +async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= @@ -991,7 +1049,7 @@ boom@5.x.x: dependencies: hoek "4.x.x" -brace-expansion@^1.0.0, brace-expansion@^1.1.7: +brace-expansion@^1.1.7: version "1.1.8" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" integrity sha1-wHshHHyVLsH479Uad+8NHTmQopI= @@ -1232,11 +1290,6 @@ camelcase-keys@^2.0.0: camelcase "^2.0.0" map-obj "^1.0.0" -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= - camelcase@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" @@ -1282,14 +1335,6 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60= - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - chainsaw@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/chainsaw/-/chainsaw-0.1.0.tgz#5eab50b28afe58074d0d58291388828b5e5fbc98" @@ -1487,15 +1532,6 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" @@ -1704,6 +1740,11 @@ commander@^2.19.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== +commander@~2.20.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== + commandpost@^1.0.0: version "1.2.1" resolved "https://registry.yarnpkg.com/commandpost/-/commandpost-1.2.1.tgz#2e9c4c7508b9dc704afefaa91cab92ee6054cc68" @@ -2108,14 +2149,14 @@ debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.0.1: +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" -decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: +decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -2162,7 +2203,7 @@ deep-extend@~0.4.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" integrity sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8= -deep-is@~0.1.2, deep-is@~0.1.3: +deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= @@ -2625,30 +2666,6 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.3, escape-string-regexp@^ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -escodegen@1.7.x: - version "1.7.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.7.1.tgz#30ecfcf66ca98dc67cd2fd162abeb6eafa8ce6fc" - integrity sha1-MOz89mypjcZ80v0WKr626vqM5vw= - dependencies: - esprima "^1.2.2" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.5.0" - optionalDependencies: - source-map "~0.2.0" - -escodegen@1.8.x: - version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" - integrity sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg= - dependencies: - esprima "^2.7.1" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.2.0" - eslint-scope@^3.7.1: version "3.7.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.3.tgz#bb507200d3d17f60247636160b4826284b108535" @@ -2778,21 +2795,11 @@ espree@^5.0.0: acorn-jsx "^5.0.0" eslint-visitor-keys "^1.0.0" -esprima@2.5.x: - version "2.5.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.5.0.tgz#f387a46fd344c1b1a39baf8c20bfb43b6d0058cc" - integrity sha1-84ekb9NEwbGjm6+MIL+0O20AWMw= - -esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1: +esprima@^2.6.0: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" integrity sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE= -esprima@^1.2.2: - version "1.2.5" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.2.5.tgz#0993502feaf668138325756f30f9a51feeec11e9" - integrity sha1-CZNQL+r2aBODJXVvMPmlH+7sEek= - esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" @@ -2820,11 +2827,6 @@ esrecurse@^4.1.0: estraverse "^4.1.0" object-assign "^4.0.1" -estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - integrity sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q= - estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -3114,11 +3116,6 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= -fast-levenshtein@~1.0.0: - version "1.0.7" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz#0178dcdee023b92905193af0959e8a7639cfdcb9" - integrity sha1-AXjc3uAjuSkFGTrwlZ6KdjnP3Lk= - fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -3168,14 +3165,6 @@ filename-regex@^2.0.0: resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" integrity sha1-mW4+gEebmLmJfxWopYs9CE6SZ3U= -fileset@0.2.x: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-0.2.1.tgz#588ef8973c6623b2a76df465105696b96aac8067" - integrity sha1-WI74lzxmI7KnbfRlEFaWuWqsgGc= - dependencies: - glob "5.x" - minimatch "2.x" - fill-range@^2.1.0: version "2.2.3" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" @@ -3652,7 +3641,7 @@ glob@3.2.11: inherits "2" minimatch "0.3" -glob@5.x, glob@^5.0.13, glob@^5.0.15, glob@^5.0.3: +glob@^5.0.13, glob@^5.0.3: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= @@ -3723,7 +3712,7 @@ global-prefix@^1.0.1: is-windows "^1.0.1" which "^1.2.14" -globals@^11.0.1: +globals@^11.0.1, globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== @@ -4053,16 +4042,16 @@ gulplog@^1.0.0: dependencies: glogg "^1.0.0" -handlebars@^4.0.1: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - integrity sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw= +handlebars@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" + integrity sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw== dependencies: - async "^1.4.0" + neo-async "^2.6.0" optimist "^0.6.1" - source-map "^0.4.4" + source-map "^0.6.1" optionalDependencies: - uglify-js "^2.6" + uglify-js "^3.1.4" har-schema@^2.0.0: version "2.0.0" @@ -4931,45 +4920,50 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= -istanbul@0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" - integrity sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs= - dependencies: - abbrev "1.0.x" - async "1.x" - escodegen "1.8.x" - esprima "2.7.x" - glob "^5.0.15" - handlebars "^4.0.1" - js-yaml "3.x" - mkdirp "0.5.x" - nopt "3.x" - once "1.x" - resolve "1.1.x" - supports-color "^3.1.0" - which "^1.1.1" - wordwrap "^1.0.0" +istanbul-lib-coverage@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" + integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== -istanbul@^0.3.17: - version "0.3.22" - resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.3.22.tgz#3e164d85021fe19c985d1f0e7ef0c3e22d012eb6" - integrity sha1-PhZNhQIf4ZyYXR8OfvDD4i0BLrY= +istanbul-lib-instrument@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630" + integrity sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== dependencies: - abbrev "1.0.x" - async "1.x" - escodegen "1.7.x" - esprima "2.5.x" - fileset "0.2.x" - handlebars "^4.0.1" - js-yaml "3.x" - mkdirp "0.5.x" - nopt "3.x" - once "1.x" - resolve "1.1.x" - supports-color "^3.1.0" - which "^1.1.1" - wordwrap "^1.0.0" + "@babel/generator" "^7.4.0" + "@babel/parser" "^7.4.3" + "@babel/template" "^7.4.0" + "@babel/traverse" "^7.4.3" + "@babel/types" "^7.4.0" + istanbul-lib-coverage "^2.0.5" + semver "^6.0.0" + +istanbul-lib-report@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33" + integrity sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ== + dependencies: + istanbul-lib-coverage "^2.0.5" + make-dir "^2.1.0" + supports-color "^6.1.0" + +istanbul-lib-source-maps@^3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8" + integrity sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^2.0.5" + make-dir "^2.1.0" + rimraf "^2.6.3" + source-map "^0.6.1" + +istanbul-reports@^2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.6.tgz#7b4f2660d82b29303a8fe6091f8ca4bf058da1af" + integrity sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA== + dependencies: + handlebars "^4.1.2" istextorbinary@1.0.2: version "1.0.2" @@ -5021,14 +5015,6 @@ js-yaml@3.6.1: argparse "^1.0.7" esprima "^2.6.0" -js-yaml@3.x: - version "3.10.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" - integrity sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - js-yaml@^3.12.0: version "3.12.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.1.tgz#295c8632a18a23e054cf5c9d3cecafe678167600" @@ -5078,6 +5064,11 @@ jsdom-no-contextify@^3.1.0: xml-name-validator "^1.0.0" xmlhttprequest ">= 1.6.0 < 2.0.0" +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + json-edm-parser@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/json-edm-parser/-/json-edm-parser-0.1.2.tgz#1e60b0fef1bc0af67bc0d146dfdde5486cd615b4" @@ -5230,11 +5221,6 @@ last-run@^1.1.0: default-resolution "^2.0.0" es6-weak-map "^2.0.1" -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= - lazy.js@^0.4.2: version "0.4.3" resolved "https://registry.yarnpkg.com/lazy.js/-/lazy.js-0.4.3.tgz#87f67a07ad36555121e4fff1520df31be66786d8" @@ -5281,14 +5267,6 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -levn@~0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.2.5.tgz#ba8d339d0ca4a610e3a3f145b9caf48807155054" - integrity sha1-uo0znQykphDjo/FFucr0iAcVUFQ= - dependencies: - prelude-ls "~1.1.0" - type-check "~0.3.1" - liftoff@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.5.0.tgz#2009291bb31cea861bbf10a7c15a28caf75c31ec" @@ -5446,11 +5424,6 @@ long@^3.2.0: resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s= -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= - loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -5500,6 +5473,14 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" +make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + make-error-cause@^1.1.1: version "1.2.2" resolved "https://registry.yarnpkg.com/make-error-cause/-/make-error-cause-1.2.2.tgz#df0388fcd0b37816dff0a5fb8108939777dcbc9d" @@ -5795,13 +5776,6 @@ minimatch@0.3: dependencies: brace-expansion "^1.1.7" -minimatch@2.x: - version "2.0.10" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" - integrity sha1-jQh8OcazjAAbl/ynzm0OHoCvusc= - dependencies: - brace-expansion "^1.0.0" - minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -6044,6 +6018,11 @@ neo-async@^2.5.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee" integrity sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA== +neo-async@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + nice-try@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" @@ -6125,7 +6104,7 @@ noop-logger@^0.1.1: resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= -nopt@3.x, nopt@^3.0.1: +nopt@^3.0.1: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= @@ -6375,7 +6354,7 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= @@ -6428,19 +6407,7 @@ optimist@0.6.x, optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -optionator@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.5.0.tgz#b75a8995a2d417df25b6e4e3862f50aa88651368" - integrity sha1-t1qJlaLUF98ltuTjhi9QqohlE2g= - dependencies: - deep-is "~0.1.2" - fast-levenshtein "~1.0.0" - levn "~0.2.5" - prelude-ls "~1.1.1" - type-check "~0.3.1" - wordwrap "~0.0.2" - -optionator@^0.8.1, optionator@^0.8.2: +optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= @@ -6815,6 +6782,11 @@ pify@^3.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -7145,7 +7117,7 @@ prebuild-install@5.3.0: tunnel-agent "^0.6.0" which-pm-runs "^1.0.0" -prelude-ls@~1.1.0, prelude-ls@~1.1.1, prelude-ls@~1.1.2: +prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= @@ -7618,17 +7590,6 @@ regexpp@^2.0.1: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== -remap-istanbul@^0.13.0: - version "0.13.0" - resolved "https://registry.yarnpkg.com/remap-istanbul/-/remap-istanbul-0.13.0.tgz#a529dfd080bb760f5274e3671c9c065f29923ed1" - integrity sha512-rS5ZpVAx3fGtKZkiBe1esXg5mKYbgW9iz8kkADFt3p6lo3NsBBUX1q6SwdhwUtYCGnr7nK6gRlbYK3i8R0jbRA== - dependencies: - istanbul "0.4.5" - minimatch "^3.0.4" - plugin-error "^1.0.1" - source-map "0.6.1" - through2 "3.0.0" - remove-bom-buffer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" @@ -7851,11 +7812,6 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@1.1.x: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2: version "1.5.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" @@ -7883,14 +7839,7 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8= - dependencies: - align-text "^0.1.1" - -rimraf@2: +rimraf@2, rimraf@^2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -8046,6 +7995,11 @@ semver@^5.5.1, semver@^5.6.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== +semver@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" + integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== + send@0.16.1: version "0.16.1" resolved "https://registry.yarnpkg.com/send/-/send-0.16.1.tgz#a70e1ca21d1382c11d0d9f6231deb281080d7ab3" @@ -8300,11 +8254,6 @@ source-map-url@^0.4.0: resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - source-map@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" @@ -8312,17 +8261,15 @@ source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: +source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - integrity sha1-2rc/vPwrqBm03gO9b26qSBZLP50= - dependencies: - amdefine ">=0.0.4" +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== sparkles@^1.0.0: version "1.0.0" @@ -8639,7 +8586,7 @@ supports-color@^2.0.0: resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^3.1.0, supports-color@^3.2.3: +supports-color@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= @@ -8667,6 +8614,13 @@ supports-color@^5.3.0, supports-color@^5.4.0: dependencies: has-flag "^3.0.0" +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + sver-compat@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8" @@ -8799,14 +8753,6 @@ through2@2.0.3, through2@^2.0.0, through2@^2.0.1, through2@^2.0.3, through2@~2.0 readable-stream "^2.1.5" xtend "~4.0.1" -through2@3.0.0, through2@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.0.tgz#468b461df9cd9fcc170f22ebf6852e467e578ff2" - integrity sha512-8B+sevlqP4OiCjonI1Zw03Sf8PuV1eRsYQgLad5eonILOdyeRsY27A/2Ze8IlvlMvq31OH+3fz/styI7Ya62yQ== - dependencies: - readable-stream "2 || 3" - xtend "~4.0.1" - through2@^0.6.0: version "0.6.5" resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" @@ -8815,6 +8761,14 @@ through2@^0.6.0: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" +through2@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.0.tgz#468b461df9cd9fcc170f22ebf6852e467e578ff2" + integrity sha512-8B+sevlqP4OiCjonI1Zw03Sf8PuV1eRsYQgLad5eonILOdyeRsY27A/2Ze8IlvlMvq31OH+3fz/styI7Ya62yQ== + dependencies: + readable-stream "2 || 3" + xtend "~4.0.1" + through2@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/through2/-/through2-0.2.3.tgz#eb3284da4ea311b6cc8ace3653748a52abf25a3f" @@ -8894,6 +8848,11 @@ to-buffer@^1.1.0: resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + to-iso-string@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/to-iso-string/-/to-iso-string-0.0.2.tgz#4dc19e664dfccbe25bd8db508b00c6da158255d1" @@ -8963,6 +8922,11 @@ trim-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + tryit@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" @@ -9042,7 +9006,7 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= -type-check@~0.3.1, type-check@~0.3.2: +type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= @@ -9109,16 +9073,6 @@ uglify-es@^3.3.4: commander "~2.13.0" source-map "~0.6.1" -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0= - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - uglify-js@^3.0.5: version "3.1.9" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.1.9.tgz#dffca799308cf327ec3ac77eeacb8e196ce3b452" @@ -9127,10 +9081,13 @@ uglify-js@^3.0.5: commander "~2.11.0" source-map "~0.6.1" -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= +uglify-js@^3.1.4: + version "3.6.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" + integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg== + dependencies: + commander "~2.20.0" + source-map "~0.6.1" uglifyjs-webpack-plugin@^1.2.4: version "1.2.7" @@ -9747,13 +9704,6 @@ which-pm-runs@^1.0.0: resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= -which@^1.1.1, which@^1.2.9: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" - integrity sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg== - dependencies: - isexe "^2.0.0" - which@^1.2.14: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -9761,6 +9711,13 @@ which@^1.2.14: dependencies: isexe "^2.0.0" +which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + integrity sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg== + dependencies: + isexe "^2.0.0" + wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" @@ -9768,11 +9725,6 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= - windows-foreground-love@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/windows-foreground-love/-/windows-foreground-love-0.1.0.tgz#948e4beac0733cd58624710cc09432b7e8bf3521" @@ -9793,21 +9745,16 @@ windows-process-tree@0.2.4: dependencies: nan "^2.13.2" -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= - -wordwrap@^1.0.0, wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + worker-farm@^1.5.2: version "1.6.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0" @@ -10026,16 +9973,6 @@ yargs@^7.1.0: y18n "^3.2.1" yargs-parser "^5.0.0" -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - yauzl@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" From 501bd363767eabefd6e263bbf4f80e8fc5df1524 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 16 Jul 2019 11:58:12 +0200 Subject: [PATCH 268/710] Move extensions workbench service to browser --- .../{node => browser}/extensionsWorkbenchService.ts | 6 +++--- .../extensions/electron-browser/extensions.contribution.ts | 4 ++-- .../test/electron-browser/extensionsActions.test.ts | 2 +- .../test/electron-browser/extensionsViews.test.ts | 2 +- .../electron-browser/extensionsWorkbenchService.test.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename src/vs/workbench/contrib/extensions/{node => browser}/extensionsWorkbenchService.ts (99%) diff --git a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts similarity index 99% rename from src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts rename to src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index fe9b03f0756..6b5f5bfafed 100644 --- a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -146,14 +146,14 @@ class Extension implements IExtension { if (this.type === ExtensionType.System && this.local) { if (this.local.manifest && this.local.manifest.contributes) { if (Array.isArray(this.local.manifest.contributes.themes) && this.local.manifest.contributes.themes.length) { - return require.toUrl('../browser/media/theme-icon.png'); + return require.toUrl('./media/theme-icon.png'); } if (Array.isArray(this.local.manifest.contributes.grammars) && this.local.manifest.contributes.grammars.length) { - return require.toUrl('../browser/media/language-icon.svg'); + return require.toUrl('./media/language-icon.svg'); } } } - return require.toUrl('../browser/media/defaultIcon.png'); + return require.toUrl('./media/defaultIcon.png'); } get repository(): string | undefined { diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts index 8723e3a6930..3e85c598dde 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts @@ -16,8 +16,8 @@ import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-b import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { IOutputChannelRegistry, Extensions as OutputExtensions } from 'vs/workbench/contrib/output/common/output'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { VIEWLET_ID, IExtensionsWorkbenchService } from '../common/extensions'; -import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/node/extensionsWorkbenchService'; +import { VIEWLET_ID, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions'; +import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; import { OpenExtensionsViewletAction, InstallExtensionsAction, ShowOutdatedExtensionsAction, ShowRecommendedExtensionsAction, ShowRecommendedKeymapExtensionsAction, ShowPopularExtensionsAction, ShowEnabledExtensionsAction, ShowInstalledExtensionsAction, ShowDisabledExtensionsAction, ShowBuiltInExtensionsAction, UpdateAllAction, diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index 49503a85eca..71e40ea102c 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -8,7 +8,7 @@ import { assign } from 'vs/base/common/objects'; import { generateUuid } from 'vs/base/common/uuid'; import { IExtensionsWorkbenchService, ExtensionContainers } from 'vs/workbench/contrib/extensions/common/extensions'; import * as ExtensionsActions from 'vs/workbench/contrib/extensions/browser/extensionsActions'; -import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/node/extensionsWorkbenchService'; +import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; import { IExtensionManagementService, IExtensionGalleryService, IExtensionEnablementService, IExtensionTipsService, ILocalExtension, IGalleryExtension, DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, EnablementState, InstallOperation, IExtensionManagementServerService, IExtensionManagementServer diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts index 55e61060143..15222e2ae26 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts @@ -9,7 +9,7 @@ import { generateUuid } from 'vs/base/common/uuid'; import { ExtensionsListView } from 'vs/workbench/contrib/extensions/browser/extensionsViews'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions'; -import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/node/extensionsWorkbenchService'; +import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; import { IExtensionManagementService, IExtensionGalleryService, IExtensionEnablementService, IExtensionTipsService, ILocalExtension, IGalleryExtension, IQueryOptions, DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, IExtensionManagementServerService, EnablementState, ExtensionRecommendationReason, SortBy, IExtensionManagementServer diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts index 1b142655ae5..a6b3f07d04c 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts @@ -9,7 +9,7 @@ import * as fs from 'fs'; import { assign } from 'vs/base/common/objects'; import { generateUuid } from 'vs/base/common/uuid'; import { IExtensionsWorkbenchService, ExtensionState, AutoCheckUpdatesConfigurationKey, AutoUpdateConfigurationKey } from 'vs/workbench/contrib/extensions/common/extensions'; -import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/node/extensionsWorkbenchService'; +import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; import { IExtensionManagementService, IExtensionGalleryService, IExtensionEnablementService, IExtensionTipsService, ILocalExtension, IGalleryExtension, DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IGalleryExtensionAssets, IExtensionIdentifier, EnablementState, InstallOperation, IExtensionManagementServerService From 0288def8919e33754fd9f2138f8a585913c95ed7 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 16 Jul 2019 12:16:46 +0200 Subject: [PATCH 269/710] Failure to launch VSCode from WSL2. Fixes microsoft/vscode-remote-release#914 --- resources/win32/bin/code.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/win32/bin/code.sh b/resources/win32/bin/code.sh index 5d92383c496..4a312474df1 100644 --- a/resources/win32/bin/code.sh +++ b/resources/win32/bin/code.sh @@ -36,7 +36,7 @@ if grep -qi Microsoft /proc/version; then if ! [ -z "$WSL_EXT_WLOC" ]; then # replace \r\n with \n in WSL_EXT_WLOC WSL_CODE=$(wslpath -u "${WSL_EXT_WLOC%%[[:cntrl:]]}")/scripts/wslCode.sh - WIN_CODE_CMD=$(wslpath -w "$VSCODE_PATH/bin/$APP_NAME.cmd") + WIN_CODE_CMD=$ELECTRON "$WSL_CODE" "$COMMIT" "$QUALITY" "$WIN_CODE_CMD" "$APP_NAME" "$DATAFOLDER" "$@" exit $? else From bb8d54703b760c9b8a616b234cd0a4f252b42e23 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 16 Jul 2019 12:51:53 +0200 Subject: [PATCH 270/710] split extensions contributions between electron and browser --- .../browser/extensions.contribution.ts | 352 ++++++++++++++++++ .../extensions.contribution.ts | 327 +--------------- src/vs/workbench/workbench.main.ts | 1 + 3 files changed, 355 insertions(+), 325 deletions(-) create mode 100644 src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts diff --git a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts new file mode 100644 index 00000000000..56cb0142584 --- /dev/null +++ b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts @@ -0,0 +1,352 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import 'vs/css!./media/extensions'; +import { localize } from 'vs/nls'; +import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; +import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; +import { ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actions'; +import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; +import { IOutputChannelRegistry, Extensions as OutputExtensions } from 'vs/workbench/contrib/output/common/output'; +import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; +import { VIEWLET_ID, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions'; +import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; +import { + OpenExtensionsViewletAction, InstallExtensionsAction, ShowOutdatedExtensionsAction, ShowRecommendedExtensionsAction, ShowRecommendedKeymapExtensionsAction, ShowPopularExtensionsAction, + ShowEnabledExtensionsAction, ShowInstalledExtensionsAction, ShowDisabledExtensionsAction, ShowBuiltInExtensionsAction, UpdateAllAction, + EnableAllAction, EnableAllWorkpsaceAction, DisableAllAction, DisableAllWorkpsaceAction, CheckForUpdatesAction, ShowLanguageExtensionsAction, ShowAzureExtensionsAction, EnableAutoUpdateAction, DisableAutoUpdateAction, ConfigureRecommendedExtensionsCommandsContributor, OpenExtensionsFolderAction, InstallVSIXAction, ReinstallAction, InstallSpecificVersionOfExtensionAction +} from 'vs/workbench/contrib/extensions/browser/extensionsActions'; +import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput'; +import { ViewletRegistry, Extensions as ViewletExtensions, ViewletDescriptor } from 'vs/workbench/browser/viewlet'; +import { ExtensionEditor } from 'vs/workbench/contrib/extensions/browser/extensionEditor'; +import { StatusUpdater, ExtensionsViewlet, MaliciousExtensionChecker, ExtensionsViewletViewsContribution } from 'vs/workbench/contrib/extensions/browser/extensionsViewlet'; +import { IQuickOpenRegistry, Extensions, QuickOpenHandlerDescriptor } from 'vs/workbench/browser/quickopen'; +import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; +import * as jsonContributionRegistry from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; +import { ExtensionsConfigurationSchema, ExtensionsConfigurationSchemaId } from 'vs/workbench/contrib/extensions/common/extensionsFileTemplate'; +import { CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; +import { KeymapExtensions } from 'vs/workbench/contrib/extensions/common/extensionsUtils'; +import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { GalleryExtensionsHandler, ExtensionsHandler } from 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen'; +import { EditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor'; +import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; +import { URI, UriComponents } from 'vs/base/common/uri'; +import { ExtensionActivationProgress } from 'vs/workbench/contrib/extensions/browser/extensionsActivationProgress'; +import { onUnexpectedError } from 'vs/base/common/errors'; +import { ExtensionDependencyChecker } from 'vs/workbench/contrib/extensions/browser/extensionsDependencyChecker'; +import { CancellationToken } from 'vs/base/common/cancellation'; +import { ExtensionType } from 'vs/platform/extensions/common/extensions'; + +// Singletons +registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService); + +const workbenchRegistry = Registry.as(WorkbenchExtensions.Workbench); +workbenchRegistry.registerWorkbenchContribution(StatusUpdater, LifecyclePhase.Restored); +workbenchRegistry.registerWorkbenchContribution(MaliciousExtensionChecker, LifecyclePhase.Eventually); +workbenchRegistry.registerWorkbenchContribution(ConfigureRecommendedExtensionsCommandsContributor, LifecyclePhase.Eventually); +workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, LifecyclePhase.Restored); +workbenchRegistry.registerWorkbenchContribution(ExtensionsViewletViewsContribution, LifecyclePhase.Starting); +workbenchRegistry.registerWorkbenchContribution(ExtensionActivationProgress, LifecyclePhase.Eventually); +workbenchRegistry.registerWorkbenchContribution(ExtensionDependencyChecker, LifecyclePhase.Eventually); + +Registry.as(OutputExtensions.OutputChannels) + .registerChannel({ id: ExtensionsChannelId, label: ExtensionsLabel, log: false }); + +// Quickopen +Registry.as(Extensions.Quickopen).registerQuickOpenHandler( + new QuickOpenHandlerDescriptor( + ExtensionsHandler, + ExtensionsHandler.ID, + 'ext ', + undefined, + localize('extensionsCommands', "Manage Extensions"), + true + ) +); + +Registry.as(Extensions.Quickopen).registerQuickOpenHandler( + new QuickOpenHandlerDescriptor( + GalleryExtensionsHandler, + GalleryExtensionsHandler.ID, + 'ext install ', + undefined, + localize('galleryExtensionsCommands', "Install Gallery Extensions"), + true + ) +); + +// Editor +const editorDescriptor = new EditorDescriptor( + ExtensionEditor, + ExtensionEditor.ID, + localize('extension', "Extension") +); + +Registry.as(EditorExtensions.Editors) + .registerEditor(editorDescriptor, [new SyncDescriptor(ExtensionsInput)]); + +// Viewlet +const viewletDescriptor = new ViewletDescriptor( + ExtensionsViewlet, + VIEWLET_ID, + localize('extensions', "Extensions"), + 'extensions', + 4 +); + +Registry.as(ViewletExtensions.Viewlets) + .registerViewlet(viewletDescriptor); + +// Global actions +const actionRegistry = Registry.as(WorkbenchActionExtensions.WorkbenchActions); + +const openViewletActionDescriptor = new SyncActionDescriptor(OpenExtensionsViewletAction, OpenExtensionsViewletAction.ID, OpenExtensionsViewletAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_X }); +actionRegistry.registerWorkbenchAction(openViewletActionDescriptor, 'View: Show Extensions', localize('view', "View")); + +const installActionDescriptor = new SyncActionDescriptor(InstallExtensionsAction, InstallExtensionsAction.ID, InstallExtensionsAction.LABEL); +actionRegistry.registerWorkbenchAction(installActionDescriptor, 'Extensions: Install Extensions', ExtensionsLabel); + +const listOutdatedActionDescriptor = new SyncActionDescriptor(ShowOutdatedExtensionsAction, ShowOutdatedExtensionsAction.ID, ShowOutdatedExtensionsAction.LABEL); +actionRegistry.registerWorkbenchAction(listOutdatedActionDescriptor, 'Extensions: Show Outdated Extensions', ExtensionsLabel); + +const recommendationsActionDescriptor = new SyncActionDescriptor(ShowRecommendedExtensionsAction, ShowRecommendedExtensionsAction.ID, ShowRecommendedExtensionsAction.LABEL); +actionRegistry.registerWorkbenchAction(recommendationsActionDescriptor, 'Extensions: Show Recommended Extensions', ExtensionsLabel); + +const keymapRecommendationsActionDescriptor = new SyncActionDescriptor(ShowRecommendedKeymapExtensionsAction, ShowRecommendedKeymapExtensionsAction.ID, ShowRecommendedKeymapExtensionsAction.SHORT_LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_M) }); +actionRegistry.registerWorkbenchAction(keymapRecommendationsActionDescriptor, 'Preferences: Keymaps', PreferencesLabel); + +const languageExtensionsActionDescriptor = new SyncActionDescriptor(ShowLanguageExtensionsAction, ShowLanguageExtensionsAction.ID, ShowLanguageExtensionsAction.SHORT_LABEL); +actionRegistry.registerWorkbenchAction(languageExtensionsActionDescriptor, 'Preferences: Language Extensions', PreferencesLabel); + +const azureExtensionsActionDescriptor = new SyncActionDescriptor(ShowAzureExtensionsAction, ShowAzureExtensionsAction.ID, ShowAzureExtensionsAction.SHORT_LABEL); +actionRegistry.registerWorkbenchAction(azureExtensionsActionDescriptor, 'Preferences: Azure Extensions', PreferencesLabel); + +const popularActionDescriptor = new SyncActionDescriptor(ShowPopularExtensionsAction, ShowPopularExtensionsAction.ID, ShowPopularExtensionsAction.LABEL); +actionRegistry.registerWorkbenchAction(popularActionDescriptor, 'Extensions: Show Popular Extensions', ExtensionsLabel); + +const enabledActionDescriptor = new SyncActionDescriptor(ShowEnabledExtensionsAction, ShowEnabledExtensionsAction.ID, ShowEnabledExtensionsAction.LABEL); +actionRegistry.registerWorkbenchAction(enabledActionDescriptor, 'Extensions: Show Enabled Extensions', ExtensionsLabel); + +const installedActionDescriptor = new SyncActionDescriptor(ShowInstalledExtensionsAction, ShowInstalledExtensionsAction.ID, ShowInstalledExtensionsAction.LABEL); +actionRegistry.registerWorkbenchAction(installedActionDescriptor, 'Extensions: Show Installed Extensions', ExtensionsLabel); + +const disabledActionDescriptor = new SyncActionDescriptor(ShowDisabledExtensionsAction, ShowDisabledExtensionsAction.ID, ShowDisabledExtensionsAction.LABEL); +actionRegistry.registerWorkbenchAction(disabledActionDescriptor, 'Extensions: Show Disabled Extensions', ExtensionsLabel); + +const builtinActionDescriptor = new SyncActionDescriptor(ShowBuiltInExtensionsAction, ShowBuiltInExtensionsAction.ID, ShowBuiltInExtensionsAction.LABEL); +actionRegistry.registerWorkbenchAction(builtinActionDescriptor, 'Extensions: Show Built-in Extensions', ExtensionsLabel); + +const updateAllActionDescriptor = new SyncActionDescriptor(UpdateAllAction, UpdateAllAction.ID, UpdateAllAction.LABEL); +actionRegistry.registerWorkbenchAction(updateAllActionDescriptor, 'Extensions: Update All Extensions', ExtensionsLabel); + +const openExtensionsFolderActionDescriptor = new SyncActionDescriptor(OpenExtensionsFolderAction, OpenExtensionsFolderAction.ID, OpenExtensionsFolderAction.LABEL); +actionRegistry.registerWorkbenchAction(openExtensionsFolderActionDescriptor, 'Extensions: Open Extensions Folder', ExtensionsLabel); + +const installVSIXActionDescriptor = new SyncActionDescriptor(InstallVSIXAction, InstallVSIXAction.ID, InstallVSIXAction.LABEL); +actionRegistry.registerWorkbenchAction(installVSIXActionDescriptor, 'Extensions: Install from VSIX...', ExtensionsLabel); + +const disableAllAction = new SyncActionDescriptor(DisableAllAction, DisableAllAction.ID, DisableAllAction.LABEL); +actionRegistry.registerWorkbenchAction(disableAllAction, 'Extensions: Disable All Installed Extensions', ExtensionsLabel); + +const disableAllWorkspaceAction = new SyncActionDescriptor(DisableAllWorkpsaceAction, DisableAllWorkpsaceAction.ID, DisableAllWorkpsaceAction.LABEL); +actionRegistry.registerWorkbenchAction(disableAllWorkspaceAction, 'Extensions: Disable All Installed Extensions for this Workspace', ExtensionsLabel); + +const enableAllAction = new SyncActionDescriptor(EnableAllAction, EnableAllAction.ID, EnableAllAction.LABEL); +actionRegistry.registerWorkbenchAction(enableAllAction, 'Extensions: Enable All Extensions', ExtensionsLabel); + +const enableAllWorkspaceAction = new SyncActionDescriptor(EnableAllWorkpsaceAction, EnableAllWorkpsaceAction.ID, EnableAllWorkpsaceAction.LABEL); +actionRegistry.registerWorkbenchAction(enableAllWorkspaceAction, 'Extensions: Enable All Extensions for this Workspace', ExtensionsLabel); + +const checkForUpdatesAction = new SyncActionDescriptor(CheckForUpdatesAction, CheckForUpdatesAction.ID, CheckForUpdatesAction.LABEL); +actionRegistry.registerWorkbenchAction(checkForUpdatesAction, `Extensions: Check for Extension Updates`, ExtensionsLabel); + +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(EnableAutoUpdateAction, EnableAutoUpdateAction.ID, EnableAutoUpdateAction.LABEL), `Extensions: Enable Auto Updating Extensions`, ExtensionsLabel); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisableAutoUpdateAction, DisableAutoUpdateAction.ID, DisableAutoUpdateAction.LABEL), `Extensions: Disable Auto Updating Extensions`, ExtensionsLabel); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(InstallSpecificVersionOfExtensionAction, InstallSpecificVersionOfExtensionAction.ID, InstallSpecificVersionOfExtensionAction.LABEL), 'Install Specific Version of Extension...', ExtensionsLabel); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReinstallAction, ReinstallAction.ID, ReinstallAction.LABEL), 'Reinstall Extension...', localize('developer', "Developer")); + +Registry.as(ConfigurationExtensions.Configuration) + .registerConfiguration({ + id: 'extensions', + order: 30, + title: localize('extensionsConfigurationTitle', "Extensions"), + type: 'object', + properties: { + 'extensions.autoUpdate': { + type: 'boolean', + description: localize('extensionsAutoUpdate', "When enabled, automatically installs updates for extensions. The updates are fetched from a Microsoft online service."), + default: true, + scope: ConfigurationScope.APPLICATION, + tags: ['usesOnlineServices'] + }, + 'extensions.autoCheckUpdates': { + type: 'boolean', + description: localize('extensionsCheckUpdates', "When enabled, automatically checks extensions for updates. If an extension has an update, it is marked as outdated in the Extensions view. The updates are fetched from a Microsoft online service."), + default: true, + scope: ConfigurationScope.APPLICATION, + tags: ['usesOnlineServices'] + }, + 'extensions.ignoreRecommendations': { + type: 'boolean', + description: localize('extensionsIgnoreRecommendations', "When enabled, the notifications for extension recommendations will not be shown."), + default: false + }, + 'extensions.showRecommendationsOnlyOnDemand': { + type: 'boolean', + description: localize('extensionsShowRecommendationsOnlyOnDemand', "When enabled, recommendations will not be fetched or shown unless specifically requested by the user. Some recommendations are fetched from a Microsoft online service."), + default: false, + tags: ['usesOnlineServices'] + }, + 'extensions.closeExtensionDetailsOnViewChange': { + type: 'boolean', + description: localize('extensionsCloseExtensionDetailsOnViewChange', "When enabled, editors with extension details will be automatically closed upon navigating away from the Extensions View."), + default: false + } + } + }); + +const jsonRegistry = Registry.as(jsonContributionRegistry.Extensions.JSONContribution); +jsonRegistry.registerSchema(ExtensionsConfigurationSchemaId, ExtensionsConfigurationSchema); + +// Register Commands +CommandsRegistry.registerCommand('_extensions.manage', (accessor: ServicesAccessor, extensionId: string) => { + const extensionService = accessor.get(IExtensionsWorkbenchService); + const extension = extensionService.local.filter(e => areSameExtensions(e.identifier, { id: extensionId })); + if (extension.length === 1) { + extensionService.open(extension[0]); + } +}); + +CommandsRegistry.registerCommand('extension.open', (accessor: ServicesAccessor, extensionId: string) => { + const extensionService = accessor.get(IExtensionsWorkbenchService); + + return extensionService.queryGallery({ names: [extensionId], pageSize: 1 }, CancellationToken.None).then(pager => { + if (pager.total !== 1) { + return; + } + + extensionService.open(pager.firstPage[0]); + }); +}); + +CommandsRegistry.registerCommand({ + id: 'workbench.extensions.installExtension', + description: { + description: localize('workbench.extensions.installExtension.description', "Install the given extension"), + args: [ + { + name: localize('workbench.extensions.installExtension.arg.name', "Extension id or VSIX resource uri"), + schema: { + 'type': ['object', 'string'] + } + } + ] + }, + handler: async (accessor, arg: string | UriComponents) => { + const extensionManagementService = accessor.get(IExtensionManagementService); + const extensionGalleryService = accessor.get(IExtensionGalleryService); + try { + if (typeof arg === 'string') { + const extension = await extensionGalleryService.getCompatibleExtension({ id: arg }); + if (extension) { + await extensionManagementService.installFromGallery(extension); + } else { + throw new Error(localize('notFound', "Extension '{0}' not found.", arg)); + } + } else { + const vsix = URI.revive(arg); + await extensionManagementService.install(vsix); + } + } catch (e) { + onUnexpectedError(e); + } + } +}); + +CommandsRegistry.registerCommand({ + id: 'workbench.extensions.uninstallExtension', + description: { + description: localize('workbench.extensions.uninstallExtension.description', "Uninstall the given extension"), + args: [ + { + name: localize('workbench.extensions.uninstallExtension.arg.name', "Id of the extension to uninstall"), + schema: { + 'type': 'string' + } + } + ] + }, + handler: async (accessor, id: string) => { + if (!id) { + throw new Error(localize('id required', "Extension id required.")); + } + const extensionManagementService = accessor.get(IExtensionManagementService); + try { + const installed = await extensionManagementService.getInstalled(ExtensionType.User); + const [extensionToUninstall] = installed.filter(e => areSameExtensions(e.identifier, { id })); + if (!extensionToUninstall) { + return Promise.reject(new Error(localize('notInstalled', "Extension '{0}' is not installed. Make sure you use the full extension ID, including the publisher, e.g.: ms-vscode.csharp.", id))); + } + await extensionManagementService.uninstall(extensionToUninstall, true); + } catch (e) { + onUnexpectedError(e); + } + } +}); + +// File menu registration + +MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, { + group: '2_keybindings', + command: { + id: ShowRecommendedKeymapExtensionsAction.ID, + title: localize({ key: 'miOpenKeymapExtensions', comment: ['&& denotes a mnemonic'] }, "&&Keymaps") + }, + order: 2 +}); + +MenuRegistry.appendMenuItem(MenuId.GlobalActivity, { + group: '2_keybindings', + command: { + id: ShowRecommendedKeymapExtensionsAction.ID, + title: localize('miOpenKeymapExtensions2', "Keymaps") + }, + order: 2 +}); + +MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, { + group: '1_settings', + command: { + id: VIEWLET_ID, + title: localize({ key: 'miPreferencesExtensions', comment: ['&& denotes a mnemonic'] }, "&&Extensions") + }, + order: 3 +}); + +// View menu + +MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, { + group: '3_views', + command: { + id: VIEWLET_ID, + title: localize({ key: 'miViewExtensions', comment: ['&& denotes a mnemonic'] }, "E&&xtensions") + }, + order: 5 +}); + +// Global Activity Menu + +MenuRegistry.appendMenuItem(MenuId.GlobalActivity, { + group: '2_configuration', + command: { + id: VIEWLET_ID, + title: localize('showExtensions', "Extensions") + }, + order: 3 +}); \ No newline at end of file diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts index 3e85c598dde..b2982429480 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts @@ -3,104 +3,33 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import 'vs/css!../browser/media/extensions'; import { localize } from 'vs/nls'; -import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { Registry } from 'vs/platform/registry/common/platform'; import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { IExtensionTipsService, ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; - +import { IExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actions'; import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; -import { IOutputChannelRegistry, Extensions as OutputExtensions } from 'vs/workbench/contrib/output/common/output'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { VIEWLET_ID, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions'; -import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; -import { - OpenExtensionsViewletAction, InstallExtensionsAction, ShowOutdatedExtensionsAction, ShowRecommendedExtensionsAction, ShowRecommendedKeymapExtensionsAction, ShowPopularExtensionsAction, - ShowEnabledExtensionsAction, ShowInstalledExtensionsAction, ShowDisabledExtensionsAction, ShowBuiltInExtensionsAction, UpdateAllAction, - EnableAllAction, EnableAllWorkpsaceAction, DisableAllAction, DisableAllWorkpsaceAction, CheckForUpdatesAction, ShowLanguageExtensionsAction, ShowAzureExtensionsAction, EnableAutoUpdateAction, DisableAutoUpdateAction, ConfigureRecommendedExtensionsCommandsContributor, OpenExtensionsFolderAction, InstallVSIXAction, ReinstallAction, InstallSpecificVersionOfExtensionAction -} from 'vs/workbench/contrib/extensions/browser/extensionsActions'; -import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput'; -import { ViewletRegistry, Extensions as ViewletExtensions, ViewletDescriptor } from 'vs/workbench/browser/viewlet'; -import { ExtensionEditor } from 'vs/workbench/contrib/extensions/browser/extensionEditor'; -import { StatusUpdater, ExtensionsViewlet, MaliciousExtensionChecker, ExtensionsViewletViewsContribution } from 'vs/workbench/contrib/extensions/browser/extensionsViewlet'; -import { IQuickOpenRegistry, Extensions, QuickOpenHandlerDescriptor } from 'vs/workbench/browser/quickopen'; -import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; -import * as jsonContributionRegistry from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; -import { ExtensionsConfigurationSchema, ExtensionsConfigurationSchemaId } from 'vs/workbench/contrib/extensions/common/extensionsFileTemplate'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { KeymapExtensions } from 'vs/workbench/contrib/extensions/common/extensionsUtils'; -import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; -import { GalleryExtensionsHandler, ExtensionsHandler } from 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen'; import { EditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor'; import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { RuntimeExtensionsEditor, ShowRuntimeExtensionsAction, IExtensionHostProfileService, DebugExtensionHostAction, StartExtensionHostProfileAction, StopExtensionHostProfileAction, CONTEXT_PROFILE_SESSION_STATE, SaveExtensionHostProfileAction, CONTEXT_EXTENSION_HOST_PROFILE_RECORDED } from 'vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor'; import { EditorInput, IEditorInputFactory, IEditorInputFactoryRegistry, Extensions as EditorInputExtensions, ActiveEditorContext } from 'vs/workbench/common/editor'; import { ExtensionHostProfileService } from 'vs/workbench/contrib/extensions/electron-browser/extensionProfileService'; import { RuntimeExtensionsInput } from 'vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput'; -import { URI, UriComponents } from 'vs/base/common/uri'; +import { URI } from 'vs/base/common/uri'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { ExtensionActivationProgress } from 'vs/workbench/contrib/extensions/browser/extensionsActivationProgress'; import { ExtensionsAutoProfiler } from 'vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler'; -import { onUnexpectedError } from 'vs/base/common/errors'; -import { ExtensionDependencyChecker } from 'vs/workbench/contrib/extensions/browser/extensionsDependencyChecker'; -import { CancellationToken } from 'vs/base/common/cancellation'; -import { ExtensionType } from 'vs/platform/extensions/common/extensions'; // Singletons -registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService); registerSingleton(IExtensionTipsService, ExtensionTipsService); registerSingleton(IExtensionHostProfileService, ExtensionHostProfileService, true); const workbenchRegistry = Registry.as(WorkbenchExtensions.Workbench); -workbenchRegistry.registerWorkbenchContribution(StatusUpdater, LifecyclePhase.Restored); -workbenchRegistry.registerWorkbenchContribution(MaliciousExtensionChecker, LifecyclePhase.Eventually); -workbenchRegistry.registerWorkbenchContribution(ConfigureRecommendedExtensionsCommandsContributor, LifecyclePhase.Eventually); -workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, LifecyclePhase.Restored); -workbenchRegistry.registerWorkbenchContribution(ExtensionsViewletViewsContribution, LifecyclePhase.Starting); -workbenchRegistry.registerWorkbenchContribution(ExtensionActivationProgress, LifecyclePhase.Eventually); workbenchRegistry.registerWorkbenchContribution(ExtensionsAutoProfiler, LifecyclePhase.Eventually); -workbenchRegistry.registerWorkbenchContribution(ExtensionDependencyChecker, LifecyclePhase.Eventually); - -Registry.as(OutputExtensions.OutputChannels) - .registerChannel({ id: ExtensionsChannelId, label: ExtensionsLabel, log: false }); - -// Quickopen -Registry.as(Extensions.Quickopen).registerQuickOpenHandler( - new QuickOpenHandlerDescriptor( - ExtensionsHandler, - ExtensionsHandler.ID, - 'ext ', - undefined, - localize('extensionsCommands', "Manage Extensions"), - true - ) -); - -Registry.as(Extensions.Quickopen).registerQuickOpenHandler( - new QuickOpenHandlerDescriptor( - GalleryExtensionsHandler, - GalleryExtensionsHandler.ID, - 'ext install ', - undefined, - localize('galleryExtensionsCommands', "Install Gallery Extensions"), - true - ) -); - -// Editor -const editorDescriptor = new EditorDescriptor( - ExtensionEditor, - ExtensionEditor.ID, - localize('extension', "Extension") -); - -Registry.as(EditorExtensions.Editors) - .registerEditor(editorDescriptor, [new SyncDescriptor(ExtensionsInput)]); // Running Extensions Editor @@ -125,150 +54,12 @@ class RuntimeExtensionsInputFactory implements IEditorInputFactory { Registry.as(EditorInputExtensions.EditorInputFactories).registerEditorInputFactory(RuntimeExtensionsInput.ID, RuntimeExtensionsInputFactory); -// Viewlet -const viewletDescriptor = new ViewletDescriptor( - ExtensionsViewlet, - VIEWLET_ID, - localize('extensions', "Extensions"), - 'extensions', - 4 -); - -Registry.as(ViewletExtensions.Viewlets) - .registerViewlet(viewletDescriptor); - // Global actions const actionRegistry = Registry.as(WorkbenchActionExtensions.WorkbenchActions); -const openViewletActionDescriptor = new SyncActionDescriptor(OpenExtensionsViewletAction, OpenExtensionsViewletAction.ID, OpenExtensionsViewletAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_X }); -actionRegistry.registerWorkbenchAction(openViewletActionDescriptor, 'View: Show Extensions', localize('view', "View")); - -const installActionDescriptor = new SyncActionDescriptor(InstallExtensionsAction, InstallExtensionsAction.ID, InstallExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(installActionDescriptor, 'Extensions: Install Extensions', ExtensionsLabel); - -const listOutdatedActionDescriptor = new SyncActionDescriptor(ShowOutdatedExtensionsAction, ShowOutdatedExtensionsAction.ID, ShowOutdatedExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(listOutdatedActionDescriptor, 'Extensions: Show Outdated Extensions', ExtensionsLabel); - -const recommendationsActionDescriptor = new SyncActionDescriptor(ShowRecommendedExtensionsAction, ShowRecommendedExtensionsAction.ID, ShowRecommendedExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(recommendationsActionDescriptor, 'Extensions: Show Recommended Extensions', ExtensionsLabel); - -const keymapRecommendationsActionDescriptor = new SyncActionDescriptor(ShowRecommendedKeymapExtensionsAction, ShowRecommendedKeymapExtensionsAction.ID, ShowRecommendedKeymapExtensionsAction.SHORT_LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_M) }); -actionRegistry.registerWorkbenchAction(keymapRecommendationsActionDescriptor, 'Preferences: Keymaps', PreferencesLabel); - -const languageExtensionsActionDescriptor = new SyncActionDescriptor(ShowLanguageExtensionsAction, ShowLanguageExtensionsAction.ID, ShowLanguageExtensionsAction.SHORT_LABEL); -actionRegistry.registerWorkbenchAction(languageExtensionsActionDescriptor, 'Preferences: Language Extensions', PreferencesLabel); - -const azureExtensionsActionDescriptor = new SyncActionDescriptor(ShowAzureExtensionsAction, ShowAzureExtensionsAction.ID, ShowAzureExtensionsAction.SHORT_LABEL); -actionRegistry.registerWorkbenchAction(azureExtensionsActionDescriptor, 'Preferences: Azure Extensions', PreferencesLabel); - -const popularActionDescriptor = new SyncActionDescriptor(ShowPopularExtensionsAction, ShowPopularExtensionsAction.ID, ShowPopularExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(popularActionDescriptor, 'Extensions: Show Popular Extensions', ExtensionsLabel); - -const enabledActionDescriptor = new SyncActionDescriptor(ShowEnabledExtensionsAction, ShowEnabledExtensionsAction.ID, ShowEnabledExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(enabledActionDescriptor, 'Extensions: Show Enabled Extensions', ExtensionsLabel); - -const installedActionDescriptor = new SyncActionDescriptor(ShowInstalledExtensionsAction, ShowInstalledExtensionsAction.ID, ShowInstalledExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(installedActionDescriptor, 'Extensions: Show Installed Extensions', ExtensionsLabel); - -const disabledActionDescriptor = new SyncActionDescriptor(ShowDisabledExtensionsAction, ShowDisabledExtensionsAction.ID, ShowDisabledExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(disabledActionDescriptor, 'Extensions: Show Disabled Extensions', ExtensionsLabel); - -const builtinActionDescriptor = new SyncActionDescriptor(ShowBuiltInExtensionsAction, ShowBuiltInExtensionsAction.ID, ShowBuiltInExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(builtinActionDescriptor, 'Extensions: Show Built-in Extensions', ExtensionsLabel); - -const updateAllActionDescriptor = new SyncActionDescriptor(UpdateAllAction, UpdateAllAction.ID, UpdateAllAction.LABEL); -actionRegistry.registerWorkbenchAction(updateAllActionDescriptor, 'Extensions: Update All Extensions', ExtensionsLabel); - -const openExtensionsFolderActionDescriptor = new SyncActionDescriptor(OpenExtensionsFolderAction, OpenExtensionsFolderAction.ID, OpenExtensionsFolderAction.LABEL); -actionRegistry.registerWorkbenchAction(openExtensionsFolderActionDescriptor, 'Extensions: Open Extensions Folder', ExtensionsLabel); - -const installVSIXActionDescriptor = new SyncActionDescriptor(InstallVSIXAction, InstallVSIXAction.ID, InstallVSIXAction.LABEL); -actionRegistry.registerWorkbenchAction(installVSIXActionDescriptor, 'Extensions: Install from VSIX...', ExtensionsLabel); - -const disableAllAction = new SyncActionDescriptor(DisableAllAction, DisableAllAction.ID, DisableAllAction.LABEL); -actionRegistry.registerWorkbenchAction(disableAllAction, 'Extensions: Disable All Installed Extensions', ExtensionsLabel); - -const disableAllWorkspaceAction = new SyncActionDescriptor(DisableAllWorkpsaceAction, DisableAllWorkpsaceAction.ID, DisableAllWorkpsaceAction.LABEL); -actionRegistry.registerWorkbenchAction(disableAllWorkspaceAction, 'Extensions: Disable All Installed Extensions for this Workspace', ExtensionsLabel); - -const enableAllAction = new SyncActionDescriptor(EnableAllAction, EnableAllAction.ID, EnableAllAction.LABEL); -actionRegistry.registerWorkbenchAction(enableAllAction, 'Extensions: Enable All Extensions', ExtensionsLabel); - -const enableAllWorkspaceAction = new SyncActionDescriptor(EnableAllWorkpsaceAction, EnableAllWorkpsaceAction.ID, EnableAllWorkpsaceAction.LABEL); -actionRegistry.registerWorkbenchAction(enableAllWorkspaceAction, 'Extensions: Enable All Extensions for this Workspace', ExtensionsLabel); - -const checkForUpdatesAction = new SyncActionDescriptor(CheckForUpdatesAction, CheckForUpdatesAction.ID, CheckForUpdatesAction.LABEL); -actionRegistry.registerWorkbenchAction(checkForUpdatesAction, `Extensions: Check for Extension Updates`, ExtensionsLabel); - -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(EnableAutoUpdateAction, EnableAutoUpdateAction.ID, EnableAutoUpdateAction.LABEL), `Extensions: Enable Auto Updating Extensions`, ExtensionsLabel); -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisableAutoUpdateAction, DisableAutoUpdateAction.ID, DisableAutoUpdateAction.LABEL), `Extensions: Disable Auto Updating Extensions`, ExtensionsLabel); -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(InstallSpecificVersionOfExtensionAction, InstallSpecificVersionOfExtensionAction.ID, InstallSpecificVersionOfExtensionAction.LABEL), 'Install Specific Version of Extension...', ExtensionsLabel); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowRuntimeExtensionsAction, ShowRuntimeExtensionsAction.ID, ShowRuntimeExtensionsAction.LABEL), 'Show Running Extensions', localize('developer', "Developer")); -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReinstallAction, ReinstallAction.ID, ReinstallAction.LABEL), 'Reinstall Extension...', localize('developer', "Developer")); - -Registry.as(ConfigurationExtensions.Configuration) - .registerConfiguration({ - id: 'extensions', - order: 30, - title: localize('extensionsConfigurationTitle', "Extensions"), - type: 'object', - properties: { - 'extensions.autoUpdate': { - type: 'boolean', - description: localize('extensionsAutoUpdate', "When enabled, automatically installs updates for extensions. The updates are fetched from a Microsoft online service."), - default: true, - scope: ConfigurationScope.APPLICATION, - tags: ['usesOnlineServices'] - }, - 'extensions.autoCheckUpdates': { - type: 'boolean', - description: localize('extensionsCheckUpdates', "When enabled, automatically checks extensions for updates. If an extension has an update, it is marked as outdated in the Extensions view. The updates are fetched from a Microsoft online service."), - default: true, - scope: ConfigurationScope.APPLICATION, - tags: ['usesOnlineServices'] - }, - 'extensions.ignoreRecommendations': { - type: 'boolean', - description: localize('extensionsIgnoreRecommendations', "When enabled, the notifications for extension recommendations will not be shown."), - default: false - }, - 'extensions.showRecommendationsOnlyOnDemand': { - type: 'boolean', - description: localize('extensionsShowRecommendationsOnlyOnDemand', "When enabled, recommendations will not be fetched or shown unless specifically requested by the user. Some recommendations are fetched from a Microsoft online service."), - default: false, - tags: ['usesOnlineServices'] - }, - 'extensions.closeExtensionDetailsOnViewChange': { - type: 'boolean', - description: localize('extensionsCloseExtensionDetailsOnViewChange', "When enabled, editors with extension details will be automatically closed upon navigating away from the Extensions View."), - default: false - } - } - }); - -const jsonRegistry = Registry.as(jsonContributionRegistry.Extensions.JSONContribution); -jsonRegistry.registerSchema(ExtensionsConfigurationSchemaId, ExtensionsConfigurationSchema); // Register Commands -CommandsRegistry.registerCommand('_extensions.manage', (accessor: ServicesAccessor, extensionId: string) => { - const extensionService = accessor.get(IExtensionsWorkbenchService); - const extension = extensionService.local.filter(e => areSameExtensions(e.identifier, { id: extensionId })); - if (extension.length === 1) { - extensionService.open(extension[0]); - } -}); - -CommandsRegistry.registerCommand('extension.open', (accessor: ServicesAccessor, extensionId: string) => { - const extensionService = accessor.get(IExtensionsWorkbenchService); - - return extensionService.queryGallery({ names: [extensionId], pageSize: 1 }, CancellationToken.None).then(pager => { - if (pager.total !== 1) { - return; - } - - extensionService.open(pager.firstPage[0]); - }); -}); CommandsRegistry.registerCommand(DebugExtensionHostAction.ID, (accessor: ServicesAccessor) => { const instantiationService = accessor.get(IInstantiationService); @@ -290,46 +81,6 @@ CommandsRegistry.registerCommand(SaveExtensionHostProfileAction.ID, (accessor: S instantiationService.createInstance(SaveExtensionHostProfileAction, SaveExtensionHostProfileAction.ID, SaveExtensionHostProfileAction.LABEL).run(); }); -// File menu registration - -MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, { - group: '2_keybindings', - command: { - id: ShowRecommendedKeymapExtensionsAction.ID, - title: localize({ key: 'miOpenKeymapExtensions', comment: ['&& denotes a mnemonic'] }, "&&Keymaps") - }, - order: 2 -}); - -MenuRegistry.appendMenuItem(MenuId.GlobalActivity, { - group: '2_keybindings', - command: { - id: ShowRecommendedKeymapExtensionsAction.ID, - title: localize('miOpenKeymapExtensions2', "Keymaps") - }, - order: 2 -}); - -MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, { - group: '1_settings', - command: { - id: VIEWLET_ID, - title: localize({ key: 'miPreferencesExtensions', comment: ['&& denotes a mnemonic'] }, "&&Extensions") - }, - order: 3 -}); - -// View menu - -MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, { - group: '3_views', - command: { - id: VIEWLET_ID, - title: localize({ key: 'miViewExtensions', comment: ['&& denotes a mnemonic'] }, "E&&xtensions") - }, - order: 5 -}); - // Running extensions MenuRegistry.appendMenuItem(MenuId.EditorTitle, { @@ -383,78 +134,4 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { }, group: 'navigation', when: ContextKeyExpr.and(ActiveEditorContext.isEqualTo(RuntimeExtensionsEditor.ID)) -}); - -CommandsRegistry.registerCommand({ - id: 'workbench.extensions.installExtension', - description: { - description: localize('workbench.extensions.installExtension.description', "Install the given extension"), - args: [ - { - name: localize('workbench.extensions.installExtension.arg.name', "Extension id or VSIX resource uri"), - schema: { - 'type': ['object', 'string'] - } - } - ] - }, - handler: async (accessor, arg: string | UriComponents) => { - const extensionManagementService = accessor.get(IExtensionManagementService); - const extensionGalleryService = accessor.get(IExtensionGalleryService); - try { - if (typeof arg === 'string') { - const extension = await extensionGalleryService.getCompatibleExtension({ id: arg }); - if (extension) { - await extensionManagementService.installFromGallery(extension); - } else { - throw new Error(localize('notFound', "Extension '{0}' not found.", arg)); - } - } else { - const vsix = URI.revive(arg); - await extensionManagementService.install(vsix); - } - } catch (e) { - onUnexpectedError(e); - } - } -}); - -CommandsRegistry.registerCommand({ - id: 'workbench.extensions.uninstallExtension', - description: { - description: localize('workbench.extensions.uninstallExtension.description', "Uninstall the given extension"), - args: [ - { - name: localize('workbench.extensions.uninstallExtension.arg.name', "Id of the extension to uninstall"), - schema: { - 'type': 'string' - } - } - ] - }, - handler: async (accessor, id: string) => { - if (!id) { - throw new Error(localize('id required', "Extension id required.")); - } - const extensionManagementService = accessor.get(IExtensionManagementService); - try { - const installed = await extensionManagementService.getInstalled(ExtensionType.User); - const [extensionToUninstall] = installed.filter(e => areSameExtensions(e.identifier, { id })); - if (!extensionToUninstall) { - return Promise.reject(new Error(localize('notInstalled', "Extension '{0}' is not installed. Make sure you use the full extension ID, including the publisher, e.g.: ms-vscode.csharp.", id))); - } - await extensionManagementService.uninstall(extensionToUninstall, true); - } catch (e) { - onUnexpectedError(e); - } - } -}); - -MenuRegistry.appendMenuItem(MenuId.GlobalActivity, { - group: '2_configuration', - command: { - id: VIEWLET_ID, - title: localize('showExtensions', "Extensions") - }, - order: 3 }); \ No newline at end of file diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index 753464f354a..3ec44b2b0d3 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -255,6 +255,7 @@ import 'vs/workbench/contrib/webview/browser/webview.contribution'; import 'vs/workbench/contrib/webview/electron-browser/webview.contribution'; // Extensions Management +import 'vs/workbench/contrib/extensions/browser/extensions.contribution'; import 'vs/workbench/contrib/extensions/electron-browser/extensions.contribution'; import 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen'; import 'vs/workbench/contrib/extensions/browser/extensionsViewlet'; From 957c83c4efc8a832c91bde51c316d86e4e6c9a88 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 16 Jul 2019 15:43:51 +0200 Subject: [PATCH 271/710] move extension management ipc to common --- src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts | 2 +- .../{node => common}/extensionManagementIpc.ts | 0 .../electron-browser/extensionManagementServerService.ts | 2 +- .../extensions/electron-browser/remoteExtensionManagementIpc.ts | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename src/vs/platform/extensionManagement/{node => common}/extensionManagementIpc.ts (100%) diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts index 854373e8920..31e2fa0a8fa 100644 --- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts @@ -13,7 +13,7 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; -import { ExtensionManagementChannel } from 'vs/platform/extensionManagement/node/extensionManagementIpc'; +import { ExtensionManagementChannel } from 'vs/platform/extensionManagement/common/extensionManagementIpc'; import { IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService'; import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService'; diff --git a/src/vs/platform/extensionManagement/node/extensionManagementIpc.ts b/src/vs/platform/extensionManagement/common/extensionManagementIpc.ts similarity index 100% rename from src/vs/platform/extensionManagement/node/extensionManagementIpc.ts rename to src/vs/platform/extensionManagement/common/extensionManagementIpc.ts diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts index 611ab9aec95..9af2b50701d 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts @@ -7,7 +7,7 @@ import { localize } from 'vs/nls'; import { Schemas } from 'vs/base/common/network'; import { URI } from 'vs/base/common/uri'; import { IExtensionManagementServer, IExtensionManagementServerService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/node/extensionManagementIpc'; +import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/common/extensionManagementIpc'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; diff --git a/src/vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc.ts b/src/vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc.ts index 518978b8983..84ec145c4c8 100644 --- a/src/vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc.ts +++ b/src/vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc.ts @@ -18,7 +18,7 @@ import { CancellationToken } from 'vs/base/common/cancellation'; import { localize } from 'vs/nls'; import { IProductService } from 'vs/platform/product/common/product'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/node/extensionManagementIpc'; +import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/common/extensionManagementIpc'; export class RemoteExtensionManagementChannelClient extends ExtensionManagementChannelClient { From 58aa4c19db774c983a50b0418995fa46af132ac8 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 16 Jul 2019 15:53:39 +0200 Subject: [PATCH 272/710] move extension management server service to extension management --- .../extensions/test/electron-browser/extensionsActions.test.ts | 2 +- .../extensions/test/electron-browser/extensionsViews.test.ts | 2 +- .../electron-browser/extensionManagementServerService.ts | 0 src/vs/workbench/workbench.main.ts | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename src/vs/workbench/services/{extensions => extensionManagement}/electron-browser/extensionManagementServerService.ts (100%) diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index 71e40ea102c..e8ac33ea50b 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -39,7 +39,7 @@ import { ExtensionIdentifier, IExtensionContributions, ExtensionType, IExtension import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService'; import { CancellationToken } from 'vs/base/common/cancellation'; import { ILabelService } from 'vs/platform/label/common/label'; -import { ExtensionManagementServerService } from 'vs/workbench/services/extensions/electron-browser/extensionManagementServerService'; +import { ExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService'; import { IProductService } from 'vs/platform/product/common/product'; suite('ExtensionsActions Test', () => { diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts index 15222e2ae26..883b6829f6e 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts @@ -40,7 +40,7 @@ import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteA import { RemoteAgentService } from 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; import { ExtensionIdentifier, ExtensionType, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService'; -import { ExtensionManagementServerService } from 'vs/workbench/services/extensions/electron-browser/extensionManagementServerService'; +import { ExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService'; import { IProductService } from 'vs/platform/product/common/product'; diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts b/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts similarity index 100% rename from src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts rename to src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index 3ec44b2b0d3..9e7838d27a4 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -129,7 +129,7 @@ import 'vs/workbench/services/extensions/electron-browser/extensionService'; import 'vs/workbench/services/contextmenu/electron-browser/contextmenuService'; import 'vs/workbench/services/extensions/node/multiExtensionManagement'; import 'vs/workbench/services/label/common/labelService'; -import 'vs/workbench/services/extensions/electron-browser/extensionManagementServerService'; +import 'vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService'; import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; import 'vs/workbench/services/notification/common/notificationService'; import 'vs/workbench/services/window/electron-browser/windowService'; From 28330549dd07fd5e35dbb34b699724afede0de9c Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 16 Jul 2019 16:03:47 +0200 Subject: [PATCH 273/710] introduce ext management server service on web --- .../extensionManagementServerService.ts | 40 +++++++++++++++++++ src/vs/workbench/workbench.web.main.ts | 6 ++- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts new file mode 100644 index 00000000000..f4c386d50f9 --- /dev/null +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { localize } from 'vs/nls'; +import { URI } from 'vs/base/common/uri'; +import { IExtensionManagementServer, IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/common/extensionManagementIpc'; +import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; +import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; +import { IChannel } from 'vs/base/parts/ipc/common/ipc'; +import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; + +const localExtensionManagementServerAuthority: string = 'vscode-local'; + +export class ExtensionManagementServerService implements IExtensionManagementServerService { + + _serviceBrand: any; + + readonly localExtensionManagementServer: IExtensionManagementServer; + readonly remoteExtensionManagementServer: IExtensionManagementServer | null = null; + + constructor( + @IRemoteAgentService remoteAgentService: IRemoteAgentService, + ) { + const remoteAgentConnection = remoteAgentService.getConnection(); + const localExtensionManagementService = new ExtensionManagementChannelClient(remoteAgentConnection!.getChannel('extensions')); + this.localExtensionManagementServer = { extensionManagementService: localExtensionManagementService, authority: localExtensionManagementServerAuthority, label: localize('local', "Local") }; + } + + getExtensionManagementServer(location: URI): IExtensionManagementServer | null { + if (location.scheme === REMOTE_HOST_SCHEME) { + return this.localExtensionManagementServer; + } + return null; + } +} + +registerSingleton(IExtensionManagementServerService, ExtensionManagementServerService); \ No newline at end of file diff --git a/src/vs/workbench/workbench.web.main.ts b/src/vs/workbench/workbench.web.main.ts index 720b5e70ed1..9c63cffd384 100644 --- a/src/vs/workbench/workbench.web.main.ts +++ b/src/vs/workbench/workbench.web.main.ts @@ -123,9 +123,7 @@ import 'vs/workbench/services/themes/browser/workbenchThemeService'; // import 'vs/workbench/services/extensionManagement/node/extensionEnablementService'; import 'vs/workbench/services/extensions/browser/extensionService'; // import 'vs/workbench/services/contextmenu/electron-browser/contextmenuService'; -// import 'vs/workbench/services/extensions/node/multiExtensionManagement'; import 'vs/workbench/services/label/common/labelService'; -// import 'vs/workbench/services/extensions/electron-browser/extensionManagementServerService'; // import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; import 'vs/workbench/services/notification/common/notificationService'; // import 'vs/workbench/services/window/electron-browser/windowService'; @@ -169,6 +167,10 @@ registerSingleton(IContextMenuService, ContextMenuService); //#endregion +//#region --- Extensions Management +import 'vs/workbench/services/extensionManagement/common/extensionManagementServerService'; +//#endregion + //#region --- workbench parts From 51a01d72682a55311b900f1c7c348fcd9d01c78e Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 16 Jul 2019 16:06:44 +0200 Subject: [PATCH 274/710] ExtTipsService: add WINDIR as variable --- .../extensions/electron-browser/extensionTipsService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts index eb853688336..816a5521610 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts @@ -913,7 +913,8 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe windowsPath = windowsPath.replace('%USERPROFILE%', process.env['USERPROFILE']!) .replace('%ProgramFiles(x86)%', process.env['ProgramFiles(x86)']!) .replace('%ProgramFiles%', process.env['ProgramFiles']!) - .replace('%APPDATA%', process.env['APPDATA']!); + .replace('%APPDATA%', process.env['APPDATA']!) + .replace('%WINDIR%', process.env['WINDIR']!); promises.push(findExecutable(exeName, windowsPath)); } else { promises.push(findExecutable(exeName, join('/usr/local/bin', exeName))); From ff1da264d5e1c8d473f58f15e8629ef3a72050f9 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 16 Jul 2019 16:26:59 +0200 Subject: [PATCH 275/710] move multi extension management to extension management --- .../node/multiExtensionManagement.ts | 0 src/vs/workbench/workbench.main.ts | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/vs/workbench/services/{extensions => extensionManagement}/node/multiExtensionManagement.ts (100%) diff --git a/src/vs/workbench/services/extensions/node/multiExtensionManagement.ts b/src/vs/workbench/services/extensionManagement/node/multiExtensionManagement.ts similarity index 100% rename from src/vs/workbench/services/extensions/node/multiExtensionManagement.ts rename to src/vs/workbench/services/extensionManagement/node/multiExtensionManagement.ts diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index 9e7838d27a4..ee9cf6d2318 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -127,7 +127,7 @@ import 'vs/workbench/services/themes/browser/workbenchThemeService'; import 'vs/workbench/services/extensionManagement/node/extensionEnablementService'; import 'vs/workbench/services/extensions/electron-browser/extensionService'; import 'vs/workbench/services/contextmenu/electron-browser/contextmenuService'; -import 'vs/workbench/services/extensions/node/multiExtensionManagement'; +import 'vs/workbench/services/extensionManagement/node/multiExtensionManagement'; import 'vs/workbench/services/label/common/labelService'; import 'vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService'; import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; From 73a34e684b54d2d6e58460194026855ab142e10d Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 16 Jul 2019 16:39:08 +0200 Subject: [PATCH 276/710] split extension management service --- .../extensionManagement.ts} | 30 ++++------------- .../node/extensionManagement.ts | 33 +++++++++++++++++++ src/vs/workbench/workbench.main.ts | 5 +-- 3 files changed, 42 insertions(+), 26 deletions(-) rename src/vs/workbench/services/extensionManagement/{node/multiExtensionManagement.ts => common/extensionManagement.ts} (87%) create mode 100644 src/vs/workbench/services/extensionManagement/node/extensionManagement.ts diff --git a/src/vs/workbench/services/extensionManagement/node/multiExtensionManagement.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts similarity index 87% rename from src/vs/workbench/services/extensionManagement/node/multiExtensionManagement.ts rename to src/vs/workbench/services/extensionManagement/common/extensionManagement.ts index 1760b4d5fc3..bbb99a6504f 100644 --- a/src/vs/workbench/services/extensionManagement/node/multiExtensionManagement.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts @@ -13,14 +13,12 @@ import { URI } from 'vs/base/common/uri'; import { Disposable } from 'vs/base/common/lifecycle'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { CancellationToken } from 'vs/base/common/cancellation'; -import { getManifest } from 'vs/platform/extensionManagement/node/extensionManagementUtil'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { localize } from 'vs/nls'; import { isUIExtension } from 'vs/workbench/services/extensions/common/extensionsUtil'; -import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { IProductService } from 'vs/platform/product/common/product'; -export class MultiExtensionManagementService extends Disposable implements IExtensionManagementService { +export class ExtensionManagementService extends Disposable implements IExtensionManagementService { _serviceBrand: any; @@ -29,13 +27,13 @@ export class MultiExtensionManagementService extends Disposable implements IExte readonly onUninstallExtension: Event; readonly onDidUninstallExtension: Event; - private readonly servers: IExtensionManagementServer[]; + protected readonly servers: IExtensionManagementServer[]; constructor( - @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, + @IExtensionManagementServerService protected readonly extensionManagementServerService: IExtensionManagementServerService, @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, - @IConfigurationService private readonly configurationService: IConfigurationService, - @IProductService private readonly productService: IProductService, + @IConfigurationService protected readonly configurationService: IConfigurationService, + @IProductService protected readonly productService: IProductService, ) { super(); this.servers = this.extensionManagementServerService.remoteExtensionManagementServer ? [this.extensionManagementServerService.localExtensionManagementServer, this.extensionManagementServerService.remoteExtensionManagementServer] : [this.extensionManagementServerService.localExtensionManagementServer]; @@ -133,20 +131,6 @@ export class MultiExtensionManagementService extends Disposable implements IExte } async install(vsix: URI): Promise { - if (this.extensionManagementServerService.remoteExtensionManagementServer) { - const manifest = await getManifest(vsix.fsPath); - if (isLanguagePackExtension(manifest)) { - // Install on both servers - const [local] = await Promise.all(this.servers.map(server => server.extensionManagementService.install(vsix))); - return local; - } - if (isUIExtension(manifest, this.productService, this.configurationService)) { - // Install only on local server - return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.install(vsix); - } - // Install only on remote server - return this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.install(vsix); - } return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.install(vsix); } @@ -178,6 +162,4 @@ export class MultiExtensionManagementService extends Disposable implements IExte private getServer(extension: ILocalExtension): IExtensionManagementServer | null { return this.extensionManagementServerService.getExtensionManagementServer(extension.location); } -} - -registerSingleton(IExtensionManagementService, MultiExtensionManagementService); \ No newline at end of file +} \ No newline at end of file diff --git a/src/vs/workbench/services/extensionManagement/node/extensionManagement.ts b/src/vs/workbench/services/extensionManagement/node/extensionManagement.ts new file mode 100644 index 00000000000..de81feb1842 --- /dev/null +++ b/src/vs/workbench/services/extensionManagement/node/extensionManagement.ts @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { isLanguagePackExtension } from 'vs/platform/extensions/common/extensions'; +import { URI } from 'vs/base/common/uri'; +import { getManifest } from 'vs/platform/extensionManagement/node/extensionManagementUtil'; +import { isUIExtension } from 'vs/workbench/services/extensions/common/extensionsUtil'; +import { ExtensionManagementService as BaseExtensionManagementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; + +export class ExtensionManagementService extends BaseExtensionManagementService { + + async install(vsix: URI): Promise { + if (this.extensionManagementServerService.remoteExtensionManagementServer) { + const manifest = await getManifest(vsix.fsPath); + if (isLanguagePackExtension(manifest)) { + // Install on both servers + const [local] = await Promise.all(this.servers.map(server => server.extensionManagementService.install(vsix))); + return local; + } + if (isUIExtension(manifest, this.productService, this.configurationService)) { + // Install only on local server + return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.install(vsix); + } + // Install only on remote server + return this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.install(vsix); + } + return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.install(vsix); + } + +} diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index ee9cf6d2318..5b722ecff0b 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -64,7 +64,7 @@ import { ITextResourceConfigurationService } from 'vs/editor/common/services/res import { TextResourceConfigurationService } from 'vs/editor/common/services/resourceConfigurationImpl'; import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility'; import { AccessibilityService } from 'vs/workbench/services/accessibility/node/accessibilityService'; -import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionGalleryService, IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'; import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService'; @@ -127,7 +127,6 @@ import 'vs/workbench/services/themes/browser/workbenchThemeService'; import 'vs/workbench/services/extensionManagement/node/extensionEnablementService'; import 'vs/workbench/services/extensions/electron-browser/extensionService'; import 'vs/workbench/services/contextmenu/electron-browser/contextmenuService'; -import 'vs/workbench/services/extensionManagement/node/multiExtensionManagement'; import 'vs/workbench/services/label/common/labelService'; import 'vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService'; import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; @@ -139,6 +138,7 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { BackupFileService } from 'vs/workbench/services/backup/node/backupFileService'; +registerSingleton(IExtensionManagementService, ExtensionManagementService); registerSingleton(IBackupFileService, BackupFileService); registerSingleton(IMenuService, MenuService, true); registerSingleton(IListService, ListService, true); @@ -344,5 +344,6 @@ import 'vs/workbench/contrib/experiments/electron-browser/experiments.contributi // Issues import 'vs/workbench/contrib/issue/electron-browser/issue.contribution'; +import { ExtensionManagementService } from './services/extensionManagement/node/extensionManagement'; //#endregion From 569d2dc334bbf8d29d854fec40890abb5cdf2d7e Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 16 Jul 2019 17:02:08 +0200 Subject: [PATCH 277/710] terminal wsl recommendations --- .../terminal/browser/terminalConfigHelper.ts | 57 +++++++++++++++++-- .../browser/terminalProcessManager.ts | 1 + .../contrib/terminal/common/terminal.ts | 1 + 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts b/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts index 899cbf7f524..48d1cd513b4 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts @@ -8,12 +8,15 @@ import * as platform from 'vs/base/common/platform'; import { EDITOR_FONT_DEFAULTS, IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { ITerminalConfiguration, ITerminalFont, IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, TERMINAL_CONFIG_SECTION, DEFAULT_LETTER_SPACING, DEFAULT_LINE_HEIGHT, MINIMUM_LETTER_SPACING, LinuxDistro } from 'vs/workbench/contrib/terminal/common/terminal'; +import { ITerminalConfiguration, ITerminalFont, IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, TERMINAL_CONFIG_SECTION, DEFAULT_LETTER_SPACING, DEFAULT_LINE_HEIGHT, MINIMUM_LETTER_SPACING, LinuxDistro, IShellLaunchConfig } from 'vs/workbench/contrib/terminal/common/terminal'; import Severity from 'vs/base/common/severity'; import { Terminal as XTermTerminal } from 'xterm'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { IBrowserTerminalConfigHelper } from 'vs/workbench/contrib/terminal/browser/terminal'; import { Emitter, Event } from 'vs/base/common/event'; +import { basename } from 'vs/base/common/path'; +import { IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { ExtensionType } from 'vs/platform/extensions/common/extensions'; const MINIMUM_FONT_SIZE = 6; const MAXIMUM_FONT_SIZE = 25; @@ -35,7 +38,7 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper { public constructor( private readonly _linuxDistro: LinuxDistro, @IConfigurationService private readonly _configurationService: IConfigurationService, - @IConfigurationService private readonly _workspaceConfigurationService: IConfigurationService, + @IExtensionManagementService private readonly _extensionManagementService: IExtensionManagementService, @INotificationService private readonly _notificationService: INotificationService, @IStorageService private readonly _storageService: IStorageService ) { @@ -174,9 +177,9 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper { public checkWorkspaceShellPermissions(osOverride: platform.OperatingSystem = platform.OS): boolean { // Check whether there is a workspace setting const platformKey = osOverride === platform.OperatingSystem.Windows ? 'windows' : osOverride === platform.OperatingSystem.Macintosh ? 'osx' : 'linux'; - const shellConfigValue = this._workspaceConfigurationService.inspect(`terminal.integrated.shell.${platformKey}`); - const shellArgsConfigValue = this._workspaceConfigurationService.inspect(`terminal.integrated.shellArgs.${platformKey}`); - const envConfigValue = this._workspaceConfigurationService.inspect<{ [key: string]: string }>(`terminal.integrated.env.${platformKey}`); + const shellConfigValue = this._configurationService.inspect(`terminal.integrated.shell.${platformKey}`); + const shellArgsConfigValue = this._configurationService.inspect(`terminal.integrated.shellArgs.${platformKey}`); + const envConfigValue = this._configurationService.inspect<{ [key: string]: string }>(`terminal.integrated.env.${platformKey}`); // Check if workspace setting exists and whether it's whitelisted let isWorkspaceShellAllowed: boolean | undefined = false; @@ -244,4 +247,48 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper { } return r; } + + private readonly NO_RECOMMENDATIONS_KEY = 'terminalConfigHelper/launchRecommendationsIgnore'; + private recommendationsShown = false; + + public async showRecommendations(shellLaunchConfig: IShellLaunchConfig): Promise { + if (this.recommendationsShown) { + return; + } + this.recommendationsShown = true; + + if (platform.isWindows && shellLaunchConfig.executable && basename(shellLaunchConfig.executable).toLowerCase() === 'wsl.exe') { + if (this._storageService.getBoolean(this.NO_RECOMMENDATIONS_KEY, StorageScope.WORKSPACE, false)) { + return; + } + + if (! await this.isExtensionInstalled('ms-vscode-remote.remote-wsl')) { + this._notificationService.prompt( + Severity.Info, + nls.localize( + 'useWslExtension.title', + "Use the 'Remote WSL' extension for developping in WSL . Click [here]({0}) to learn more.", + 'https://go.microsoft.com/fwlink/?linkid=2097212' + ), + [ + { + label: nls.localize('doNotShowAgain', "Don't Show Again"), + run: () => { + this._storageService.store(this.NO_RECOMMENDATIONS_KEY, true, StorageScope.WORKSPACE); + } + } + ], + { + sticky: true + } + ); + } + } + } + + private isExtensionInstalled(id: string): Promise { + return this._extensionManagementService.getInstalled(ExtensionType.User).then(extensions => { + return extensions.some(e => e.identifier.id === id); + }); + } } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts index 5bbb0612709..3d6317a6078 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts @@ -197,6 +197,7 @@ export class TerminalProcessManager implements ITerminalProcessManager { const lastActiveWorkspace = activeWorkspaceRootUri ? this._workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri) : null; const envFromConfigValue = this._workspaceConfigurationService.inspect(`terminal.integrated.env.${platformKey}`); const isWorkspaceShellAllowed = this._configHelper.checkWorkspaceShellPermissions(); + this._configHelper.showRecommendations(shellLaunchConfig); const baseEnv = this._configHelper.config.inheritEnv ? process.env as platform.IProcessEnvironment : await this._terminalInstanceService.getMainProcessParentEnv(); const env = terminalEnvironment.createTerminalEnvironment(shellLaunchConfig, lastActiveWorkspace, envFromConfigValue, this._configurationResolverService, isWorkspaceShellAllowed, this._productService.version, this._configHelper.config.setLocaleVariables, baseEnv); diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index dfd82834397..c126bf70978 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -122,6 +122,7 @@ export interface ITerminalConfigHelper { /** Sets whether a workspace shell configuration is allowed or not */ setWorkspaceShellAllowed(isAllowed: boolean): void; checkWorkspaceShellPermissions(osOverride?: OperatingSystem): boolean; + showRecommendations(shellLaunchConfig: IShellLaunchConfig): void; } export interface ITerminalFont { From 0f90403c57c5f50193984b6ab710f82c511084a4 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 16 Jul 2019 17:05:57 +0200 Subject: [PATCH 278/710] windows/code.sh: convert to sh --- resources/win32/bin/code.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/resources/win32/bin/code.sh b/resources/win32/bin/code.sh index 4a312474df1..6ae88507877 100644 --- a/resources/win32/bin/code.sh +++ b/resources/win32/bin/code.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh # # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -11,7 +11,7 @@ VSCODE_PATH="$(dirname "$(dirname "$(realpath "$0")")")" ELECTRON="$VSCODE_PATH/$NAME.exe" if grep -qi Microsoft /proc/version; then # in a wsl shell - if ! [ -z "$WSL_DISTRO_NAME" ]; then + if [ "$WSL_DISTRO_NAME" ]; then # $WSL_DISTRO_NAME is available since WSL builds 18362, also for WSL2 WSL_BUILD=18362 else @@ -26,21 +26,16 @@ if grep -qi Microsoft /proc/version; then # WSLPATH is available since WSL build 17046 # WSLENV is available since WSL build 17063 export WSLENV=ELECTRON_RUN_AS_NODE/w:$WSLENV + CLI=$(wslpath -m "$VSCODE_PATH/resources/app/out/cli.js") # use the Remote WSL extension if installed - pushd "$VSCODE_PATH" > /dev/null WSL_EXT_ID="ms-vscode-remote.remote-wsl" - WSL_EXT_WLOC=$(ELECTRON_RUN_AS_NODE=1 "$ELECTRON" ".\resources\app\out\cli.js" --locate-extension $WSL_EXT_ID) - popd > /dev/null - - if ! [ -z "$WSL_EXT_WLOC" ]; then + WSL_EXT_WLOC=$(ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --locate-extension $WSL_EXT_ID) + if [ -n "$WSL_EXT_WLOC" ]; then # replace \r\n with \n in WSL_EXT_WLOC WSL_CODE=$(wslpath -u "${WSL_EXT_WLOC%%[[:cntrl:]]}")/scripts/wslCode.sh - WIN_CODE_CMD=$ELECTRON - "$WSL_CODE" "$COMMIT" "$QUALITY" "$WIN_CODE_CMD" "$APP_NAME" "$DATAFOLDER" "$@" + "$WSL_CODE" "$COMMIT" "$QUALITY" "$ELECTRON" "$APP_NAME" "$DATAFOLDER" "$@" exit $? - else - CLI=$(wslpath -m "$VSCODE_PATH/resources/app/out/cli.js") fi else # If running under older WSL, don't pass cli.js to Electron as From c08d8b424c9aa5120155b0ae8a03f95cff2c90bd Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 16 Jul 2019 17:09:34 +0200 Subject: [PATCH 279/710] introduce gallery machine id resource in env --- .../environment/common/environment.ts | 2 + .../environment/node/environmentService.ts | 3 ++ .../common/extensionGalleryService.ts | 49 ++++++++++--------- .../environment/browser/environmentService.ts | 1 + 4 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index d889e685a0b..e5e0f59d3ef 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -170,4 +170,6 @@ export interface IEnvironmentService { webviewEndpoint?: string; readonly webviewResourceRoot: string; readonly webviewCspSource: string; + + readonly galleryMachineIdResource?: URI; } diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts index dcda4352784..e4635b7fc32 100644 --- a/src/vs/platform/environment/node/environmentService.ts +++ b/src/vs/platform/environment/node/environmentService.ts @@ -266,6 +266,9 @@ export class EnvironmentService implements IEnvironmentService { @memoize get nodeCachedDataDir(): string | undefined { return process.env['VSCODE_NODE_CACHED_DATA_DIR'] || undefined; } + @memoize + get galleryMachineIdResource(): URI { return resources.joinPath(URI.file(this.userDataPath), 'machineid'); } + get disableUpdates(): boolean { return !!this._args['disable-updates']; } get disableCrashReporter(): boolean { return !!this._args['disable-crash-reporter']; } diff --git a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts index 08c4c3a022f..3c7e35fb2f3 100644 --- a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts @@ -9,7 +9,7 @@ import { getGalleryExtensionId, getGalleryExtensionTelemetryData, adoptToGallery import { assign, getOrDefault } from 'vs/base/common/objects'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IPager } from 'vs/base/common/paging'; -import { IRequestService, IRequestOptions, IRequestContext, asJson, asText } from 'vs/platform/request/common/request'; +import { IRequestService, IRequestOptions, IRequestContext, asJson, asText, IHeaders } from 'vs/platform/request/common/request'; import { isEngineValid } from 'vs/platform/extensions/common/extensionValidator'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { generateUuid, isUUID } from 'vs/base/common/uuid'; @@ -774,29 +774,30 @@ export class ExtensionGalleryService implements IExtensionGalleryService { } export async function resolveMarketplaceHeaders(version: string, environmentService: IEnvironmentService, fileService: IFileService): Promise<{ [key: string]: string; }> { - const marketplaceMachineIdFile = joinPath(URI.file(environmentService.userDataPath), 'machineid'); - - let uuid: string | null = null; - - try { - const contents = await fileService.readFile(marketplaceMachineIdFile); - const value = contents.value.toString(); - uuid = isUUID(value) ? value : null; - } catch (e) { - uuid = null; - } - - if (!uuid) { - uuid = generateUuid(); - try { - await fileService.writeFile(marketplaceMachineIdFile, VSBuffer.fromString(uuid)); - } catch (error) { - //noop - } - } - return { + const headers: IHeaders = { 'X-Market-Client-Id': `VSCode ${version}`, - 'User-Agent': `VSCode ${version}`, - 'X-Market-User-Id': uuid + 'User-Agent': `VSCode ${version}` }; + let uuid: string | null = null; + if (environmentService.galleryMachineIdResource) { + try { + const contents = await fileService.readFile(environmentService.galleryMachineIdResource); + const value = contents.value.toString(); + uuid = isUUID(value) ? value : null; + } catch (e) { + uuid = null; + } + + if (!uuid) { + uuid = generateUuid(); + try { + await fileService.writeFile(environmentService.galleryMachineIdResource, VSBuffer.fromString(uuid)); + } catch (error) { + //noop + } + } + headers['X-Market-User-Id'] = uuid; + } + return headers; + } \ No newline at end of file diff --git a/src/vs/workbench/services/environment/browser/environmentService.ts b/src/vs/workbench/services/environment/browser/environmentService.ts index 6ee56a1d50e..f6d67298ba0 100644 --- a/src/vs/workbench/services/environment/browser/environmentService.ts +++ b/src/vs/workbench/services/environment/browser/environmentService.ts @@ -143,6 +143,7 @@ export class BrowserWorkbenchEnvironmentService implements IEnvironmentService { driverHandle?: string; driverVerbose: boolean; webviewEndpoint?: string; + galleryMachineIdResource?: URI; get webviewResourceRoot(): string { return this.webviewEndpoint ? this.webviewEndpoint + '/vscode-resource{{resource}}' : 'vscode-resource:{{resource}}'; From 7a8e27f205de2e4ec727a94ff5a4d0f9cba180ed Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 16 Jul 2019 17:26:42 +0200 Subject: [PATCH 280/710] wording --- .../workbench/contrib/terminal/browser/terminalConfigHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts b/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts index 48d1cd513b4..0da7d6c690b 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts @@ -267,7 +267,7 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper { Severity.Info, nls.localize( 'useWslExtension.title', - "Use the 'Remote WSL' extension for developping in WSL . Click [here]({0}) to learn more.", + "Check out the 'Visual Studio Code Remote - WSL' extension for a great development experience in WSL. Click [here]({0}) to learn more.", 'https://go.microsoft.com/fwlink/?linkid=2097212' ), [ From dbf2651e868c26647aa99cb6aa921f82b5a3e4f8 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Tue, 16 Jul 2019 08:32:57 -0700 Subject: [PATCH 281/710] Update tree filter icons --- src/vs/base/browser/ui/list/list.css | 6 ++-- .../base/browser/ui/list/media/close-dark.svg | 4 ++- .../base/browser/ui/list/media/close-hc.svg | 34 ++----------------- .../browser/ui/list/media/close-light.svg | 3 ++ src/vs/base/browser/ui/list/media/close.svg | 1 - .../browser/ui/list/media/filter-dark.svg | 4 +-- .../base/browser/ui/list/media/filter-hc.svg | 4 +-- .../browser/ui/list/media/filter-light.svg | 3 ++ src/vs/base/browser/ui/list/media/filter.svg | 5 --- .../browser/ui/list/media/no-filter-dark.svg | 4 +-- .../browser/ui/list/media/no-filter-hc.svg | 4 +-- .../browser/ui/list/media/no-filter-light.svg | 3 ++ .../base/browser/ui/list/media/no-filter.svg | 5 --- 13 files changed, 21 insertions(+), 59 deletions(-) create mode 100644 src/vs/base/browser/ui/list/media/close-light.svg delete mode 100644 src/vs/base/browser/ui/list/media/close.svg create mode 100644 src/vs/base/browser/ui/list/media/filter-light.svg delete mode 100644 src/vs/base/browser/ui/list/media/filter.svg create mode 100644 src/vs/base/browser/ui/list/media/no-filter-light.svg delete mode 100644 src/vs/base/browser/ui/list/media/no-filter.svg diff --git a/src/vs/base/browser/ui/list/list.css b/src/vs/base/browser/ui/list/list.css index 3aa2e653473..1c1fa4c8223 100644 --- a/src/vs/base/browser/ui/list/list.css +++ b/src/vs/base/browser/ui/list/list.css @@ -126,13 +126,13 @@ -webkit-appearance: none; width: 16px; height: 16px; - background: url("media/no-filter.svg"); + background: url("media/no-filter-light.svg"); background-position: 50% 50%; cursor: pointer; } .monaco-list-type-filter > .controls > .filter:checked { - background-image: url("media/filter.svg"); + background-image: url("media/filter-light.svg"); } .vs-dark .monaco-list-type-filter > .controls > .filter { @@ -153,7 +153,7 @@ .monaco-list-type-filter > .controls > .clear { border: none; - background: url("media/close.svg"); + background: url("media/close-light.svg"); cursor: pointer; } diff --git a/src/vs/base/browser/ui/list/media/close-dark.svg b/src/vs/base/browser/ui/list/media/close-dark.svg index 751e89b3b02..7305a8f099a 100644 --- a/src/vs/base/browser/ui/list/media/close-dark.svg +++ b/src/vs/base/browser/ui/list/media/close-dark.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/vs/base/browser/ui/list/media/close-hc.svg b/src/vs/base/browser/ui/list/media/close-hc.svg index c20895c60aa..7305a8f099a 100644 --- a/src/vs/base/browser/ui/list/media/close-hc.svg +++ b/src/vs/base/browser/ui/list/media/close-hc.svg @@ -1,33 +1,3 @@ - - - - - - image/svg+xml - - - - - - - + + diff --git a/src/vs/base/browser/ui/list/media/close-light.svg b/src/vs/base/browser/ui/list/media/close-light.svg new file mode 100644 index 00000000000..ecddcd665b5 --- /dev/null +++ b/src/vs/base/browser/ui/list/media/close-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/vs/base/browser/ui/list/media/close.svg b/src/vs/base/browser/ui/list/media/close.svg deleted file mode 100644 index fde34404d4e..00000000000 --- a/src/vs/base/browser/ui/list/media/close.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/base/browser/ui/list/media/filter-dark.svg b/src/vs/base/browser/ui/list/media/filter-dark.svg index 0925909a117..46c35f4374d 100644 --- a/src/vs/base/browser/ui/list/media/filter-dark.svg +++ b/src/vs/base/browser/ui/list/media/filter-dark.svg @@ -1,5 +1,3 @@ - - - + diff --git a/src/vs/base/browser/ui/list/media/filter-hc.svg b/src/vs/base/browser/ui/list/media/filter-hc.svg index 0e2724f52e2..d7b6bdd3923 100644 --- a/src/vs/base/browser/ui/list/media/filter-hc.svg +++ b/src/vs/base/browser/ui/list/media/filter-hc.svg @@ -1,5 +1,3 @@ - - - + diff --git a/src/vs/base/browser/ui/list/media/filter-light.svg b/src/vs/base/browser/ui/list/media/filter-light.svg new file mode 100644 index 00000000000..2550d80cb70 --- /dev/null +++ b/src/vs/base/browser/ui/list/media/filter-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/vs/base/browser/ui/list/media/filter.svg b/src/vs/base/browser/ui/list/media/filter.svg deleted file mode 100644 index f8c011064b1..00000000000 --- a/src/vs/base/browser/ui/list/media/filter.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/vs/base/browser/ui/list/media/no-filter-dark.svg b/src/vs/base/browser/ui/list/media/no-filter-dark.svg index 5f495c006dc..6fc07d81a55 100644 --- a/src/vs/base/browser/ui/list/media/no-filter-dark.svg +++ b/src/vs/base/browser/ui/list/media/no-filter-dark.svg @@ -1,5 +1,3 @@ - - - + diff --git a/src/vs/base/browser/ui/list/media/no-filter-hc.svg b/src/vs/base/browser/ui/list/media/no-filter-hc.svg index 31d8f70f05a..6fc07d81a55 100644 --- a/src/vs/base/browser/ui/list/media/no-filter-hc.svg +++ b/src/vs/base/browser/ui/list/media/no-filter-hc.svg @@ -1,5 +1,3 @@ - - - + diff --git a/src/vs/base/browser/ui/list/media/no-filter-light.svg b/src/vs/base/browser/ui/list/media/no-filter-light.svg new file mode 100644 index 00000000000..3608b15d29e --- /dev/null +++ b/src/vs/base/browser/ui/list/media/no-filter-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/vs/base/browser/ui/list/media/no-filter.svg b/src/vs/base/browser/ui/list/media/no-filter.svg deleted file mode 100644 index 760cc3c4403..00000000000 --- a/src/vs/base/browser/ui/list/media/no-filter.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - From 0a8ca638f1f64ee0d330b74f8a04d8a22d83efbe Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Tue, 16 Jul 2019 09:23:38 -0700 Subject: [PATCH 282/710] Resolve Terminal arguments (#76895) * Resolved terminal argds * Move location of resolution * Fix routing of resolver in extHost * Remove unnecessary comma * Compilation errors * some async stuff * Undo changes * Variable resolver in constructor * Load resolver upon construction of extHostTerminalService * Utilize last active workspace root * Reevaluate variableReoslver whenever the workspace gets new folder * Fix types for string shellArgs * Use async one level higher * Fix compile issue * Initialize resolver when exthost is created * Fix ext host in remote case with no folder open * Resolve args that an ecxctension passes in * Remove TODO * Resolve extension arguments --- .../api/node/extHostTerminalService.ts | 53 ++++++++++++++++--- .../browser/terminalProcessManager.ts | 20 +++++-- .../terminal/common/terminalEnvironment.ts | 26 +++++++-- .../terminalInstanceService.ts | 17 +++++- 4 files changed, 99 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 56d11496bb0..37044a2f362 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -286,6 +286,8 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { private _terminalProcesses: { [id: number]: ITerminalChildProcess } = {}; private _terminalRenderers: ExtHostTerminalRenderer[] = []; private _getTerminalPromises: { [id: number]: Promise } = {}; + private _variableResolver: ExtHostVariableResolverService | undefined; + private _lastActiveWorkspace: IWorkspaceFolder | undefined; // TODO: Pull this from main side private _isWorkspaceShellAllowed: boolean = false; @@ -307,9 +309,12 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { private _extHostConfiguration: ExtHostConfiguration, private _extHostWorkspace: ExtHostWorkspace, private _extHostDocumentsAndEditors: ExtHostDocumentsAndEditors, - private _logService: ILogService, + private _logService: ILogService ) { this._proxy = mainContext.getProxy(MainContext.MainThreadTerminalService); + this.updateLastActiveWorkspace(); + this.updateVariableResolver(); + this.registerListeners(); } public createTerminal(name?: string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal { @@ -366,18 +371,21 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { this._isWorkspaceShellAllowed, getSystemShell(platform.platform), process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432'), - process.env.windir + process.env.windir, + this._lastActiveWorkspace, + this._variableResolver ); } - private _getDefaultShellArgs(configProvider: ExtHostConfigProvider): string[] | string | undefined { + private _getDefaultShellArgs(configProvider: ExtHostConfigProvider): string[] | string { const fetchSetting = (key: string) => { const setting = configProvider .getConfiguration(key.substr(0, key.lastIndexOf('.'))) .inspect(key.substr(key.lastIndexOf('.') + 1)); return this._apiInspectConfigToPlain(setting); }; - return terminalEnvironment.getDefaultShellArgs(fetchSetting, this._isWorkspaceShellAllowed); + + return terminalEnvironment.getDefaultShellArgs(fetchSetting, this._isWorkspaceShellAllowed, this._lastActiveWorkspace, this._variableResolver); } public async resolveTerminalRenderer(id: number): Promise { @@ -526,6 +534,24 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { return env; } + private registerListeners(): void { + this._extHostDocumentsAndEditors.onDidChangeActiveTextEditor(() => this.updateLastActiveWorkspace()); + this._extHostWorkspace.onDidChangeWorkspace(() => this.updateVariableResolver()); + } + + private updateLastActiveWorkspace(): void { + const activeEditor = this._extHostDocumentsAndEditors.activeEditor(); + if (activeEditor) { + this._lastActiveWorkspace = this._extHostWorkspace.getWorkspaceFolder(activeEditor.document.uri) as IWorkspaceFolder; + } + } + + private async updateVariableResolver(): Promise { + const configProvider = await this._extHostConfiguration.getConfigProvider(); + const workspaceFolders = await this._extHostWorkspace.getWorkspaceFolders2(); + this._variableResolver = new ExtHostVariableResolverService(workspaceFolders || [], this._extHostDocumentsAndEditors, configProvider); + } + public async $createProcess(id: number, shellLaunchConfigDto: ShellLaunchConfigDto, activeWorkspaceRootUriComponents: UriComponents, cols: number, rows: number, isWorkspaceShellAllowed: boolean): Promise { const shellLaunchConfig: IShellLaunchConfig = { name: shellLaunchConfigDto.name, @@ -541,6 +567,21 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { if (!shellLaunchConfig.executable) { shellLaunchConfig.executable = this.getDefaultShell(configProvider); shellLaunchConfig.args = this._getDefaultShellArgs(configProvider); + } else { + if (this._variableResolver) { + shellLaunchConfig.executable = this._variableResolver.resolve(this._lastActiveWorkspace, shellLaunchConfig.executable); + if (shellLaunchConfig.args) { + if (Array.isArray(shellLaunchConfig.args)) { + const resolvedArgs: string[] = []; + for (const arg of shellLaunchConfig.args) { + resolvedArgs.push(this._variableResolver.resolve(this._lastActiveWorkspace, arg)); + } + shellLaunchConfig.args = resolvedArgs; + } else { + shellLaunchConfig.args = this._variableResolver.resolve(this._lastActiveWorkspace, shellLaunchConfig.args); + } + } + } } // Get the initial cwd @@ -559,14 +600,12 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { } } as IWorkspaceFolder : null; const envFromConfig = this._apiInspectConfigToPlain(configProvider.getConfiguration('terminal.integrated').inspect(`env.${platformKey}`)); - const workspaceFolders = await this._extHostWorkspace.getWorkspaceFolders2(); - const variableResolver = workspaceFolders ? new ExtHostVariableResolverService(workspaceFolders, this._extHostDocumentsAndEditors, configProvider) : undefined; const baseEnv = terminalConfig.get('inheritEnv', true) ? process.env as platform.IProcessEnvironment : await this._getNonInheritedEnv(); const env = terminalEnvironment.createTerminalEnvironment( shellLaunchConfig, lastActiveWorkspace, envFromConfig, - variableResolver, + this._variableResolver, isWorkspaceShellAllowed, pkg.version, terminalConfig.get('setLocaleVariables', false), diff --git a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts index 5bbb0612709..bfa9741748e 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts @@ -184,17 +184,29 @@ export class TerminalProcessManager implements ITerminalProcessManager { rows: number, isScreenReaderModeEnabled: boolean ): Promise { + const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(Schemas.file); + const platformKey = platform.isWindows ? 'windows' : (platform.isMacintosh ? 'osx' : 'linux'); + const lastActiveWorkspace = activeWorkspaceRootUri ? this._workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri) : null; if (!shellLaunchConfig.executable) { const defaultConfig = await this._terminalInstanceService.getDefaultShellAndArgs(); shellLaunchConfig.executable = defaultConfig.shell; shellLaunchConfig.args = defaultConfig.args; + } else { + shellLaunchConfig.executable = this._configurationResolverService.resolve(lastActiveWorkspace === null ? undefined : lastActiveWorkspace, shellLaunchConfig.executable); + if (shellLaunchConfig.args) { + if (Array.isArray(shellLaunchConfig.args)) { + const resolvedArgs: string[] = []; + for (const arg of shellLaunchConfig.args) { + resolvedArgs.push(this._configurationResolverService.resolve(lastActiveWorkspace === null ? undefined : lastActiveWorkspace, arg)); + } + shellLaunchConfig.args = resolvedArgs; + } else { + shellLaunchConfig.args = this._configurationResolverService.resolve(lastActiveWorkspace === null ? undefined : lastActiveWorkspace, shellLaunchConfig.args); + } + } } - const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(Schemas.file); const initialCwd = terminalEnvironment.getCwd(shellLaunchConfig, this._environmentService.userHome, activeWorkspaceRootUri, this._configHelper.config.cwd); - - const platformKey = platform.isWindows ? 'windows' : (platform.isMacintosh ? 'osx' : 'linux'); - const lastActiveWorkspace = activeWorkspaceRootUri ? this._workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri) : null; const envFromConfigValue = this._workspaceConfigurationService.inspect(`terminal.integrated.env.${platformKey}`); const isWorkspaceShellAllowed = this._configHelper.checkWorkspaceShellPermissions(); const baseEnv = this._configHelper.config.inheritEnv ? process.env as platform.IProcessEnvironment : await this._terminalInstanceService.getMainProcessParentEnv(); diff --git a/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts b/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts index db22a46964d..58b897d4aa6 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts @@ -169,7 +169,9 @@ export function getDefaultShell( defaultShell: string, isWoW64: boolean, windir: string | undefined, - platformOverride: platform.Platform = platform.platform + lastActiveWorkspace: IWorkspaceFolder | undefined, + configurationResolverService: IConfigurationResolverService | undefined, + platformOverride: platform.Platform = platform.platform, ): string { const platformKey = platformOverride === platform.Platform.Windows ? 'windows' : platformOverride === platform.Platform.Mac ? 'osx' : 'linux'; const shellConfigValue = fetchSetting(`terminal.integrated.shell.${platformKey}`); @@ -190,17 +192,33 @@ export function getDefaultShell( executable = executable.replace(/\//g, '\\'); } + if (configurationResolverService) { + executable = configurationResolverService.resolve(lastActiveWorkspace, executable); + } + return executable; } export function getDefaultShellArgs( fetchSetting: (key: string) => { user: string | string[] | undefined, value: string | string[] | undefined, default: string | string[] | undefined }, isWorkspaceShellAllowed: boolean, - platformOverride: platform.Platform = platform.platform -): string[] { + lastActiveWorkspace: IWorkspaceFolder | undefined, + configurationResolverService: IConfigurationResolverService | undefined, + platformOverride: platform.Platform = platform.platform, +): string | string[] { const platformKey = platformOverride === platform.Platform.Windows ? 'windows' : platformOverride === platform.Platform.Mac ? 'osx' : 'linux'; const shellArgsConfigValue = fetchSetting(`terminal.integrated.shellArgs.${platformKey}`); - const args = (isWorkspaceShellAllowed ? shellArgsConfigValue.value : shellArgsConfigValue.user) || shellArgsConfigValue.default; + let args = ((isWorkspaceShellAllowed ? shellArgsConfigValue.value : shellArgsConfigValue.user) || shellArgsConfigValue.default); + if (typeof args === 'string' && platformOverride === platform.Platform.Windows) { + return configurationResolverService ? configurationResolverService.resolve(lastActiveWorkspace, args) : args; + } + if (configurationResolverService) { + const resolvedArgs: string[] = []; + for (const arg of args) { + resolvedArgs.push(configurationResolverService.resolve(lastActiveWorkspace, arg)); + } + args = resolvedArgs; + } return args; } diff --git a/src/vs/workbench/contrib/terminal/electron-browser/terminalInstanceService.ts b/src/vs/workbench/contrib/terminal/electron-browser/terminalInstanceService.ts index 94b5a713671..e9b13c0d68f 100644 --- a/src/vs/workbench/contrib/terminal/electron-browser/terminalInstanceService.ts +++ b/src/vs/workbench/contrib/terminal/electron-browser/terminalInstanceService.ts @@ -17,6 +17,9 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { getDefaultShell, getDefaultShellArgs } from 'vs/workbench/contrib/terminal/common/terminalEnvironment'; import { StorageScope, IStorageService } from 'vs/platform/storage/common/storage'; import { getMainProcessParentEnv } from 'vs/workbench/contrib/terminal/node/terminalEnvironment'; +import { IConfigurationResolverService } from 'vs/workbench/services/configurationResolver/common/configurationResolver'; +import { IHistoryService } from 'vs/workbench/services/history/common/history'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; let Terminal: typeof XTermTerminal; let WebLinksAddon: typeof XTermWebLinksAddon; @@ -28,7 +31,10 @@ export class TerminalInstanceService implements ITerminalInstanceService { constructor( @IInstantiationService private readonly _instantiationService: IInstantiationService, @IConfigurationService private readonly _configurationService: IConfigurationService, - @IStorageService private readonly _storageService: IStorageService + @IStorageService private readonly _storageService: IStorageService, + @IConfigurationResolverService private readonly _configurationResolverService: IConfigurationResolverService, + @IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService, + @IHistoryService private readonly _historyService: IHistoryService ) { } @@ -65,19 +71,26 @@ export class TerminalInstanceService implements ITerminalInstanceService { return this._storageService.getBoolean(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, StorageScope.WORKSPACE, false); } - public getDefaultShellAndArgs(platformOverride: Platform = platform): Promise<{ shell: string, args: string[] | undefined }> { + public getDefaultShellAndArgs(platformOverride: Platform = platform): Promise<{ shell: string, args: string | string[] }> { const isWorkspaceShellAllowed = this._isWorkspaceShellAllowed(); + const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(); + let lastActiveWorkspace = activeWorkspaceRootUri ? this._workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri) : undefined; + lastActiveWorkspace = lastActiveWorkspace === null ? undefined : lastActiveWorkspace; const shell = getDefaultShell( (key) => this._configurationService.inspect(key), isWorkspaceShellAllowed, getSystemShell(platformOverride), process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432'), process.env.windir, + lastActiveWorkspace, + this._configurationResolverService, platformOverride ); const args = getDefaultShellArgs( (key) => this._configurationService.inspect(key), isWorkspaceShellAllowed, + lastActiveWorkspace, + this._configurationResolverService, platformOverride ); return Promise.resolve({ shell, args }); From c109f9a5d42c5158bf12e5a60dee21c369f2eddd Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Tue, 16 Jul 2019 10:57:53 -0700 Subject: [PATCH 283/710] Use background color for input toggle active state --- src/vs/base/browser/ui/checkbox/checkbox.ts | 8 +++++++- src/vs/base/browser/ui/findinput/findInput.ts | 14 +++++++++++--- .../browser/ui/findinput/findInputCheckboxes.ts | 10 +++++++--- src/vs/editor/contrib/find/findOptionsWidget.ts | 17 ++++++++++++----- src/vs/editor/contrib/find/findWidget.ts | 3 ++- src/vs/editor/contrib/find/simpleFindWidget.ts | 3 ++- src/vs/platform/theme/common/colorRegistry.ts | 3 ++- src/vs/platform/theme/common/styler.ts | 8 ++++++-- 8 files changed, 49 insertions(+), 17 deletions(-) diff --git a/src/vs/base/browser/ui/checkbox/checkbox.ts b/src/vs/base/browser/ui/checkbox/checkbox.ts index 40dcdfbb9ab..8ec96513dd2 100644 --- a/src/vs/base/browser/ui/checkbox/checkbox.ts +++ b/src/vs/base/browser/ui/checkbox/checkbox.ts @@ -22,10 +22,12 @@ export interface ICheckboxOpts extends ICheckboxStyles { export interface ICheckboxStyles { inputActiveOptionBorder?: Color; + inputActiveOptionBackground?: Color; } const defaultOpts = { - inputActiveOptionBorder: Color.fromHex('#007ACC') + inputActiveOptionBorder: Color.fromHex('#007ACC00'), + inputActiveOptionBackground: Color.fromHex('#0E639C50') }; export class CheckboxActionViewItem extends BaseActionViewItem { @@ -149,12 +151,16 @@ export class Checkbox extends Widget { if (styles.inputActiveOptionBorder) { this._opts.inputActiveOptionBorder = styles.inputActiveOptionBorder; } + if (styles.inputActiveOptionBackground) { + this._opts.inputActiveOptionBackground = styles.inputActiveOptionBackground; + } this.applyStyles(); } protected applyStyles(): void { if (this.domNode) { this.domNode.style.borderColor = this._checked && this._opts.inputActiveOptionBorder ? this._opts.inputActiveOptionBorder.toString() : 'transparent'; + this.domNode.style.backgroundColor = this._checked && this._opts.inputActiveOptionBackground ? this._opts.inputActiveOptionBackground.toString() : 'transparent'; } } diff --git a/src/vs/base/browser/ui/findinput/findInput.ts b/src/vs/base/browser/ui/findinput/findInput.ts index 38a5082b141..180e660f3a5 100644 --- a/src/vs/base/browser/ui/findinput/findInput.ts +++ b/src/vs/base/browser/ui/findinput/findInput.ts @@ -33,6 +33,7 @@ export interface IFindInputOptions extends IFindInputStyles { export interface IFindInputStyles extends IInputBoxStyles { inputActiveOptionBorder?: Color; + inputActiveOptionBackground?: Color; } const NLS_DEFAULT_LABEL = nls.localize('defaultLabel', "input"); @@ -48,6 +49,7 @@ export class FindInput extends Widget { private fixFocusOnOptionClickEnabled = true; private inputActiveOptionBorder?: Color; + private inputActiveOptionBackground?: Color; private inputBackground?: Color; private inputForeground?: Color; private inputBorder?: Color; @@ -97,6 +99,7 @@ export class FindInput extends Widget { this.label = options.label || NLS_DEFAULT_LABEL; this.inputActiveOptionBorder = options.inputActiveOptionBorder; + this.inputActiveOptionBackground = options.inputActiveOptionBackground; this.inputBackground = options.inputBackground; this.inputForeground = options.inputForeground; this.inputBorder = options.inputBorder; @@ -173,6 +176,7 @@ export class FindInput extends Widget { public style(styles: IFindInputStyles): void { this.inputActiveOptionBorder = styles.inputActiveOptionBorder; + this.inputActiveOptionBackground = styles.inputActiveOptionBackground; this.inputBackground = styles.inputBackground; this.inputForeground = styles.inputForeground; this.inputBorder = styles.inputBorder; @@ -194,6 +198,7 @@ export class FindInput extends Widget { if (this.domNode) { const checkBoxStyles: ICheckboxStyles = { inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionBackground: this.inputActiveOptionBackground, }; this.regex.style(checkBoxStyles); this.wholeWords.style(checkBoxStyles); @@ -294,7 +299,8 @@ export class FindInput extends Widget { this.regex = this._register(new RegexCheckbox({ appendTitle: appendRegexLabel, isChecked: false, - inputActiveOptionBorder: this.inputActiveOptionBorder + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionBackground: this.inputActiveOptionBackground })); this._register(this.regex.onChange(viaKeyboard => { this._onDidOptionChange.fire(viaKeyboard); @@ -310,7 +316,8 @@ export class FindInput extends Widget { this.wholeWords = this._register(new WholeWordsCheckbox({ appendTitle: appendWholeWordsLabel, isChecked: false, - inputActiveOptionBorder: this.inputActiveOptionBorder + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionBackground: this.inputActiveOptionBackground })); this._register(this.wholeWords.onChange(viaKeyboard => { this._onDidOptionChange.fire(viaKeyboard); @@ -323,7 +330,8 @@ export class FindInput extends Widget { this.caseSensitive = this._register(new CaseSensitiveCheckbox({ appendTitle: appendCaseSensitiveLabel, isChecked: false, - inputActiveOptionBorder: this.inputActiveOptionBorder + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionBackground: this.inputActiveOptionBackground })); this._register(this.caseSensitive.onChange(viaKeyboard => { this._onDidOptionChange.fire(viaKeyboard); diff --git a/src/vs/base/browser/ui/findinput/findInputCheckboxes.ts b/src/vs/base/browser/ui/findinput/findInputCheckboxes.ts index 62451f1a4b8..effef734a8c 100644 --- a/src/vs/base/browser/ui/findinput/findInputCheckboxes.ts +++ b/src/vs/base/browser/ui/findinput/findInputCheckboxes.ts @@ -12,6 +12,7 @@ export interface IFindInputCheckboxOpts { readonly appendTitle: string; readonly isChecked: boolean; readonly inputActiveOptionBorder?: Color; + readonly inputActiveOptionBackground?: Color; } const NLS_CASE_SENSITIVE_CHECKBOX_LABEL = nls.localize('caseDescription', "Match Case"); @@ -24,7 +25,8 @@ export class CaseSensitiveCheckbox extends Checkbox { actionClassName: 'monaco-case-sensitive', title: NLS_CASE_SENSITIVE_CHECKBOX_LABEL + opts.appendTitle, isChecked: opts.isChecked, - inputActiveOptionBorder: opts.inputActiveOptionBorder + inputActiveOptionBorder: opts.inputActiveOptionBorder, + inputActiveOptionBackground: opts.inputActiveOptionBackground }); } } @@ -35,7 +37,8 @@ export class WholeWordsCheckbox extends Checkbox { actionClassName: 'monaco-whole-word', title: NLS_WHOLE_WORD_CHECKBOX_LABEL + opts.appendTitle, isChecked: opts.isChecked, - inputActiveOptionBorder: opts.inputActiveOptionBorder + inputActiveOptionBorder: opts.inputActiveOptionBorder, + inputActiveOptionBackground: opts.inputActiveOptionBackground }); } } @@ -46,7 +49,8 @@ export class RegexCheckbox extends Checkbox { actionClassName: 'monaco-regex', title: NLS_REGEX_CHECKBOX_LABEL + opts.appendTitle, isChecked: opts.isChecked, - inputActiveOptionBorder: opts.inputActiveOptionBorder + inputActiveOptionBorder: opts.inputActiveOptionBorder, + inputActiveOptionBackground: opts.inputActiveOptionBackground }); } } diff --git a/src/vs/editor/contrib/find/findOptionsWidget.ts b/src/vs/editor/contrib/find/findOptionsWidget.ts index 8a61aabd766..76fe78b42de 100644 --- a/src/vs/editor/contrib/find/findOptionsWidget.ts +++ b/src/vs/editor/contrib/find/findOptionsWidget.ts @@ -11,7 +11,7 @@ import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPosit import { FIND_IDS } from 'vs/editor/contrib/find/findModel'; import { FindReplaceState } from 'vs/editor/contrib/find/findState'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { contrastBorder, editorWidgetBackground, inputActiveOptionBorder, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; +import { contrastBorder, editorWidgetBackground, inputActiveOptionBorder, inputActiveOptionBackground, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; import { ITheme, IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; export class FindOptionsWidget extends Widget implements IOverlayWidget { @@ -47,11 +47,13 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { this._domNode.setAttribute('aria-hidden', 'true'); const inputActiveOptionBorderColor = themeService.getTheme().getColor(inputActiveOptionBorder); + const inputActiveOptionBackgroundColor = themeService.getTheme().getColor(inputActiveOptionBackground); this.caseSensitive = this._register(new CaseSensitiveCheckbox({ appendTitle: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand), isChecked: this._state.matchCase, - inputActiveOptionBorder: inputActiveOptionBorderColor + inputActiveOptionBorder: inputActiveOptionBorderColor, + inputActiveOptionBackground: inputActiveOptionBackgroundColor })); this._domNode.appendChild(this.caseSensitive.domNode); this._register(this.caseSensitive.onChange(() => { @@ -63,7 +65,8 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { this.wholeWords = this._register(new WholeWordsCheckbox({ appendTitle: this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand), isChecked: this._state.wholeWord, - inputActiveOptionBorder: inputActiveOptionBorderColor + inputActiveOptionBorder: inputActiveOptionBorderColor, + inputActiveOptionBackground: inputActiveOptionBackgroundColor })); this._domNode.appendChild(this.wholeWords.domNode); this._register(this.wholeWords.onChange(() => { @@ -75,7 +78,8 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { this.regex = this._register(new RegexCheckbox({ appendTitle: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand), isChecked: this._state.isRegex, - inputActiveOptionBorder: inputActiveOptionBorderColor + inputActiveOptionBorder: inputActiveOptionBorderColor, + inputActiveOptionBackground: inputActiveOptionBackgroundColor })); this._domNode.appendChild(this.regex.domNode); this._register(this.regex.onChange(() => { @@ -179,7 +183,10 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { } private _applyTheme(theme: ITheme) { - let inputStyles = { inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder) }; + let inputStyles = { + inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder), + inputActiveOptionBackground: theme.getColor(inputActiveOptionBackground) + }; this.caseSensitive.style(inputStyles); this.wholeWords.style(inputStyles); this.regex.style(inputStyles); diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index 5e7febe1ccf..1d3e734ac98 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -27,7 +27,7 @@ import { CONTEXT_FIND_INPUT_FOCUSED, CONTEXT_REPLACE_INPUT_FOCUSED, FIND_IDS, MA import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/findState'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { contrastBorder, editorFindMatch, editorFindMatchBorder, editorFindMatchHighlight, editorFindMatchHighlightBorder, editorFindRangeHighlight, editorFindRangeHighlightBorder, editorWidgetBackground, editorWidgetBorder, editorWidgetResizeBorder, errorForeground, inputActiveOptionBorder, inputBackground, inputBorder, inputForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground, widgetShadow, editorWidgetForeground } from 'vs/platform/theme/common/colorRegistry'; +import { contrastBorder, editorFindMatch, editorFindMatchBorder, editorFindMatchHighlight, editorFindMatchHighlightBorder, editorFindRangeHighlight, editorFindRangeHighlightBorder, editorWidgetBackground, editorWidgetBorder, editorWidgetResizeBorder, errorForeground, inputActiveOptionBorder, inputActiveOptionBackground, inputBackground, inputBorder, inputForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground, widgetShadow, editorWidgetForeground } from 'vs/platform/theme/common/colorRegistry'; import { ITheme, IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { ContextScopedFindInput, ContextScopedHistoryInputBox } from 'vs/platform/browser/contextScopedHistoryWidget'; import { AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility'; @@ -560,6 +560,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas private _applyTheme(theme: ITheme) { let inputStyles: IFindInputStyles = { inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder), + inputActiveOptionBackground: theme.getColor(inputActiveOptionBackground), inputBackground: theme.getColor(inputBackground), inputForeground: theme.getColor(inputForeground), inputBorder: theme.getColor(inputBorder), diff --git a/src/vs/editor/contrib/find/simpleFindWidget.ts b/src/vs/editor/contrib/find/simpleFindWidget.ts index 31c75f9f7a6..54f256d48aa 100644 --- a/src/vs/editor/contrib/find/simpleFindWidget.ts +++ b/src/vs/editor/contrib/find/simpleFindWidget.ts @@ -15,7 +15,7 @@ import { IMessage as InputBoxMessage } from 'vs/base/browser/ui/inputbox/inputBo import { SimpleButton } from 'vs/editor/contrib/find/findWidget'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; -import { editorWidgetBackground, inputActiveOptionBorder, inputBackground, inputBorder, inputForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; +import { editorWidgetBackground, inputActiveOptionBorder, inputActiveOptionBackground, inputBackground, inputBorder, inputForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; import { ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { ContextScopedFindInput } from 'vs/platform/browser/contextScopedHistoryWidget'; @@ -180,6 +180,7 @@ export abstract class SimpleFindWidget extends Widget { public updateTheme(theme: ITheme): void { const inputStyles: IFindInputStyles = { inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder), + inputActiveOptionBackground: theme.getColor(inputActiveOptionBackground), inputBackground: theme.getColor(inputBackground), inputForeground: theme.getColor(inputForeground), inputBorder: theme.getColor(inputBorder), diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 11cb7598f9c..412fc5561da 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -203,7 +203,8 @@ export const widgetShadow = registerColor('widget.shadow', { dark: '#000000', li export const inputBackground = registerColor('input.background', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('inputBoxBackground', "Input box background.")); export const inputForeground = registerColor('input.foreground', { dark: foreground, light: foreground, hc: foreground }, nls.localize('inputBoxForeground', "Input box foreground.")); export const inputBorder = registerColor('input.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('inputBoxBorder', "Input box border.")); -export const inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC', light: '#007ACC', hc: activeContrastBorder }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); +export const inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC00', light: '#007ACC00', hc: '#007ACC00' }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); +export const inputActiveOptionBackground = registerColor('inputOption.activeBackground', { dark: transparent(focusBorder, 0.5), light: transparent(focusBorder, 0.3), hc: activeContrastBorder }, nls.localize('inputOption.activeBackground', "Background color of activated options in input fields.")); export const inputPlaceholderForeground = registerColor('input.placeholderForeground', { light: transparent(foreground, 0.5), dark: transparent(foreground, 0.5), hc: transparent(foreground, 0.7) }, nls.localize('inputPlaceholderForeground', "Input box foreground color for placeholder text.")); export const inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('inputValidationInfoBackground', "Input validation background color for information severity.")); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index d04b8bd3c8f..75245df2d1e 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { focusBorder, inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectListBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listInactiveFocusBackground, listHoverBackground, listHoverForeground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, badgeBackground, badgeForeground, progressBarBackground, breadcrumbsForeground, breadcrumbsFocusForeground, breadcrumbsActiveSelectionForeground, breadcrumbsBackground, editorWidgetBorder, inputValidationInfoForeground, inputValidationWarningForeground, inputValidationErrorForeground, menuForeground, menuBackground, menuSelectionForeground, menuSelectionBackground, menuSelectionBorder, menuBorder, menuSeparatorBackground, darken, listFilterWidgetOutline, listFilterWidgetNoMatchesOutline, listFilterWidgetBackground, editorWidgetBackground, treeIndentGuidesStroke, editorWidgetForeground } from 'vs/platform/theme/common/colorRegistry'; +import { focusBorder, inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectListBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, inputActiveOptionBackground, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listInactiveFocusBackground, listHoverBackground, listHoverForeground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, badgeBackground, badgeForeground, progressBarBackground, breadcrumbsForeground, breadcrumbsFocusForeground, breadcrumbsActiveSelectionForeground, breadcrumbsBackground, editorWidgetBorder, inputValidationInfoForeground, inputValidationWarningForeground, inputValidationErrorForeground, menuForeground, menuBackground, menuSelectionForeground, menuSelectionBackground, menuSelectionBorder, menuBorder, menuSeparatorBackground, darken, listFilterWidgetOutline, listFilterWidgetNoMatchesOutline, listFilterWidgetBackground, editorWidgetBackground, treeIndentGuidesStroke, editorWidgetForeground } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; import { Color } from 'vs/base/common/color'; import { mixin } from 'vs/base/common/objects'; @@ -59,11 +59,13 @@ export function attachStyler(themeService: IThemeServic export interface ICheckboxStyleOverrides extends IStyleOverrides { inputActiveOptionBorderColor?: ColorIdentifier; + inputActiveOptionBackgroundColor?: ColorIdentifier; } export function attachCheckboxStyler(widget: IThemable, themeService: IThemeService, style?: ICheckboxStyleOverrides): IDisposable { return attachStyler(themeService, { - inputActiveOptionBorder: (style && style.inputActiveOptionBorderColor) || inputActiveOptionBorder + inputActiveOptionBorder: (style && style.inputActiveOptionBorderColor) || inputActiveOptionBorder, + inputActiveOptionBackground: (style && style.inputActiveOptionBackgroundColor) || inputActiveOptionBackground } as ICheckboxStyleOverrides, widget); } @@ -85,6 +87,7 @@ export interface IInputBoxStyleOverrides extends IStyleOverrides { inputForeground?: ColorIdentifier; inputBorder?: ColorIdentifier; inputActiveOptionBorder?: ColorIdentifier; + inputActiveOptionBackground?: ColorIdentifier; inputValidationInfoBorder?: ColorIdentifier; inputValidationInfoBackground?: ColorIdentifier; inputValidationInfoForeground?: ColorIdentifier; @@ -146,6 +149,7 @@ export function attachFindInputBoxStyler(widget: IThemable, themeService: ITheme inputForeground: (style && style.inputForeground) || inputForeground, inputBorder: (style && style.inputBorder) || inputBorder, inputActiveOptionBorder: (style && style.inputActiveOptionBorder) || inputActiveOptionBorder, + inputActiveOptionBackground: (style && style.inputActiveOptionBackground) || inputActiveOptionBackground, inputValidationInfoBorder: (style && style.inputValidationInfoBorder) || inputValidationInfoBorder, inputValidationInfoBackground: (style && style.inputValidationInfoBackground) || inputValidationInfoBackground, inputValidationInfoForeground: (style && style.inputValidationInfoForeground) || inputValidationInfoForeground, From 82db3257c260fc53df577592091433aba781815a Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Tue, 16 Jul 2019 11:23:51 -0700 Subject: [PATCH 284/710] Apply 'inputOption.activeBackground' to find in selection --- src/vs/editor/contrib/find/findWidget.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index 1d3e734ac98..01f71b91505 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -1218,4 +1218,9 @@ registerThemingParticipant((theme, collector) => { if (inputActiveBorder) { collector.addRule(`.monaco-editor .find-widget .monaco-checkbox .checkbox:checked + .label { border: 1px solid ${inputActiveBorder.toString()}; }`); } + + const inputActiveBackground = theme.getColor(inputActiveOptionBackground); + if (inputActiveBackground) { + collector.addRule(`.monaco-editor .find-widget .monaco-checkbox .checkbox:checked + .label { background-color: ${inputActiveBackground.toString()}; }`); + } }); From 67605407a69c34853b300d8b848492b36ed00b64 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 16 Jul 2019 11:56:51 -0700 Subject: [PATCH 285/710] Don't sanitize terminal config env vars Fixes #77440 --- .../contrib/terminal/common/terminalEnvironment.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts b/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts index 58b897d4aa6..7442639d505 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts @@ -255,14 +255,14 @@ export function createTerminalEnvironment( } } - // Merge config (settings) and ShellLaunchConfig environments - mergeEnvironments(env, allowedEnvFromConfig); - mergeEnvironments(env, shellLaunchConfig.env); - // Sanitize the environment, removing any undesirable VS Code and Electron environment // variables sanitizeProcessEnvironment(env, 'VSCODE_IPC_HOOK_CLI'); + // Merge config (settings) and ShellLaunchConfig environments + mergeEnvironments(env, allowedEnvFromConfig); + mergeEnvironments(env, shellLaunchConfig.env); + // Adding other env keys necessary to create the process addTerminalEnvironmentKeys(env, version, platform.locale, setLocaleVariables); } From 1ed9be719ce6f0ffd78bf418c670997bc1479ea4 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Tue, 16 Jul 2019 11:56:49 -0700 Subject: [PATCH 286/710] Warning in console when keyboard layout mismatch --- src/vs/workbench/services/keybinding/browser/keymapService.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/services/keybinding/browser/keymapService.ts b/src/vs/workbench/services/keybinding/browser/keymapService.ts index 401dede8db9..a0d6e007f79 100644 --- a/src/vs/workbench/services/keybinding/browser/keymapService.ts +++ b/src/vs/workbench/services/keybinding/browser/keymapService.ts @@ -200,6 +200,8 @@ export class BrowserKeyboardMapperFactoryBase { }] ); + console.warn('Active keymap/keyevent does not match current keyboard layout', JSON.stringify(keymap), this._activeKeymapInfo ? JSON.stringify(this._activeKeymapInfo.layout) : ''); + return; } From 5518ffa909191e824a912c3be192c01760641154 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Tue, 16 Jul 2019 14:44:21 -0700 Subject: [PATCH 287/710] Update high contrast border colors --- src/vs/platform/theme/common/colorRegistry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 412fc5561da..f06681a814e 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -203,8 +203,8 @@ export const widgetShadow = registerColor('widget.shadow', { dark: '#000000', li export const inputBackground = registerColor('input.background', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('inputBoxBackground', "Input box background.")); export const inputForeground = registerColor('input.foreground', { dark: foreground, light: foreground, hc: foreground }, nls.localize('inputBoxForeground', "Input box foreground.")); export const inputBorder = registerColor('input.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('inputBoxBorder', "Input box border.")); -export const inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC00', light: '#007ACC00', hc: '#007ACC00' }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); -export const inputActiveOptionBackground = registerColor('inputOption.activeBackground', { dark: transparent(focusBorder, 0.5), light: transparent(focusBorder, 0.3), hc: activeContrastBorder }, nls.localize('inputOption.activeBackground', "Background color of activated options in input fields.")); +export const inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC00', light: '#007ACC00', hc: contrastBorder }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); +export const inputActiveOptionBackground = registerColor('inputOption.activeBackground', { dark: transparent(focusBorder, 0.5), light: transparent(focusBorder, 0.3), hc: null }, nls.localize('inputOption.activeBackground', "Background color of activated options in input fields.")); export const inputPlaceholderForeground = registerColor('input.placeholderForeground', { light: transparent(foreground, 0.5), dark: transparent(foreground, 0.5), hc: transparent(foreground, 0.7) }, nls.localize('inputPlaceholderForeground', "Input box foreground color for placeholder text.")); export const inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('inputValidationInfoBackground', "Input validation background color for information severity.")); From c2aae8970ee5277f09fa2030ef3a461cc16939f9 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Tue, 16 Jul 2019 14:57:27 -0700 Subject: [PATCH 288/710] Remove css background color for find in selection button --- src/vs/editor/contrib/find/findWidget.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/vs/editor/contrib/find/findWidget.css b/src/vs/editor/contrib/find/findWidget.css index 0f2a7720c67..b0311427209 100644 --- a/src/vs/editor/contrib/find/findWidget.css +++ b/src/vs/editor/contrib/find/findWidget.css @@ -289,10 +289,6 @@ background-color: rgba(255, 255, 255, 0.1); } -.monaco-editor.vs-dark .find-widget .monaco-checkbox .checkbox:checked + .label { - background-color: rgba(255, 255, 255, 0.1); -} - .monaco-editor.hc-black .find-widget .close-fw, .monaco-editor.vs-dark .find-widget .close-fw { background-image: url('images/close-dark.svg'); From 8d09c994e8ddb4b2df625a79533a7d8f94e55892 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 Jul 2019 14:40:14 -0700 Subject: [PATCH 289/710] Extract WebviewIconsManager --- .../webview/browser/webviewEditorInput.ts | 44 ++++++++++++------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts index d6133b09e04..aadd6394c0b 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts @@ -3,49 +3,59 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as dom from 'vs/base/browser/dom'; +import { memoize } from 'vs/base/common/decorators'; import { Emitter } from 'vs/base/common/event'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { URI } from 'vs/base/common/uri'; import { IEditorModel } from 'vs/platform/editor/common/editor'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { EditorInput, EditorModel, GroupIdentifier, IEditorInput } from 'vs/workbench/common/editor'; +import { Webview, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService'; import { WebviewEvents, WebviewInputOptions } from './webviewEditorService'; -import { Webview, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; -export class WebviewEditorInput extends EditorInput { +class WebviewIconsManager { + private readonly _icons = new Map(); - private static _styleElement?: HTMLStyleElement; + @memoize + private get _styleElement(): HTMLStyleElement { + const element = dom.createStyleSheet(); + element.className = 'webview-icons'; + return element; + } - private static _icons = new Map(); - - private static updateStyleElement( - id: string, + public setIcons( + webviewId: string, iconPath: { light: URI, dark: URI } | undefined ) { - if (!this._styleElement) { - this._styleElement = dom.createStyleSheet(); - this._styleElement.className = 'webview-icons'; - } - - if (!iconPath) { - this._icons.delete(id); + if (iconPath) { + this._icons.set(webviewId, iconPath); } else { - this._icons.set(id, iconPath); + this._icons.delete(webviewId); } + this.updateStyleSheet(); + } + + private updateStyleSheet() { const cssRules: string[] = []; this._icons.forEach((value, key) => { const webviewSelector = `.show-file-icons .webview-${key}-name-file-icon::before`; if (URI.isUri(value)) { cssRules.push(`${webviewSelector} { content: ""; background-image: url(${dom.asDomUri(value).toString()}); }`); - } else { + } + else { cssRules.push(`.vs ${webviewSelector} { content: ""; background-image: url(${dom.asDomUri(value.light).toString()}); }`); cssRules.push(`.vs-dark ${webviewSelector} { content: ""; background-image: url(${dom.asDomUri(value.dark).toString()}); }`); } }); this._styleElement.innerHTML = cssRules.join('\n'); } +} + +export class WebviewEditorInput extends EditorInput { + + private readonly iconsManager = new WebviewIconsManager(); public static readonly typeId = 'workbench.editors.webviewInput'; @@ -144,7 +154,7 @@ export class WebviewEditorInput extends EditorInput { public set iconPath(value: { light: URI, dark: URI } | undefined) { this._iconPath = value; - WebviewEditorInput.updateStyleElement(this.id, value); + this.iconsManager.setIcons(this.id, value); } public matches(other: IEditorInput): boolean { From cdfa3c541813c07f3432d5db6e7f5717352f0930 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 Jul 2019 14:45:15 -0700 Subject: [PATCH 290/710] Mark that property may not be initialized yet --- .../contrib/update/electron-browser/releaseNotesEditor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts b/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts index b4803e191fa..c6d72b3e1f8 100644 --- a/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts +++ b/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts @@ -51,7 +51,7 @@ export class ReleaseNotesManager { private _releaseNotesCache: { [version: string]: Promise; } = Object.create(null); private _currentReleaseNotes: WebviewEditorInput | undefined = undefined; - private _lastText: string; + private _lastText: string | undefined; public constructor( @IEnvironmentService private readonly _environmentService: IEnvironmentService, From 112fa76c775ecb79ac2c9e9e5dba0d711d523543 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 Jul 2019 15:02:31 -0700 Subject: [PATCH 291/710] Remove empty ctor and mark readonly --- src/vs/base/common/lifecycle.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vs/base/common/lifecycle.ts b/src/vs/base/common/lifecycle.ts index 66143bb94b7..79f206f23be 100644 --- a/src/vs/base/common/lifecycle.ts +++ b/src/vs/base/common/lifecycle.ts @@ -213,9 +213,7 @@ export interface IReference extends IDisposable { export abstract class ReferenceCollection { - private references: Map = new Map(); - - constructor() { } + private readonly references: Map = new Map(); acquire(key: string): IReference { let reference = this.references.get(key); From 48e7c6d92742aab31a6f6393dee623e34b9fec26 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 16 Jul 2019 15:10:17 -0700 Subject: [PATCH 292/710] Fix start cb in CustomExecution2 Fixes #77428 --- .../api/browser/mainThreadTerminalService.ts | 17 ++++++++++++----- src/vs/workbench/api/node/extHostTask.ts | 4 +--- .../api/node/extHostTerminalService.ts | 14 ++++++++++++-- .../contrib/terminal/browser/terminalService.ts | 5 ++--- .../contrib/terminal/browser/terminalTab.ts | 6 ++---- .../contrib/terminal/common/terminal.ts | 2 +- .../contrib/terminal/common/terminalService.ts | 2 +- 7 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadTerminalService.ts b/src/vs/workbench/api/browser/mainThreadTerminalService.ts index ab865cc5224..e00be6872bd 100644 --- a/src/vs/workbench/api/browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/browser/mainThreadTerminalService.ts @@ -34,13 +34,20 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape // ITerminalService listeners this._toDispose.add(_terminalService.onInstanceCreated((instance) => { - // Delay this message so the TerminalInstance constructor has a chance to finish and - // return the ID normally to the extension host. The ID that is passed here will be used - // to register non-extension API terminals in the extension host. - setTimeout(() => { + if (instance.shellLaunchConfig.isVirtualProcess) { + // Fire events for virtual processes immediately as the extension host already knows + // about them this._onTerminalOpened(instance); this._onInstanceDimensionsChanged(instance); - }, EXT_HOST_CREATION_DELAY); + } else { + // Delay this message so the TerminalInstance constructor has a chance to finish and + // return the ID normally to the extension host. The ID that is passed here will be + // used to register non-extension API terminals in the extension host. + setTimeout(() => { + this._onTerminalOpened(instance); + this._onInstanceDimensionsChanged(instance); + }, EXT_HOST_CREATION_DELAY); + } })); this._toDispose.add(_terminalService.onInstanceDisposed(instance => this._onTerminalDisposed(instance))); diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 4d97792f198..a1e82957b48 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -588,9 +588,7 @@ export class ExtHostTask implements ExtHostTaskShape { // Clone the custom execution to keep the original untouched. This is important for multiple runs of the same task. this._activeCustomExecutions2.set(execution.id, execution2); - this._terminalService.performTerminalIdAction(terminalId, async terminal => { - this._terminalService.attachVirtualProcessToTerminal(terminalId, await execution2.callback()); - }); + this._terminalService.attachVirtualProcessToTerminal(terminalId, await execution2.callback()); } // Once a terminal is spun up for the custom execution task this event will be fired. diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 37044a2f362..9ec81e1aa58 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -620,8 +620,18 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { this._setupExtHostProcessListeners(id, new TerminalProcess(shellLaunchConfig, initialCwd, cols, rows, env, enableConpty, this._logService)); } - public $startVirtualProcess(id: number, initialDimensions: ITerminalDimensionsDto | undefined): void { - (this._terminalProcesses[id] as ExtHostVirtualProcess).startSendingEvents(initialDimensions); + public async $startVirtualProcess(id: number, initialDimensions: ITerminalDimensionsDto | undefined): Promise { + // Processes should be initialized here for normal virtual process terminals, however for + // tasks they are responsible for attaching the virtual process to a terminal so this + // function may be called before tasks is able to attach to the terminal. + let retries = 5; + while (retries-- > 0) { + if (this._terminalProcesses[id]) { + (this._terminalProcesses[id] as ExtHostVirtualProcess).startSendingEvents(initialDimensions); + return; + } + await timeout(50); + } } private _setupExtHostProcessListeners(id: number, p: ITerminalChildProcess): void { diff --git a/src/vs/workbench/contrib/terminal/browser/terminalService.ts b/src/vs/workbench/contrib/terminal/browser/terminalService.ts index 1b117021f53..9ca71e3d27b 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalService.ts @@ -49,7 +49,7 @@ export class TerminalService extends CommonTerminalService implements ITerminalS this._configHelper = this._instantiationService.createInstance(TerminalConfigHelper, this.terminalNativeService.linuxDistro); } - public createInstance(terminalFocusContextKey: IContextKey, configHelper: ITerminalConfigHelper, container: HTMLElement | undefined, shellLaunchConfig: IShellLaunchConfig, doCreateProcess: boolean): ITerminalInstance { + public createInstance(terminalFocusContextKey: IContextKey, configHelper: ITerminalConfigHelper, container: HTMLElement | undefined, shellLaunchConfig: IShellLaunchConfig): ITerminalInstance { const instance = this._instantiationService.createInstance(TerminalInstance, terminalFocusContextKey, configHelper, container, shellLaunchConfig); this._onInstanceCreated.fire(instance); return instance; @@ -60,8 +60,7 @@ export class TerminalService extends CommonTerminalService implements ITerminalS const instance = this.createInstance(this._terminalFocusContextKey, this.configHelper, undefined, - shell, - true); + shell); this._backgroundedTerminalInstances.push(instance); this._initInstanceListeners(instance); return instance; diff --git a/src/vs/workbench/contrib/terminal/browser/terminalTab.ts b/src/vs/workbench/contrib/terminal/browser/terminalTab.ts index 20259f39e08..e00296853ff 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalTab.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalTab.ts @@ -246,8 +246,7 @@ export class TerminalTab extends Disposable implements ITerminalTab { terminalFocusContextKey, configHelper, undefined, - shellLaunchConfigOrInstance, - true); + shellLaunchConfigOrInstance); } this._terminalInstances.push(instance); this._initInstanceListeners(instance); @@ -389,8 +388,7 @@ export class TerminalTab extends Disposable implements ITerminalTab { terminalFocusContextKey, configHelper, undefined, - shellLaunchConfig, - true); + shellLaunchConfig); this._terminalInstances.splice(this._activeInstanceIndex + 1, 0, instance); this._initInstanceListeners(instance); this._setActiveInstance(instance); diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index c126bf70978..0579b9c84a3 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -251,7 +251,7 @@ export interface ITerminalService { /** * Creates a raw terminal instance, this should not be used outside of the terminal part. */ - createInstance(terminalFocusContextKey: IContextKey, configHelper: ITerminalConfigHelper, container: HTMLElement | undefined, shellLaunchConfig: IShellLaunchConfig, doCreateProcess: boolean): ITerminalInstance; + createInstance(terminalFocusContextKey: IContextKey, configHelper: ITerminalConfigHelper, container: HTMLElement | undefined, shellLaunchConfig: IShellLaunchConfig): ITerminalInstance; getInstanceFromId(terminalId: number): ITerminalInstance | undefined; getInstanceFromIndex(terminalIndex: number): ITerminalInstance; getTabLabels(): string[]; diff --git a/src/vs/workbench/contrib/terminal/common/terminalService.ts b/src/vs/workbench/contrib/terminal/common/terminalService.ts index fa335e234c4..281b93093e9 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalService.ts @@ -119,7 +119,7 @@ export abstract class TerminalService implements ITerminalService { protected abstract _showBackgroundTerminal(instance: ITerminalInstance): void; public abstract createTerminal(shell?: IShellLaunchConfig, wasNewTerminalAction?: boolean): ITerminalInstance; - public abstract createInstance(terminalFocusContextKey: IContextKey, configHelper: ITerminalConfigHelper, container: HTMLElement, shellLaunchConfig: IShellLaunchConfig, doCreateProcess: boolean): ITerminalInstance; + public abstract createInstance(terminalFocusContextKey: IContextKey, configHelper: ITerminalConfigHelper, container: HTMLElement, shellLaunchConfig: IShellLaunchConfig): ITerminalInstance; public abstract setContainers(panelContainer: HTMLElement, terminalContainer: HTMLElement): void; public createTerminalRenderer(name: string): ITerminalInstance { From e51ecc4699230605485a8f516e5c339464361f28 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 17 Jul 2019 00:55:07 +0200 Subject: [PATCH 293/710] Make local extension managment server optional --- .../common/extensionManagement.ts | 2 +- .../extensions/browser/extensionsActions.ts | 54 ++++++-------- .../extensions/browser/extensionsViewlet.ts | 13 ++-- .../extensions/browser/extensionsWidgets.ts | 21 +++--- .../browser/extensionsWorkbenchService.ts | 54 +++++++++----- .../extensionsActions.test.ts | 2 +- .../electron-browser/extensionsViews.test.ts | 3 +- .../extensionManagementServerService.ts | 17 +++-- ...ement.ts => extensionManagementService.ts} | 71 +++++++++++++------ .../extensionManagementServerService.ts | 10 ++- .../node/extensionEnablementService.ts | 2 +- ...ement.ts => extensionManagementService.ts} | 9 ++- src/vs/workbench/workbench.main.ts | 3 +- src/vs/workbench/workbench.web.main.ts | 15 ++-- 14 files changed, 158 insertions(+), 118 deletions(-) rename src/vs/workbench/services/extensionManagement/common/{extensionManagement.ts => extensionManagementService.ts} (74%) rename src/vs/workbench/services/extensionManagement/node/{extensionManagement.ts => extensionManagementService.ts} (79%) diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts index 0edfddb4904..0c4035b4a8f 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagement.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts @@ -216,7 +216,7 @@ export interface IExtensionManagementServer { export interface IExtensionManagementServerService { _serviceBrand: any; - readonly localExtensionManagementServer: IExtensionManagementServer; + readonly localExtensionManagementServer: IExtensionManagementServer | null; readonly remoteExtensionManagementServer: IExtensionManagementServer | null; getExtensionManagementServer(location: URI): IExtensionManagementServer | null; } diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index dce34147deb..5ba999de322 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -15,7 +15,7 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { dispose, Disposable } from 'vs/base/common/lifecycle'; import { IExtension, ExtensionState, IExtensionsWorkbenchService, VIEWLET_ID, IExtensionsViewlet, AutoUpdateConfigurationKey, IExtensionContainer, EXTENSIONS_CONFIG } from 'vs/workbench/contrib/extensions/common/extensions'; import { ExtensionsConfigurationInitialContent } from 'vs/workbench/contrib/extensions/common/extensionsFileTemplate'; -import { IExtensionEnablementService, IExtensionTipsService, EnablementState, ExtensionsLabel, IExtensionRecommendation, IGalleryExtension, IExtensionsConfigContent, IExtensionGalleryService, INSTALL_ERROR_MALICIOUS, INSTALL_ERROR_INCOMPATIBLE, IGalleryExtensionVersion, ILocalExtension, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, IExtensionTipsService, EnablementState, ExtensionsLabel, IExtensionRecommendation, IGalleryExtension, IExtensionsConfigContent, IExtensionGalleryService, INSTALL_ERROR_MALICIOUS, INSTALL_ERROR_INCOMPATIBLE, IGalleryExtensionVersion, ILocalExtension, IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionType, ExtensionIdentifier, IExtensionDescription, IExtensionManifest, isLanguagePackExtension } from 'vs/platform/extensions/common/extensions'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; @@ -54,9 +54,7 @@ import { alert } from 'vs/base/browser/ui/aria/aria'; import { coalesce } from 'vs/base/common/arrays'; import { IWorkbenchThemeService, COLOR_THEME_SETTING, ICON_THEME_SETTING, IFileIconTheme, IColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { ILabelService } from 'vs/platform/label/common/label'; -import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; import { isUIExtension } from 'vs/workbench/services/extensions/common/extensionsUtil'; -import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IProductService } from 'vs/platform/product/common/product'; @@ -162,10 +160,10 @@ export class InstallAction extends ExtensionAction { @IOpenerService private readonly openerService: IOpenerService, @IExtensionService private readonly runtimeExtensionService: IExtensionService, @IWorkbenchThemeService private readonly workbenchThemeService: IWorkbenchThemeService, - @IWorkbenchEnvironmentService private readonly workbenchEnvironmentService: IWorkbenchEnvironmentService, @IConfigurationService private readonly configurationService: IConfigurationService, @IProductService private readonly productService: IProductService, - @ILabelService private readonly labelService: ILabelService + @ILabelService private readonly labelService: ILabelService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService ) { super(`extensions.install`, InstallAction.INSTALL_LABEL, InstallAction.Class, false); this.update(); @@ -193,12 +191,12 @@ export class InstallAction extends ExtensionAction { this.label = InstallAction.INSTALLING_LABEL; this.tooltip = InstallAction.INSTALLING_LABEL; } else { - if (this._manifest && this.workbenchEnvironmentService.configuration.remoteAuthority) { + if (this._manifest && this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { if (isUIExtension(this._manifest, this.productService, this.configurationService)) { this.label = `${InstallAction.INSTALL_LABEL} ${localize('locally', "Locally")}`; this.tooltip = `${InstallAction.INSTALL_LABEL} ${localize('locally', "Locally")}`; } else { - const host = this.labelService.getHostLabel(REMOTE_HOST_SCHEME, this.workbenchEnvironmentService.configuration.remoteAuthority) || localize('remote', "Remote"); + const host = this.extensionManagementServerService.remoteExtensionManagementServer.label; this.label = `${InstallAction.INSTALL_LABEL} on ${host}`; this.tooltip = `${InstallAction.INSTALL_LABEL} on ${host}`; } @@ -285,7 +283,6 @@ export class RemoteInstallAction extends ExtensionAction { constructor( @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, @ILabelService private readonly labelService: ILabelService, - @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, @IConfigurationService private readonly configurationService: IConfigurationService, @IProductService private readonly productService: IProductService, @@ -302,10 +299,9 @@ export class RemoteInstallAction extends ExtensionAction { this.tooltip = this.label; return; } - const remoteAuthority = this.environmentService.configuration.remoteAuthority; - if (remoteAuthority) { - const host = this.labelService.getHostLabel(REMOTE_HOST_SCHEME, this.environmentService.configuration.remoteAuthority) || localize('remote', "Remote"); - this.label = `${RemoteInstallAction.INSTALL_LABEL} on ${host}`; + const remoteServer = this.extensionManagementServerService.remoteExtensionManagementServer; + if (remoteServer) { + this.label = `${RemoteInstallAction.INSTALL_LABEL} on ${remoteServer.label}`; this.tooltip = this.label; return; } @@ -320,7 +316,7 @@ export class RemoteInstallAction extends ExtensionAction { this.updateLabel(); return; } - if (this.environmentService.configuration.remoteAuthority + if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer // Installed User Extension && this.extension && this.extension.local && this.extension.type === ExtensionType.User && this.extension.state === ExtensionState.Installed // Local Workspace Extension @@ -364,7 +360,6 @@ export class LocalInstallAction extends ExtensionAction { constructor( @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, @ILabelService private readonly labelService: ILabelService, - @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, @IConfigurationService private readonly configurationService: IConfigurationService, @IProductService private readonly productService: IProductService, @@ -394,7 +389,7 @@ export class LocalInstallAction extends ExtensionAction { this.updateLabel(); return; } - if (this.environmentService.configuration.remoteAuthority + if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer // Installed User Extension && this.extension && this.extension.local && this.extension.type === ExtensionType.User && this.extension.state === ExtensionState.Installed // Remote UI or Language pack Extension @@ -410,7 +405,7 @@ export class LocalInstallAction extends ExtensionAction { } async run(): Promise { - if (!this.installing) { + if (this.extensionManagementServerService.localExtensionManagementServer && !this.installing) { this.installing = true; this.update(); this.extensionsWorkbenchService.open(this.extension); @@ -1206,7 +1201,6 @@ export class ReloadAction extends ExtensionAction { @IExtensionService private readonly extensionService: IExtensionService, @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, - @IWorkbenchEnvironmentService private readonly workbenchEnvironmentService: IWorkbenchEnvironmentService, @IConfigurationService private readonly configurationService: IConfigurationService, @IProductService private readonly productService: IProductService, ) { @@ -1287,7 +1281,7 @@ export class ReloadAction extends ExtensionAction { this.tooltip = localize('postEnableTooltip', "Please reload Visual Studio Code to enable this extension."); return; } - if (this.workbenchEnvironmentService.configuration.remoteAuthority) { + if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { const uiExtension = isUIExtension(this.extension.local.manifest, this.productService, this.configurationService); // Local Workspace Extension if (!uiExtension && this.extension.server === this.extensionManagementServerService.localExtensionManagementServer) { @@ -1716,8 +1710,10 @@ export class InstallWorkspaceRecommendedExtensionsAction extends Action { try { if (extension.local && extension.gallery) { if (isUIExtension(extension.local.manifest, this.productService, this.configurationService)) { - await this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.installFromGallery(extension.gallery); - return; + if (this.extensionManagementServerService.localExtensionManagementServer) { + await this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.installFromGallery(extension.gallery); + return; + } } else if (this.extensionManagementServerService.remoteExtensionManagementServer) { await this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.installFromGallery(extension.gallery); return; @@ -2629,7 +2625,6 @@ export class SystemDisabledWarningAction extends ExtensionAction { @IConfigurationService private readonly configurationService: IConfigurationService, @IProductService private readonly productService: IProductService, @ILabelService private readonly labelService: ILabelService, - @IWorkbenchEnvironmentService private readonly workbenchEnvironmentService: IWorkbenchEnvironmentService, @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, @IExtensionService private readonly extensionService: IExtensionService, ) { @@ -2652,8 +2647,7 @@ export class SystemDisabledWarningAction extends ExtensionAction { !this.extension.local || !this.extension.server || !this._runningExtensions || - !this.workbenchEnvironmentService.configuration.remoteAuthority || - !this.extensionManagementServerService.remoteExtensionManagementServer || + !(this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) || this.extension.state !== ExtensionState.Installed ) { return; @@ -2662,7 +2656,7 @@ export class SystemDisabledWarningAction extends ExtensionAction { if (!this.extensionsWorkbenchService.installed.some(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server !== this.extension.server)) { this.class = `${SystemDisabledWarningAction.INFO_CLASS}`; this.tooltip = this.extension.server === this.extensionManagementServerService.localExtensionManagementServer - ? localize('Install language pack also in remote server', "Install the language pack extension on '{0}' to enable it also there.", this.getServerLabel(this.extensionManagementServerService.remoteExtensionManagementServer)) + ? localize('Install language pack also in remote server', "Install the language pack extension on '{0}' to enable it also there.", this.extensionManagementServerService.remoteExtensionManagementServer.label) : localize('Install language pack also locally', "Install the language pack extension locally to enable it also there."); } return; @@ -2674,19 +2668,19 @@ export class SystemDisabledWarningAction extends ExtensionAction { if (this.extension.server === this.extensionManagementServerService.localExtensionManagementServer && !isUIExtension(this.extension.local.manifest, this.productService, this.configurationService)) { if (runningExtensionServer === this.extensionManagementServerService.remoteExtensionManagementServer) { this.class = `${SystemDisabledWarningAction.INFO_CLASS}`; - this.tooltip = localize('disabled locally', "Extension is enabled on '{0}' and disabled locally.", this.getServerLabel(this.extensionManagementServerService.remoteExtensionManagementServer)); + this.tooltip = localize('disabled locally', "Extension is enabled on '{0}' and disabled locally.", this.extensionManagementServerService.remoteExtensionManagementServer.label); return; } if (localExtensionServer !== this.extensionManagementServerService.remoteExtensionManagementServer) { this.class = `${SystemDisabledWarningAction.WARNING_CLASS}`; - this.tooltip = localize('Install in remote server', "Install the extension on '{0}' to enable.", this.getServerLabel(this.extensionManagementServerService.remoteExtensionManagementServer)); + this.tooltip = localize('Install in remote server', "Install the extension on '{0}' to enable.", this.extensionManagementServerService.remoteExtensionManagementServer.label); return; } } if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer && isUIExtension(this.extension.local.manifest, this.productService, this.configurationService)) { if (runningExtensionServer === this.extensionManagementServerService.localExtensionManagementServer) { this.class = `${SystemDisabledWarningAction.INFO_CLASS}`; - this.tooltip = localize('disabled remotely', "Extension is enabled locally and disabled on '{0}'.", this.getServerLabel(this.extensionManagementServerService.remoteExtensionManagementServer)); + this.tooltip = localize('disabled remotely', "Extension is enabled locally and disabled on '{0}'.", this.extensionManagementServerService.remoteExtensionManagementServer.label); return; } if (localExtensionServer !== this.extensionManagementServerService.localExtensionManagementServer) { @@ -2697,12 +2691,6 @@ export class SystemDisabledWarningAction extends ExtensionAction { } } - private getServerLabel(server: IExtensionManagementServer): string { - if (server === this.extensionManagementServerService.remoteExtensionManagementServer) { - return this.labelService.getHostLabel(REMOTE_HOST_SCHEME, this.workbenchEnvironmentService.configuration.remoteAuthority) || localize('remote', "Remote"); - } - return server.label; - } run(): Promise { return Promise.resolve(null); } diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts index bbfe3e75868..d9272d6d014 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts @@ -55,8 +55,6 @@ import { ExtensionType } from 'vs/platform/extensions/common/extensions'; import { Registry } from 'vs/platform/registry/common/platform'; import { ViewContainerViewlet } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { RemoteAuthorityContext } from 'vs/workbench/browser/contextkeys'; -import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; -import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; import { ILabelService } from 'vs/platform/label/common/label'; import { MementoObject } from 'vs/workbench/common/memento'; @@ -96,7 +94,6 @@ export class ExtensionsViewletViewsContribution implements IWorkbenchContributio constructor( @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, @ILabelService private readonly labelService: ILabelService, - @IWorkbenchEnvironmentService private readonly workbenchEnvironmentService: IWorkbenchEnvironmentService ) { this.registerViews(); } @@ -116,7 +113,9 @@ export class ExtensionsViewletViewsContribution implements IWorkbenchContributio viewDescriptors.push(this.createOtherRecommendedExtensionsListViewDescriptor()); viewDescriptors.push(this.createWorkspaceRecommendedExtensionsListViewDescriptor()); - viewDescriptors.push(...this.createExtensionsViewDescriptorsForServer(this.extensionManagementServerService.localExtensionManagementServer)); + if (this.extensionManagementServerService.localExtensionManagementServer) { + viewDescriptors.push(...this.createExtensionsViewDescriptorsForServer(this.extensionManagementServerService.localExtensionManagementServer)); + } if (this.extensionManagementServerService.remoteExtensionManagementServer) { viewDescriptors.push(...this.createExtensionsViewDescriptorsForServer(this.extensionManagementServerService.remoteExtensionManagementServer)); } @@ -183,15 +182,15 @@ export class ExtensionsViewletViewsContribution implements IWorkbenchContributio private createExtensionsViewDescriptorsForServer(server: IExtensionManagementServer): IViewDescriptor[] { const getViewName = (viewTitle: string, server: IExtensionManagementServer): string => { - const serverLabel = this.workbenchEnvironmentService.configuration.remoteAuthority === server.authority ? this.labelService.getHostLabel(REMOTE_HOST_SCHEME, server.authority) || server.label : server.label; - if (viewTitle && this.workbenchEnvironmentService.configuration.remoteAuthority) { + const serverLabel = server.label; + if (viewTitle && this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { return `${serverLabel} - ${viewTitle}`; } return viewTitle ? viewTitle : serverLabel; }; const getInstalledViewName = (): string => getViewName(localize('installed', "Installed"), server); const getOutdatedViewName = (): string => getViewName(localize('outdated', "Outdated"), server); - const onDidChangeServerLabel: EventOf = this.workbenchEnvironmentService.configuration.remoteAuthority ? EventOf.map(this.labelService.onDidChangeFormatters, () => undefined) : EventOf.None; + const onDidChangeServerLabel: EventOf = EventOf.map(this.labelService.onDidChangeFormatters, () => undefined); return [{ id: `extensions.${server.authority}.installed`, get name() { return getInstalledViewName(); }, diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts index 13ec15781cd..6d8e9578422 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts @@ -14,8 +14,6 @@ import { ILabelService } from 'vs/platform/label/common/label'; import { extensionButtonProminentBackground, extensionButtonProminentForeground, DisabledLabelAction, ReloadAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { EXTENSION_BADGE_REMOTE_BACKGROUND, EXTENSION_BADGE_REMOTE_FOREGROUND } from 'vs/workbench/common/theme'; -import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; -import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { Emitter, Event } from 'vs/base/common/event'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -151,8 +149,7 @@ export class TooltipWidget extends ExtensionWidget { private readonly recommendationWidget: RecommendationWidget, private readonly reloadAction: ReloadAction, @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, - @ILabelService private readonly labelService: ILabelService, - @IWorkbenchEnvironmentService private readonly workbenchEnvironmentService: IWorkbenchEnvironmentService + @ILabelService private readonly labelService: ILabelService ) { super(); this._register(Event.any( @@ -184,7 +181,7 @@ export class TooltipWidget extends ExtensionWidget { } if (this.extension.local && this.extension.state === ExtensionState.Installed) { if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer) { - return localize('extension enabled on remote', "Extension is enabled on '{0}'", this.labelService.getHostLabel(REMOTE_HOST_SCHEME, this.workbenchEnvironmentService.configuration.remoteAuthority)); + return localize('extension enabled on remote', "Extension is enabled on '{0}'", this.extension.server.label); } return localize('extension enabled locally', "Extension is enabled locally."); } @@ -281,13 +278,11 @@ export class RemoteBadgeWidget extends ExtensionWidget { render(): void { this.clear(); - if (!this.extension || !this.extension.local || !this.extension.server) { + if (!this.extension || !this.extension.local || !this.extension.server || !(this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) || this.extension.server !== this.extensionManagementServerService.remoteExtensionManagementServer) { return; } - if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer) { - this.remoteBadge.value = this.instantiationService.createInstance(RemoteBadge, this.tooltip); - append(this.element, this.remoteBadge.value.element); - } + this.remoteBadge.value = this.instantiationService.createInstance(RemoteBadge, this.tooltip); + append(this.element, this.remoteBadge.value.element); } } @@ -299,7 +294,7 @@ class RemoteBadge extends Disposable { private readonly tooltip: boolean, @ILabelService private readonly labelService: ILabelService, @IThemeService private readonly themeService: IThemeService, - @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService ) { super(); this.element = $('div.extension-remote-badge'); @@ -323,8 +318,8 @@ class RemoteBadge extends Disposable { if (this.tooltip) { const updateTitle = () => { - if (this.element) { - this.element.title = localize('remote extension title', "Extension in {0}", this.labelService.getHostLabel(REMOTE_HOST_SCHEME, this.environmentService.configuration.remoteAuthority)); + if (this.element && this.extensionManagementServerService.remoteExtensionManagementServer) { + this.element.title = localize('remote extension title', "Extension in {0}", this.extensionManagementServerService.remoteExtensionManagementServer.label); } }; this._register(this.labelService.onDidChangeFormatters(() => updateTitle())); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index 6b5f5bfafed..f9f0abe3e5c 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -472,8 +472,8 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension private static readonly SyncPeriod = 1000 * 60 * 60 * 12; // 12 hours _serviceBrand: any; - private readonly localExtensions: Extensions; - private readonly remoteExtensions: Extensions | null; + private readonly localExtensions: Extensions | null = null; + private readonly remoteExtensions: Extensions | null = null; private syncDelayer: ThrottledDelayer; private autoUpdateDelayer: ThrottledDelayer; @@ -501,13 +501,13 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension @IProductService private readonly productService: IProductService ) { super(); - this.localExtensions = this._register(instantiationService.createInstance(Extensions, extensionManagementServerService.localExtensionManagementServer, ext => this.getExtensionState(ext))); - this._register(this.localExtensions.onChange(e => this._onChange.fire(e))); + if (this.extensionManagementServerService.localExtensionManagementServer) { + this.localExtensions = this._register(instantiationService.createInstance(Extensions, extensionManagementServerService.localExtensionManagementServer, ext => this.getExtensionState(ext))); + this._register(this.localExtensions.onChange(e => this._onChange.fire(e))); + } if (this.extensionManagementServerService.remoteExtensionManagementServer) { this.remoteExtensions = this._register(instantiationService.createInstance(Extensions, extensionManagementServerService.remoteExtensionManagementServer, ext => this.getExtensionState(ext))); this._register(this.remoteExtensions.onChange(e => this._onChange.fire(e))); - } else { - this.remoteExtensions = null; } this.syncDelayer = new ThrottledDelayer(ExtensionsWorkbenchService.SyncPeriod); @@ -541,7 +541,10 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension } get installed(): IExtension[] { - const result = [...this.localExtensions.local]; + const result = []; + if (this.localExtensions) { + result.push(...this.localExtensions.local); + } if (this.remoteExtensions) { result.push(...this.remoteExtensions.local); } @@ -549,7 +552,10 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension } get outdated(): IExtension[] { - const allLocal = [...this.localExtensions.local]; + const allLocal = []; + if (this.localExtensions) { + allLocal.push(...this.localExtensions.local); + } if (this.remoteExtensions) { allLocal.push(...this.remoteExtensions.local); } @@ -558,7 +564,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension async queryLocal(server?: IExtensionManagementServer): Promise { if (server) { - if (this.extensionManagementServerService.localExtensionManagementServer === server) { + if (this.localExtensions && this.extensionManagementServerService.localExtensionManagementServer === server) { return this.localExtensions.queryInstalled(); } if (this.remoteExtensions && this.extensionManagementServerService.remoteExtensionManagementServer === server) { @@ -566,12 +572,12 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension } } - await this.localExtensions.queryInstalled(); - if (this.remoteExtensions) { - await Promise.all([this.localExtensions.queryInstalled(), this.remoteExtensions.queryInstalled()]); - } else { + if (this.localExtensions) { await this.localExtensions.queryInstalled(); } + if (this.remoteExtensions) { + await this.remoteExtensions.queryInstalled(); + } return this.local; } @@ -635,7 +641,10 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension } private fromGallery(gallery: IGalleryExtension, maliciousExtensionSet: Set): IExtension { - Promise.all([this.localExtensions.syncLocalWithGalleryExtension(gallery, maliciousExtensionSet), this.remoteExtensions ? this.remoteExtensions.syncLocalWithGalleryExtension(gallery, maliciousExtensionSet) : Promise.resolve(false)]) + Promise.all([ + this.localExtensions ? this.localExtensions.syncLocalWithGalleryExtension(gallery, maliciousExtensionSet) : Promise.resolve(false), + this.remoteExtensions ? this.remoteExtensions.syncLocalWithGalleryExtension(gallery, maliciousExtensionSet) : Promise.resolve(false) + ]) .then(result => { if (result[0] || result[1]) { this.eventuallyAutoUpdateExtensions(); @@ -671,7 +680,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension private getExtensionState(extension: Extension): ExtensionState { const isInstalling = this.installing.some(i => areSameExtensions(i.identifier, extension.identifier)); if (extension.server) { - const state = (extension.server === this.extensionManagementServerService.localExtensionManagementServer ? this.localExtensions : this.remoteExtensions!).getExtensionState(extension); + const state = (extension.server === this.extensionManagementServerService.localExtensionManagementServer ? this.localExtensions! : this.remoteExtensions!).getExtensionState(extension); return state === ExtensionState.Uninstalled && isInstalling ? ExtensionState.Installing : state; } else if (isInstalling) { return ExtensionState.Installing; @@ -682,7 +691,10 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension return state; } } - return this.localExtensions.getExtensionState(extension); + if (this.localExtensions) { + return this.localExtensions.getExtensionState(extension); + } + return ExtensionState.Uninstalled; } checkForUpdates(): Promise { @@ -752,7 +764,15 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension return false; } - return !!(extension as Extension).gallery; + if (!extension.gallery) { + return false; + } + + if (this.extensionManagementServerService.localExtensionManagementServer || this.extensionManagementServerService.remoteExtensionManagementServer) { + return true; + } + + return false; } install(extension: string | IExtension): Promise { diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index e8ac33ea50b..19740cf5365 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -79,7 +79,7 @@ suite('ExtensionsActions Test', () => { instantiationService.stub(IExtensionManagementServerService, new class extends ExtensionManagementServerService { private _localExtensionManagementServer: IExtensionManagementServer = { extensionManagementService: instantiationService.get(IExtensionManagementService), label: 'local', authority: 'vscode-local' }; constructor() { - super(instantiationService.get(ISharedProcessService), instantiationService.get(IRemoteAgentService), instantiationService.get(IExtensionGalleryService), instantiationService.get(IConfigurationService), instantiationService.get(IProductService), instantiationService.get(ILogService)); + super(instantiationService.get(ISharedProcessService), instantiationService.get(IRemoteAgentService), instantiationService.get(IExtensionGalleryService), instantiationService.get(IConfigurationService), instantiationService.get(IProductService), instantiationService.get(ILogService), instantiationService.get(ILabelService)); } get localExtensionManagementServer(): IExtensionManagementServer { return this._localExtensionManagementServer; } set localExtensionManagementServer(server: IExtensionManagementServer) { } diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts index 883b6829f6e..67ae23cae17 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts @@ -42,6 +42,7 @@ import { ExtensionIdentifier, ExtensionType, IExtensionDescription } from 'vs/pl import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService'; import { ExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService'; import { IProductService } from 'vs/platform/product/common/product'; +import { ILabelService } from 'vs/platform/label/common/label'; suite('ExtensionsListView Tests', () => { @@ -95,7 +96,7 @@ suite('ExtensionsListView Tests', () => { instantiationService.stub(IExtensionManagementServerService, new class extends ExtensionManagementServerService { private _localExtensionManagementServer: IExtensionManagementServer = { extensionManagementService: instantiationService.get(IExtensionManagementService), label: 'local', authority: 'vscode-local' }; constructor() { - super(instantiationService.get(ISharedProcessService), instantiationService.get(IRemoteAgentService), instantiationService.get(IExtensionGalleryService), instantiationService.get(IConfigurationService), instantiationService.get(IProductService), instantiationService.get(ILogService)); + super(instantiationService.get(ISharedProcessService), instantiationService.get(IRemoteAgentService), instantiationService.get(IExtensionGalleryService), instantiationService.get(IConfigurationService), instantiationService.get(IProductService), instantiationService.get(ILogService), instantiationService.get(ILabelService)); } get localExtensionManagementServer(): IExtensionManagementServer { return this._localExtensionManagementServer; } set localExtensionManagementServer(server: IExtensionManagementServer) { } diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts index f4c386d50f9..fda5c0332b9 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts @@ -11,27 +11,32 @@ import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteA import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; - -const localExtensionManagementServerAuthority: string = 'vscode-local'; +import { ILabelService } from 'vs/platform/label/common/label'; export class ExtensionManagementServerService implements IExtensionManagementServerService { _serviceBrand: any; - readonly localExtensionManagementServer: IExtensionManagementServer; + readonly localExtensionManagementServer: IExtensionManagementServer | null = null; readonly remoteExtensionManagementServer: IExtensionManagementServer | null = null; constructor( @IRemoteAgentService remoteAgentService: IRemoteAgentService, + @ILabelService labelService: ILabelService, ) { const remoteAgentConnection = remoteAgentService.getConnection(); - const localExtensionManagementService = new ExtensionManagementChannelClient(remoteAgentConnection!.getChannel('extensions')); - this.localExtensionManagementServer = { extensionManagementService: localExtensionManagementService, authority: localExtensionManagementServerAuthority, label: localize('local', "Local") }; + if (remoteAgentConnection) { + const extensionManagementService = new ExtensionManagementChannelClient(remoteAgentConnection!.getChannel('extensions')); + this.remoteExtensionManagementServer = { + authority: remoteAgentConnection.remoteAuthority, extensionManagementService, + get label() { return labelService.getHostLabel(REMOTE_HOST_SCHEME, remoteAgentConnection!.remoteAuthority) || localize('remote', "Remote"); } + }; + } } getExtensionManagementServer(location: URI): IExtensionManagementServer | null { if (location.scheme === REMOTE_HOST_SCHEME) { - return this.localExtensionManagementServer; + return this.remoteExtensionManagementServer; } return null; } diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts similarity index 74% rename from src/vs/workbench/services/extensionManagement/common/extensionManagement.ts rename to src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts index bbb99a6504f..a22015cf40c 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts @@ -27,7 +27,7 @@ export class ExtensionManagementService extends Disposable implements IExtension readonly onUninstallExtension: Event; readonly onDidUninstallExtension: Event; - protected readonly servers: IExtensionManagementServer[]; + protected readonly servers: IExtensionManagementServer[] = []; constructor( @IExtensionManagementServerService protected readonly extensionManagementServerService: IExtensionManagementServerService, @@ -36,7 +36,12 @@ export class ExtensionManagementService extends Disposable implements IExtension @IProductService protected readonly productService: IProductService, ) { super(); - this.servers = this.extensionManagementServerService.remoteExtensionManagementServer ? [this.extensionManagementServerService.localExtensionManagementServer, this.extensionManagementServerService.remoteExtensionManagementServer] : [this.extensionManagementServerService.localExtensionManagementServer]; + if (this.extensionManagementServerService.localExtensionManagementServer) { + this.servers.push(this.extensionManagementServerService.localExtensionManagementServer); + } + if (this.extensionManagementServerService.remoteExtensionManagementServer) { + this.servers.push(this.extensionManagementServerService.remoteExtensionManagementServer); + } this.onInstallExtension = this._register(this.servers.reduce((emitter: EventMultiplexer, server) => { emitter.add(server.extensionManagementService.onInstallExtension); return emitter; }, new EventMultiplexer())).event; this.onDidInstallExtension = this._register(this.servers.reduce((emitter: EventMultiplexer, server) => { emitter.add(server.extensionManagementService.onDidInstallExtension); return emitter; }, new EventMultiplexer())).event; @@ -51,31 +56,33 @@ export class ExtensionManagementService extends Disposable implements IExtension .catch(e => installedExtensions); } - async uninstall(extension: ILocalExtension, force?: boolean): Promise { - if (this.extensionManagementServerService.remoteExtensionManagementServer) { - const server = this.getServer(extension); - if (!server) { - return Promise.reject(`Invalid location ${extension.location.toString()}`); - } - if (isLanguagePackExtension(extension.manifest)) { - return this.uninstallEverywhere(extension, force); - } - return this.uninstallInServer(extension, server, force); + async uninstall(extension: ILocalExtension): Promise { + const server = this.getServer(extension); + if (!server) { + return Promise.reject(`Invalid location ${extension.location.toString()}`); } - return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.uninstall(extension, force); + if (this.servers.length > 1) { + if (isLanguagePackExtension(extension.manifest)) { + return this.uninstallEverywhere(extension); + } + return this.uninstallInServer(extension, server); + } + return server.extensionManagementService.uninstall(extension); } - private async uninstallEverywhere(extension: ILocalExtension, force?: boolean): Promise { + private async uninstallEverywhere(extension: ILocalExtension): Promise { const server = this.getServer(extension); if (!server) { return Promise.reject(`Invalid location ${extension.location.toString()}`); } const promise = server.extensionManagementService.uninstall(extension); - const anotherServer: IExtensionManagementServer = server === this.extensionManagementServerService.localExtensionManagementServer ? this.extensionManagementServerService.remoteExtensionManagementServer! : this.extensionManagementServerService.localExtensionManagementServer; - const installed = await anotherServer.extensionManagementService.getInstalled(ExtensionType.User); - extension = installed.filter(i => areSameExtensions(i.identifier, extension.identifier))[0]; - if (extension) { - await anotherServer.extensionManagementService.uninstall(extension); + const anotherServer: IExtensionManagementServer | null = server === this.extensionManagementServerService.localExtensionManagementServer ? this.extensionManagementServerService.remoteExtensionManagementServer! : this.extensionManagementServerService.localExtensionManagementServer; + if (anotherServer) { + const installed = await anotherServer.extensionManagementService.getInstalled(ExtensionType.User); + extension = installed.filter(i => areSameExtensions(i.identifier, extension.identifier))[0]; + if (extension) { + await anotherServer.extensionManagementService.uninstall(extension); + } } return promise; } @@ -131,11 +138,17 @@ export class ExtensionManagementService extends Disposable implements IExtension } async install(vsix: URI): Promise { - return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.install(vsix); + if (this.extensionManagementServerService.localExtensionManagementServer) { + return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.install(vsix); + } + if (this.extensionManagementServerService.remoteExtensionManagementServer) { + return this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.install(vsix); + } + return Promise.reject('No Servers to Install'); } async installFromGallery(gallery: IGalleryExtension): Promise { - if (this.extensionManagementServerService.remoteExtensionManagementServer) { + if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { const manifest = await this.extensionGalleryService.getManifest(gallery, CancellationToken.None); if (manifest) { if (isLanguagePackExtension(manifest)) { @@ -152,11 +165,23 @@ export class ExtensionManagementService extends Disposable implements IExtension return Promise.reject(localize('Manifest is not found', "Installing Extension {0} failed: Manifest is not found.", gallery.displayName || gallery.name)); } } - return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.installFromGallery(gallery); + if (this.extensionManagementServerService.localExtensionManagementServer) { + return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.installFromGallery(gallery); + } + if (this.extensionManagementServerService.remoteExtensionManagementServer) { + return this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.installFromGallery(gallery); + } + return Promise.reject('No Servers to Install'); } getExtensionsReport(): Promise { - return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.getExtensionsReport(); + if (this.extensionManagementServerService.localExtensionManagementServer) { + return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.getExtensionsReport(); + } + if (this.extensionManagementServerService.remoteExtensionManagementServer) { + return this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.getExtensionsReport(); + } + return Promise.resolve([]); } private getServer(extension: ILocalExtension): IExtensionManagementServer | null { diff --git a/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts b/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts index 9af2b50701d..c5b08097ce4 100644 --- a/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts +++ b/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts @@ -17,6 +17,7 @@ import { ILogService } from 'vs/platform/log/common/log'; import { RemoteExtensionManagementChannelClient } from 'vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IProductService } from 'vs/platform/product/common/product'; +import { ILabelService } from 'vs/platform/label/common/label'; const localExtensionManagementServerAuthority: string = 'vscode-local'; @@ -26,6 +27,7 @@ export class ExtensionManagementServerService implements IExtensionManagementSer readonly localExtensionManagementServer: IExtensionManagementServer; readonly remoteExtensionManagementServer: IExtensionManagementServer | null = null; + readonly isSingleServer: boolean = false; constructor( @ISharedProcessService sharedProcessService: ISharedProcessService, @@ -33,7 +35,8 @@ export class ExtensionManagementServerService implements IExtensionManagementSer @IExtensionGalleryService galleryService: IExtensionGalleryService, @IConfigurationService configurationService: IConfigurationService, @IProductService productService: IProductService, - @ILogService logService: ILogService + @ILogService logService: ILogService, + @ILabelService labelService: ILabelService, ) { const localExtensionManagementService = new ExtensionManagementChannelClient(sharedProcessService.getChannel('extensions')); @@ -41,7 +44,10 @@ export class ExtensionManagementServerService implements IExtensionManagementSer const remoteAgentConnection = remoteAgentService.getConnection(); if (remoteAgentConnection) { const extensionManagementService = new RemoteExtensionManagementChannelClient(remoteAgentConnection.getChannel('extensions'), this.localExtensionManagementServer.extensionManagementService, galleryService, logService, configurationService, productService); - this.remoteExtensionManagementServer = { authority: remoteAgentConnection.remoteAuthority, extensionManagementService, label: localize('remote', "Remote") }; + this.remoteExtensionManagementServer = { + authority: remoteAgentConnection.remoteAuthority, extensionManagementService, + get label() { return labelService.getHostLabel(REMOTE_HOST_SCHEME, remoteAgentConnection!.remoteAuthority) || localize('remote', "Remote"); } + }; } } diff --git a/src/vs/workbench/services/extensionManagement/node/extensionEnablementService.ts b/src/vs/workbench/services/extensionManagement/node/extensionEnablementService.ts index 4e1a3788010..705ea4028c1 100644 --- a/src/vs/workbench/services/extensionManagement/node/extensionEnablementService.ts +++ b/src/vs/workbench/services/extensionManagement/node/extensionEnablementService.ts @@ -138,7 +138,7 @@ export class ExtensionEnablementService extends Disposable implements IExtension if (Array.isArray(disabledExtensions)) { return disabledExtensions.some(id => areSameExtensions({ id }, extension.identifier)); } - if (this.environmentService.configuration.remoteAuthority) { + if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { const server = isUIExtension(extension.manifest, this.productService, this.configurationService) ? this.extensionManagementServerService.localExtensionManagementServer : this.extensionManagementServerService.remoteExtensionManagementServer; return this.extensionManagementServerService.getExtensionManagementServer(extension.location) !== server; } diff --git a/src/vs/workbench/services/extensionManagement/node/extensionManagement.ts b/src/vs/workbench/services/extensionManagement/node/extensionManagementService.ts similarity index 79% rename from src/vs/workbench/services/extensionManagement/node/extensionManagement.ts rename to src/vs/workbench/services/extensionManagement/node/extensionManagementService.ts index de81feb1842..46db06b9d1a 100644 --- a/src/vs/workbench/services/extensionManagement/node/extensionManagement.ts +++ b/src/vs/workbench/services/extensionManagement/node/extensionManagementService.ts @@ -8,12 +8,12 @@ import { isLanguagePackExtension } from 'vs/platform/extensions/common/extension import { URI } from 'vs/base/common/uri'; import { getManifest } from 'vs/platform/extensionManagement/node/extensionManagementUtil'; import { isUIExtension } from 'vs/workbench/services/extensions/common/extensionsUtil'; -import { ExtensionManagementService as BaseExtensionManagementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { ExtensionManagementService as BaseExtensionManagementService } from 'vs/workbench/services/extensionManagement/common/extensionManagementService'; export class ExtensionManagementService extends BaseExtensionManagementService { async install(vsix: URI): Promise { - if (this.extensionManagementServerService.remoteExtensionManagementServer) { + if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { const manifest = await getManifest(vsix.fsPath); if (isLanguagePackExtension(manifest)) { // Install on both servers @@ -27,7 +27,10 @@ export class ExtensionManagementService extends BaseExtensionManagementService { // Install only on remote server return this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.install(vsix); } - return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.install(vsix); + if (this.extensionManagementServerService.localExtensionManagementServer) { + return this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.install(vsix); + } + return Promise.reject('No Servers to Install'); } } diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index 5b722ecff0b..7ade525b350 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -136,7 +136,7 @@ import 'vs/workbench/services/telemetry/electron-browser/telemetryService'; import 'vs/workbench/services/configurationResolver/electron-browser/configurationResolverService'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { BackupFileService } from 'vs/workbench/services/backup/node/backupFileService'; - +import { ExtensionManagementService } from 'vs/workbench/services/extensionManagement/node/extensionManagementService'; registerSingleton(IExtensionManagementService, ExtensionManagementService); registerSingleton(IBackupFileService, BackupFileService); @@ -344,6 +344,5 @@ import 'vs/workbench/contrib/experiments/electron-browser/experiments.contributi // Issues import 'vs/workbench/contrib/issue/electron-browser/issue.contribution'; -import { ExtensionManagementService } from './services/extensionManagement/node/extensionManagement'; //#endregion diff --git a/src/vs/workbench/workbench.web.main.ts b/src/vs/workbench/workbench.web.main.ts index 9c63cffd384..476f87ecf79 100644 --- a/src/vs/workbench/workbench.web.main.ts +++ b/src/vs/workbench/workbench.web.main.ts @@ -63,7 +63,7 @@ import { ITextResourceConfigurationService } from 'vs/editor/common/services/res import { TextResourceConfigurationService } from 'vs/editor/common/services/resourceConfigurationImpl'; import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility'; import { BrowserAccessibilityService } from 'vs/platform/accessibility/common/accessibilityService'; -import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionGalleryService, IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'; import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService'; import { BrowserLifecycleService } from 'vs/platform/lifecycle/browser/lifecycleService'; @@ -124,6 +124,7 @@ import 'vs/workbench/services/themes/browser/workbenchThemeService'; import 'vs/workbench/services/extensions/browser/extensionService'; // import 'vs/workbench/services/contextmenu/electron-browser/contextmenuService'; import 'vs/workbench/services/label/common/labelService'; +import 'vs/workbench/services/extensionManagement/common/extensionManagementServerService'; // import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; import 'vs/workbench/services/notification/common/notificationService'; // import 'vs/workbench/services/window/electron-browser/windowService'; @@ -133,9 +134,11 @@ import { IContextViewService, IContextMenuService } from 'vs/platform/contextvie import { ContextMenuService } from 'vs/platform/contextview/browser/contextMenuService'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { BackupFileService } from 'vs/workbench/services/backup/common/backupFileService'; +import { ExtensionManagementService } from 'vs/workbench/services/extensionManagement/common/extensionManagementService'; import 'vs/workbench/browser/web.simpleservices'; +registerSingleton(IExtensionManagementService, ExtensionManagementService); registerSingleton(IBackupFileService, BackupFileService); registerSingleton(IDialogService, DialogService, true); registerSingleton(IMenuService, MenuService, true); @@ -167,10 +170,6 @@ registerSingleton(IContextMenuService, ContextMenuService); //#endregion -//#region --- Extensions Management -import 'vs/workbench/services/extensionManagement/common/extensionManagementServerService'; -//#endregion - //#region --- workbench parts @@ -264,9 +263,9 @@ registerSingleton(IWebviewService, WebviewService, true); registerSingleton(IWebviewEditorService, WebviewEditorService, true); // Extensions Management -// import 'vs/workbench/contrib/extensions/electron-browser/extensions.contribution'; -// import 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen'; -// import 'vs/workbench/contrib/extensions/browser/extensionsViewlet'; +import 'vs/workbench/contrib/extensions/browser/extensions.contribution'; +import 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen'; +import 'vs/workbench/contrib/extensions/browser/extensionsViewlet'; // Output Panel import 'vs/workbench/contrib/output/browser/output.contribution'; From 8ac5b7a963778f88b1c5d2ecfd75821b6afb5fd4 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 17 Jul 2019 00:55:31 +0200 Subject: [PATCH 294/710] fix extension management simple services --- .../workbench/browser/web.simpleservices.ts | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index 3384986b4ad..5d611022667 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -28,7 +28,6 @@ import { ITunnelService } from 'vs/platform/remote/common/tunnel'; import { IReloadSessionEvent, IExtensionHostDebugService, ICloseSessionEvent, IAttachSessionEvent, ILogToSessionEvent, ITerminateSessionEvent } from 'vs/workbench/services/extensions/common/extensionHostDebug'; import { IRemoteConsoleLog } from 'vs/base/common/console'; // tslint:disable-next-line: import-patterns -import { IExtensionsWorkbenchService, IExtension as IExtension2 } from 'vs/workbench/contrib/extensions/common/extensions'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { addDisposableListener, EventType } from 'vs/base/browser/dom'; import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService'; @@ -58,28 +57,6 @@ registerSingleton(IDownloadService, SimpleDownloadService, true); //#endregion -//#endregion IExtensionsWorkbenchService -export class SimpleExtensionsWorkbenchService implements IExtensionsWorkbenchService { - _serviceBrand: any; - onChange: Event; - local: IExtension2[]; - installed: IExtension2[]; - outdated: IExtension2[]; - queryLocal: any; - queryGallery: any; - canInstall: any; - install: any; - uninstall: any; - installVersion: any; - reinstall: any; - setEnablement: any; - open: any; - checkForUpdates: any; - allowedBadgeProviders: string[]; -} -registerSingleton(IExtensionsWorkbenchService, SimpleExtensionsWorkbenchService, true); -//#endregion - //#region Extension Management //#region Extension Enablement @@ -145,7 +122,7 @@ export class SimpleExtensionTipsService implements IExtensionTipsService { } getAllIgnoredRecommendations(): { global: string[]; workspace: string[]; } { - return Object.create(null); + return { global: [], workspace: [] }; } } From 960123749de86371952f1c8aff49d490cc0538d7 Mon Sep 17 00:00:00 2001 From: Angelo Date: Wed, 17 Jul 2019 07:15:00 +0200 Subject: [PATCH 295/710] Add '.ent' and '.mod' file extensions for the XML language This PR adds `.ent` and `.mod` file extensions which are used as DTD file. --- extensions/xml/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/xml/package.json b/extensions/xml/package.json index 2e6cc49fd65..d76a632b10c 100644 --- a/extensions/xml/package.json +++ b/extensions/xml/package.json @@ -23,6 +23,8 @@ ".dita", ".ditamap", ".dtd", + ".ent", + ".mod", ".dtml", ".fsproj", ".fxml", From 59876172bf02d15ffccf6151fa620fc7359b58fd Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 17 Jul 2019 12:43:22 +0200 Subject: [PATCH 296/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c27f0802eeb..285547b6a75 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "18f781db7cf104b1156ee97a29d4938296ea4616", + "distro": "68290ed01405cdd0adb6defb3796e52f3d71d615", "author": { "name": "Microsoft Corporation" }, From cf6ccf137143a88d5571268aaf1fb17438915ebd Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 17 Jul 2019 16:52:50 +0200 Subject: [PATCH 297/710] Use semver umd module --- package.json | 1 + remote/package.json | 1 + remote/web/package.json | 3 ++- remote/web/yarn.lock | 5 +++++ remote/yarn.lock | 12 ++++++------ src/vs/code/browser/workbench/workbench.js | 1 + yarn.lock | 5 +++++ 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c27f0802eeb..17862c19dbb 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "nsfw": "1.2.5", "onigasm-umd": "^2.2.2", "semver": "^5.5.0", + "semver-umd": "^5.5.0", "spdlog": "^0.9.0", "sudo-prompt": "9.0.0", "v8-inspect-profiler": "^0.0.20", diff --git a/remote/package.json b/remote/package.json index 6fc6471a2ce..16edc649482 100644 --- a/remote/package.json +++ b/remote/package.json @@ -15,6 +15,7 @@ "nsfw": "1.2.5", "onigasm-umd": "^2.2.2", "semver": "^5.5.0", + "semver-umd": "^5.5.0", "spdlog": "^0.9.0", "vscode-chokidar": "2.1.7", "vscode-proxy-agent": "0.4.0", diff --git a/remote/web/package.json b/remote/web/package.json index 38f730e7dab..6c18cb53937 100644 --- a/remote/web/package.json +++ b/remote/web/package.json @@ -6,6 +6,7 @@ "vscode-textmate": "^4.1.1", "xterm": "3.15.0-beta67", "xterm-addon-search": "0.2.0-beta2", - "xterm-addon-web-links": "0.1.0-beta10" + "xterm-addon-web-links": "0.1.0-beta10", + "semver-umd": "^5.5.0" } } \ No newline at end of file diff --git a/remote/web/yarn.lock b/remote/web/yarn.lock index 3f790e1f281..6839b2e5af6 100644 --- a/remote/web/yarn.lock +++ b/remote/web/yarn.lock @@ -19,6 +19,11 @@ oniguruma@^7.2.0: dependencies: nan "^2.14.0" +semver-umd@^5.5.0: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.1.tgz#ad0211c4addc9d93b22c807ef5166a3d0581c79b" + integrity sha512-BogOfRyzUCjHU3dENRlf3HxliVcQRjQRy+mx+1/ILZSV6WCOGniAxcg45Rol3CGFfKaCiodeTgfaGAswWBOU+g== + vscode-textmate@^4.1.1: version "4.2.2" resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-4.2.2.tgz#0b4dabc69a6fba79a065cb6b615f66eac07c8f4c" diff --git a/remote/yarn.lock b/remote/yarn.lock index 7d522e2901b..2e8118c8bc3 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -876,17 +876,17 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +semver-umd@^5.5.0: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.1.tgz#ad0211c4addc9d93b22c807ef5166a3d0581c79b" + integrity sha512-BogOfRyzUCjHU3dENRlf3HxliVcQRjQRy+mx+1/ILZSV6WCOGniAxcg45Rol3CGFfKaCiodeTgfaGAswWBOU+g== + semver@^5.3.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== -semver@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== - -semver@^5.6.0: +semver@^5.5.0, semver@^5.6.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== diff --git a/src/vs/code/browser/workbench/workbench.js b/src/vs/code/browser/workbench/workbench.js index 34f321f90df..2f62dceb9ed 100644 --- a/src/vs/code/browser/workbench/workbench.js +++ b/src/vs/code/browser/workbench/workbench.js @@ -15,6 +15,7 @@ 'xterm': `${window.location.origin}/node_modules/xterm/lib/xterm.js`, 'xterm-addon-search': `${window.location.origin}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`, 'xterm-addon-web-links': `${window.location.origin}/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`, + 'semver': `${window.location.origin}/node_modules/semver-umd/lib/semver-umd.js`, } }); diff --git a/yarn.lock b/yarn.lock index 574bd317d96..6aa4b28cf28 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7975,6 +7975,11 @@ semver-greatest-satisfied-range@^1.1.0: dependencies: sver-compat "^1.5.0" +semver-umd@^5.5.0: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.1.tgz#ad0211c4addc9d93b22c807ef5166a3d0581c79b" + integrity sha512-BogOfRyzUCjHU3dENRlf3HxliVcQRjQRy+mx+1/ILZSV6WCOGniAxcg45Rol3CGFfKaCiodeTgfaGAswWBOU+g== + "semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" From 242386942610e31d0b6d6b47b039016ce24458e4 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 17 Jul 2019 17:04:22 +0200 Subject: [PATCH 298/710] fix tests --- .../test/electron-browser/extensionEnablementService.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts b/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts index cdb4509a617..ec939ce04b0 100644 --- a/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts +++ b/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts @@ -70,6 +70,11 @@ suite('ExtensionEnablementService Test', () => { setup(() => { instantiationService = new TestInstantiationService(); instantiationService.stub(IExtensionManagementService, { onDidUninstallExtension: didUninstallEvent.event, onDidInstallExtension: didInstallEvent.event, getInstalled: () => Promise.resolve([] as ILocalExtension[]) } as IExtensionManagementService); + instantiationService.stub(IExtensionManagementServerService, { + localExtensionManagementServer: { + extensionManagementService: instantiationService.get(IExtensionManagementService) + } + }); testObject = new TestExtensionEnablementService(instantiationService); }); From 1e05dac61cf7136c3b1d6fe830e50d36b1546e32 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 17 Jul 2019 17:09:50 +0200 Subject: [PATCH 299/710] :lipstick: --- .../extensionManagement/common/extensionManagementService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts index a22015cf40c..825d9ef62e6 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts @@ -61,7 +61,7 @@ export class ExtensionManagementService extends Disposable implements IExtension if (!server) { return Promise.reject(`Invalid location ${extension.location.toString()}`); } - if (this.servers.length > 1) { + if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { if (isLanguagePackExtension(extension.manifest)) { return this.uninstallEverywhere(extension); } From f41d90ab6619a883894fd9142bcf546c1027b857 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 17 Jul 2019 17:21:08 +0200 Subject: [PATCH 300/710] update distro --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 15062ee6b76..f8883efbe59 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "68290ed01405cdd0adb6defb3796e52f3d71d615", + "distro": "3b7db3f93b5efe73eedab147ee9eb72a9abadc9d", "author": { "name": "Microsoft Corporation" }, @@ -159,4 +159,4 @@ "windows-mutex": "0.2.1", "windows-process-tree": "0.2.4" } -} +} \ No newline at end of file From f50a0430c3e45e5ff3c6a525958766e95f1bb214 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Wed, 17 Jul 2019 08:29:25 -0700 Subject: [PATCH 301/710] More strongly typed telemetry (#77412) * More strongly typed telemetry * Updated update service to not duplicate typings --- .../diagnostics/node/diagnosticsService.ts | 19 +++--- .../common/extensionGalleryService.ts | 16 ++--- .../electron-main/abstractUpdateService.ts | 4 ++ .../electron-main/updateService.darwin.ts | 20 ++----- .../electron-main/updateService.linux.ts | 19 +----- .../electron-main/updateService.snap.ts | 17 +----- .../electron-main/updateService.win32.ts | 9 +-- .../api/node/extHostRequireInterceptor.ts | 20 +++---- .../electron-browser/experimentService.ts | 10 ++-- .../tasks/browser/abstractTaskService.ts | 18 +++--- .../browser/telemetry.contribution.ts | 58 ++++++++++++------- .../electron-browser/telemetryOptOut.ts | 14 +++-- .../walkThrough/browser/walkThroughPart.ts | 38 +++++------- src/vs/workbench/electron-browser/window.ts | 12 ++-- 14 files changed, 122 insertions(+), 152 deletions(-) diff --git a/src/vs/platform/diagnostics/node/diagnosticsService.ts b/src/vs/platform/diagnostics/node/diagnosticsService.ts index b83d063a245..f1e6a82fb1a 100644 --- a/src/vs/platform/diagnostics/node/diagnosticsService.ts +++ b/src/vs/platform/diagnostics/node/diagnosticsService.ts @@ -520,14 +520,17 @@ export class DiagnosticsService implements IDiagnosticsService { if (folderUri.scheme === 'file') { const folder = folderUri.fsPath; collectWorkspaceStats(folder, ['node_modules', '.git']).then(stats => { - /* __GDPR__ - "workspace.stats" : { - "fileTypes" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "configTypes" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "launchConfigs" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('workspace.stats', { + type WorkspaceStatsClassification = { + fileTypes: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + configTypes: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + launchConfigs: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + }; + type WorkspaceStatsEvent = { + fileTypes: WorkspaceStatItem[]; + configTypes: WorkspaceStatItem[]; + launchConfigs: WorkspaceStatItem[]; + }; + this.telemetryService.publicLog2('workspace.stats', { fileTypes: stats.fileTypes, configTypes: stats.configFiles, launchConfigs: stats.launchConfigFiles diff --git a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts index 3c7e35fb2f3..fa54ffc156d 100644 --- a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts @@ -411,13 +411,15 @@ export class ExtensionGalleryService implements IExtensionGalleryService { let text = options.text || ''; const pageSize = getOrDefault(options, o => o.pageSize, 50); - /* __GDPR__ - "galleryService:query" : { - "type" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "text": { "classification": "CustomerContent", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('galleryService:query', { type, text }); + type GalleryServiceQueryClassification = { + type: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + text: { classification: 'CustomerContent', purpose: 'FeatureInsight' }; + }; + type GalleryServiceQueryEvent = { + type: string; + text: string; + }; + this.telemetryService.publicLog2('galleryService:query', { type, text }); let query = new Query() .withFlags(Flags.IncludeLatestVersionOnly, Flags.IncludeAssetUri, Flags.IncludeStatistics, Flags.IncludeFiles, Flags.IncludeVersionProperties) diff --git a/src/vs/platform/update/electron-main/abstractUpdateService.ts b/src/vs/platform/update/electron-main/abstractUpdateService.ts index f8059fb04b6..2a1240b1eb9 100644 --- a/src/vs/platform/update/electron-main/abstractUpdateService.ts +++ b/src/vs/platform/update/electron-main/abstractUpdateService.ts @@ -18,6 +18,10 @@ export function createUpdateURL(platform: string, quality: string): string { return `${product.updateUrl}/api/update/${platform}/${quality}/${product.commit}`; } +export type UpdateNotAvailableClassification = { + explicit: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; +}; + export abstract class AbstractUpdateService implements IUpdateService { _serviceBrand: any; diff --git a/src/vs/platform/update/electron-main/updateService.darwin.ts b/src/vs/platform/update/electron-main/updateService.darwin.ts index 352d4d91633..da534803b83 100644 --- a/src/vs/platform/update/electron-main/updateService.darwin.ts +++ b/src/vs/platform/update/electron-main/updateService.darwin.ts @@ -13,7 +13,7 @@ import { State, IUpdate, StateType, UpdateType } from 'vs/platform/update/common import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ILogService } from 'vs/platform/log/common/log'; -import { AbstractUpdateService, createUpdateURL } from 'vs/platform/update/electron-main/abstractUpdateService'; +import { AbstractUpdateService, createUpdateURL, UpdateNotAvailableClassification } from 'vs/platform/update/electron-main/abstractUpdateService'; import { IRequestService } from 'vs/platform/request/common/request'; export class DarwinUpdateService extends AbstractUpdateService { @@ -81,12 +81,10 @@ export class DarwinUpdateService extends AbstractUpdateService { return; } - /* __GDPR__ - "update:downloaded" : { - "version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('update:downloaded', { version: update.version }); + type UpdateDownloadedClassification = { + version: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + }; + this.telemetryService.publicLog2<{ version: String }, UpdateDownloadedClassification>('update:downloaded', { version: update.version }); this.setState(State.Ready(update)); } @@ -95,13 +93,7 @@ export class DarwinUpdateService extends AbstractUpdateService { if (this.state.type !== StateType.CheckingForUpdates) { return; } - - /* __GDPR__ - "update:notAvailable" : { - "explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('update:notAvailable', { explicit: !!this.state.context }); + this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!this.state.context }); this.setState(State.Idle(UpdateType.Archive)); } diff --git a/src/vs/platform/update/electron-main/updateService.linux.ts b/src/vs/platform/update/electron-main/updateService.linux.ts index 52c4ac7dc2b..07eaf22cb09 100644 --- a/src/vs/platform/update/electron-main/updateService.linux.ts +++ b/src/vs/platform/update/electron-main/updateService.linux.ts @@ -10,7 +10,7 @@ import { State, IUpdate, AvailableForDownload, UpdateType } from 'vs/platform/up import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ILogService } from 'vs/platform/log/common/log'; -import { createUpdateURL, AbstractUpdateService } from 'vs/platform/update/electron-main/abstractUpdateService'; +import { createUpdateURL, AbstractUpdateService, UpdateNotAvailableClassification } from 'vs/platform/update/electron-main/abstractUpdateService'; import { IRequestService, asJson } from 'vs/platform/request/common/request'; import { shell } from 'electron'; import { CancellationToken } from 'vs/base/common/cancellation'; @@ -40,17 +40,11 @@ export class LinuxUpdateService extends AbstractUpdateService { } this.setState(State.CheckingForUpdates(context)); - this.requestService.request({ url: this.url }, CancellationToken.None) .then(asJson) .then(update => { if (!update || !update.url || !update.version || !update.productVersion) { - /* __GDPR__ - "update:notAvailable" : { - "explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('update:notAvailable', { explicit: !!context }); + this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!context }); this.setState(State.Idle(UpdateType.Archive)); } else { @@ -59,14 +53,7 @@ export class LinuxUpdateService extends AbstractUpdateService { }) .then(undefined, err => { this.logService.error(err); - - /* __GDPR__ - "update:notAvailable" : { - "explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('update:notAvailable', { explicit: !!context }); - + this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!context }); // only show message when explicitly checking for updates const message: string | undefined = !!context ? (err.message || err) : undefined; this.setState(State.Idle(UpdateType.Archive, message)); diff --git a/src/vs/platform/update/electron-main/updateService.snap.ts b/src/vs/platform/update/electron-main/updateService.snap.ts index ad64d8adfe0..54f63ca59e4 100644 --- a/src/vs/platform/update/electron-main/updateService.snap.ts +++ b/src/vs/platform/update/electron-main/updateService.snap.ts @@ -13,6 +13,7 @@ import * as path from 'vs/base/common/path'; import { realpath, watch } from 'fs'; import { spawn } from 'child_process'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { UpdateNotAvailableClassification } from 'vs/platform/update/electron-main/abstractUpdateService'; abstract class AbstractUpdateService2 implements IUpdateService { @@ -159,29 +160,17 @@ export class SnapUpdateService extends AbstractUpdateService2 { protected doCheckForUpdates(context: any): void { this.setState(State.CheckingForUpdates(context)); - this.isUpdateAvailable().then(result => { if (result) { this.setState(State.Ready({ version: 'something', productVersion: 'something' })); } else { - /* __GDPR__ - "update:notAvailable" : { - "explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('update:notAvailable', { explicit: !!context }); + this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!context }); this.setState(State.Idle(UpdateType.Snap)); } }, err => { this.logService.error(err); - - /* __GDPR__ - "update:notAvailable" : { - "explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('update:notAvailable', { explicit: !!context }); + this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!context }); this.setState(State.Idle(UpdateType.Snap, err.message || err)); }); } diff --git a/src/vs/platform/update/electron-main/updateService.win32.ts b/src/vs/platform/update/electron-main/updateService.win32.ts index cbff0bf1c74..31c7818a737 100644 --- a/src/vs/platform/update/electron-main/updateService.win32.ts +++ b/src/vs/platform/update/electron-main/updateService.win32.ts @@ -14,7 +14,7 @@ import { State, IUpdate, StateType, AvailableForDownload, UpdateType } from 'vs/ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ILogService } from 'vs/platform/log/common/log'; -import { createUpdateURL, AbstractUpdateService } from 'vs/platform/update/electron-main/abstractUpdateService'; +import { createUpdateURL, AbstractUpdateService, UpdateNotAvailableClassification } from 'vs/platform/update/electron-main/abstractUpdateService'; import { IRequestService, asJson } from 'vs/platform/request/common/request'; import { checksum } from 'vs/base/node/crypto'; import { tmpdir } from 'os'; @@ -168,12 +168,7 @@ export class Win32UpdateService extends AbstractUpdateService { }) .then(undefined, err => { this.logService.error(err); - /* __GDPR__ - "update:notAvailable" : { - "explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('update:notAvailable', { explicit: !!context }); + this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!context }); // only show message when explicitly checking for updates const message: string | undefined = !!context ? (err.message || err) : undefined; diff --git a/src/vs/workbench/api/node/extHostRequireInterceptor.ts b/src/vs/workbench/api/node/extHostRequireInterceptor.ts index c73c005de92..789ece36253 100644 --- a/src/vs/workbench/api/node/extHostRequireInterceptor.ts +++ b/src/vs/workbench/api/node/extHostRequireInterceptor.ts @@ -231,23 +231,19 @@ export class OpenNodeModuleFactory implements INodeModuleFactory { if (!this._extensionId) { return; } - /* __GDPR__ - "shimming.open" : { - "extension": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this._mainThreadTelemerty.$publicLog('shimming.open', { extension: this._extensionId }); + type ShimmingOpenClassification = { + extension: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + }; + this._mainThreadTelemerty.$publicLog2<{ extension: string }, ShimmingOpenClassification>('shimming.open', { extension: this._extensionId }); } private sendNoForwardTelemetry(): void { if (!this._extensionId) { return; } - /* __GDPR__ - "shimming.open.call.noForward" : { - "extension": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this._mainThreadTelemerty.$publicLog('shimming.open.call.noForward', { extension: this._extensionId }); + type ShimmingOpenCallNoForwardClassification = { + extension: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + }; + this._mainThreadTelemerty.$publicLog2<{ extension: string }, ShimmingOpenCallNoForwardClassification>('shimming.open.call.noForward', { extension: this._extensionId }); } } diff --git a/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts b/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts index ada56e8df4d..643b404f191 100644 --- a/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts +++ b/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts @@ -220,12 +220,10 @@ export class ExperimentService extends Disposable implements IExperimentService }); return Promise.all(promises).then(() => { - /* __GDPR__ - "experiments" : { - "experiments" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('experiments', { experiments: this._experiments }); + type ExperimentsClassification = { + experiments: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + }; + this.telemetryService.publicLog2<{ experiments: IExperiment[] }, ExperimentsClassification>('experiments', { experiments: this._experiments }); }); }); } diff --git a/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts b/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts index 676f63a171d..894a0b10e7a 100644 --- a/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts +++ b/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts @@ -168,8 +168,6 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer private static readonly IgnoreTask010DonotShowAgain_key = 'workbench.tasks.ignoreTask010Shown'; private static CustomizationTelemetryEventName: string = 'taskService.customize'; - public static TemplateTelemetryEventName: string = 'taskService.template'; - public _serviceBrand: any; public static OutputChannelId: string = 'tasks'; public static OutputChannelLabel: string = nls.localize('tasks', "Tasks"); @@ -2057,14 +2055,16 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer content = content.replace(/(\n)(\t+)/g, (_, s1, s2) => s1 + strings.repeat(' ', s2.length * editorConfig.editor.tabSize)); } configFileCreated = true; - /* __GDPR__ - "taskService.template" : { - "templateId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "autoDetect" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ + type TaskServiceTemplateClassification = { + templateId?: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + autoDetect: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + }; + type TaskServiceEvent = { + templateId?: string; + autoDetect: boolean; + }; return this.textFileService.create(resource, content).then((result): URI => { - this.telemetryService.publicLog(AbstractTaskService.TemplateTelemetryEventName, { + this.telemetryService.publicLog2('taskService.template', { templateId: selection.id, autoDetect: selection.autoDetect }); diff --git a/src/vs/workbench/contrib/telemetry/browser/telemetry.contribution.ts b/src/vs/workbench/contrib/telemetry/browser/telemetry.contribution.ts index 3e73903b7d2..35c131834e0 100644 --- a/src/vs/workbench/contrib/telemetry/browser/telemetry.contribution.ts +++ b/src/vs/workbench/contrib/telemetry/browser/telemetry.contribution.ts @@ -5,7 +5,7 @@ import { Registry } from 'vs/platform/registry/common/platform'; import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry, IWorkbenchContribution } from 'vs/workbench/common/contributions'; -import { LifecyclePhase, ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; +import { LifecyclePhase, ILifecycleService, StartupKind } from 'vs/platform/lifecycle/common/lifecycle'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IActivityBarService } from 'vs/workbench/services/activityBar/browser/activityBarService'; @@ -39,27 +39,41 @@ export class TelemetryContribution extends Disposable implements IWorkbenchContr const { filesToOpenOrCreate, filesToDiff } = environmentService.configuration; const activeViewlet = viewletService.getActiveViewlet(); - /* __GDPR__ - "workspaceLoad" : { - "userAgent" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "windowSize.innerHeight": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "windowSize.innerWidth": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "windowSize.outerHeight": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "windowSize.outerWidth": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "emptyWorkbench": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workbench.filesToOpenOrCreate": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workbench.filesToDiff": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "customKeybindingsCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "theme": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "language": { "classification": "SystemMetaData", "purpose": "BusinessInsight" }, - "pinnedViewlets": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "restoredViewlet": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "restoredEditors": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "pinnedViewlets": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - telemetryService.publicLog('workspaceLoad', { + type WindowSizeFragment = { + innerHeight: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + innerWidth: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + outerHeight: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + outerWidth: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + }; + type WorkspaceLoadClassification = { + userAgent: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + emptyWorkbench: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + windowSize: WindowSizeFragment; + 'workbench.filesToOpenOrCreate': { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + 'workbench.filesToDiff': { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + customKeybindingsCount: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + theme: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + language: { classification: 'SystemMetaData', purpose: 'BusinessInsight' }; + pinnedViewlets: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + restoredViewlet?: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + restoredEditors: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + startupKind: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + }; + type WorkspaceLoadEvent = { + userAgent: string; + windowSize: { innerHeight: number, innerWidth: number, outerHeight: number, outerWidth: number }; + emptyWorkbench: boolean; + 'workbench.filesToOpenOrCreate': number; + 'workbench.filesToDiff': number; + customKeybindingsCount: number; + theme: string; + language: string; + pinnedViewlets: string[]; + restoredViewlet?: string; + restoredEditors: number; + startupKind: StartupKind; + }; + telemetryService.publicLog2('workspaceLoad', { userAgent: navigator.userAgent, windowSize: { innerHeight: window.innerHeight, innerWidth: window.innerWidth, outerHeight: window.outerHeight, outerWidth: window.outerWidth }, emptyWorkbench: contextService.getWorkbenchState() === WorkbenchState.EMPTY, diff --git a/src/vs/workbench/contrib/welcome/gettingStarted/electron-browser/telemetryOptOut.ts b/src/vs/workbench/contrib/welcome/gettingStarted/electron-browser/telemetryOptOut.ts index 78b36054376..f137c1a6fce 100644 --- a/src/vs/workbench/contrib/welcome/gettingStarted/electron-browser/telemetryOptOut.ts +++ b/src/vs/workbench/contrib/welcome/gettingStarted/electron-browser/telemetryOptOut.ts @@ -109,12 +109,14 @@ export class TelemetryOptOut implements IWorkbenchContribution { } const logTelemetry = (optout?: boolean) => { - /* __GDPR__ - "experiments:optout" : { - "optOut": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('experiments:optout', typeof optout === 'boolean' ? { optout } : {}); + type ExperimentsOptOutClassification = { + optout?: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + }; + + type ExperimentsOptOutEvent = { + optout?: boolean; + }; + this.telemetryService.publicLog2('experiments:optout', typeof optout === 'boolean' ? { optout } : {}); }; queryPromise.then(() => { diff --git a/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts b/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts index 7bae52d70b7..d78d47b4535 100644 --- a/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts +++ b/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts @@ -356,43 +356,33 @@ export class WalkThroughPart extends BaseEditor { } })); + type WalkThroughSnippetInteractionClassification = { + from?: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + type: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + snippet: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + }; + type WalkThroughSnippetInteractionEvent = { + from?: string, + type: string, + snippet: number + }; + this.contentDisposables.push(Event.once(editor.onMouseDown)(() => { - /* __GDPR__ - "walkThroughSnippetInteraction" : { - "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "type": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "snippet": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('walkThroughSnippetInteraction', { + this.telemetryService.publicLog2('walkThroughSnippetInteraction', { from: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined, type: 'mouseDown', snippet: i }); })); this.contentDisposables.push(Event.once(editor.onKeyDown)(() => { - /* __GDPR__ - "walkThroughSnippetInteraction" : { - "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "type": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "snippet": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('walkThroughSnippetInteraction', { + this.telemetryService.publicLog2('walkThroughSnippetInteraction', { from: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined, type: 'keyDown', snippet: i }); })); this.contentDisposables.push(Event.once(editor.onDidChangeModelContent)(() => { - /* __GDPR__ - "walkThroughSnippetInteraction" : { - "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "type": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "snippet": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('walkThroughSnippetInteraction', { + this.telemetryService.publicLog2('walkThroughSnippetInteraction', { from: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined, type: 'changeModelContent', snippet: i diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index d3c48734060..e10a49baee6 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -135,13 +135,11 @@ export class ElectronWindow extends Disposable { try { await this.commandService.executeCommand(request.id, ...args); - /* __GDPR__ - "commandExecuted" : { - "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('commandExecuted', { id: request.id, from: request.from }); + type CommandExecutedClassifcation = { + id: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + from: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + }; + this.telemetryService.publicLog2<{ id: String, from: String }, CommandExecutedClassifcation>('commandExecuted', { id: request.id, from: request.from }); } catch (error) { this.notificationService.error(error); } From b11b93ed8c2ee5e400c080c09a9585eecec81a34 Mon Sep 17 00:00:00 2001 From: Maik Riechert Date: Wed, 17 Jul 2019 18:19:37 +0100 Subject: [PATCH 302/710] Fix incrementing of variables in cpuUsage.sh --- src/vs/base/node/cpuUsage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/base/node/cpuUsage.sh b/src/vs/base/node/cpuUsage.sh index 3d42b36dc20..8e07feffaf7 100755 --- a/src/vs/base/node/cpuUsage.sh +++ b/src/vs/base/node/cpuUsage.sh @@ -30,7 +30,7 @@ for PID in "$@"; do fi PROCESS_BEFORE_TIMES[$ITER]=$PROCESS_TIME_BEFORE - ((ITER++)) + ((++ITER)) done # Wait for a second @@ -60,5 +60,5 @@ for PID in "$@"; do # Parent script reads from stdout, so echo result to be read echo $CPU_USAGE - ((ITER++)) + ((++ITER)) done From 750ea458cd1efc21d941399cb552acc6bf9fbfcf Mon Sep 17 00:00:00 2001 From: Pine Wu Date: Wed, 17 Jul 2019 10:47:05 -0700 Subject: [PATCH 303/710] [css] Upgrade service and add dynamic link support --- .../css-language-features/server/package.json | 2 +- .../server/src/cssServerMain.ts | 56 ++++++++++++++++--- .../server/src/utils/runner.ts | 21 +++++++ .../css-language-features/server/yarn.lock | 14 +++-- 4 files changed, 80 insertions(+), 13 deletions(-) diff --git a/extensions/css-language-features/server/package.json b/extensions/css-language-features/server/package.json index 6f2e734a109..d1913a26acf 100644 --- a/extensions/css-language-features/server/package.json +++ b/extensions/css-language-features/server/package.json @@ -9,7 +9,7 @@ }, "main": "./out/cssServerMain", "dependencies": { - "vscode-css-languageservice": "^4.0.2", + "vscode-css-languageservice": "^4.0.3-next.0", "vscode-languageserver": "^5.3.0-next.8" }, "devDependencies": { diff --git a/extensions/css-language-features/server/src/cssServerMain.ts b/extensions/css-language-features/server/src/cssServerMain.ts index cf539df1e1d..76374165b7c 100644 --- a/extensions/css-language-features/server/src/cssServerMain.ts +++ b/extensions/css-language-features/server/src/cssServerMain.ts @@ -8,11 +8,12 @@ import { } from 'vscode-languageserver'; import URI from 'vscode-uri'; import { TextDocument, CompletionList, Position } from 'vscode-languageserver-types'; +import { stat as fsStat } from 'fs'; -import { getCSSLanguageService, getSCSSLanguageService, getLESSLanguageService, LanguageSettings, LanguageService, Stylesheet } from 'vscode-css-languageservice'; +import { getCSSLanguageService, getSCSSLanguageService, getLESSLanguageService, LanguageSettings, LanguageService, Stylesheet, FileSystemProvider, FileType } from 'vscode-css-languageservice'; import { getLanguageModelCache } from './languageModelCache'; import { getPathCompletionParticipant } from './pathCompletion'; -import { formatError, runSafe } from './utils/runner'; +import { formatError, runSafe, runSafeAsync } from './utils/runner'; import { getDocumentContext } from './utils/documentContext'; import { getDataProviders } from './customData'; @@ -52,6 +53,45 @@ let workspaceFolders: WorkspaceFolder[]; const languageServices: { [id: string]: LanguageService } = {}; +const fileSystemProvider: FileSystemProvider = { + stat(documentUri: string) { + const filePath = URI.parse(documentUri).fsPath; + + return new Promise((c, e) => { + fsStat(filePath, (err, stats) => { + if (err) { + if (err.code === 'ENOENT') { + return c({ + type: FileType.Unknown, + ctime: -1, + mtime: -1, + size: -1 + }); + } else { + return e(err); + } + } + + let type = FileType.Unknown; + if (stats.isFile()) { + type = FileType.File; + } else if (stats.isDirectory) { + type = FileType.Directory; + } else if (stats.isSymbolicLink) { + type = FileType.SymbolicLink; + } + + c({ + type, + ctime: stats.ctime.getTime(), + mtime: stats.mtime.getTime(), + size: stats.size + }); + }); + }); + } +}; + // After the server has started the client sends an initialize request. The server receives // in the passed params the rootPath of the workspace plus the client capabilities. connection.onInitialize((params: InitializeParams): InitializeResult => { @@ -81,9 +121,9 @@ connection.onInitialize((params: InitializeParams): InitializeResult => { scopedSettingsSupport = !!getClientCapability('workspace.configuration', false); foldingRangeLimit = getClientCapability('textDocument.foldingRange.rangeLimit', Number.MAX_VALUE); - languageServices.css = getCSSLanguageService({ customDataProviders }); - languageServices.scss = getSCSSLanguageService({ customDataProviders }); - languageServices.less = getLESSLanguageService({ customDataProviders }); + languageServices.css = getCSSLanguageService({ customDataProviders, fileSystemProvider }); + languageServices.scss = getSCSSLanguageService({ customDataProviders, fileSystemProvider }); + languageServices.less = getLESSLanguageService({ customDataProviders, fileSystemProvider }); const capabilities: ServerCapabilities = { // Tell the client that the server works in FULL text document sync mode @@ -256,13 +296,13 @@ connection.onDocumentHighlight((documentHighlightParams, token) => { }); -connection.onDocumentLinks((documentLinkParams, token) => { - return runSafe(() => { +connection.onDocumentLinks(async (documentLinkParams, token) => { + return runSafeAsync(async () => { const document = documents.get(documentLinkParams.textDocument.uri); if (document) { const documentContext = getDocumentContext(document.uri, workspaceFolders); const stylesheet = stylesheets.get(document); - return getLanguageService(document).findDocumentLinks(document, stylesheet, documentContext); + return await getLanguageService(document).findDocumentLinks2(document, stylesheet, documentContext); } return []; }, [], `Error while computing document links for ${documentLinkParams.textDocument.uri}`, token); diff --git a/extensions/css-language-features/server/src/utils/runner.ts b/extensions/css-language-features/server/src/utils/runner.ts index df024167dab..98a7a96f9aa 100644 --- a/extensions/css-language-features/server/src/utils/runner.ts +++ b/extensions/css-language-features/server/src/utils/runner.ts @@ -17,6 +17,27 @@ export function formatError(message: string, err: any): string { return message; } +export function runSafeAsync(func: () => Thenable, errorVal: T, errorMessage: string, token: CancellationToken): Thenable> { + return new Promise>((resolve) => { + setImmediate(() => { + if (token.isCancellationRequested) { + resolve(cancelValue()); + } + return func().then(result => { + if (token.isCancellationRequested) { + resolve(cancelValue()); + return; + } else { + resolve(result); + } + }, e => { + console.error(formatError(errorMessage, e)); + resolve(errorVal); + }); + }); + }); +} + export function runSafe(func: () => T, errorVal: T, errorMessage: string, token: CancellationToken): Thenable> { return new Promise>((resolve) => { setImmediate(() => { diff --git a/extensions/css-language-features/server/yarn.lock b/extensions/css-language-features/server/yarn.lock index c5bfa63c869..3537a3d2ecd 100644 --- a/extensions/css-language-features/server/yarn.lock +++ b/extensions/css-language-features/server/yarn.lock @@ -781,13 +781,14 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -vscode-css-languageservice@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.2.tgz#7496e538b0c151feac16d5888cc0b1b104f4c736" - integrity sha512-pTnfXbsME3pl+yDfhUp/mtvPyIJk0Le4zqJxDn56s9GY9LqY0RmkSEh0oHH6D0HXR3Ni6wKosIaqu8a2G0+jdw== +vscode-css-languageservice@^4.0.3-next.0: + version "4.0.3-next.0" + resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.0.tgz#ba96894cf2a0c86c744a1274590f27e55ea60f58" + integrity sha512-ku58Y5jDFNfDicv2AAhgu1edgfGcRZPwlKu6EBK2ck/O/Vco7Zy64FDoClJghcYBhJiDs7sy2q/UtQD0IoGbRw== dependencies: vscode-languageserver-types "^3.15.0-next.2" vscode-nls "^4.1.1" + vscode-uri "^2.0.3" vscode-jsonrpc@^4.1.0-next.2: version "4.1.0-next.2" @@ -831,6 +832,11 @@ vscode-uri@^1.0.6: resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-1.0.6.tgz#6b8f141b0bbc44ad7b07e94f82f168ac7608ad4d" integrity sha512-sLI2L0uGov3wKVb9EB+vIQBl9tVP90nqRvxSoJ35vI3NjxE8jfsE5DSOhWgSunHSZmKS4OCi2jrtfxK7uyp2ww== +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" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" From 16219067b1e1f40fccfa504c02bf3857cc971374 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Wed, 17 Jul 2019 11:17:30 -0700 Subject: [PATCH 304/710] Respond to theme changes for minimap decorations, fixes #77487 --- src/vs/editor/browser/viewParts/minimap/minimap.ts | 10 ++++++++++ src/vs/editor/common/model/textModel.ts | 4 ++++ src/vs/editor/common/viewModel/viewModel.ts | 1 + src/vs/editor/common/viewModel/viewModelImpl.ts | 12 +++++++++++- 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 8184682f4ae..c883223ae31 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -451,6 +451,7 @@ export class Minimap extends ViewPart { private _options: MinimapOptions; private _lastRenderData: RenderData | null; + private _lastDecorations: ViewModelDecoration[] | undefined; private _renderDecorations: boolean = false; private _buffers: MinimapBuffers | null; @@ -675,6 +676,13 @@ export class Minimap extends ViewPart { return true; } + public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + this._context.model.invalidateMinimapColorCache(); + // Only bother calling render if decorations are currently shown + this._renderDecorations = !!this._lastDecorations; + return !!this._lastDecorations; + } + // --- end event handlers public prepareRender(ctx: RenderingContext): void { @@ -751,6 +759,8 @@ export class Minimap extends ViewPart { this.renderDecorationOnLine(canvasContext, lineOffsetMap, decoration, layout, line, height, lineHeight, tabSize, characterWidth); } } + + this._lastDecorations = decorations; } } diff --git a/src/vs/editor/common/model/textModel.ts b/src/vs/editor/common/model/textModel.ts index c8b89e889cf..3b7bb2d1365 100644 --- a/src/vs/editor/common/model/textModel.ts +++ b/src/vs/editor/common/model/textModel.ts @@ -2703,6 +2703,10 @@ export class ModelDecorationMinimapOptions extends DecorationOptions { return this._resolvedColor; } + public invalidateCachedColor(): void { + this._resolvedColor = undefined; + } + private _resolveColor(color: string | ThemeColor, theme: ITheme): Color | undefined { if (typeof color === 'string') { return Color.fromHex(color); diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index 1c889284c76..fe832ef3707 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -141,6 +141,7 @@ export interface IViewModel { getLineLastNonWhitespaceColumn(lineNumber: number): number; getAllOverviewRulerDecorations(theme: ITheme): IOverviewRulerDecorations; invalidateOverviewRulerColorCache(): void; + invalidateMinimapColorCache(): void; getValueInRange(range: Range, eol: EndOfLinePreference): string; getModelLineMaxColumn(modelLineNumber: number): number; diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index e721c4af6cf..5161636aa45 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -11,7 +11,7 @@ import { IPosition, Position } from 'vs/editor/common/core/position'; import { IRange, Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { EndOfLinePreference, IActiveIndentGuideInfo, ITextModel, TrackedRangeStickiness, TextModelResolvedOptions } from 'vs/editor/common/model'; -import { ModelDecorationOverviewRulerOptions } from 'vs/editor/common/model/textModel'; +import { ModelDecorationOverviewRulerOptions, ModelDecorationMinimapOptions } from 'vs/editor/common/model/textModel'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; import { ColorId, LanguageId, TokenizationRegistry } from 'vs/editor/common/modes'; import { tokenizeLineToHTML } from 'vs/editor/common/modes/textToHtmlTokenizer'; @@ -565,6 +565,16 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel } } + public invalidateMinimapColorCache(): void { + const decorations = this.model.getAllDecorations(); + for (const decoration of decorations) { + const opts = decoration.options.minimap; + if (opts) { + opts.invalidateCachedColor(); + } + } + } + public getValueInRange(range: Range, eol: EndOfLinePreference): string { const modelRange = this.coordinatesConverter.convertViewRangeToModelRange(range); return this.model.getValueInRange(modelRange, eol); From 4a38038457a3af3bdeea822f9c1a877e8a0d7597 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Tue, 16 Jul 2019 13:52:16 -0400 Subject: [PATCH 305/710] Added clear input method to clear disposables. --- src/vs/base/browser/ui/sash/sash.ts | 158 +++---- .../extensions/browser/extensionEditor.ts | 439 +++++++++--------- 2 files changed, 300 insertions(+), 297 deletions(-) diff --git a/src/vs/base/browser/ui/sash/sash.ts b/src/vs/base/browser/ui/sash/sash.ts index 874bc9482e1..100076e5c11 100644 --- a/src/vs/base/browser/ui/sash/sash.ts +++ b/src/vs/base/browser/ui/sash/sash.ts @@ -208,93 +208,95 @@ export class Sash extends Disposable { } } - if (!this.state) { - return; - } + if (this.state) { - // Select both iframes and webviews; internally Electron nests an iframe - // in its component, but this isn't queryable. - const iframes = [ - ...getElementsByTagName('iframe'), - ...getElementsByTagName('webview'), - ]; - for (const iframe of iframes) { - iframe.style.pointerEvents = 'none'; // disable mouse events on iframes as long as we drag the sash - } - const mouseDownEvent = new StandardMouseEvent(e); - const startX = mouseDownEvent.posx; - const startY = mouseDownEvent.posy; - const altKey = mouseDownEvent.altKey; - const startEvent: ISashEvent = { startX, currentX: startX, startY, currentY: startY, altKey }; - - addClass(this.el, 'active'); - this._onDidStart.fire(startEvent); - - // fix https://github.com/Microsoft/vscode/issues/21675 - const style = createStyleSheet(this.el); - const updateStyle = () => { - let cursor = ''; - - if (isMultisashResize) { - cursor = 'all-scroll'; - } else if (this.orientation === Orientation.HORIZONTAL) { - if (this.state === SashState.Minimum) { - cursor = 's-resize'; - } else if (this.state === SashState.Maximum) { - cursor = 'n-resize'; - } else { - cursor = isMacintosh ? 'row-resize' : 'ns-resize'; - } - } else { - if (this.state === SashState.Minimum) { - cursor = 'e-resize'; - } else if (this.state === SashState.Maximum) { - cursor = 'w-resize'; - } else { - cursor = isMacintosh ? 'col-resize' : 'ew-resize'; - } - } - - style.innerHTML = `* { cursor: ${cursor} !important; }`; - }; - - const disposables = new DisposableStore(); - - updateStyle(); - - if (!isMultisashResize) { - this.onDidEnablementChange(updateStyle, null, disposables); - } - - const onMouseMove = (e: MouseEvent) => { - EventHelper.stop(e, false); - const mouseMoveEvent = new StandardMouseEvent(e); - const event: ISashEvent = { startX, currentX: mouseMoveEvent.posx, startY, currentY: mouseMoveEvent.posy, altKey }; - - this._onDidChange.fire(event); - }; - - const onMouseUp = (e: MouseEvent) => { - EventHelper.stop(e, false); - - this.el.removeChild(style); - - removeClass(this.el, 'active'); - this._onDidEnd.fire(); - - disposables.dispose(); + // Select both iframes and webviews; internally Electron nests an iframe + // in its component, but this isn't queryable. + const iframes = [ + ...getElementsByTagName('webview'), + ...getElementsByTagName('iframe'), + ]; for (const iframe of iframes) { - iframe.style.pointerEvents = 'auto'; + iframe.style.pointerEvents = 'none'; // disable mouse events on iframes as long as we drag the sash } - }; - domEvent(window, 'mousemove')(onMouseMove, null, disposables); - domEvent(window, 'mouseup')(onMouseUp, null, disposables); + const mouseDownEvent = new StandardMouseEvent(e); + const startX = mouseDownEvent.posx; + const startY = mouseDownEvent.posy; + const altKey = mouseDownEvent.altKey; + const startEvent: ISashEvent = { startX, currentX: startX, startY, currentY: startY, altKey }; + + addClass(this.el, 'active'); + this._onDidStart.fire(startEvent); + + // fix https://github.com/Microsoft/vscode/issues/21675 + const style = createStyleSheet(this.el); + const updateStyle = () => { + let cursor = ''; + + if (isMultisashResize) { + cursor = 'all-scroll'; + } else if (this.orientation === Orientation.HORIZONTAL) { + if (this.state === SashState.Minimum) { + cursor = 's-resize'; + } else if (this.state === SashState.Maximum) { + cursor = 'n-resize'; + } else { + cursor = isMacintosh ? 'row-resize' : 'ns-resize'; + } + } else { + if (this.state === SashState.Minimum) { + cursor = 'e-resize'; + } else if (this.state === SashState.Maximum) { + cursor = 'w-resize'; + } else { + cursor = isMacintosh ? 'col-resize' : 'ew-resize'; + } + } + + style.innerHTML = `* { cursor: ${cursor} !important; }`; + }; + + const disposables = new DisposableStore(); + + updateStyle(); + + if (!isMultisashResize) { + this.onDidEnablementChange(updateStyle, null, disposables); + } + + const onMouseMove = (e: MouseEvent) => { + EventHelper.stop(e, false); + const mouseMoveEvent = new StandardMouseEvent(e); + const event: ISashEvent = { startX, currentX: mouseMoveEvent.posx, startY, currentY: mouseMoveEvent.posy, altKey }; + + this._onDidChange.fire(event); + }; + + const onMouseUp = (e: MouseEvent) => { + EventHelper.stop(e, false); + + this.el.removeChild(style); + + removeClass(this.el, 'active'); + this._onDidEnd.fire(); + + disposables.dispose(); + + for (const iframe of iframes) { + iframe.style.pointerEvents = 'auto'; + } + }; + + domEvent(window, 'mousemove')(onMouseMove, null, disposables); + domEvent(window, 'mouseup')(onMouseUp, null, disposables); + } } + private onMouseDoubleClick(event: MouseEvent): void { this._onDidReset.fire(); } diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index 2ab1851bda6..2608272f4ce 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -483,6 +483,13 @@ export class ExtensionEditor extends BaseEditor { })); } + clearInput(): void { + this.contentDisposables.clear(); + this.transientDisposables.clear(); + + super.clearInput(); + } + focus(): void { if (this.activeElement) { this.activeElement.focus(); @@ -584,39 +591,38 @@ export class ExtensionEditor extends BaseEditor { const content = $('div', { class: 'subcontent', tabindex: '0' }); return this.loadContents(() => this.extensionManifest!.get()) .then(manifest => { - if (!manifest) { - return content; - } + if (manifest) { - const scrollableContent = new DomScrollableElement(content, {}); + const scrollableContent = new DomScrollableElement(content, {}); - const layout = () => scrollableContent.scanDomNode(); - const removeLayoutParticipant = arrays.insert(this.layoutParticipants, { layout }); - this.contentDisposables.add(toDisposable(removeLayoutParticipant)); + const layout = () => scrollableContent.scanDomNode(); + const removeLayoutParticipant = arrays.insert(this.layoutParticipants, { layout }); + this.contentDisposables.add(toDisposable(removeLayoutParticipant)); - const renders = [ - this.renderSettings(content, manifest, layout), - this.renderCommands(content, manifest, layout), - this.renderLanguages(content, manifest, layout), - this.renderColorThemes(content, manifest, layout), - this.renderIconThemes(content, manifest, layout), - this.renderColors(content, manifest, layout), - this.renderJSONValidation(content, manifest, layout), - this.renderDebuggers(content, manifest, layout), - this.renderViewContainers(content, manifest, layout), - this.renderViews(content, manifest, layout), - this.renderLocalizations(content, manifest, layout) - ]; + const renders = [ + this.renderSettings(content, manifest, layout), + this.renderCommands(content, manifest, layout), + this.renderLanguages(content, manifest, layout), + this.renderColorThemes(content, manifest, layout), + this.renderIconThemes(content, manifest, layout), + this.renderColors(content, manifest, layout), + this.renderJSONValidation(content, manifest, layout), + this.renderDebuggers(content, manifest, layout), + this.renderViewContainers(content, manifest, layout), + this.renderViews(content, manifest, layout), + this.renderLocalizations(content, manifest, layout) + ]; - scrollableContent.scanDomNode(); + scrollableContent.scanDomNode(); - const isEmpty = !renders.some(x => x); - if (isEmpty) { - append(content, $('p.nocontent')).textContent = localize('noContributions', "No Contributions"); - append(this.content, content); - } else { - append(this.content, scrollableContent.getDomNode()); - this.contentDisposables.add(scrollableContent); + const isEmpty = !renders.some(x => x); + if (isEmpty) { + append(content, $('p.nocontent')).textContent = localize('noContributions', "No Contributions"); + append(this.content, content); + } else { + append(this.content, scrollableContent.getDomNode()); + this.contentDisposables.add(scrollableContent); + } } return content; }, () => { @@ -684,53 +690,51 @@ export class ExtensionEditor extends BaseEditor { } const contrib = properties ? Object.keys(properties) : []; - if (!contrib.length) { - return false; + if (contrib.length) { + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('settings', "Settings ({0})", contrib.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('setting name', "Name")), + $('th', undefined, localize('description', "Description")), + $('th', undefined, localize('default', "Default")) + ), + ...contrib.map(key => $('tr', undefined, + $('td', undefined, $('code', undefined, key)), + $('td', undefined, properties[key].description), + $('td', undefined, $('code', undefined, `${isUndefined(properties[key].default) ? getDefaultValue(properties[key].type) : properties[key].default}`)) + )) + ) + ); + + append(container, details); + return true; } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('settings', "Settings ({0})", contrib.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('setting name', "Name")), - $('th', undefined, localize('description', "Description")), - $('th', undefined, localize('default', "Default")) - ), - ...contrib.map(key => $('tr', undefined, - $('td', undefined, $('code', undefined, key)), - $('td', undefined, properties[key].description), - $('td', undefined, $('code', undefined, `${isUndefined(properties[key].default) ? getDefaultValue(properties[key].type) : properties[key].default}`)) - )) - ) - ); - - append(container, details); - return true; + return false; } private renderDebuggers(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { const contributes = manifest.contributes; const contrib = contributes && contributes.debuggers || []; - if (!contrib.length) { - return false; + if (contrib.length) { + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('debuggers', "Debuggers ({0})", contrib.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('debugger name', "Name")), + $('th', undefined, localize('debugger type', "Type")), + ), + ...contrib.map(d => $('tr', undefined, + $('td', undefined, d.label!), + $('td', undefined, d.type))) + ) + ); + + append(container, details); + return true; } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('debuggers', "Debuggers ({0})", contrib.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('debugger name', "Name")), - $('th', undefined, localize('debugger type', "Type")), - ), - ...contrib.map(d => $('tr', undefined, - $('td', undefined, d.label!), - $('td', undefined, d.type))) - ) - ); - - append(container, details); - return true; + return false; } private renderViewContainers(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -743,20 +747,19 @@ export class ExtensionEditor extends BaseEditor { return result; }, [] as Array<{ id: string, title: string, location: string }>); - if (!viewContainers.length) { - return false; + if (viewContainers.length) { + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('viewContainers', "View Containers ({0})", viewContainers.length)), + $('table', undefined, + $('tr', undefined, $('th', undefined, localize('view container id', "ID")), $('th', undefined, localize('view container title', "Title")), $('th', undefined, localize('view container location', "Where"))), + ...viewContainers.map(viewContainer => $('tr', undefined, $('td', undefined, viewContainer.id), $('td', undefined, viewContainer.title), $('td', undefined, viewContainer.location))) + ) + ); + + append(container, details); + return true; } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('viewContainers', "View Containers ({0})", viewContainers.length)), - $('table', undefined, - $('tr', undefined, $('th', undefined, localize('view container id', "ID")), $('th', undefined, localize('view container title', "Title")), $('th', undefined, localize('view container location', "Where"))), - ...viewContainers.map(viewContainer => $('tr', undefined, $('td', undefined, viewContainer.id), $('td', undefined, viewContainer.title), $('td', undefined, viewContainer.location))) - ) - ); - - append(container, details); - return true; + return false; } private renderViews(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -769,20 +772,19 @@ export class ExtensionEditor extends BaseEditor { return result; }, [] as Array<{ id: string, name: string, location: string }>); - if (!views.length) { - return false; + if (views.length) { + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('views', "Views ({0})", views.length)), + $('table', undefined, + $('tr', undefined, $('th', undefined, localize('view id', "ID")), $('th', undefined, localize('view name', "Name")), $('th', undefined, localize('view location', "Where"))), + ...views.map(view => $('tr', undefined, $('td', undefined, view.id), $('td', undefined, view.name), $('td', undefined, view.location))) + ) + ); + + append(container, details); + return true; } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('views', "Views ({0})", views.length)), - $('table', undefined, - $('tr', undefined, $('th', undefined, localize('view id', "ID")), $('th', undefined, localize('view name', "Name")), $('th', undefined, localize('view location', "Where"))), - ...views.map(view => $('tr', undefined, $('td', undefined, view.id), $('td', undefined, view.name), $('td', undefined, view.location))) - ) - ); - - append(container, details); - return true; + return false; } private renderLocalizations(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -843,44 +845,46 @@ export class ExtensionEditor extends BaseEditor { const contributes = manifest.contributes; const colors = contributes && contributes.colors; - if (!colors || !colors.length) { - return false; - } + if (colors && colors.length) { - function colorPreview(colorReference: string): Node[] { - let result: Node[] = []; - if (colorReference && colorReference[0] === '#') { - let color = Color.fromHex(colorReference); - if (color) { - result.push($('span', { class: 'colorBox', style: 'background-color: ' + Color.Format.CSS.format(color) }, '')); + + + function colorPreview(colorReference: string): Node[] { + let result: Node[] = []; + if (colorReference && colorReference[0] === '#') { + let color = Color.fromHex(colorReference); + if (color) { + result.push($('span', { class: 'colorBox', style: 'background-color: ' + Color.Format.CSS.format(color) }, '')); + } } + result.push($('code', undefined, colorReference)); + return result; } - result.push($('code', undefined, colorReference)); - return result; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('colors', "Colors ({0})", colors.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('colorId', "Id")), + $('th', undefined, localize('description', "Description")), + $('th', undefined, localize('defaultDark', "Dark Default")), + $('th', undefined, localize('defaultLight', "Light Default")), + $('th', undefined, localize('defaultHC', "High Contrast Default")) + ), + ...colors.map(color => $('tr', undefined, + $('td', undefined, $('code', undefined, color.id)), + $('td', undefined, color.description), + $('td', undefined, ...colorPreview(color.defaults.dark)), + $('td', undefined, ...colorPreview(color.defaults.light)), + $('td', undefined, ...colorPreview(color.defaults.highContrast)) + )) + ) + ); + + append(container, details); + return true; } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('colors', "Colors ({0})", colors.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('colorId', "Id")), - $('th', undefined, localize('description', "Description")), - $('th', undefined, localize('defaultDark', "Dark Default")), - $('th', undefined, localize('defaultLight', "Light Default")), - $('th', undefined, localize('defaultHC', "High Contrast Default")) - ), - ...colors.map(color => $('tr', undefined, - $('td', undefined, $('code', undefined, color.id)), - $('td', undefined, color.description), - $('td', undefined, ...colorPreview(color.defaults.dark)), - $('td', undefined, ...colorPreview(color.defaults.light)), - $('td', undefined, ...colorPreview(color.defaults.highContrast)) - )) - ) - ); - - append(container, details); - return true; + return false; } @@ -888,24 +892,23 @@ export class ExtensionEditor extends BaseEditor { const contributes = manifest.contributes; const contrib = contributes && contributes.jsonValidation || []; - if (!contrib.length) { - return false; + if (contrib.length) { + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('JSON Validation', "JSON Validation ({0})", contrib.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('fileMatch', "File Match")), + $('th', undefined, localize('schema', "Schema")) + ), + ...contrib.map(v => $('tr', undefined, + $('td', undefined, $('code', undefined, v.fileMatch)), + $('td', undefined, v.url) + )))); + + append(container, details); + return true; } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('JSON Validation', "JSON Validation ({0})", contrib.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('fileMatch', "File Match")), - $('th', undefined, localize('schema', "Schema")) - ), - ...contrib.map(v => $('tr', undefined, - $('td', undefined, $('code', undefined, v.fileMatch)), - $('td', undefined, v.url) - )))); - - append(container, details); - return true; + return false; } private renderCommands(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -941,51 +944,52 @@ export class ExtensionEditor extends BaseEditor { rawKeybindings.forEach(rawKeybinding => { const keybinding = this.resolveKeybinding(rawKeybinding); - if (!keybinding) { - return; - } + if (keybinding) { - let command = byId[rawKeybinding.command]; + let command = byId[rawKeybinding.command]; - if (!command) { - command = { id: rawKeybinding.command, title: '', keybindings: [keybinding], menus: [] }; - byId[command.id] = command; - commands.push(command); - } else { - command.keybindings.push(keybinding); + if (command) { + command.keybindings.push(keybinding); + } else { + command = { id: rawKeybinding.command, title: '', keybindings: [keybinding], menus: [] }; + byId[command.id] = command; + commands.push(command); + } } + return; }); - if (!commands.length) { - return false; + if (commands.length) { + + + const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => { + const element = $(''); + new KeybindingLabel(element, OS).set(keybinding); + return element; + }; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('commands', "Commands ({0})", commands.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('command name', "Name")), + $('th', undefined, localize('description', "Description")), + $('th', undefined, localize('keyboard shortcuts', "Keyboard Shortcuts")), + $('th', undefined, localize('menuContexts', "Menu Contexts")) + ), + ...commands.map(c => $('tr', undefined, + $('td', undefined, $('code', undefined, c.id)), + $('td', undefined, c.title), + $('td', undefined, ...c.keybindings.map(keybinding => renderKeybinding(keybinding))), + $('td', undefined, ...c.menus.map(context => $('code', undefined, context))) + )) + ) + ); + + append(container, details); + return true; } - - const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => { - const element = $(''); - new KeybindingLabel(element, OS).set(keybinding); - return element; - }; - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('commands', "Commands ({0})", commands.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('command name', "Name")), - $('th', undefined, localize('description', "Description")), - $('th', undefined, localize('keyboard shortcuts', "Keyboard Shortcuts")), - $('th', undefined, localize('menuContexts', "Menu Contexts")) - ), - ...commands.map(c => $('tr', undefined, - $('td', undefined, $('code', undefined, c.id)), - $('td', undefined, c.title), - $('td', undefined, ...c.keybindings.map(keybinding => renderKeybinding(keybinding))), - $('td', undefined, ...c.menus.map(context => $('code', undefined, context))) - )) - ) - ); - - append(container, details); - return true; + return false; } private renderLanguages(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -1006,12 +1010,12 @@ export class ExtensionEditor extends BaseEditor { grammars.forEach(grammar => { let language = byId[grammar.language]; - if (!language) { + if (language) { + language.hasGrammar = true; + } else { language = { id: grammar.language, name: grammar.language, extensions: [], hasGrammar: true, hasSnippets: false }; byId[language.id] = language; languages.push(language); - } else { - language.hasGrammar = true; } }); @@ -1020,41 +1024,40 @@ export class ExtensionEditor extends BaseEditor { snippets.forEach(snippet => { let language = byId[snippet.language]; - if (!language) { + if (language) { + language.hasSnippets = true; + } else { language = { id: snippet.language, name: snippet.language, extensions: [], hasGrammar: false, hasSnippets: true }; byId[language.id] = language; languages.push(language); - } else { - language.hasSnippets = true; } }); - if (!languages.length) { - return false; + if (languages.length) { + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('languages', "Languages ({0})", languages.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('language id', "ID")), + $('th', undefined, localize('language name', "Name")), + $('th', undefined, localize('file extensions', "File Extensions")), + $('th', undefined, localize('grammar', "Grammar")), + $('th', undefined, localize('snippets', "Snippets")) + ), + ...languages.map(l => $('tr', undefined, + $('td', undefined, l.id), + $('td', undefined, l.name), + $('td', undefined, ...join(l.extensions.map(ext => $('code', undefined, ext)), ' ')), + $('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '—')), + $('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : '—')) + )) + ) + ); + + append(container, details); + return true; } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('languages', "Languages ({0})", languages.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('language id', "ID")), - $('th', undefined, localize('language name', "Name")), - $('th', undefined, localize('file extensions', "File Extensions")), - $('th', undefined, localize('grammar', "Grammar")), - $('th', undefined, localize('snippets', "Snippets")) - ), - ...languages.map(l => $('tr', undefined, - $('td', undefined, l.id), - $('td', undefined, l.name), - $('td', undefined, ...join(l.extensions.map(ext => $('code', undefined, ext)), ' ')), - $('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '—')), - $('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : '—')) - )) - ) - ); - - append(container, details); - return true; + return false; } private resolveKeybinding(rawKeyBinding: IKeyBinding): ResolvedKeybinding | null { @@ -1067,11 +1070,10 @@ export class ExtensionEditor extends BaseEditor { } const keyBinding = KeybindingParser.parseKeybinding(key || rawKeyBinding.key, OS); - if (!keyBinding) { - return null; + if (keyBinding) { + return this.keybindingService.resolveKeybinding(keyBinding)[0]; } - - return this.keybindingService.resolveKeybinding(keyBinding)[0]; + return null; } private loadContents(loadingTask: () => CacheResult): Promise { @@ -1094,7 +1096,6 @@ export class ExtensionEditor extends BaseEditor { if (isPromiseCanceledError(err)) { return; } - this.notificationService.error(err); } } From d79071a49fcc7e381b268a829bf3aec306e62938 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Tue, 16 Jul 2019 13:58:57 -0400 Subject: [PATCH 306/710] Fixed formatting to pass the hygiene tests --- src/vs/base/common/uri.ts | 61 +++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/src/vs/base/common/uri.ts b/src/vs/base/common/uri.ts index 966555e04d0..91f4c82cf37 100644 --- a/src/vs/base/common/uri.ts +++ b/src/vs/base/common/uri.ts @@ -48,10 +48,9 @@ function _validateUri(ret: URI, _strict?: boolean): void { if (!_singleSlashStart.test(ret.path)) { throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character'); } - } else { - if (_doubleSlashStart.test(ret.path)) { - throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); - } + } else if (_doubleSlashStart.test(ret.path)) { + throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); + } } } @@ -64,11 +63,11 @@ function _schemeFix(scheme: string, _strict: boolean): string { if (_strict || _throwOnMissingSchema) { return scheme || _empty; } - if (!scheme) { - console.trace('BAD uri lacks scheme, falling back to file-scheme.'); - scheme = 'file'; + if (scheme) { + return scheme; } - return scheme; + console.trace('BAD uri lacks scheme, falling back to file-scheme.'); + scheme = 'file'; } // implements a bit of https://tools.ietf.org/html/rfc3986#section-5 @@ -116,17 +115,17 @@ export class URI implements UriComponents { if (thing instanceof URI) { return true; } - if (!thing) { - return false; + if (thing) { + return typeof (thing).authority === 'string' + && typeof (thing).fragment === 'string' + && typeof (thing).path === 'string' + && typeof (thing).query === 'string' + && typeof (thing).scheme === 'string' + && typeof (thing).fsPath === 'function' + && typeof (thing).with === 'function' + && typeof (thing).toString === 'function'; } - return typeof (thing).authority === 'string' - && typeof (thing).fragment === 'string' - && typeof (thing).path === 'string' - && typeof (thing).query === 'string' - && typeof (thing).scheme === 'string' - && typeof (thing).fsPath === 'function' - && typeof (thing).with === 'function' - && typeof (thing).toString === 'function'; + return false; } /** @@ -281,17 +280,17 @@ export class URI implements UriComponents { */ static parse(value: string, _strict: boolean = false): URI { const match = _regexp.exec(value); - if (!match) { - return new _URI(_empty, _empty, _empty, _empty, _empty); + if (match) { + return new _URI( + match[2] || _empty, + decodeURIComponent(match[4] || _empty), + decodeURIComponent(match[5] || _empty), + decodeURIComponent(match[7] || _empty), + decodeURIComponent(match[9] || _empty), + _strict + ); } - return new _URI( - match[2] || _empty, - decodeURIComponent(match[4] || _empty), - decodeURIComponent(match[5] || _empty), - decodeURIComponent(match[7] || _empty), - decodeURIComponent(match[9] || _empty), - _strict - ); + return new _URI(_empty, _empty, _empty, _empty, _empty); } /** @@ -560,10 +559,8 @@ function encodeURIComponentMinimal(path: string): string { res = path.substr(0, pos); } res += encodeTable[code]; - } else { - if (res !== undefined) { - res += path[pos]; - } + } else if (res !== undefined) { + res += path[pos]; } } return res !== undefined ? res : path; From 5746289634e036335ccdec84575a1173189a8ca7 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Tue, 16 Jul 2019 14:09:45 -0400 Subject: [PATCH 307/710] Fixed formatting --- .../telemetry/common/errorTelemetry.ts | 44 +++++++------- .../contrib/files/browser/fileActions.ts | 60 ++++++++----------- 2 files changed, 47 insertions(+), 57 deletions(-) diff --git a/src/vs/platform/telemetry/common/errorTelemetry.ts b/src/vs/platform/telemetry/common/errorTelemetry.ts index d58610ecc67..c3ec801c0a1 100644 --- a/src/vs/platform/telemetry/common/errorTelemetry.ts +++ b/src/vs/platform/telemetry/common/errorTelemetry.ts @@ -34,7 +34,9 @@ export namespace ErrorEvent { export function compare(a: ErrorEvent, b: ErrorEvent) { if (a.callstack < b.callstack) { return -1; - } else if (a.callstack > b.callstack) { + } + + if (a.callstack > b.callstack) { return 1; } return 0; @@ -75,25 +77,21 @@ export default abstract class BaseErrorTelemetry { private _onErrorEvent(err: any): void { - if (!err) { - return; + if (err) { + // unwrap nested errors from loader + if (err.detail && err.detail.stack) { + err = err.detail; + } + + // work around behavior in workerServer.ts that breaks up Error.stack + let callstack = Array.isArray(err.stack) ? err.stack.join('\n') : err.stack; + let msg = err.message ? err.message : safeStringify(err); + + // errors without a stack are not useful telemetry + if (callstack) { + this._enqueue({ msg, callstack }); + } } - - // unwrap nested errors from loader - if (err.detail && err.detail.stack) { - err = err.detail; - } - - // work around behavior in workerServer.ts that breaks up Error.stack - let callstack = Array.isArray(err.stack) ? err.stack.join('\n') : err.stack; - let msg = err.message ? err.message : safeStringify(err); - - // errors without a stack are not useful telemetry - if (!callstack) { - return; - } - - this._enqueue({ msg, callstack }); } protected _enqueue(e: ErrorEvent): void { @@ -102,10 +100,10 @@ export default abstract class BaseErrorTelemetry { if (idx < 0) { e.count = 1; this._buffer.splice(~idx, 0, e); - } else { - if (!this._buffer[idx].count) { - this._buffer[idx].count = 0; - } + } else if (!this._buffer[idx].count) { + this._buffer[idx].count = 0; + } + else { this._buffer[idx].count! += 1; } diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index 4bde241c886..1a8089bde4a 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -332,11 +332,7 @@ export function findValidPasteFileTarget(targetFolder: ExplorerItem, fileToPaste let name = resources.basenameOrAuthority(fileToPaste.resource); let candidate = resources.joinPath(targetFolder.resource, name); - while (true && !fileToPaste.allowOverwrite) { - if (!targetFolder.root.find(candidate)) { - break; - } - + while (!(fileToPaste.allowOverwrite || targetFolder.root.find(candidate))) { name = incrementFileName(name, !!fileToPaste.isDirectory); candidate = resources.joinPath(targetFolder.resource, name); } @@ -951,46 +947,42 @@ export const deleteFileHandler = (accessor: ServicesAccessor) => { let pasteShouldMove = false; export const copyFileHandler = (accessor: ServicesAccessor) => { const listService = accessor.get(IListService); - if (!listService.lastFocusedList) { - return; - } - const explorerContext = getContext(listService.lastFocusedList); - const explorerService = accessor.get(IExplorerService); - if (explorerContext.stat) { - const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; - explorerService.setToCopy(stats, false); - pasteShouldMove = false; + if (listService.lastFocusedList) { + const explorerContext = getContext(listService.lastFocusedList); + const explorerService = accessor.get(IExplorerService); + if (explorerContext.stat) { + const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; + explorerService.setToCopy(stats, false); + pasteShouldMove = false; + } } }; export const cutFileHandler = (accessor: ServicesAccessor) => { const listService = accessor.get(IListService); - if (!listService.lastFocusedList) { - return; - } - const explorerContext = getContext(listService.lastFocusedList); - const explorerService = accessor.get(IExplorerService); - if (explorerContext.stat) { - const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; - explorerService.setToCopy(stats, true); - pasteShouldMove = true; + if (listService.lastFocusedList) { + const explorerContext = getContext(listService.lastFocusedList); + const explorerService = accessor.get(IExplorerService); + if (explorerContext.stat) { + const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; + explorerService.setToCopy(stats, true); + pasteShouldMove = true; + } } }; export const DOWNLOAD_COMMAND_ID = 'explorer.download'; const downloadFileHandler = (accessor: ServicesAccessor) => { const listService = accessor.get(IListService); - if (!listService.lastFocusedList) { - return; - } - const explorerContext = getContext(listService.lastFocusedList); - const textFileService = accessor.get(ITextFileService); - - if (explorerContext.stat) { - const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; - stats.forEach(async s => { - await textFileService.saveAs(s.resource, undefined, { availableFileSystems: [Schemas.file] }); - }); + if (listService.lastFocusedList) { + const explorerContext = getContext(listService.lastFocusedList); + const textFileService = accessor.get(ITextFileService); + if (explorerContext.stat) { + const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; + stats.forEach(async s => { + await textFileService.saveAs(s.resource, undefined, { availableFileSystems: [Schemas.file] }); + }); + } } }; CommandsRegistry.registerCommand({ From c77c6603f9b489a03665a45a97bddca26b6358b1 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Tue, 16 Jul 2019 14:27:42 -0400 Subject: [PATCH 308/710] Fixed compilation errors --- src/vs/base/common/uri.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/common/uri.ts b/src/vs/base/common/uri.ts index 91f4c82cf37..b095d410d3f 100644 --- a/src/vs/base/common/uri.ts +++ b/src/vs/base/common/uri.ts @@ -67,7 +67,7 @@ function _schemeFix(scheme: string, _strict: boolean): string { return scheme; } console.trace('BAD uri lacks scheme, falling back to file-scheme.'); - scheme = 'file'; + return 'file'; } // implements a bit of https://tools.ietf.org/html/rfc3986#section-5 From bc78d5230aeea90d4bf0d1f0460adb701f79ec10 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Tue, 16 Jul 2019 14:29:41 -0400 Subject: [PATCH 309/710] Revert "Fixed compilation errors" This reverts commit b59ecadf6b1c3c84213b8300df8ba8ce962e6625. --- src/vs/base/common/uri.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/common/uri.ts b/src/vs/base/common/uri.ts index b095d410d3f..91f4c82cf37 100644 --- a/src/vs/base/common/uri.ts +++ b/src/vs/base/common/uri.ts @@ -67,7 +67,7 @@ function _schemeFix(scheme: string, _strict: boolean): string { return scheme; } console.trace('BAD uri lacks scheme, falling back to file-scheme.'); - return 'file'; + scheme = 'file'; } // implements a bit of https://tools.ietf.org/html/rfc3986#section-5 From eecec905e42466fc8d64bdd621eb43740c7ceee2 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Tue, 16 Jul 2019 14:29:43 -0400 Subject: [PATCH 310/710] Revert "Fixed formatting" This reverts commit ff8fc9aa75edd7d30d135ef49738754d421fa4fd. --- .../telemetry/common/errorTelemetry.ts | 44 +++++++------- .../contrib/files/browser/fileActions.ts | 60 +++++++++++-------- 2 files changed, 57 insertions(+), 47 deletions(-) diff --git a/src/vs/platform/telemetry/common/errorTelemetry.ts b/src/vs/platform/telemetry/common/errorTelemetry.ts index c3ec801c0a1..d58610ecc67 100644 --- a/src/vs/platform/telemetry/common/errorTelemetry.ts +++ b/src/vs/platform/telemetry/common/errorTelemetry.ts @@ -34,9 +34,7 @@ export namespace ErrorEvent { export function compare(a: ErrorEvent, b: ErrorEvent) { if (a.callstack < b.callstack) { return -1; - } - - if (a.callstack > b.callstack) { + } else if (a.callstack > b.callstack) { return 1; } return 0; @@ -77,21 +75,25 @@ export default abstract class BaseErrorTelemetry { private _onErrorEvent(err: any): void { - if (err) { - // unwrap nested errors from loader - if (err.detail && err.detail.stack) { - err = err.detail; - } - - // work around behavior in workerServer.ts that breaks up Error.stack - let callstack = Array.isArray(err.stack) ? err.stack.join('\n') : err.stack; - let msg = err.message ? err.message : safeStringify(err); - - // errors without a stack are not useful telemetry - if (callstack) { - this._enqueue({ msg, callstack }); - } + if (!err) { + return; } + + // unwrap nested errors from loader + if (err.detail && err.detail.stack) { + err = err.detail; + } + + // work around behavior in workerServer.ts that breaks up Error.stack + let callstack = Array.isArray(err.stack) ? err.stack.join('\n') : err.stack; + let msg = err.message ? err.message : safeStringify(err); + + // errors without a stack are not useful telemetry + if (!callstack) { + return; + } + + this._enqueue({ msg, callstack }); } protected _enqueue(e: ErrorEvent): void { @@ -100,10 +102,10 @@ export default abstract class BaseErrorTelemetry { if (idx < 0) { e.count = 1; this._buffer.splice(~idx, 0, e); - } else if (!this._buffer[idx].count) { - this._buffer[idx].count = 0; - } - else { + } else { + if (!this._buffer[idx].count) { + this._buffer[idx].count = 0; + } this._buffer[idx].count! += 1; } diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index 1a8089bde4a..4bde241c886 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -332,7 +332,11 @@ export function findValidPasteFileTarget(targetFolder: ExplorerItem, fileToPaste let name = resources.basenameOrAuthority(fileToPaste.resource); let candidate = resources.joinPath(targetFolder.resource, name); - while (!(fileToPaste.allowOverwrite || targetFolder.root.find(candidate))) { + while (true && !fileToPaste.allowOverwrite) { + if (!targetFolder.root.find(candidate)) { + break; + } + name = incrementFileName(name, !!fileToPaste.isDirectory); candidate = resources.joinPath(targetFolder.resource, name); } @@ -947,42 +951,46 @@ export const deleteFileHandler = (accessor: ServicesAccessor) => { let pasteShouldMove = false; export const copyFileHandler = (accessor: ServicesAccessor) => { const listService = accessor.get(IListService); - if (listService.lastFocusedList) { - const explorerContext = getContext(listService.lastFocusedList); - const explorerService = accessor.get(IExplorerService); - if (explorerContext.stat) { - const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; - explorerService.setToCopy(stats, false); - pasteShouldMove = false; - } + if (!listService.lastFocusedList) { + return; + } + const explorerContext = getContext(listService.lastFocusedList); + const explorerService = accessor.get(IExplorerService); + if (explorerContext.stat) { + const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; + explorerService.setToCopy(stats, false); + pasteShouldMove = false; } }; export const cutFileHandler = (accessor: ServicesAccessor) => { const listService = accessor.get(IListService); - if (listService.lastFocusedList) { - const explorerContext = getContext(listService.lastFocusedList); - const explorerService = accessor.get(IExplorerService); - if (explorerContext.stat) { - const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; - explorerService.setToCopy(stats, true); - pasteShouldMove = true; - } + if (!listService.lastFocusedList) { + return; + } + const explorerContext = getContext(listService.lastFocusedList); + const explorerService = accessor.get(IExplorerService); + if (explorerContext.stat) { + const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; + explorerService.setToCopy(stats, true); + pasteShouldMove = true; } }; export const DOWNLOAD_COMMAND_ID = 'explorer.download'; const downloadFileHandler = (accessor: ServicesAccessor) => { const listService = accessor.get(IListService); - if (listService.lastFocusedList) { - const explorerContext = getContext(listService.lastFocusedList); - const textFileService = accessor.get(ITextFileService); - if (explorerContext.stat) { - const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; - stats.forEach(async s => { - await textFileService.saveAs(s.resource, undefined, { availableFileSystems: [Schemas.file] }); - }); - } + if (!listService.lastFocusedList) { + return; + } + const explorerContext = getContext(listService.lastFocusedList); + const textFileService = accessor.get(ITextFileService); + + if (explorerContext.stat) { + const stats = explorerContext.selection.length > 1 ? explorerContext.selection : [explorerContext.stat]; + stats.forEach(async s => { + await textFileService.saveAs(s.resource, undefined, { availableFileSystems: [Schemas.file] }); + }); } }; CommandsRegistry.registerCommand({ From 47365df63c66a026a4255f1eff6a922ceec5610a Mon Sep 17 00:00:00 2001 From: pi1024e Date: Tue, 16 Jul 2019 14:30:25 -0400 Subject: [PATCH 311/710] Revert "Added clear input method to clear disposables." This reverts commit ce17e06dc3849db00e377f221c9e98fc3f11ba6c. --- src/vs/base/browser/ui/sash/sash.ts | 158 +++--- .../extensions/browser/extensionEditor.ts | 449 +++++++++--------- 2 files changed, 302 insertions(+), 305 deletions(-) diff --git a/src/vs/base/browser/ui/sash/sash.ts b/src/vs/base/browser/ui/sash/sash.ts index 100076e5c11..874bc9482e1 100644 --- a/src/vs/base/browser/ui/sash/sash.ts +++ b/src/vs/base/browser/ui/sash/sash.ts @@ -208,95 +208,93 @@ export class Sash extends Disposable { } } - if (this.state) { + if (!this.state) { + return; + } + // Select both iframes and webviews; internally Electron nests an iframe + // in its component, but this isn't queryable. + const iframes = [ + ...getElementsByTagName('iframe'), + ...getElementsByTagName('webview'), + ]; + for (const iframe of iframes) { + iframe.style.pointerEvents = 'none'; // disable mouse events on iframes as long as we drag the sash + } - // Select both iframes and webviews; internally Electron nests an iframe - // in its component, but this isn't queryable. - const iframes = [ - ...getElementsByTagName('webview'), - ...getElementsByTagName('iframe'), - ]; + const mouseDownEvent = new StandardMouseEvent(e); + const startX = mouseDownEvent.posx; + const startY = mouseDownEvent.posy; + const altKey = mouseDownEvent.altKey; + const startEvent: ISashEvent = { startX, currentX: startX, startY, currentY: startY, altKey }; + + addClass(this.el, 'active'); + this._onDidStart.fire(startEvent); + + // fix https://github.com/Microsoft/vscode/issues/21675 + const style = createStyleSheet(this.el); + const updateStyle = () => { + let cursor = ''; + + if (isMultisashResize) { + cursor = 'all-scroll'; + } else if (this.orientation === Orientation.HORIZONTAL) { + if (this.state === SashState.Minimum) { + cursor = 's-resize'; + } else if (this.state === SashState.Maximum) { + cursor = 'n-resize'; + } else { + cursor = isMacintosh ? 'row-resize' : 'ns-resize'; + } + } else { + if (this.state === SashState.Minimum) { + cursor = 'e-resize'; + } else if (this.state === SashState.Maximum) { + cursor = 'w-resize'; + } else { + cursor = isMacintosh ? 'col-resize' : 'ew-resize'; + } + } + + style.innerHTML = `* { cursor: ${cursor} !important; }`; + }; + + const disposables = new DisposableStore(); + + updateStyle(); + + if (!isMultisashResize) { + this.onDidEnablementChange(updateStyle, null, disposables); + } + + const onMouseMove = (e: MouseEvent) => { + EventHelper.stop(e, false); + const mouseMoveEvent = new StandardMouseEvent(e); + const event: ISashEvent = { startX, currentX: mouseMoveEvent.posx, startY, currentY: mouseMoveEvent.posy, altKey }; + + this._onDidChange.fire(event); + }; + + const onMouseUp = (e: MouseEvent) => { + EventHelper.stop(e, false); + + this.el.removeChild(style); + + removeClass(this.el, 'active'); + this._onDidEnd.fire(); + + disposables.dispose(); for (const iframe of iframes) { - iframe.style.pointerEvents = 'none'; // disable mouse events on iframes as long as we drag the sash + iframe.style.pointerEvents = 'auto'; } + }; - const mouseDownEvent = new StandardMouseEvent(e); - const startX = mouseDownEvent.posx; - const startY = mouseDownEvent.posy; - const altKey = mouseDownEvent.altKey; - const startEvent: ISashEvent = { startX, currentX: startX, startY, currentY: startY, altKey }; - - addClass(this.el, 'active'); - this._onDidStart.fire(startEvent); - - // fix https://github.com/Microsoft/vscode/issues/21675 - const style = createStyleSheet(this.el); - const updateStyle = () => { - let cursor = ''; - - if (isMultisashResize) { - cursor = 'all-scroll'; - } else if (this.orientation === Orientation.HORIZONTAL) { - if (this.state === SashState.Minimum) { - cursor = 's-resize'; - } else if (this.state === SashState.Maximum) { - cursor = 'n-resize'; - } else { - cursor = isMacintosh ? 'row-resize' : 'ns-resize'; - } - } else { - if (this.state === SashState.Minimum) { - cursor = 'e-resize'; - } else if (this.state === SashState.Maximum) { - cursor = 'w-resize'; - } else { - cursor = isMacintosh ? 'col-resize' : 'ew-resize'; - } - } - - style.innerHTML = `* { cursor: ${cursor} !important; }`; - }; - - const disposables = new DisposableStore(); - - updateStyle(); - - if (!isMultisashResize) { - this.onDidEnablementChange(updateStyle, null, disposables); - } - - const onMouseMove = (e: MouseEvent) => { - EventHelper.stop(e, false); - const mouseMoveEvent = new StandardMouseEvent(e); - const event: ISashEvent = { startX, currentX: mouseMoveEvent.posx, startY, currentY: mouseMoveEvent.posy, altKey }; - - this._onDidChange.fire(event); - }; - - const onMouseUp = (e: MouseEvent) => { - EventHelper.stop(e, false); - - this.el.removeChild(style); - - removeClass(this.el, 'active'); - this._onDidEnd.fire(); - - disposables.dispose(); - - for (const iframe of iframes) { - iframe.style.pointerEvents = 'auto'; - } - }; - - domEvent(window, 'mousemove')(onMouseMove, null, disposables); - domEvent(window, 'mouseup')(onMouseUp, null, disposables); - } + domEvent(window, 'mousemove')(onMouseMove, null, disposables); + domEvent(window, 'mouseup')(onMouseUp, null, disposables); } - private onMouseDoubleClick(event: MouseEvent): void { this._onDidReset.fire(); } diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index 2608272f4ce..2ab1851bda6 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -483,13 +483,6 @@ export class ExtensionEditor extends BaseEditor { })); } - clearInput(): void { - this.contentDisposables.clear(); - this.transientDisposables.clear(); - - super.clearInput(); - } - focus(): void { if (this.activeElement) { this.activeElement.focus(); @@ -591,38 +584,39 @@ export class ExtensionEditor extends BaseEditor { const content = $('div', { class: 'subcontent', tabindex: '0' }); return this.loadContents(() => this.extensionManifest!.get()) .then(manifest => { - if (manifest) { + if (!manifest) { + return content; + } - const scrollableContent = new DomScrollableElement(content, {}); + const scrollableContent = new DomScrollableElement(content, {}); - const layout = () => scrollableContent.scanDomNode(); - const removeLayoutParticipant = arrays.insert(this.layoutParticipants, { layout }); - this.contentDisposables.add(toDisposable(removeLayoutParticipant)); + const layout = () => scrollableContent.scanDomNode(); + const removeLayoutParticipant = arrays.insert(this.layoutParticipants, { layout }); + this.contentDisposables.add(toDisposable(removeLayoutParticipant)); - const renders = [ - this.renderSettings(content, manifest, layout), - this.renderCommands(content, manifest, layout), - this.renderLanguages(content, manifest, layout), - this.renderColorThemes(content, manifest, layout), - this.renderIconThemes(content, manifest, layout), - this.renderColors(content, manifest, layout), - this.renderJSONValidation(content, manifest, layout), - this.renderDebuggers(content, manifest, layout), - this.renderViewContainers(content, manifest, layout), - this.renderViews(content, manifest, layout), - this.renderLocalizations(content, manifest, layout) - ]; + const renders = [ + this.renderSettings(content, manifest, layout), + this.renderCommands(content, manifest, layout), + this.renderLanguages(content, manifest, layout), + this.renderColorThemes(content, manifest, layout), + this.renderIconThemes(content, manifest, layout), + this.renderColors(content, manifest, layout), + this.renderJSONValidation(content, manifest, layout), + this.renderDebuggers(content, manifest, layout), + this.renderViewContainers(content, manifest, layout), + this.renderViews(content, manifest, layout), + this.renderLocalizations(content, manifest, layout) + ]; - scrollableContent.scanDomNode(); + scrollableContent.scanDomNode(); - const isEmpty = !renders.some(x => x); - if (isEmpty) { - append(content, $('p.nocontent')).textContent = localize('noContributions', "No Contributions"); - append(this.content, content); - } else { - append(this.content, scrollableContent.getDomNode()); - this.contentDisposables.add(scrollableContent); - } + const isEmpty = !renders.some(x => x); + if (isEmpty) { + append(content, $('p.nocontent')).textContent = localize('noContributions', "No Contributions"); + append(this.content, content); + } else { + append(this.content, scrollableContent.getDomNode()); + this.contentDisposables.add(scrollableContent); } return content; }, () => { @@ -690,51 +684,53 @@ export class ExtensionEditor extends BaseEditor { } const contrib = properties ? Object.keys(properties) : []; - if (contrib.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('settings', "Settings ({0})", contrib.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('setting name', "Name")), - $('th', undefined, localize('description', "Description")), - $('th', undefined, localize('default', "Default")) - ), - ...contrib.map(key => $('tr', undefined, - $('td', undefined, $('code', undefined, key)), - $('td', undefined, properties[key].description), - $('td', undefined, $('code', undefined, `${isUndefined(properties[key].default) ? getDefaultValue(properties[key].type) : properties[key].default}`)) - )) - ) - ); - - append(container, details); - return true; + if (!contrib.length) { + return false; } - return false; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('settings', "Settings ({0})", contrib.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('setting name', "Name")), + $('th', undefined, localize('description', "Description")), + $('th', undefined, localize('default', "Default")) + ), + ...contrib.map(key => $('tr', undefined, + $('td', undefined, $('code', undefined, key)), + $('td', undefined, properties[key].description), + $('td', undefined, $('code', undefined, `${isUndefined(properties[key].default) ? getDefaultValue(properties[key].type) : properties[key].default}`)) + )) + ) + ); + + append(container, details); + return true; } private renderDebuggers(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { const contributes = manifest.contributes; const contrib = contributes && contributes.debuggers || []; - if (contrib.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('debuggers', "Debuggers ({0})", contrib.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('debugger name', "Name")), - $('th', undefined, localize('debugger type', "Type")), - ), - ...contrib.map(d => $('tr', undefined, - $('td', undefined, d.label!), - $('td', undefined, d.type))) - ) - ); - - append(container, details); - return true; + if (!contrib.length) { + return false; } - return false; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('debuggers', "Debuggers ({0})", contrib.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('debugger name', "Name")), + $('th', undefined, localize('debugger type', "Type")), + ), + ...contrib.map(d => $('tr', undefined, + $('td', undefined, d.label!), + $('td', undefined, d.type))) + ) + ); + + append(container, details); + return true; } private renderViewContainers(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -747,19 +743,20 @@ export class ExtensionEditor extends BaseEditor { return result; }, [] as Array<{ id: string, title: string, location: string }>); - if (viewContainers.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('viewContainers', "View Containers ({0})", viewContainers.length)), - $('table', undefined, - $('tr', undefined, $('th', undefined, localize('view container id', "ID")), $('th', undefined, localize('view container title', "Title")), $('th', undefined, localize('view container location', "Where"))), - ...viewContainers.map(viewContainer => $('tr', undefined, $('td', undefined, viewContainer.id), $('td', undefined, viewContainer.title), $('td', undefined, viewContainer.location))) - ) - ); - - append(container, details); - return true; + if (!viewContainers.length) { + return false; } - return false; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('viewContainers', "View Containers ({0})", viewContainers.length)), + $('table', undefined, + $('tr', undefined, $('th', undefined, localize('view container id', "ID")), $('th', undefined, localize('view container title', "Title")), $('th', undefined, localize('view container location', "Where"))), + ...viewContainers.map(viewContainer => $('tr', undefined, $('td', undefined, viewContainer.id), $('td', undefined, viewContainer.title), $('td', undefined, viewContainer.location))) + ) + ); + + append(container, details); + return true; } private renderViews(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -772,19 +769,20 @@ export class ExtensionEditor extends BaseEditor { return result; }, [] as Array<{ id: string, name: string, location: string }>); - if (views.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('views', "Views ({0})", views.length)), - $('table', undefined, - $('tr', undefined, $('th', undefined, localize('view id', "ID")), $('th', undefined, localize('view name', "Name")), $('th', undefined, localize('view location', "Where"))), - ...views.map(view => $('tr', undefined, $('td', undefined, view.id), $('td', undefined, view.name), $('td', undefined, view.location))) - ) - ); - - append(container, details); - return true; + if (!views.length) { + return false; } - return false; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('views', "Views ({0})", views.length)), + $('table', undefined, + $('tr', undefined, $('th', undefined, localize('view id', "ID")), $('th', undefined, localize('view name', "Name")), $('th', undefined, localize('view location', "Where"))), + ...views.map(view => $('tr', undefined, $('td', undefined, view.id), $('td', undefined, view.name), $('td', undefined, view.location))) + ) + ); + + append(container, details); + return true; } private renderLocalizations(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -845,46 +843,44 @@ export class ExtensionEditor extends BaseEditor { const contributes = manifest.contributes; const colors = contributes && contributes.colors; - if (colors && colors.length) { - - - - function colorPreview(colorReference: string): Node[] { - let result: Node[] = []; - if (colorReference && colorReference[0] === '#') { - let color = Color.fromHex(colorReference); - if (color) { - result.push($('span', { class: 'colorBox', style: 'background-color: ' + Color.Format.CSS.format(color) }, '')); - } - } - result.push($('code', undefined, colorReference)); - return result; - } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('colors', "Colors ({0})", colors.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('colorId', "Id")), - $('th', undefined, localize('description', "Description")), - $('th', undefined, localize('defaultDark', "Dark Default")), - $('th', undefined, localize('defaultLight', "Light Default")), - $('th', undefined, localize('defaultHC', "High Contrast Default")) - ), - ...colors.map(color => $('tr', undefined, - $('td', undefined, $('code', undefined, color.id)), - $('td', undefined, color.description), - $('td', undefined, ...colorPreview(color.defaults.dark)), - $('td', undefined, ...colorPreview(color.defaults.light)), - $('td', undefined, ...colorPreview(color.defaults.highContrast)) - )) - ) - ); - - append(container, details); - return true; + if (!colors || !colors.length) { + return false; } - return false; + + function colorPreview(colorReference: string): Node[] { + let result: Node[] = []; + if (colorReference && colorReference[0] === '#') { + let color = Color.fromHex(colorReference); + if (color) { + result.push($('span', { class: 'colorBox', style: 'background-color: ' + Color.Format.CSS.format(color) }, '')); + } + } + result.push($('code', undefined, colorReference)); + return result; + } + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('colors', "Colors ({0})", colors.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('colorId', "Id")), + $('th', undefined, localize('description', "Description")), + $('th', undefined, localize('defaultDark', "Dark Default")), + $('th', undefined, localize('defaultLight', "Light Default")), + $('th', undefined, localize('defaultHC', "High Contrast Default")) + ), + ...colors.map(color => $('tr', undefined, + $('td', undefined, $('code', undefined, color.id)), + $('td', undefined, color.description), + $('td', undefined, ...colorPreview(color.defaults.dark)), + $('td', undefined, ...colorPreview(color.defaults.light)), + $('td', undefined, ...colorPreview(color.defaults.highContrast)) + )) + ) + ); + + append(container, details); + return true; } @@ -892,23 +888,24 @@ export class ExtensionEditor extends BaseEditor { const contributes = manifest.contributes; const contrib = contributes && contributes.jsonValidation || []; - if (contrib.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('JSON Validation', "JSON Validation ({0})", contrib.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('fileMatch', "File Match")), - $('th', undefined, localize('schema', "Schema")) - ), - ...contrib.map(v => $('tr', undefined, - $('td', undefined, $('code', undefined, v.fileMatch)), - $('td', undefined, v.url) - )))); - - append(container, details); - return true; + if (!contrib.length) { + return false; } - return false; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('JSON Validation', "JSON Validation ({0})", contrib.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('fileMatch', "File Match")), + $('th', undefined, localize('schema', "Schema")) + ), + ...contrib.map(v => $('tr', undefined, + $('td', undefined, $('code', undefined, v.fileMatch)), + $('td', undefined, v.url) + )))); + + append(container, details); + return true; } private renderCommands(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -944,52 +941,51 @@ export class ExtensionEditor extends BaseEditor { rawKeybindings.forEach(rawKeybinding => { const keybinding = this.resolveKeybinding(rawKeybinding); - if (keybinding) { - - let command = byId[rawKeybinding.command]; - - if (command) { - command.keybindings.push(keybinding); - } else { - command = { id: rawKeybinding.command, title: '', keybindings: [keybinding], menus: [] }; - byId[command.id] = command; - commands.push(command); - } + if (!keybinding) { + return; + } + + let command = byId[rawKeybinding.command]; + + if (!command) { + command = { id: rawKeybinding.command, title: '', keybindings: [keybinding], menus: [] }; + byId[command.id] = command; + commands.push(command); + } else { + command.keybindings.push(keybinding); } - return; }); - if (commands.length) { - - - const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => { - const element = $(''); - new KeybindingLabel(element, OS).set(keybinding); - return element; - }; - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('commands', "Commands ({0})", commands.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('command name', "Name")), - $('th', undefined, localize('description', "Description")), - $('th', undefined, localize('keyboard shortcuts', "Keyboard Shortcuts")), - $('th', undefined, localize('menuContexts', "Menu Contexts")) - ), - ...commands.map(c => $('tr', undefined, - $('td', undefined, $('code', undefined, c.id)), - $('td', undefined, c.title), - $('td', undefined, ...c.keybindings.map(keybinding => renderKeybinding(keybinding))), - $('td', undefined, ...c.menus.map(context => $('code', undefined, context))) - )) - ) - ); - - append(container, details); - return true; + if (!commands.length) { + return false; } - return false; + + const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => { + const element = $(''); + new KeybindingLabel(element, OS).set(keybinding); + return element; + }; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('commands', "Commands ({0})", commands.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('command name', "Name")), + $('th', undefined, localize('description', "Description")), + $('th', undefined, localize('keyboard shortcuts', "Keyboard Shortcuts")), + $('th', undefined, localize('menuContexts', "Menu Contexts")) + ), + ...commands.map(c => $('tr', undefined, + $('td', undefined, $('code', undefined, c.id)), + $('td', undefined, c.title), + $('td', undefined, ...c.keybindings.map(keybinding => renderKeybinding(keybinding))), + $('td', undefined, ...c.menus.map(context => $('code', undefined, context))) + )) + ) + ); + + append(container, details); + return true; } private renderLanguages(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -1010,12 +1006,12 @@ export class ExtensionEditor extends BaseEditor { grammars.forEach(grammar => { let language = byId[grammar.language]; - if (language) { - language.hasGrammar = true; - } else { + if (!language) { language = { id: grammar.language, name: grammar.language, extensions: [], hasGrammar: true, hasSnippets: false }; byId[language.id] = language; languages.push(language); + } else { + language.hasGrammar = true; } }); @@ -1024,40 +1020,41 @@ export class ExtensionEditor extends BaseEditor { snippets.forEach(snippet => { let language = byId[snippet.language]; - if (language) { - language.hasSnippets = true; - } else { + if (!language) { language = { id: snippet.language, name: snippet.language, extensions: [], hasGrammar: false, hasSnippets: true }; byId[language.id] = language; languages.push(language); + } else { + language.hasSnippets = true; } }); - if (languages.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('languages', "Languages ({0})", languages.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('language id', "ID")), - $('th', undefined, localize('language name', "Name")), - $('th', undefined, localize('file extensions', "File Extensions")), - $('th', undefined, localize('grammar', "Grammar")), - $('th', undefined, localize('snippets', "Snippets")) - ), - ...languages.map(l => $('tr', undefined, - $('td', undefined, l.id), - $('td', undefined, l.name), - $('td', undefined, ...join(l.extensions.map(ext => $('code', undefined, ext)), ' ')), - $('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '—')), - $('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : '—')) - )) - ) - ); - - append(container, details); - return true; + if (!languages.length) { + return false; } - return false; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('languages', "Languages ({0})", languages.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('language id', "ID")), + $('th', undefined, localize('language name', "Name")), + $('th', undefined, localize('file extensions', "File Extensions")), + $('th', undefined, localize('grammar', "Grammar")), + $('th', undefined, localize('snippets', "Snippets")) + ), + ...languages.map(l => $('tr', undefined, + $('td', undefined, l.id), + $('td', undefined, l.name), + $('td', undefined, ...join(l.extensions.map(ext => $('code', undefined, ext)), ' ')), + $('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '—')), + $('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : '—')) + )) + ) + ); + + append(container, details); + return true; } private resolveKeybinding(rawKeyBinding: IKeyBinding): ResolvedKeybinding | null { @@ -1070,10 +1067,11 @@ export class ExtensionEditor extends BaseEditor { } const keyBinding = KeybindingParser.parseKeybinding(key || rawKeyBinding.key, OS); - if (keyBinding) { - return this.keybindingService.resolveKeybinding(keyBinding)[0]; + if (!keyBinding) { + return null; } - return null; + + return this.keybindingService.resolveKeybinding(keyBinding)[0]; } private loadContents(loadingTask: () => CacheResult): Promise { @@ -1096,6 +1094,7 @@ export class ExtensionEditor extends BaseEditor { if (isPromiseCanceledError(err)) { return; } + this.notificationService.error(err); } } From 2d7f80baad30033428e6b8393eb3ce15e1a27c72 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Tue, 16 Jul 2019 14:32:32 -0400 Subject: [PATCH 312/710] Undid unneccesary changes for the sake of the pull request. --- src/vs/base/common/uri.ts | 3 +-- .../contrib/extensions/browser/extensionEditor.ts | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vs/base/common/uri.ts b/src/vs/base/common/uri.ts index 91f4c82cf37..84ec8f67caf 100644 --- a/src/vs/base/common/uri.ts +++ b/src/vs/base/common/uri.ts @@ -50,7 +50,6 @@ function _validateUri(ret: URI, _strict?: boolean): void { } } else if (_doubleSlashStart.test(ret.path)) { throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); - } } } @@ -67,7 +66,7 @@ function _schemeFix(scheme: string, _strict: boolean): string { return scheme; } console.trace('BAD uri lacks scheme, falling back to file-scheme.'); - scheme = 'file'; + return 'file'; } // implements a bit of https://tools.ietf.org/html/rfc3986#section-5 diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index 2ab1851bda6..97c6b0ddc9a 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -483,6 +483,13 @@ export class ExtensionEditor extends BaseEditor { })); } + clearInput(): void { + this.contentDisposables.clear(); + this.transientDisposables.clear(); + + super.clearInput(); + } + focus(): void { if (this.activeElement) { this.activeElement.focus(); From 920963a1c8ffa777222b18f7fe0dd5db5cb151bb Mon Sep 17 00:00:00 2001 From: pi1024e Date: Tue, 16 Jul 2019 14:35:26 -0400 Subject: [PATCH 313/710] Revert "Fixed compilation errors" This reverts commit b59ecadf6b1c3c84213b8300df8ba8ce962e6625. --- src/vs/base/common/uri.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/common/uri.ts b/src/vs/base/common/uri.ts index 84ec8f67caf..801b515cc7d 100644 --- a/src/vs/base/common/uri.ts +++ b/src/vs/base/common/uri.ts @@ -66,7 +66,7 @@ function _schemeFix(scheme: string, _strict: boolean): string { return scheme; } console.trace('BAD uri lacks scheme, falling back to file-scheme.'); - return 'file'; + scheme = 'file'; } // implements a bit of https://tools.ietf.org/html/rfc3986#section-5 From 1b0fd26a4ce284548d2d4b7322adf2ced3369bd7 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Tue, 16 Jul 2019 14:36:34 -0400 Subject: [PATCH 314/710] Undid uri.ts changes --- src/vs/base/common/uri.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/base/common/uri.ts b/src/vs/base/common/uri.ts index 801b515cc7d..8f9274c8531 100644 --- a/src/vs/base/common/uri.ts +++ b/src/vs/base/common/uri.ts @@ -62,11 +62,11 @@ function _schemeFix(scheme: string, _strict: boolean): string { if (_strict || _throwOnMissingSchema) { return scheme || _empty; } - if (scheme) { - return scheme; + if (!scheme) { + console.trace('BAD uri lacks scheme, falling back to file-scheme.'); + scheme = 'file'; } - console.trace('BAD uri lacks scheme, falling back to file-scheme.'); - scheme = 'file'; + return scheme; } // implements a bit of https://tools.ietf.org/html/rfc3986#section-5 From a1f354204e7888a199a51162379e9ca7e9ce1a5e Mon Sep 17 00:00:00 2001 From: pi1024e Date: Wed, 17 Jul 2019 11:09:01 -0400 Subject: [PATCH 315/710] Update uri.ts --- src/vs/base/common/uri.ts | 52 +++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/src/vs/base/common/uri.ts b/src/vs/base/common/uri.ts index 8f9274c8531..966555e04d0 100644 --- a/src/vs/base/common/uri.ts +++ b/src/vs/base/common/uri.ts @@ -48,8 +48,10 @@ function _validateUri(ret: URI, _strict?: boolean): void { if (!_singleSlashStart.test(ret.path)) { throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character'); } - } else if (_doubleSlashStart.test(ret.path)) { - throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); + } else { + if (_doubleSlashStart.test(ret.path)) { + throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); + } } } } @@ -114,17 +116,17 @@ export class URI implements UriComponents { if (thing instanceof URI) { return true; } - if (thing) { - return typeof (thing).authority === 'string' - && typeof (thing).fragment === 'string' - && typeof (thing).path === 'string' - && typeof (thing).query === 'string' - && typeof (thing).scheme === 'string' - && typeof (thing).fsPath === 'function' - && typeof (thing).with === 'function' - && typeof (thing).toString === 'function'; + if (!thing) { + return false; } - return false; + return typeof (thing).authority === 'string' + && typeof (thing).fragment === 'string' + && typeof (thing).path === 'string' + && typeof (thing).query === 'string' + && typeof (thing).scheme === 'string' + && typeof (thing).fsPath === 'function' + && typeof (thing).with === 'function' + && typeof (thing).toString === 'function'; } /** @@ -279,17 +281,17 @@ export class URI implements UriComponents { */ static parse(value: string, _strict: boolean = false): URI { const match = _regexp.exec(value); - if (match) { - return new _URI( - match[2] || _empty, - decodeURIComponent(match[4] || _empty), - decodeURIComponent(match[5] || _empty), - decodeURIComponent(match[7] || _empty), - decodeURIComponent(match[9] || _empty), - _strict - ); + if (!match) { + return new _URI(_empty, _empty, _empty, _empty, _empty); } - return new _URI(_empty, _empty, _empty, _empty, _empty); + return new _URI( + match[2] || _empty, + decodeURIComponent(match[4] || _empty), + decodeURIComponent(match[5] || _empty), + decodeURIComponent(match[7] || _empty), + decodeURIComponent(match[9] || _empty), + _strict + ); } /** @@ -558,8 +560,10 @@ function encodeURIComponentMinimal(path: string): string { res = path.substr(0, pos); } res += encodeTable[code]; - } else if (res !== undefined) { - res += path[pos]; + } else { + if (res !== undefined) { + res += path[pos]; + } } } return res !== undefined ? res : path; From 083cca443a23ce9728e84bd7fa6c15286e9df326 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Wed, 17 Jul 2019 11:25:59 -0400 Subject: [PATCH 316/710] Edits --- .../extensions/browser/extensionEditor.ts | 158 +++++++++--------- 1 file changed, 82 insertions(+), 76 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index 97c6b0ddc9a..9bd3c5a5ba0 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -719,25 +719,25 @@ export class ExtensionEditor extends BaseEditor { const contributes = manifest.contributes; const contrib = contributes && contributes.debuggers || []; - if (!contrib.length) { - return false; + if (contrib.length) { + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('debuggers', "Debuggers ({0})", contrib.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('debugger name', "Name")), + $('th', undefined, localize('debugger type', "Type")), + ), + ...contrib.map(d => $('tr', undefined, + $('td', undefined, d.label!), + $('td', undefined, d.type))) + ) + ); + + append(container, details); + return true; } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('debuggers', "Debuggers ({0})", contrib.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('debugger name', "Name")), - $('th', undefined, localize('debugger type', "Type")), - ), - ...contrib.map(d => $('tr', undefined, - $('td', undefined, d.label!), - $('td', undefined, d.type))) - ) - ); - - append(container, details); - return true; + return false; } private renderViewContainers(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -750,20 +750,21 @@ export class ExtensionEditor extends BaseEditor { return result; }, [] as Array<{ id: string, title: string, location: string }>); - if (!viewContainers.length) { - return false; + if (viewContainers.length) { + + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('viewContainers', "View Containers ({0})", viewContainers.length)), + $('table', undefined, + $('tr', undefined, $('th', undefined, localize('view container id', "ID")), $('th', undefined, localize('view container title', "Title")), $('th', undefined, localize('view container location', "Where"))), + ...viewContainers.map(viewContainer => $('tr', undefined, $('td', undefined, viewContainer.id), $('td', undefined, viewContainer.title), $('td', undefined, viewContainer.location))) + ) + ); + + append(container, details); + return true; } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('viewContainers', "View Containers ({0})", viewContainers.length)), - $('table', undefined, - $('tr', undefined, $('th', undefined, localize('view container id', "ID")), $('th', undefined, localize('view container title', "Title")), $('th', undefined, localize('view container location', "Where"))), - ...viewContainers.map(viewContainer => $('tr', undefined, $('td', undefined, viewContainer.id), $('td', undefined, viewContainer.title), $('td', undefined, viewContainer.location))) - ) - ); - - append(container, details); - return true; + return false; } private renderViews(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -776,49 +777,49 @@ export class ExtensionEditor extends BaseEditor { return result; }, [] as Array<{ id: string, name: string, location: string }>); - if (!views.length) { - return false; + if (views.length) { + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('views', "Views ({0})", views.length)), + $('table', undefined, + $('tr', undefined, $('th', undefined, localize('view id', "ID")), $('th', undefined, localize('view name', "Name")), $('th', undefined, localize('view location', "Where"))), + ...views.map(view => $('tr', undefined, $('td', undefined, view.id), $('td', undefined, view.name), $('td', undefined, view.location))) + ) + ); + + append(container, details); + return true; } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('views', "Views ({0})", views.length)), - $('table', undefined, - $('tr', undefined, $('th', undefined, localize('view id', "ID")), $('th', undefined, localize('view name', "Name")), $('th', undefined, localize('view location', "Where"))), - ...views.map(view => $('tr', undefined, $('td', undefined, view.id), $('td', undefined, view.name), $('td', undefined, view.location))) - ) - ); - - append(container, details); - return true; + return false; } private renderLocalizations(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { const contributes = manifest.contributes; const localizations = contributes && contributes.localizations || []; - if (!localizations.length) { - return false; + if (localizations.length) { + + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('localizations', "Localizations ({0})", localizations.length)), + $('table', undefined, + $('tr', undefined, $('th', undefined, localize('localizations language id', "Language Id")), $('th', undefined, localize('localizations language name', "Language Name")), $('th', undefined, localize('localizations localized language name', "Language Name (Localized)"))), + ...localizations.map(localization => $('tr', undefined, $('td', undefined, localization.languageId), $('td', undefined, localization.languageName || ''), $('td', undefined, localization.localizedLanguageName || ''))) + ) + ); + + append(container, details); + return true; } - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('localizations', "Localizations ({0})", localizations.length)), - $('table', undefined, - $('tr', undefined, $('th', undefined, localize('localizations language id', "Language Id")), $('th', undefined, localize('localizations language name', "Language Name")), $('th', undefined, localize('localizations localized language name', "Language Name (Localized)"))), - ...localizations.map(localization => $('tr', undefined, $('td', undefined, localization.languageId), $('td', undefined, localization.languageName || ''), $('td', undefined, localization.localizedLanguageName || ''))) - ) - ); - - append(container, details); - return true; + return false; } private renderColorThemes(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { const contributes = manifest.contributes; const contrib = contributes && contributes.themes || []; - if (!contrib.length) { - return false; - } + if (contrib.length) { + const details = $('details', { open: true, ontoggle: onDetailsToggle }, $('summary', undefined, localize('colorThemes', "Color Themes ({0})", contrib.length)), @@ -827,15 +828,15 @@ export class ExtensionEditor extends BaseEditor { append(container, details); return true; + } return false; } private renderIconThemes(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { const contributes = manifest.contributes; const contrib = contributes && contributes.iconThemes || []; - if (!contrib.length) { - return false; - } + if (contrib.length) { + const details = $('details', { open: true, ontoggle: onDetailsToggle }, $('summary', undefined, localize('iconThemes', "Icon Themes ({0})", contrib.length)), @@ -844,13 +845,15 @@ export class ExtensionEditor extends BaseEditor { append(container, details); return true; + } + return false; } private renderColors(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { const contributes = manifest.contributes; const colors = contributes && contributes.colors; - if (!colors || !colors.length) { + if (!(colors && colors.length)) { return false; } @@ -954,18 +957,18 @@ export class ExtensionEditor extends BaseEditor { let command = byId[rawKeybinding.command]; - if (!command) { + if (command) { + command.keybindings.push(keybinding); + + } else { command = { id: rawKeybinding.command, title: '', keybindings: [keybinding], menus: [] }; byId[command.id] = command; commands.push(command); - } else { - command.keybindings.push(keybinding); } }); - if (!commands.length) { - return false; - } + if (commands.length) { + const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => { const element = $(''); @@ -993,6 +996,7 @@ export class ExtensionEditor extends BaseEditor { append(container, details); return true; + } return false; } private renderLanguages(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -1036,9 +1040,8 @@ export class ExtensionEditor extends BaseEditor { } }); - if (!languages.length) { - return false; - } + if (languages.length) { + const details = $('details', { open: true, ontoggle: onDetailsToggle }, $('summary', undefined, localize('languages', "Languages ({0})", languages.length)), @@ -1062,6 +1065,7 @@ export class ExtensionEditor extends BaseEditor { append(container, details); return true; + } return false; } private resolveKeybinding(rawKeyBinding: IKeyBinding): ResolvedKeybinding | null { @@ -1074,11 +1078,13 @@ export class ExtensionEditor extends BaseEditor { } const keyBinding = KeybindingParser.parseKeybinding(key || rawKeyBinding.key, OS); - if (!keyBinding) { - return null; + if (keyBinding) { + return this.keybindingService.resolveKeybinding(keyBinding)[0]; } - return this.keybindingService.resolveKeybinding(keyBinding)[0]; + return null; + + } private loadContents(loadingTask: () => CacheResult): Promise { From afcd2bc310cbf2703d9e817a2d38a804d86b7072 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Wed, 17 Jul 2019 11:33:58 -0400 Subject: [PATCH 317/710] Fixed formatting --- .../extensions/browser/extensionEditor.ts | 117 +++++++++--------- 1 file changed, 58 insertions(+), 59 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index 9bd3c5a5ba0..0e9dc8ff736 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -821,13 +821,13 @@ export class ExtensionEditor extends BaseEditor { if (contrib.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('colorThemes', "Color Themes ({0})", contrib.length)), - $('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label))) - ); + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('colorThemes', "Color Themes ({0})", contrib.length)), + $('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label))) + ); - append(container, details); - return true; + append(container, details); + return true; } return false; } @@ -838,13 +838,13 @@ export class ExtensionEditor extends BaseEditor { if (contrib.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('iconThemes', "Icon Themes ({0})", contrib.length)), - $('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label))) - ); + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('iconThemes', "Icon Themes ({0})", contrib.length)), + $('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label))) + ); - append(container, details); - return true; + append(container, details); + return true; } return false; } @@ -970,33 +970,33 @@ export class ExtensionEditor extends BaseEditor { if (commands.length) { - const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => { - const element = $(''); - new KeybindingLabel(element, OS).set(keybinding); - return element; - }; + const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => { + const element = $(''); + new KeybindingLabel(element, OS).set(keybinding); + return element; + }; - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('commands', "Commands ({0})", commands.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('command name', "Name")), - $('th', undefined, localize('description', "Description")), - $('th', undefined, localize('keyboard shortcuts', "Keyboard Shortcuts")), - $('th', undefined, localize('menuContexts', "Menu Contexts")) - ), - ...commands.map(c => $('tr', undefined, - $('td', undefined, $('code', undefined, c.id)), - $('td', undefined, c.title), - $('td', undefined, ...c.keybindings.map(keybinding => renderKeybinding(keybinding))), - $('td', undefined, ...c.menus.map(context => $('code', undefined, context))) - )) - ) - ); + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('commands', "Commands ({0})", commands.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('command name', "Name")), + $('th', undefined, localize('description', "Description")), + $('th', undefined, localize('keyboard shortcuts', "Keyboard Shortcuts")), + $('th', undefined, localize('menuContexts', "Menu Contexts")) + ), + ...commands.map(c => $('tr', undefined, + $('td', undefined, $('code', undefined, c.id)), + $('td', undefined, c.title), + $('td', undefined, ...c.keybindings.map(keybinding => renderKeybinding(keybinding))), + $('td', undefined, ...c.menus.map(context => $('code', undefined, context))) + )) + ) + ); - append(container, details); - return true; - } return false; + append(container, details); + return true; + } return false; } private renderLanguages(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -1043,28 +1043,28 @@ export class ExtensionEditor extends BaseEditor { if (languages.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('languages', "Languages ({0})", languages.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('language id', "ID")), - $('th', undefined, localize('language name', "Name")), - $('th', undefined, localize('file extensions', "File Extensions")), - $('th', undefined, localize('grammar', "Grammar")), - $('th', undefined, localize('snippets', "Snippets")) - ), - ...languages.map(l => $('tr', undefined, - $('td', undefined, l.id), - $('td', undefined, l.name), - $('td', undefined, ...join(l.extensions.map(ext => $('code', undefined, ext)), ' ')), - $('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '—')), - $('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : '—')) - )) - ) - ); + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('languages', "Languages ({0})", languages.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('language id', "ID")), + $('th', undefined, localize('language name', "Name")), + $('th', undefined, localize('file extensions', "File Extensions")), + $('th', undefined, localize('grammar', "Grammar")), + $('th', undefined, localize('snippets', "Snippets")) + ), + ...languages.map(l => $('tr', undefined, + $('td', undefined, l.id), + $('td', undefined, l.name), + $('td', undefined, ...join(l.extensions.map(ext => $('code', undefined, ext)), ' ')), + $('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '—')), + $('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : '—')) + )) + ) + ); - append(container, details); - return true; + append(container, details); + return true; } return false; } @@ -1084,7 +1084,6 @@ export class ExtensionEditor extends BaseEditor { return null; - } private loadContents(loadingTask: () => CacheResult): Promise { From d928313dd581b56645f75525b8ea6f6a48eab3b2 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Wed, 17 Jul 2019 11:45:25 -0400 Subject: [PATCH 318/710] Revert "Fixed formatting" This reverts commit 30d7dc8a3f5ef8a8d8a702da2dc4517a0f64f1d4. --- .../extensions/browser/extensionEditor.ts | 117 +++++++++--------- 1 file changed, 59 insertions(+), 58 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index 0e9dc8ff736..9bd3c5a5ba0 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -821,13 +821,13 @@ export class ExtensionEditor extends BaseEditor { if (contrib.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('colorThemes', "Color Themes ({0})", contrib.length)), - $('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label))) - ); + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('colorThemes', "Color Themes ({0})", contrib.length)), + $('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label))) + ); - append(container, details); - return true; + append(container, details); + return true; } return false; } @@ -838,13 +838,13 @@ export class ExtensionEditor extends BaseEditor { if (contrib.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('iconThemes', "Icon Themes ({0})", contrib.length)), - $('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label))) - ); + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('iconThemes', "Icon Themes ({0})", contrib.length)), + $('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label))) + ); - append(container, details); - return true; + append(container, details); + return true; } return false; } @@ -970,33 +970,33 @@ export class ExtensionEditor extends BaseEditor { if (commands.length) { - const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => { - const element = $(''); - new KeybindingLabel(element, OS).set(keybinding); - return element; - }; + const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => { + const element = $(''); + new KeybindingLabel(element, OS).set(keybinding); + return element; + }; - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('commands', "Commands ({0})", commands.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('command name', "Name")), - $('th', undefined, localize('description', "Description")), - $('th', undefined, localize('keyboard shortcuts', "Keyboard Shortcuts")), - $('th', undefined, localize('menuContexts', "Menu Contexts")) - ), - ...commands.map(c => $('tr', undefined, - $('td', undefined, $('code', undefined, c.id)), - $('td', undefined, c.title), - $('td', undefined, ...c.keybindings.map(keybinding => renderKeybinding(keybinding))), - $('td', undefined, ...c.menus.map(context => $('code', undefined, context))) - )) - ) - ); + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('commands', "Commands ({0})", commands.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('command name', "Name")), + $('th', undefined, localize('description', "Description")), + $('th', undefined, localize('keyboard shortcuts', "Keyboard Shortcuts")), + $('th', undefined, localize('menuContexts', "Menu Contexts")) + ), + ...commands.map(c => $('tr', undefined, + $('td', undefined, $('code', undefined, c.id)), + $('td', undefined, c.title), + $('td', undefined, ...c.keybindings.map(keybinding => renderKeybinding(keybinding))), + $('td', undefined, ...c.menus.map(context => $('code', undefined, context))) + )) + ) + ); - append(container, details); - return true; - } return false; + append(container, details); + return true; + } return false; } private renderLanguages(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -1043,28 +1043,28 @@ export class ExtensionEditor extends BaseEditor { if (languages.length) { - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('languages', "Languages ({0})", languages.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('language id', "ID")), - $('th', undefined, localize('language name', "Name")), - $('th', undefined, localize('file extensions', "File Extensions")), - $('th', undefined, localize('grammar', "Grammar")), - $('th', undefined, localize('snippets', "Snippets")) - ), - ...languages.map(l => $('tr', undefined, - $('td', undefined, l.id), - $('td', undefined, l.name), - $('td', undefined, ...join(l.extensions.map(ext => $('code', undefined, ext)), ' ')), - $('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '—')), - $('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : '—')) - )) - ) - ); + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('languages', "Languages ({0})", languages.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('language id', "ID")), + $('th', undefined, localize('language name', "Name")), + $('th', undefined, localize('file extensions', "File Extensions")), + $('th', undefined, localize('grammar', "Grammar")), + $('th', undefined, localize('snippets', "Snippets")) + ), + ...languages.map(l => $('tr', undefined, + $('td', undefined, l.id), + $('td', undefined, l.name), + $('td', undefined, ...join(l.extensions.map(ext => $('code', undefined, ext)), ' ')), + $('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '—')), + $('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : '—')) + )) + ) + ); - append(container, details); - return true; + append(container, details); + return true; } return false; } @@ -1084,6 +1084,7 @@ export class ExtensionEditor extends BaseEditor { return null; + } private loadContents(loadingTask: () => CacheResult): Promise { From 5b1d433ab9174969c02a10fb29830e16ee62a95d Mon Sep 17 00:00:00 2001 From: pi1024e Date: Wed, 17 Jul 2019 11:45:33 -0400 Subject: [PATCH 319/710] Revert "Edits" This reverts commit ce404be0b7b7d0c2c5675cf73311f7d5fdc52bfb. --- .../extensions/browser/extensionEditor.ts | 158 +++++++++--------- 1 file changed, 76 insertions(+), 82 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index 9bd3c5a5ba0..97c6b0ddc9a 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -719,25 +719,25 @@ export class ExtensionEditor extends BaseEditor { const contributes = manifest.contributes; const contrib = contributes && contributes.debuggers || []; - if (contrib.length) { - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('debuggers', "Debuggers ({0})", contrib.length)), - $('table', undefined, - $('tr', undefined, - $('th', undefined, localize('debugger name', "Name")), - $('th', undefined, localize('debugger type', "Type")), - ), - ...contrib.map(d => $('tr', undefined, - $('td', undefined, d.label!), - $('td', undefined, d.type))) - ) - ); - - append(container, details); - return true; + if (!contrib.length) { + return false; } - return false; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('debuggers', "Debuggers ({0})", contrib.length)), + $('table', undefined, + $('tr', undefined, + $('th', undefined, localize('debugger name', "Name")), + $('th', undefined, localize('debugger type', "Type")), + ), + ...contrib.map(d => $('tr', undefined, + $('td', undefined, d.label!), + $('td', undefined, d.type))) + ) + ); + + append(container, details); + return true; } private renderViewContainers(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -750,21 +750,20 @@ export class ExtensionEditor extends BaseEditor { return result; }, [] as Array<{ id: string, title: string, location: string }>); - if (viewContainers.length) { - - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('viewContainers', "View Containers ({0})", viewContainers.length)), - $('table', undefined, - $('tr', undefined, $('th', undefined, localize('view container id', "ID")), $('th', undefined, localize('view container title', "Title")), $('th', undefined, localize('view container location', "Where"))), - ...viewContainers.map(viewContainer => $('tr', undefined, $('td', undefined, viewContainer.id), $('td', undefined, viewContainer.title), $('td', undefined, viewContainer.location))) - ) - ); - - append(container, details); - return true; + if (!viewContainers.length) { + return false; } - return false; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('viewContainers', "View Containers ({0})", viewContainers.length)), + $('table', undefined, + $('tr', undefined, $('th', undefined, localize('view container id', "ID")), $('th', undefined, localize('view container title', "Title")), $('th', undefined, localize('view container location', "Where"))), + ...viewContainers.map(viewContainer => $('tr', undefined, $('td', undefined, viewContainer.id), $('td', undefined, viewContainer.title), $('td', undefined, viewContainer.location))) + ) + ); + + append(container, details); + return true; } private renderViews(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -777,49 +776,49 @@ export class ExtensionEditor extends BaseEditor { return result; }, [] as Array<{ id: string, name: string, location: string }>); - if (views.length) { - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('views', "Views ({0})", views.length)), - $('table', undefined, - $('tr', undefined, $('th', undefined, localize('view id', "ID")), $('th', undefined, localize('view name', "Name")), $('th', undefined, localize('view location', "Where"))), - ...views.map(view => $('tr', undefined, $('td', undefined, view.id), $('td', undefined, view.name), $('td', undefined, view.location))) - ) - ); - - append(container, details); - return true; + if (!views.length) { + return false; } - return false; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('views', "Views ({0})", views.length)), + $('table', undefined, + $('tr', undefined, $('th', undefined, localize('view id', "ID")), $('th', undefined, localize('view name', "Name")), $('th', undefined, localize('view location', "Where"))), + ...views.map(view => $('tr', undefined, $('td', undefined, view.id), $('td', undefined, view.name), $('td', undefined, view.location))) + ) + ); + + append(container, details); + return true; } private renderLocalizations(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { const contributes = manifest.contributes; const localizations = contributes && contributes.localizations || []; - if (localizations.length) { - - - const details = $('details', { open: true, ontoggle: onDetailsToggle }, - $('summary', undefined, localize('localizations', "Localizations ({0})", localizations.length)), - $('table', undefined, - $('tr', undefined, $('th', undefined, localize('localizations language id', "Language Id")), $('th', undefined, localize('localizations language name', "Language Name")), $('th', undefined, localize('localizations localized language name', "Language Name (Localized)"))), - ...localizations.map(localization => $('tr', undefined, $('td', undefined, localization.languageId), $('td', undefined, localization.languageName || ''), $('td', undefined, localization.localizedLanguageName || ''))) - ) - ); - - append(container, details); - return true; + if (!localizations.length) { + return false; } - return false; + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', undefined, localize('localizations', "Localizations ({0})", localizations.length)), + $('table', undefined, + $('tr', undefined, $('th', undefined, localize('localizations language id', "Language Id")), $('th', undefined, localize('localizations language name', "Language Name")), $('th', undefined, localize('localizations localized language name', "Language Name (Localized)"))), + ...localizations.map(localization => $('tr', undefined, $('td', undefined, localization.languageId), $('td', undefined, localization.languageName || ''), $('td', undefined, localization.localizedLanguageName || ''))) + ) + ); + + append(container, details); + return true; } private renderColorThemes(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { const contributes = manifest.contributes; const contrib = contributes && contributes.themes || []; - if (contrib.length) { - + if (!contrib.length) { + return false; + } const details = $('details', { open: true, ontoggle: onDetailsToggle }, $('summary', undefined, localize('colorThemes', "Color Themes ({0})", contrib.length)), @@ -828,15 +827,15 @@ export class ExtensionEditor extends BaseEditor { append(container, details); return true; - } return false; } private renderIconThemes(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { const contributes = manifest.contributes; const contrib = contributes && contributes.iconThemes || []; - if (contrib.length) { - + if (!contrib.length) { + return false; + } const details = $('details', { open: true, ontoggle: onDetailsToggle }, $('summary', undefined, localize('iconThemes', "Icon Themes ({0})", contrib.length)), @@ -845,15 +844,13 @@ export class ExtensionEditor extends BaseEditor { append(container, details); return true; - } - return false; } private renderColors(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { const contributes = manifest.contributes; const colors = contributes && contributes.colors; - if (!(colors && colors.length)) { + if (!colors || !colors.length) { return false; } @@ -957,18 +954,18 @@ export class ExtensionEditor extends BaseEditor { let command = byId[rawKeybinding.command]; - if (command) { - command.keybindings.push(keybinding); - - } else { + if (!command) { command = { id: rawKeybinding.command, title: '', keybindings: [keybinding], menus: [] }; byId[command.id] = command; commands.push(command); + } else { + command.keybindings.push(keybinding); } }); - if (commands.length) { - + if (!commands.length) { + return false; + } const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => { const element = $(''); @@ -996,7 +993,6 @@ export class ExtensionEditor extends BaseEditor { append(container, details); return true; - } return false; } private renderLanguages(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { @@ -1040,8 +1036,9 @@ export class ExtensionEditor extends BaseEditor { } }); - if (languages.length) { - + if (!languages.length) { + return false; + } const details = $('details', { open: true, ontoggle: onDetailsToggle }, $('summary', undefined, localize('languages', "Languages ({0})", languages.length)), @@ -1065,7 +1062,6 @@ export class ExtensionEditor extends BaseEditor { append(container, details); return true; - } return false; } private resolveKeybinding(rawKeyBinding: IKeyBinding): ResolvedKeybinding | null { @@ -1078,13 +1074,11 @@ export class ExtensionEditor extends BaseEditor { } const keyBinding = KeybindingParser.parseKeybinding(key || rawKeyBinding.key, OS); - if (keyBinding) { - return this.keybindingService.resolveKeybinding(keyBinding)[0]; + if (!keyBinding) { + return null; } - return null; - - + return this.keybindingService.resolveKeybinding(keyBinding)[0]; } private loadContents(loadingTask: () => CacheResult): Promise { From b5136de090f43dfb8e5741e42275d028e12d611f Mon Sep 17 00:00:00 2001 From: pi1024e Date: Wed, 17 Jul 2019 11:49:16 -0400 Subject: [PATCH 320/710] Fixed changes and refactored so method structures in the file are same, allowing the new method to fit naturally. --- .../extensions/browser/extensionEditor.ts | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index 97c6b0ddc9a..714ee465961 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -850,7 +850,7 @@ export class ExtensionEditor extends BaseEditor { const contributes = manifest.contributes; const colors = contributes && contributes.colors; - if (!colors || !colors.length) { + if (!(colors && colors.length)) { return false; } @@ -933,12 +933,12 @@ export class ExtensionEditor extends BaseEditor { menus[context].forEach(menu => { let command = byId[menu.command]; - if (!command) { + if (command) { + command.menus.push(context); + } else { command = { id: menu.command, title: '', keybindings: [], menus: [context] }; byId[command.id] = command; commands.push(command); - } else { - command.menus.push(context); } }); }); @@ -954,12 +954,12 @@ export class ExtensionEditor extends BaseEditor { let command = byId[rawKeybinding.command]; - if (!command) { + if (command) { + command.keybindings.push(keybinding); + } else { command = { id: rawKeybinding.command, title: '', keybindings: [keybinding], menus: [] }; byId[command.id] = command; commands.push(command); - } else { - command.keybindings.push(keybinding); } }); @@ -1013,12 +1013,12 @@ export class ExtensionEditor extends BaseEditor { grammars.forEach(grammar => { let language = byId[grammar.language]; - if (!language) { + if (language) { + language.hasGrammar = true; + } else { language = { id: grammar.language, name: grammar.language, extensions: [], hasGrammar: true, hasSnippets: false }; byId[language.id] = language; languages.push(language); - } else { - language.hasGrammar = true; } }); @@ -1027,12 +1027,12 @@ export class ExtensionEditor extends BaseEditor { snippets.forEach(snippet => { let language = byId[snippet.language]; - if (!language) { + if (language) { + language.hasSnippets = true; + } else { language = { id: snippet.language, name: snippet.language, extensions: [], hasGrammar: false, hasSnippets: true }; byId[language.id] = language; languages.push(language); - } else { - language.hasSnippets = true; } }); @@ -1074,11 +1074,11 @@ export class ExtensionEditor extends BaseEditor { } const keyBinding = KeybindingParser.parseKeybinding(key || rawKeyBinding.key, OS); - if (!keyBinding) { - return null; - } + if (keyBinding) { + return this.keybindingService.resolveKeybinding(keyBinding)[0]; - return this.keybindingService.resolveKeybinding(keyBinding)[0]; + } + return null; } private loadContents(loadingTask: () => CacheResult): Promise { From 891d29ab55116a1c88c2927a1e2d8b0b3506bdd4 Mon Sep 17 00:00:00 2001 From: Pine Wu Date: Wed, 17 Jul 2019 13:32:04 -0700 Subject: [PATCH 321/710] Fix #77535 --- src/vs/workbench/contrib/preferences/browser/settingsTree.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/contrib/preferences/browser/settingsTree.ts b/src/vs/workbench/contrib/preferences/browser/settingsTree.ts index 63571356cc2..4c48aa744d3 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsTree.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsTree.ts @@ -70,6 +70,10 @@ function getExcludeDisplayValue(element: SettingsTreeSettingElement): IListDataI } function getListDisplayValue(element: SettingsTreeSettingElement): IListDataItem[] { + if (!element.value || !isArray(element.value)) { + return []; + } + return element.value.map((key: string) => { return { value: key From 7d58f5f95bc058e9c403d70184b4adee21b88fb9 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Fri, 12 Jul 2019 16:30:55 +0200 Subject: [PATCH 322/710] fix typo --- src/vs/base/parts/ipc/common/ipc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/parts/ipc/common/ipc.ts b/src/vs/base/parts/ipc/common/ipc.ts index 6292487e1c1..9715105baa3 100644 --- a/src/vs/base/parts/ipc/common/ipc.ts +++ b/src/vs/base/parts/ipc/common/ipc.ts @@ -23,7 +23,7 @@ export interface IChannel { } /** - * An `IServerChannel` is the couter part to `IChannel`, + * An `IServerChannel` is the counter part to `IChannel`, * on the server-side. You should implement this interface * if you'd like to handle remote promises or events. */ From 31d1b50c9ff5bf207a5ef7a6261312e2ecc30a2f Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Wed, 17 Jul 2019 23:06:44 +0200 Subject: [PATCH 323/710] extensionHostDebugService for web --- .../workbench/browser/web.simpleservices.ts | 112 ++++++++++++++++-- .../environment/browser/environmentService.ts | 30 +++++ 2 files changed, 132 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index 5d611022667..b6e17d60b4e 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -40,6 +40,10 @@ import { IProcessEnvironment } from 'vs/base/common/platform'; import { toStoreData, restoreRecentlyOpened } from 'vs/platform/history/common/historyStorage'; // tslint:disable-next-line: import-patterns import { IExperimentService, IExperiment, ExperimentActionType, ExperimentState } from 'vs/workbench/contrib/experiments/common/experimentService'; +//import { IServerChannel } from 'vs/base/parts/ipc/common/ipc'; +import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; +import { IChannel } from 'vs/base/parts/ipc/common/ipc'; +//import { RemoteAgentConnectionContext } from 'vs/platform/remote/common/remoteAgentEnvironment'; //#region Download @@ -649,20 +653,61 @@ registerSingleton(IWindowService, SimpleWindowService); export class SimpleExtensionHostDebugService implements IExtensionHostDebugService { _serviceBrand: any; - reload(sessionId: string): void { } - onReload: Event = Event.None; + private channel: IChannel; - close(sessionId: string): void { } - onClose: Event = Event.None; + constructor( + @IRemoteAgentService private remoteAgentService: IRemoteAgentService + ) { + const connection = this.remoteAgentService.getConnection(); + if (connection) { + this.channel = connection.getChannel('extensionhostdebugservice'); + } + } - attachSession(sessionId: string, port: number, subId?: string): void { } - onAttachSession: Event = Event.None; + reload(sessionId: string): void { + if (this.channel) { + this.channel.call('reload', [sessionId]); + } + } + get onReload(): Event { + return this.channel ? this.channel.listen('reload') : Event.None; + } - logToSession(sessionId: string, log: IRemoteConsoleLog): void { } - onLogToSession: Event = Event.None; + close(sessionId: string): void { + if (this.channel) { + this.channel.call('close', [sessionId]); + } + } + get onClose(): Event { + return this.channel ? this.channel.listen('close') : Event.None; + } - terminateSession(sessionId: string, subId?: string): void { } - onTerminateSession: Event = Event.None; + attachSession(sessionId: string, port: number, subId?: string): void { + if (this.channel) { + this.channel.call('attach', [sessionId, port, subId]); + } + } + get onAttachSession(): Event { + return this.channel ? this.channel.listen('attach') : Event.None; + } + + logToSession(sessionId: string, log: IRemoteConsoleLog): void { + if (this.channel) { + this.channel.call('log', [sessionId, log]); + } + } + get onLogToSession(): Event { + return this.channel ? this.channel.listen('log') : Event.None; + } + + terminateSession(sessionId: string, subId?: string): void { + if (this.channel) { + this.channel.call('terminate', [sessionId, subId]); + } + } + get onTerminateSession(): Event { + return this.channel ? this.channel.listen('terminate') : Event.None; + } } registerSingleton(IExtensionHostDebugService, SimpleExtensionHostDebugService); @@ -807,6 +852,53 @@ export class SimpleWindowsService implements IWindowsService { } openExtensionDevelopmentHostWindow(args: ParsedArgs, env: IProcessEnvironment): Promise { + + // we pass the "ParsedArgs" as query parameters of the URL + + let newAddress = `${document.location.origin}/?`; + + const f = args['folder-uri']; + if (f) { + let u: URI | undefined; + if (Array.isArray(f)) { + if (f.length > 0) { + u = URI.parse(f[0]); + } + } else { + u = URI.parse(f); + } + if (u) { + newAddress += `folder=${encodeURIComponent(u.path)}`; + } + } + + const ep = args['extensionDevelopmentPath']; + if (ep) { + let u: string | undefined; + if (Array.isArray(ep)) { + if (ep.length > 0) { + u = ep[0]; + } + } else { + u = ep; + } + if (u) { + newAddress += `&edp=${encodeURIComponent(u)}`; + } + } + + const di = args['debugId']; + if (di) { + newAddress += `&di=${encodeURIComponent(di)}`; + } + + const ibe = args['inspect-brk-extensions']; + if (ibe) { + newAddress += `&ibe=${encodeURIComponent(ibe)}`; + } + + window.open(newAddress); + return Promise.resolve(); } diff --git a/src/vs/workbench/services/environment/browser/environmentService.ts b/src/vs/workbench/services/environment/browser/environmentService.ts index f6d67298ba0..ff6cefe4491 100644 --- a/src/vs/workbench/services/environment/browser/environmentService.ts +++ b/src/vs/workbench/services/environment/browser/environmentService.ts @@ -91,6 +91,36 @@ export class BrowserWorkbenchEnvironmentService implements IEnvironmentService { this.webviewEndpoint = configuration.webviewEndpoint; this.untitledWorkspacesHome = URI.from({ scheme: Schemas.untitled, path: 'Workspaces' }); + + if (document && document.location && document.location.search) { + + const map = new Map(); + const query = document.location.search.substring(1); + const vars = query.split('&'); + for (let p of vars) { + const pair = p.split('='); + if (pair.length >= 2) { + map.set(decodeURIComponent(pair[0]), decodeURIComponent(pair[1])); + } + } + + const edp = map.get('edp'); + if (edp) { + this.extensionDevelopmentLocationURI = [URI.parse(edp)]; + this.isExtensionDevelopment = true; + } + + const di = map.get('di'); + if (di) { + this.debugExtensionHost.debugId = di; + } + + const ibe = map.get('ibe'); + if (ibe) { + this.debugExtensionHost.port = parseInt(ibe); + this.debugExtensionHost.break = false; + } + } } untitledWorkspacesHome: URI; From 279e5cdf8879c9e7aef2d20d6b0f6e80281b2716 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Wed, 17 Jul 2019 14:23:43 -0700 Subject: [PATCH 324/710] Fix #77501, center triangle in status bar notification bell --- .../workbench/browser/parts/statusbar/media/statusbarpart.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/statusbar/media/statusbarpart.css b/src/vs/workbench/browser/parts/statusbar/media/statusbarpart.css index 5c4e22b033c..ad1d1498654 100644 --- a/src/vs/workbench/browser/parts/statusbar/media/statusbarpart.css +++ b/src/vs/workbench/browser/parts/statusbar/media/statusbarpart.css @@ -40,7 +40,7 @@ .monaco-workbench .part.statusbar > .items-container > .statusbar-item.has-beak:before { content: ''; position: absolute; - left: 11px; + left: calc(50% - 8px); /* 3px (margin) + 5px (padding) = 8px */ top: -5px; border-bottom-width: 5px; border-bottom-style: solid; From 326c26b9e0edc9eeaa5738739b57b60e9f6dfe37 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Wed, 17 Jul 2019 15:58:09 -0700 Subject: [PATCH 325/710] Create browser version of telemetry service --- src/vs/base/common/platform.ts | 10 +- src/vs/code/browser/workbench/workbench.html | 5 +- .../product/browser/productService.ts | 4 +- src/vs/platform/product/common/product.ts | 4 + .../browser/workbenchCommonProperties.ts | 86 +++++++++ .../telemetry/common/telemetryUtils.ts | 73 ++++++++ .../telemetry/node/appInsightsAppender.ts | 76 +------- .../workbench/browser/web.simpleservices.ts | 34 ---- .../telemetry/browser/telemetryService.ts | 170 ++++++++++++++++++ src/vs/workbench/workbench.web.main.ts | 4 +- 10 files changed, 350 insertions(+), 116 deletions(-) create mode 100644 src/vs/platform/telemetry/browser/workbenchCommonProperties.ts create mode 100644 src/vs/workbench/services/telemetry/browser/telemetryService.ts diff --git a/src/vs/base/common/platform.ts b/src/vs/base/common/platform.ts index 4cba839fe52..d7371552d30 100644 --- a/src/vs/base/common/platform.ts +++ b/src/vs/base/common/platform.ts @@ -13,6 +13,7 @@ let _isWeb = false; let _locale: string | undefined = undefined; let _language: string = LANGUAGE_DEFAULT; let _translationsConfigFile: string | undefined = undefined; +let _userAgent: string | undefined = undefined; interface NLSConfig { locale: string; @@ -48,10 +49,10 @@ const isElectronRenderer = (typeof process !== 'undefined' && typeof process.ver // OS detection if (typeof navigator === 'object' && !isElectronRenderer) { - const userAgent = navigator.userAgent; - _isWindows = userAgent.indexOf('Windows') >= 0; - _isMacintosh = userAgent.indexOf('Macintosh') >= 0; - _isLinux = userAgent.indexOf('Linux') >= 0; + _userAgent = navigator.userAgent; + _isWindows = _userAgent.indexOf('Windows') >= 0; + _isMacintosh = _userAgent.indexOf('Macintosh') >= 0; + _isLinux = _userAgent.indexOf('Linux') >= 0; _isWeb = true; _locale = navigator.language; _language = _locale; @@ -108,6 +109,7 @@ export const isLinux = _isLinux; export const isNative = _isNative; export const isWeb = _isWeb; export const platform = _platform; +export const userAgent = _userAgent; export function isRootUser(): boolean { return _isNative && !_isWindows && (process.getuid() === 0); diff --git a/src/vs/code/browser/workbench/workbench.html b/src/vs/code/browser/workbench/workbench.html index 1e742447047..829ce5e4aea 100644 --- a/src/vs/code/browser/workbench/workbench.html +++ b/src/vs/code/browser/workbench/workbench.html @@ -10,7 +10,7 @@ + content="default-src 'none'; img-src 'self' https: data: blob: vscode-remote:; media-src 'none'; child-src 'self' {{WEBVIEW_ENDPOINT}}; script-src 'self' https://az416426.vo.msecnd.net 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self' ws: wss: https:; font-src 'self' blob: vscode-remote:;"> @@ -27,6 +27,9 @@ + + + diff --git a/src/vs/platform/product/browser/productService.ts b/src/vs/platform/product/browser/productService.ts index d40b86aa0d2..fbdf03fd3e4 100644 --- a/src/vs/platform/product/browser/productService.ts +++ b/src/vs/platform/product/browser/productService.ts @@ -19,7 +19,7 @@ export class ProductService implements IProductService { get version(): string { return '1.35.0'; } - get commit(): string | undefined { return undefined; } + get commit(): string | undefined { return this.productConfiguration ? this.productConfiguration.commit : undefined; } get nameLong(): string { return ''; } @@ -44,4 +44,6 @@ export class ProductService implements IProductService { get extensionKeywords(): { [extension: string]: readonly string[]; } | undefined { return this.productConfiguration ? this.productConfiguration.extensionKeywords : undefined; } get extensionAllowedBadgeProviders(): readonly string[] | undefined { return this.productConfiguration ? this.productConfiguration.extensionAllowedBadgeProviders : undefined; } + + get aiConfig() { return this.productConfiguration ? this.productConfiguration.aiConfig : undefined; } } \ No newline at end of file diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts index 63ea4836512..45c31ca0f3d 100644 --- a/src/vs/platform/product/common/product.ts +++ b/src/vs/platform/product/common/product.ts @@ -37,6 +37,10 @@ export interface IProductService { readonly experimentsUrl?: string; readonly extensionKeywords?: { [extension: string]: readonly string[]; }; readonly extensionAllowedBadgeProviders?: readonly string[]; + + readonly aiConfig?: { + readonly asimovKey: string; + }; } export interface IProductConfiguration { diff --git a/src/vs/platform/telemetry/browser/workbenchCommonProperties.ts b/src/vs/platform/telemetry/browser/workbenchCommonProperties.ts new file mode 100644 index 00000000000..3e6c88bd451 --- /dev/null +++ b/src/vs/platform/telemetry/browser/workbenchCommonProperties.ts @@ -0,0 +1,86 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; + +export const instanceStorageKey = 'telemetry.instanceId'; +export const currentSessionDateStorageKey = 'telemetry.currentSessionDate'; +export const firstSessionDateStorageKey = 'telemetry.firstSessionDate'; +export const lastSessionDateStorageKey = 'telemetry.lastSessionDate'; + +import * as Platform from 'vs/base/common/platform'; +import * as uuid from 'vs/base/common/uuid'; + +export async function resolveWorkbenchCommonProperties(storageService: IStorageService, commit: string | undefined, version: string | undefined, machineId: string, remoteAuthority?: string): Promise<{ [name: string]: string | undefined }> { + const result: { [name: string]: string | undefined; } = Object.create(null); + const instanceId = storageService.get(instanceStorageKey, StorageScope.GLOBAL)!; + const firstSessionDate = storageService.get(firstSessionDateStorageKey, StorageScope.GLOBAL)!; + const lastSessionDate = storageService.get(lastSessionDateStorageKey, StorageScope.GLOBAL)!; + + // __GDPR__COMMON__ "common.firstSessionDate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['common.firstSessionDate'] = firstSessionDate; + // __GDPR__COMMON__ "common.lastSessionDate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['common.lastSessionDate'] = lastSessionDate || ''; + // __GDPR__COMMON__ "common.isNewSession" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['common.isNewSession'] = !lastSessionDate ? '1' : '0'; + // __GDPR__COMMON__ "common.instanceId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['common.instanceId'] = instanceId; + // __GDPR__COMMON__ "common.remoteAuthority" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + result['common.remoteAuthority'] = cleanRemoteAuthority(remoteAuthority); + + // __GDPR__COMMON__ "common.machineId" : { "endPoint": "MacAddressHash", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } + result['common.machineId'] = machineId; + // __GDPR__COMMON__ "sessionID" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['sessionID'] = uuid.generateUuid() + Date.now(); + // __GDPR__COMMON__ "commitHash" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + result['commitHash'] = commit; + // __GDPR__COMMON__ "version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['version'] = version; + // __GDPR__COMMON__ "common.platform" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['common.platform'] = Platform.PlatformToString(Platform.platform); + // __GDPR__COMMON__ "common.product" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + result['common.product'] = 'web'; + // __GDPR__COMMON__ "common.userAgent" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['common.userAgent'] = Platform.userAgent; + + // dynamic properties which value differs on each call + let seq = 0; + const startTime = Date.now(); + Object.defineProperties(result, { + // __GDPR__COMMON__ "timestamp" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + 'timestamp': { + get: () => new Date(), + enumerable: true + }, + // __GDPR__COMMON__ "common.timesincesessionstart" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } + 'common.timesincesessionstart': { + get: () => Date.now() - startTime, + enumerable: true + }, + // __GDPR__COMMON__ "common.sequence" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } + 'common.sequence': { + get: () => seq++, + enumerable: true + } + }); + + return result; +} + +function cleanRemoteAuthority(remoteAuthority?: string): string { + if (!remoteAuthority) { + return 'none'; + } + + let ret = 'other'; + // Whitelisted remote authorities + ['ssh-remote', 'dev-container', 'wsl'].forEach((res: string) => { + if (remoteAuthority!.indexOf(`${res}+`) === 0) { + ret = res; + } + }); + + return ret; +} diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 37b4f848681..e2fca2ba8c6 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -9,6 +9,8 @@ import { IKeybindingService, KeybindingSource } from 'vs/platform/keybinding/com import { ITelemetryService, ITelemetryInfo, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { ILogService } from 'vs/platform/log/common/log'; import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings'; +import { safeStringify } from 'vs/base/common/objects'; +import { isObject } from 'vs/base/common/types'; export const NullTelemetryService = new class implements ITelemetryService { _serviceBrand: undefined; @@ -243,6 +245,77 @@ export function keybindingsTelemetry(telemetryService: ITelemetryService, keybin }); } + +export interface Properties { + [key: string]: string; +} + +export interface Measurements { + [key: string]: number; +} + +export function validateTelemetryData(data?: any): { properties: Properties, measurements: Measurements } { + + const properties: Properties = Object.create(null); + const measurements: Measurements = Object.create(null); + + const flat = Object.create(null); + flatten(data, flat); + + for (let prop in flat) { + // enforce property names less than 150 char, take the last 150 char + prop = prop.length > 150 ? prop.substr(prop.length - 149) : prop; + const value = flat[prop]; + + if (typeof value === 'number') { + measurements[prop] = value; + + } else if (typeof value === 'boolean') { + measurements[prop] = value ? 1 : 0; + + } else if (typeof value === 'string') { + //enforce property value to be less than 1024 char, take the first 1024 char + properties[prop] = value.substring(0, 1023); + + } else if (typeof value !== 'undefined' && value !== null) { + properties[prop] = value; + } + } + + return { + properties, + measurements + }; +} + +function flatten(obj: any, result: { [key: string]: any }, order: number = 0, prefix?: string): void { + if (!obj) { + return; + } + + for (let item of Object.getOwnPropertyNames(obj)) { + const value = obj[item]; + const index = prefix ? prefix + item : item; + + if (Array.isArray(value)) { + result[index] = safeStringify(value); + + } else if (value instanceof Date) { + // TODO unsure why this is here and not in _getData + result[index] = value.toISOString(); + + } else if (isObject(value)) { + if (order < 2) { + flatten(value, result, order + 1, index + '.'); + } else { + result[index] = safeStringify(value); + } + } else { + result[index] = value; + } + } +} + function flattenKeys(value: Object | undefined): string[] { if (!value) { return []; diff --git a/src/vs/platform/telemetry/node/appInsightsAppender.ts b/src/vs/platform/telemetry/node/appInsightsAppender.ts index 5f6f7e3dbe8..2ed0150ac1f 100644 --- a/src/vs/platform/telemetry/node/appInsightsAppender.ts +++ b/src/vs/platform/telemetry/node/appInsightsAppender.ts @@ -4,9 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as appInsights from 'applicationinsights'; -import { isObject } from 'vs/base/common/types'; -import { safeStringify, mixin } from 'vs/base/common/objects'; -import { ITelemetryAppender } from 'vs/platform/telemetry/common/telemetryUtils'; +import { mixin } from 'vs/base/common/objects'; +import { ITelemetryAppender, validateTelemetryData } from 'vs/platform/telemetry/common/telemetryUtils'; import { ILogService } from 'vs/platform/log/common/log'; function getClient(aiKey: string): appInsights.TelemetryClient { @@ -35,13 +34,6 @@ function getClient(aiKey: string): appInsights.TelemetryClient { return client; } -interface Properties { - [key: string]: string; -} - -interface Measurements { - [key: string]: number; -} export class AppInsightsAppender implements ITelemetryAppender { @@ -64,74 +56,12 @@ export class AppInsightsAppender implements ITelemetryAppender { } } - private static _getData(data?: any): { properties: Properties, measurements: Measurements } { - - const properties: Properties = Object.create(null); - const measurements: Measurements = Object.create(null); - - const flat = Object.create(null); - AppInsightsAppender._flaten(data, flat); - - for (let prop in flat) { - // enforce property names less than 150 char, take the last 150 char - prop = prop.length > 150 ? prop.substr(prop.length - 149) : prop; - const value = flat[prop]; - - if (typeof value === 'number') { - measurements[prop] = value; - - } else if (typeof value === 'boolean') { - measurements[prop] = value ? 1 : 0; - - } else if (typeof value === 'string') { - //enforce property value to be less than 1024 char, take the first 1024 char - properties[prop] = value.substring(0, 1023); - - } else if (typeof value !== 'undefined' && value !== null) { - properties[prop] = value; - } - } - - return { - properties, - measurements - }; - } - - private static _flaten(obj: any, result: { [key: string]: any }, order: number = 0, prefix?: string): void { - if (!obj) { - return; - } - - for (let item of Object.getOwnPropertyNames(obj)) { - const value = obj[item]; - const index = prefix ? prefix + item : item; - - if (Array.isArray(value)) { - result[index] = safeStringify(value); - - } else if (value instanceof Date) { - // TODO unsure why this is here and not in _getData - result[index] = value.toISOString(); - - } else if (isObject(value)) { - if (order < 2) { - AppInsightsAppender._flaten(value, result, order + 1, index + '.'); - } else { - result[index] = safeStringify(value); - } - } else { - result[index] = value; - } - } - } - log(eventName: string, data?: any): void { if (!this._aiClient) { return; } data = mixin(data, this._defaultData); - data = AppInsightsAppender._getData(data); + data = validateTelemetryData(data); if (this._logService) { this._logService.trace(`telemetry/${eventName}`, data); diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index 9cfaf411337..e5d4842aaa8 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -14,7 +14,6 @@ import { CancellationToken } from 'vs/base/common/cancellation'; import { IGalleryExtension, IExtensionIdentifier, IReportedExtension, IExtensionManagementService, ILocalExtension, IGalleryMetadata, IExtensionTipsService, ExtensionRecommendationReason, IExtensionRecommendation, IExtensionEnablementService, EnablementState } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ExtensionType, ExtensionIdentifier, IExtension } from 'vs/platform/extensions/common/extensions'; import { IURLHandler, IURLService } from 'vs/platform/url/common/url'; -import { ITelemetryService, ITelemetryData, ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry'; import { ConsoleLogService, ILogService } from 'vs/platform/log/common/log'; import { Disposable, IDisposable } from 'vs/base/common/lifecycle'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; @@ -35,7 +34,6 @@ import { pathsToEditors } from 'vs/workbench/common/editor'; import { IFileService } from 'vs/platform/files/common/files'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; -import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings'; import { IProcessEnvironment } from 'vs/base/common/platform'; import { toStoreData, restoreRecentlyOpened } from 'vs/platform/history/common/historyStorage'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; @@ -275,38 +273,6 @@ export class SimpleMultiExtensionsManagementService implements IExtensionManagem //#endregion -//#region Telemetry - -export class SimpleTelemetryService implements ITelemetryService { - - _serviceBrand: undefined; - - isOptedIn: true; - - publicLog(eventName: string, data?: ITelemetryData) { - return Promise.resolve(undefined); - } - - publicLog2 = never, T extends GDPRClassification = never>(eventName: string, data?: StrictPropertyCheck) { - return this.publicLog(eventName, data as ITelemetryData); - } - - setEnabled(value: boolean): void { - } - - getTelemetryInfo(): Promise { - return Promise.resolve({ - instanceId: 'someValue.instanceId', - sessionId: 'someValue.sessionId', - machineId: 'someValue.machineId' - }); - } -} - -registerSingleton(ITelemetryService, SimpleTelemetryService); - -//#endregion - //#region Update export class SimpleUpdateService implements IUpdateService { diff --git a/src/vs/workbench/services/telemetry/browser/telemetryService.ts b/src/vs/workbench/services/telemetry/browser/telemetryService.ts new file mode 100644 index 00000000000..13af5766086 --- /dev/null +++ b/src/vs/workbench/services/telemetry/browser/telemetryService.ts @@ -0,0 +1,170 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { ITelemetryService, ITelemetryInfo, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; +import { NullTelemetryService, combinedAppender, LogAppender, ITelemetryAppender, validateTelemetryData } 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'; +import { ILogService } from 'vs/platform/log/common/log'; +import { TelemetryService as BaseTelemetryService, ITelemetryServiceConfig } from 'vs/platform/telemetry/common/telemetryService'; +import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; +import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings'; +import { IStorageService } from 'vs/platform/storage/common/storage'; +import { resolveWorkbenchCommonProperties } from 'vs/platform/telemetry/browser/workbenchCommonProperties'; +import { IProductService } from 'vs/platform/product/common/product'; + +interface IConfig { + instrumentationKey?: string; + endpointUrl?: string; + emitLineDelimitedJson?: boolean; + accountId?: string; + sessionRenewalMs?: number; + sessionExpirationMs?: number; + maxBatchSizeInBytes?: number; + maxBatchInterval?: number; + enableDebug?: boolean; + disableExceptionTracking?: boolean; + disableTelemetry?: boolean; + verboseLogging?: boolean; + diagnosticLogInterval?: number; + samplingPercentage?: number; + autoTrackPageVisitTime?: boolean; + disableAjaxTracking?: boolean; + overridePageViewDuration?: boolean; + maxAjaxCallsPerView?: number; + disableDataLossAnalysis?: boolean; + disableCorrelationHeaders?: boolean; + correlationHeaderExcludedDomains?: string[]; + disableFlushOnBeforeUnload?: boolean; + enableSessionStorageBuffer?: boolean; + isCookieUseDisabled?: boolean; + cookieDomain?: string; + isRetryDisabled?: boolean; + url?: string; + isStorageUseDisabled?: boolean; + isBeaconApiDisabled?: boolean; + sdkExtension?: string; + isBrowserLinkTrackingEnabled?: boolean; + appId?: string; + enableCorsCorrelation?: boolean; +} + +declare class Microsoft { + public static ApplicationInsights: { + Initialization: { + new(init: { config: IConfig }): AppInsights; + } + }; +} + +declare interface IAppInsightsClient { + config: IConfig; + + /** Log a user action or other occurrence. */ + trackEvent: (name: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number }) => void; + + /** Immediately send all queued telemetry. Synchronous. */ + flush(): void; +} + +interface AppInsights { + loadAppInsights: () => IAppInsightsClient; +} + +export class WebTelemetryAppender implements ITelemetryAppender { + private _aiClient?: IAppInsightsClient; + + constructor(aiKey: string, private _logService: ILogService) { + const initConfig = { + config: { + instrumentationKey: aiKey, + endpointUrl: 'https://vortex.data.microsoft.com/collect/v1', + emitLineDelimitedJson: true, + autoTrackPageVisitTime: false, + disableExceptionTracking: true, + disableAjaxTracking: true + } + }; + + const appInsights = new Microsoft.ApplicationInsights.Initialization(initConfig); + this._aiClient = appInsights.loadAppInsights(); + } + + log(eventName: string, data: any): void { + if (!this._aiClient) { + return; + } + + data = validateTelemetryData(data); + this._logService.trace(`telemetry/${eventName}`, data); + + this._aiClient.trackEvent('monacoworkbench/' + eventName, data.properties, data.measurements); + } + + dispose(): Promise | undefined { + if (this._aiClient) { + return new Promise(resolve => { + this._aiClient!.flush(); + this._aiClient = undefined; + resolve(undefined); + }); + } + + return undefined; + } +} + +export class TelemetryService extends Disposable implements ITelemetryService { + + _serviceBrand: any; + + private impl: ITelemetryService; + + constructor( + @IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService, + @ILogService logService: ILogService, + @IConfigurationService configurationService: IConfigurationService, + @IStorageService storageService: IStorageService, + @IProductService productService: IProductService + ) { + super(); + + const aiKey = productService.aiConfig && productService.aiConfig.asimovKey; + if (!environmentService.isExtensionDevelopment && !environmentService.args['disable-telemetry'] && !!productService.enableTelemetry && !!aiKey) { + const config: ITelemetryServiceConfig = { + appender: combinedAppender(new WebTelemetryAppender(aiKey, logService), new LogAppender(logService)), + commonProperties: resolveWorkbenchCommonProperties(storageService, productService.commit, productService.version, environmentService.configuration.machineId, environmentService.configuration.remoteAuthority), + piiPaths: [environmentService.appRoot] + }; + + this.impl = this._register(new BaseTelemetryService(config, configurationService)); + } else { + this.impl = NullTelemetryService; + } + } + + setEnabled(value: boolean): void { + return this.impl.setEnabled(value); + } + + get isOptedIn(): boolean { + return this.impl.isOptedIn; + } + + publicLog(eventName: string, data?: ITelemetryData, anonymizeFilePaths?: boolean): Promise { + return this.impl.publicLog(eventName, data, anonymizeFilePaths); + } + + publicLog2 = never, T extends GDPRClassification = never>(eventName: string, data?: StrictPropertyCheck, anonymizeFilePaths?: boolean) { + return this.publicLog(eventName, data as ITelemetryData, anonymizeFilePaths); + } + + getTelemetryInfo(): Promise { + return this.impl.getTelemetryInfo(); + } +} + +registerSingleton(ITelemetryService, TelemetryService); \ No newline at end of file diff --git a/src/vs/workbench/workbench.web.main.ts b/src/vs/workbench/workbench.web.main.ts index 476f87ecf79..da6555d131f 100644 --- a/src/vs/workbench/workbench.web.main.ts +++ b/src/vs/workbench/workbench.web.main.ts @@ -73,8 +73,6 @@ import { DialogService } from 'vs/platform/dialogs/browser/dialogService'; // import { ILocalizationsService } from 'vs/platform/localizations/common/localizations'; // import { LocalizationsService } from 'vs/platform/localizations/electron-browser/localizationsService'; // import { ISharedProcessService, SharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService'; -// import { IProductService } from 'vs/platform/product/common/product'; -// import { ProductService } from 'vs/platform/product/node/productService'; // import { IWindowsService } from 'vs/platform/windows/common/windows'; // import { WindowsService } from 'vs/platform/windows/electron-browser/windowsService'; // import { IUpdateService } from 'vs/platform/update/common/update'; @@ -128,7 +126,7 @@ import 'vs/workbench/services/extensionManagement/common/extensionManagementServ // import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; import 'vs/workbench/services/notification/common/notificationService'; // import 'vs/workbench/services/window/electron-browser/windowService'; -// import 'vs/workbench/services/telemetry/electron-browser/telemetryService'; +import 'vs/workbench/services/telemetry/browser/telemetryService'; import 'vs/workbench/services/configurationResolver/browser/configurationResolverService'; import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { ContextMenuService } from 'vs/platform/contextview/browser/contextMenuService'; From 6d5e584e20c9dab4fd943e820abbd0922683249b Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 17 Jul 2019 16:36:26 -0700 Subject: [PATCH 326/710] chore: Bump windows-foreground-love@0.2.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f8883efbe59..b5b38a4cd1c 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "optionalDependencies": { "vscode-windows-ca-certs": "0.1.0", "vscode-windows-registry": "1.0.1", - "windows-foreground-love": "0.1.0", + "windows-foreground-love": "0.2.0", "windows-mutex": "0.2.1", "windows-process-tree": "0.2.4" } diff --git a/yarn.lock b/yarn.lock index 6aa4b28cf28..bb7c51d4e9c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9730,10 +9730,10 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" -windows-foreground-love@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/windows-foreground-love/-/windows-foreground-love-0.1.0.tgz#948e4beac0733cd58624710cc09432b7e8bf3521" - integrity sha1-lI5L6sBzPNWGJHEMwJQyt+i/NSE= +windows-foreground-love@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/windows-foreground-love/-/windows-foreground-love-0.2.0.tgz#b291832d8a02a966bc046ba0e498cc789809076b" + integrity sha512-72ZDshnt8Q3/ImLMt4wxsY8eVnUd1KDb5QfvZX09AxJJJa0hGdyzPfd/ms0pKSYYwKlEhB1ri+WDKNvdIpJknQ== windows-mutex@0.2.1: version "0.2.1" From c898cc34899bb3b3d5e2bcae881ae9a3f5fa3162 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 9 Jun 2019 10:15:25 -0600 Subject: [PATCH 327/710] Add the .rbi file extension as a Ruby file type. .rbi files are type definition files that are currently used by some community type checkers, most notably Stripe's Sorbet, and will be part of the main language in Ruby 3. --- extensions/ruby/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/ruby/package.json b/extensions/ruby/package.json index a88b790d86f..4572f2526d8 100644 --- a/extensions/ruby/package.json +++ b/extensions/ruby/package.json @@ -12,7 +12,7 @@ "contributes": { "languages": [{ "id": "ruby", - "extensions": [ ".rb", ".rbx", ".rjs", ".gemspec", ".rake", ".ru", ".erb",".podspec" ], + "extensions": [ ".rb", ".rbx", ".rjs", ".gemspec", ".rake", ".ru", ".erb", ".podspec", ".rbi" ], "filenames": [ "rakefile", "gemfile", "guardfile", "podfile", "capfile" ], "aliases": [ "Ruby", "rb" ], "firstLine": "^#!\\s*/.*\\bruby\\b", From 3000b68b6a3a97011caeee98247481b391fceb02 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Wed, 17 Jul 2019 17:36:22 -0700 Subject: [PATCH 328/710] keymap tests. --- .../services/keybinding/test/browserKeyboardMapper.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts index acf45e1358d..2c707c50278 100644 --- a/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts @@ -33,12 +33,12 @@ suite('keyboard layout loader', () => { let commandService = instantiationService.stub(ICommandService, {}); let instance = new TestKeyboardMapperFactory(notitifcationService, storageService, commandService); - test.skip('load default US keyboard layout', () => { + test('load default US keyboard layout', () => { assert.notEqual(instance.activeKeyboardLayout, null); assert.equal(instance.activeKeyboardLayout!.isUSStandard, true); }); - test.skip('isKeyMappingActive', () => { + test('isKeyMappingActive', () => { assert.equal(instance.isKeyMappingActive({ KeyA: { value: 'a', From c742363dfc889ead24861412795d25df7f3cd5f2 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Wed, 17 Jul 2019 17:45:09 -0700 Subject: [PATCH 329/710] Revert "keymap tests." This reverts commit 3000b68b6a3a97011caeee98247481b391fceb02. --- .../services/keybinding/test/browserKeyboardMapper.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts index 2c707c50278..acf45e1358d 100644 --- a/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts @@ -33,12 +33,12 @@ suite('keyboard layout loader', () => { let commandService = instantiationService.stub(ICommandService, {}); let instance = new TestKeyboardMapperFactory(notitifcationService, storageService, commandService); - test('load default US keyboard layout', () => { + test.skip('load default US keyboard layout', () => { assert.notEqual(instance.activeKeyboardLayout, null); assert.equal(instance.activeKeyboardLayout!.isUSStandard, true); }); - test('isKeyMappingActive', () => { + test.skip('isKeyMappingActive', () => { assert.equal(instance.isKeyMappingActive({ KeyA: { value: 'a', From b185e5b77cce1d861950c38bba3a5406706f02f8 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 Jul 2019 15:12:32 -0700 Subject: [PATCH 330/710] Remove unsed event --- .../workbench/contrib/webview/browser/webviewEditorInput.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts index aadd6394c0b..71f9a9754a5 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ import * as dom from 'vs/base/browser/dom'; import { memoize } from 'vs/base/common/decorators'; -import { Emitter } from 'vs/base/common/event'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { URI } from 'vs/base/common/uri'; import { IEditorModel } from 'vs/platform/editor/common/editor'; @@ -104,9 +103,6 @@ export class WebviewEditorInput extends EditorInput { return WebviewEditorInput.typeId; } - private readonly _onDidChangeIcon = this._register(new Emitter()); - public readonly onDidChangeIcon = this._onDidChangeIcon.event; - public dispose() { this.disposeWebview(); From e26db506b7c85ac1d8023449f41650eb99ba6724 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 Jul 2019 15:15:01 -0700 Subject: [PATCH 331/710] Mark that state may be undefined --- src/vs/workbench/api/browser/mainThreadWebview.ts | 2 +- .../workbench/contrib/webview/browser/webviewEditorInput.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadWebview.ts b/src/vs/workbench/api/browser/mainThreadWebview.ts index d26b5440d47..e1f0616efe6 100644 --- a/src/vs/workbench/api/browser/mainThreadWebview.ts +++ b/src/vs/workbench/api/browser/mainThreadWebview.ts @@ -230,7 +230,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews if (!webview || webview.isDisposed()) { return; } - (webview as WebviewEditorInput).state.state = newState; + (webview as WebviewEditorInput).state!.state = newState; } }; } diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts index 71f9a9754a5..0d340e912b1 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts @@ -70,7 +70,7 @@ export class WebviewEditorInput extends EditorInput { private readonly _webviewDisposables = this._register(new DisposableStore()); private _group?: GroupIdentifier; private _scrollYPercentage: number = 0; - private _state: State; + private _state: State | undefined; public readonly extension?: { readonly location: URI; @@ -178,11 +178,11 @@ export class WebviewEditorInput extends EditorInput { } } - public get state(): State { + public get state(): State | undefined { return this._state; } - public set state(value: State) { + public set state(value: State | undefined) { this._state = value; } From 46294799205b65ac5fe691b6f0f44cc6025ae2b3 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 Jul 2019 15:18:19 -0700 Subject: [PATCH 332/710] Don't require using state to check if we can revive --- src/vs/workbench/api/browser/mainThreadWebview.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/browser/mainThreadWebview.ts b/src/vs/workbench/api/browser/mainThreadWebview.ts index e1f0616efe6..efa06d54b4b 100644 --- a/src/vs/workbench/api/browser/mainThreadWebview.ts +++ b/src/vs/workbench/api/browser/mainThreadWebview.ts @@ -176,7 +176,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews this._revivers.set(viewType, this._webviewEditorService.registerReviver({ canRevive: (webview) => { - return webview.state && webview.state.viewType === viewType; + return webview.state && webview.viewType === this.getInternalWebviewViewType(viewType); }, reviveWebview: async (webview): Promise => { const viewType = webview.state.viewType; From 8b69b981de528a7bbeaba40624d6164309f09551 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 Jul 2019 15:52:05 -0700 Subject: [PATCH 333/710] Simplify state used for webviews We previously used nested states to store some additional metadata alongside the real webview state. This is overly complicated. This change switches us to using a single top level state field, while also adding some code to handle migration from the old state structure --- .../api/browser/mainThreadWebview.ts | 52 +++++++++++++------ .../contrib/webview/browser/webviewEditor.ts | 2 +- .../webview/browser/webviewEditorInput.ts | 18 ++----- .../browser/webviewEditorInputFactory.ts | 23 +++++++- 4 files changed, 65 insertions(+), 30 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadWebview.ts b/src/vs/workbench/api/browser/mainThreadWebview.ts index efa06d54b4b..6d96547134d 100644 --- a/src/vs/workbench/api/browser/mainThreadWebview.ts +++ b/src/vs/workbench/api/browser/mainThreadWebview.ts @@ -22,8 +22,9 @@ import { ACTIVE_GROUP, IEditorService } from 'vs/workbench/services/editor/commo import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; import { extHostNamedCustomer } from '../common/extHostCustomers'; import { IProductService } from 'vs/platform/product/common/product'; +import { startsWith } from 'vs/base/common/strings'; -interface MainThreadWebviewState { +interface OldMainThreadWebviewState { readonly viewType: string; state: any; } @@ -43,7 +44,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews private readonly _proxy: ExtHostWebviewsShape; - private readonly _webviews = new Map>(); + private readonly _webviews = new Map(); private readonly _revivers = new Map(); private _activeWebview: WebviewPanelHandle | undefined = undefined; @@ -67,8 +68,12 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews // This reviver's only job is to activate webview extensions // This should trigger the real reviver to be registered from the extension host side. this._register(_webviewEditorService.registerReviver({ - canRevive: (webview: WebviewEditorInput) => { - const viewType = webview.state && webview.state.viewType; + canRevive: (webview: WebviewEditorInput) => { + if (!webview.state) { + return false; + } + + const viewType = this.fromInternalWebviewViewType(webview.viewType); if (typeof viewType === 'string') { extensionService.activateByEvent(`onWebviewPanel:${viewType}`); } @@ -96,11 +101,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews const webview = this._webviewEditorService.createWebview(handle, this.getInternalWebviewViewType(viewType), title, mainThreadShowOptions, reviveWebviewOptions(options), { location: URI.revive(extensionLocation), id: extensionId - }, this.createWebviewEventDelegate(handle)) as WebviewEditorInput; - webview.state = { - viewType: viewType, - state: undefined - }; + }, this.createWebviewEventDelegate(handle)) as WebviewEditorInput; this._webviews.set(handle, webview); @@ -176,17 +177,31 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews this._revivers.set(viewType, this._webviewEditorService.registerReviver({ canRevive: (webview) => { - return webview.state && webview.viewType === this.getInternalWebviewViewType(viewType); + return !!webview.state && webview.viewType === this.getInternalWebviewViewType(viewType); }, reviveWebview: async (webview): Promise => { - const viewType = webview.state.viewType; - const handle = 'revival-' + MainThreadWebviews.revivalPool++; + const viewType = this.fromInternalWebviewViewType(webview.viewType); + if (!viewType) { + webview.html = MainThreadWebviews.getDeserializationFailedContents(webview.viewType); + return; + } + + const handle = `revival-${MainThreadWebviews.revivalPool++}`; this._webviews.set(handle, webview); webview._events = this.createWebviewEventDelegate(handle); let state = undefined; - if (webview.state.state) { + if (webview.state) { try { - state = JSON.parse(webview.state.state); + // Check for old-style webview state first which stored state inside another state object + // TODO: remove this after 1.37 ships. + if ( + typeof (webview.state as unknown as OldMainThreadWebviewState).viewType === 'string' && + 'state' in (webview.state as unknown as OldMainThreadWebviewState) + ) { + state = JSON.parse((webview.state as any).state); + } else { + state = JSON.parse(webview.state); + } } catch { // noop } @@ -216,6 +231,13 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews return `mainThreadWebview-${viewType}`; } + private fromInternalWebviewViewType(viewType: string): string | undefined { + if (!startsWith(viewType, 'mainThreadWebview-')) { + return undefined; + } + return viewType.replace(/^mainThreadWebview-/, ''); + } + private createWebviewEventDelegate(handle: WebviewPanelHandle) { return { onDidClickLink: (uri: URI) => this.onDidClickLink(handle, uri), @@ -230,7 +252,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews if (!webview || webview.isDisposed()) { return; } - (webview as WebviewEditorInput).state!.state = newState; + webview.state = newState; } }; } diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts index b128f150afb..fc68d1dc91d 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts @@ -256,7 +256,7 @@ export class WebviewEditor extends BaseEditor { this._webview.initialScrollProgress = input.scrollYPercentage; } - this._webview.state = input.state ? input.state.state : undefined; + this._webview.state = input.state; this._content!.setAttribute('aria-flowto', this._webviewContent.id); diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts index 0d340e912b1..fa553aef2e7 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts @@ -52,7 +52,7 @@ class WebviewIconsManager { } } -export class WebviewEditorInput extends EditorInput { +export class WebviewEditorInput extends EditorInput { private readonly iconsManager = new WebviewIconsManager(); @@ -70,7 +70,7 @@ export class WebviewEditorInput extends EditorInput { private readonly _webviewDisposables = this._register(new DisposableStore()); private _group?: GroupIdentifier; private _scrollYPercentage: number = 0; - private _state: State | undefined; + public state: string | undefined; public readonly extension?: { readonly location: URI; @@ -82,7 +82,7 @@ export class WebviewEditorInput extends EditorInput { public readonly viewType: string, name: string, options: WebviewInputOptions, - state: State, + state: string, events: WebviewEvents, extension: undefined | { readonly location: URI; @@ -95,7 +95,7 @@ export class WebviewEditorInput extends EditorInput { this._name = name; this._options = options; this._events = events; - this._state = state; + this.state = state; this.extension = extension; } @@ -178,14 +178,6 @@ export class WebviewEditorInput extends EditorInput { } } - public get state(): State | undefined { - return this._state; - } - - public set state(value: State | undefined) { - this._state = value; - } - public get options(): WebviewInputOptions { return this._options; } @@ -308,7 +300,7 @@ export class RevivedWebviewEditorInput extends WebviewEditorInput { viewType: string, name: string, options: WebviewInputOptions, - state: any, + state: string, events: WebviewEvents, extension: undefined | { readonly location: URI; diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInputFactory.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInputFactory.ts index 6c565b87ada..2b4eb4551ff 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInputFactory.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInputFactory.ts @@ -68,12 +68,15 @@ export class WebviewEditorInputFactory implements IEditorInputFactory { const extensionLocation = reviveUri(data.extensionLocation); const extensionId = data.extensionId ? new ExtensionIdentifier(data.extensionId) : undefined; const iconPath = reviveIconPath(data.iconPath); - return this._webviewService.reviveWebview(generateUuid(), data.viewType, data.title, iconPath, data.state, data.options, extensionLocation ? { + const state = reviveState(data.state); + + return this._webviewService.reviveWebview(generateUuid(), data.viewType, data.title, iconPath, state, data.options, extensionLocation ? { location: extensionLocation, id: extensionId } : undefined, data.group); } } + function reviveIconPath(data: SerializedIconPath | undefined) { if (!data) { return undefined; @@ -98,3 +101,21 @@ function reviveUri(data: string | UriComponents | undefined): URI | undefined { return undefined; } } + + +function reviveState(state: unknown | undefined): undefined | string { + if (!state) { + return undefined; + } + + if (typeof state === 'string') { + return state; + } + + // Likely an old style state. Unwrap to a simple state object + // Remove after 1.37 + if ('state' in (state as any) && typeof (state as any).state === 'string') { + return (state as any).state; + } + return undefined; +} \ No newline at end of file From 5ea2f5a75d5d734c13d2ae1de9661fb29e112834 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 Jul 2019 15:57:46 -0700 Subject: [PATCH 334/710] Use regular map instead of object literal map --- .../update/electron-browser/releaseNotesEditor.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts b/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts index c6d72b3e1f8..b1660fd9e5c 100644 --- a/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts +++ b/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts @@ -48,7 +48,7 @@ function renderBody( export class ReleaseNotesManager { - private _releaseNotesCache: { [version: string]: Promise; } = Object.create(null); + private readonly _releaseNotesCache = new Map>(); private _currentReleaseNotes: WebviewEditorInput | undefined = undefined; private _lastText: string | undefined; @@ -162,8 +162,8 @@ export class ReleaseNotesManager { .replace(/kbstyle\(([^\)]+)\)/gi, kbstyle); }; - if (!this._releaseNotesCache[version]) { - this._releaseNotesCache[version] = this._requestService.request({ url }, CancellationToken.None) + if (!this._releaseNotesCache.has(version)) { + this._releaseNotesCache.set(version, this._requestService.request({ url }, CancellationToken.None) .then(asText) .then(text => { if (!text || !/^#\s/.test(text)) { // release notes always starts with `#` followed by whitespace @@ -172,10 +172,10 @@ export class ReleaseNotesManager { return Promise.resolve(text); }) - .then(text => patchKeybindings(text)); + .then(text => patchKeybindings(text))); } - return this._releaseNotesCache[version]; + return this._releaseNotesCache.get(version)!; } private onDidClickLink(uri: URI) { From 8bdcd22b623d210e38c805502521e3dd81bb07ed Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 Jul 2019 16:39:07 -0700 Subject: [PATCH 335/710] Start with no state, instead of empty object state --- .../workbench/contrib/webview/browser/webviewEditorInput.ts | 4 ++-- .../workbench/contrib/webview/browser/webviewEditorService.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts index fa553aef2e7..6c95600c417 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts @@ -82,7 +82,7 @@ export class WebviewEditorInput extends EditorInput { public readonly viewType: string, name: string, options: WebviewInputOptions, - state: string, + state: string | undefined, events: WebviewEvents, extension: undefined | { readonly location: URI; @@ -300,7 +300,7 @@ export class RevivedWebviewEditorInput extends WebviewEditorInput { viewType: string, name: string, options: WebviewInputOptions, - state: string, + state: string | undefined, events: WebviewEvents, extension: undefined | { readonly location: URI; diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts index 1a5fa997a1e..ead9999212d 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts @@ -146,7 +146,7 @@ export class WebviewEditorService implements IWebviewEditorService { }, events: WebviewEvents ): WebviewEditorInput { - const webviewInput = this._instantiationService.createInstance(WebviewEditorInput, id, viewType, title, options, {}, events, extension); + const webviewInput = this._instantiationService.createInstance(WebviewEditorInput, id, viewType, title, options, undefined, events, extension); this._editorService.openEditor(webviewInput, { pinned: true, preserveFocus: showOptions.preserveFocus }, showOptions.group); return webviewInput; } From 928ae46457461558a4894c0257c8144124a621ee Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 17 Jul 2019 18:13:31 -0700 Subject: [PATCH 336/710] Rewrite how webviews are managed internally This change attempts to do the following: - Encapsult most of the logic for handling the webviews used for webview editors into a new WebviewEditorOverlay class - Greatly simplify WebviewEditorInput and make it take a webview when it is created - Move the webview creation logic up into the webviewEditorService instead of having it be inside the webviewEditor class itself This aim of these changes is to make it possible to re-use more of the webview logic for custom editors --- .../api/browser/mainThreadCodeInsets.ts | 7 +- .../api/browser/mainThreadWebview.ts | 92 ++++---- .../electron-browser/releaseNotesEditor.ts | 14 +- .../contrib/webview/browser/webviewEditor.ts | 213 ++++++------------ .../webview/browser/webviewEditorInput.ts | 176 +-------------- .../browser/webviewEditorInputFactory.ts | 4 +- .../webview/browser/webviewEditorService.ts | 66 ++++-- .../contrib/webview/browser/webviewElement.ts | 2 +- .../contrib/webview/browser/webviewService.ts | 187 ++++++++++++++- .../contrib/webview/common/webview.ts | 28 ++- .../electron-browser/webviewCommands.ts | 6 +- .../electron-browser/webviewElement.ts | 26 +-- .../electron-browser/webviewService.ts | 19 +- 13 files changed, 389 insertions(+), 451 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadCodeInsets.ts b/src/vs/workbench/api/browser/mainThreadCodeInsets.ts index 05cfa4cdc4c..48938ad1f5b 100644 --- a/src/vs/workbench/api/browser/mainThreadCodeInsets.ts +++ b/src/vs/workbench/api/browser/mainThreadCodeInsets.ts @@ -8,7 +8,7 @@ import * as modes from 'vs/editor/common/modes'; import { MainContext, MainThreadEditorInsetsShape, IExtHostContext, ExtHostEditorInsetsShape, ExtHostContext } from 'vs/workbench/api/common/extHost.protocol'; import { extHostNamedCustomer } from '../common/extHostCustomers'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; -import { IWebviewService, Webview } from 'vs/workbench/contrib/webview/common/webview'; +import { IWebviewService, WebviewElement } from 'vs/workbench/contrib/webview/common/webview'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { IActiveCodeEditor, IViewZone } from 'vs/editor/browser/editorBrowser'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; @@ -33,7 +33,7 @@ class EditorWebviewZone implements IViewZone { readonly editor: IActiveCodeEditor, readonly line: number, readonly height: number, - readonly webview: Webview, + readonly webview: WebviewElement, ) { this.domNode = document.createElement('div'); this.domNode.style.zIndex = '10'; // without this, the webview is not interactive @@ -124,12 +124,11 @@ export class MainThreadEditorInsets implements MainThreadEditorInsetsShape { $setHtml(handle: number, value: string): void { const inset = this.getInset(handle); inset.webview.html = value; - } $setOptions(handle: number, options: modes.IWebviewOptions): void { const inset = this.getInset(handle); - inset.webview.options = options; + inset.webview.contentOptions = options; } async $postMessage(handle: number, value: any): Promise { diff --git a/src/vs/workbench/api/browser/mainThreadWebview.ts b/src/vs/workbench/api/browser/mainThreadWebview.ts index 6d96547134d..94413dd49a7 100644 --- a/src/vs/workbench/api/browser/mainThreadWebview.ts +++ b/src/vs/workbench/api/browser/mainThreadWebview.ts @@ -14,7 +14,6 @@ import { IOpenerService } from 'vs/platform/opener/common/opener'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ExtHostContext, ExtHostWebviewsShape, IExtHostContext, MainContext, MainThreadWebviewsShape, WebviewPanelHandle, WebviewPanelShowOptions } from 'vs/workbench/api/common/extHost.protocol'; import { editorGroupToViewColumn, EditorViewColumn, viewColumnToEditorGroup } from 'vs/workbench/api/common/shared/editor'; -import { WebviewEditor } from 'vs/workbench/contrib/webview/browser/webviewEditor'; import { WebviewEditorInput } from 'vs/workbench/contrib/webview/browser/webviewEditorInput'; import { ICreateWebViewShowOptions, IWebviewEditorService, WebviewInputOptions } from 'vs/workbench/contrib/webview/browser/webviewEditorService'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; @@ -69,7 +68,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews // This should trigger the real reviver to be registered from the extension host side. this._register(_webviewEditorService.registerReviver({ canRevive: (webview: WebviewEditorInput) => { - if (!webview.state) { + if (!webview.webview.state) { return false; } @@ -101,7 +100,8 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews const webview = this._webviewEditorService.createWebview(handle, this.getInternalWebviewViewType(viewType), title, mainThreadShowOptions, reviveWebviewOptions(options), { location: URI.revive(extensionLocation), id: extensionId - }, this.createWebviewEventDelegate(handle)) as WebviewEditorInput; + }); + this.hookupWebviewEventDelegate(handle, webview); this._webviews.set(handle, webview); @@ -130,12 +130,12 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews public $setHtml(handle: WebviewPanelHandle, value: string): void { const webview = this.getWebview(handle); - webview.html = value; + webview.webview.html = value; } public $setOptions(handle: WebviewPanelHandle, options: modes.IWebviewOptions): void { const webview = this.getWebview(handle); - webview.setOptions(reviveWebviewOptions(options as any /*todo@mat */)); + webview.webview.contentOptions = reviveWebviewOptions(options as any /*todo@mat */); } public $reveal(handle: WebviewPanelHandle, showOptions: WebviewPanelShowOptions): void { @@ -152,22 +152,8 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews public async $postMessage(handle: WebviewPanelHandle, message: any): Promise { const webview = this.getWebview(handle); - const editors = this._editorService.visibleControls - .filter(e => e instanceof WebviewEditor) - .map(e => e as WebviewEditor) - .filter(e => e.input!.matches(webview)); - - if (editors.length > 0) { - editors[0].sendMessage(message); - return true; - } - - if (webview.webview) { - webview.webview.sendMessage(message); - return true; - } - - return false; + webview.webview.sendMessage(message); + return true; } public $registerSerializer(viewType: string): void { @@ -176,31 +162,31 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews } this._revivers.set(viewType, this._webviewEditorService.registerReviver({ - canRevive: (webview) => { - return !!webview.state && webview.viewType === this.getInternalWebviewViewType(viewType); + canRevive: (webviewEditorInput) => { + return !!webviewEditorInput.webview.state && webviewEditorInput.viewType === this.getInternalWebviewViewType(viewType); }, - reviveWebview: async (webview): Promise => { - const viewType = this.fromInternalWebviewViewType(webview.viewType); + reviveWebview: async (webviewEditorInput): Promise => { + const viewType = this.fromInternalWebviewViewType(webviewEditorInput.viewType); if (!viewType) { - webview.html = MainThreadWebviews.getDeserializationFailedContents(webview.viewType); + webviewEditorInput.webview.html = MainThreadWebviews.getDeserializationFailedContents(webviewEditorInput.viewType); return; } const handle = `revival-${MainThreadWebviews.revivalPool++}`; - this._webviews.set(handle, webview); - webview._events = this.createWebviewEventDelegate(handle); + this._webviews.set(handle, webviewEditorInput); + this.hookupWebviewEventDelegate(handle, webviewEditorInput); let state = undefined; - if (webview.state) { + if (webviewEditorInput.webview.state) { try { // Check for old-style webview state first which stored state inside another state object // TODO: remove this after 1.37 ships. if ( - typeof (webview.state as unknown as OldMainThreadWebviewState).viewType === 'string' && - 'state' in (webview.state as unknown as OldMainThreadWebviewState) + typeof (webviewEditorInput.webview.state as unknown as OldMainThreadWebviewState).viewType === 'string' && + 'state' in (webviewEditorInput.webview.state as unknown as OldMainThreadWebviewState) ) { - state = JSON.parse((webview.state as any).state); + state = JSON.parse((webviewEditorInput.webview.state as any).state); } else { - state = JSON.parse(webview.state); + state = JSON.parse(webviewEditorInput.webview.state); } } catch { // noop @@ -208,10 +194,10 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews } try { - await this._proxy.$deserializeWebviewPanel(handle, viewType, webview.getTitle(), state, editorGroupToViewColumn(this._editorGroupService, webview.group || 0), webview.options); + await this._proxy.$deserializeWebviewPanel(handle, viewType, webviewEditorInput.getTitle(), state, editorGroupToViewColumn(this._editorGroupService, webviewEditorInput.group || 0), webviewEditorInput.webview.options); } catch (error) { onUnexpectedError(error); - webview.html = MainThreadWebviews.getDeserializationFailedContents(viewType); + webviewEditorInput.webview.html = MainThreadWebviews.getDeserializationFailedContents(viewType); } } })); @@ -238,23 +224,21 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews return viewType.replace(/^mainThreadWebview-/, ''); } - private createWebviewEventDelegate(handle: WebviewPanelHandle) { - return { - onDidClickLink: (uri: URI) => this.onDidClickLink(handle, uri), - onMessage: (message: any) => this._proxy.$onMessage(handle, message), - onDispose: () => { - this._proxy.$onDidDisposeWebviewPanel(handle).finally(() => { - this._webviews.delete(handle); - }); - }, - onDidUpdateWebviewState: (newState: any) => { - const webview = this.tryGetWebview(handle); - if (!webview || webview.isDisposed()) { - return; - } - webview.state = newState; + private hookupWebviewEventDelegate(handle: WebviewPanelHandle, input: WebviewEditorInput) { + input.webview.onDidClickLink((uri: URI) => this.onDidClickLink(handle, uri)); + input.webview.onMessage((message: any) => this._proxy.$onMessage(handle, message)); + input.onDispose(() => { + this._proxy.$onDidDisposeWebviewPanel(handle).finally(() => { + this._webviews.delete(handle); + }); + }); + input.webview.onDidUpdateState((newState: any) => { + const webview = this.tryGetWebview(handle); + if (!webview || webview.isDisposed()) { + return; } - }; + webview.webview.state = newState; + }); } private onActiveEditorChanged() { @@ -341,7 +325,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews if (this._productService.urlProtocol === link.scheme) { return true; } - return !!webview.options.enableCommandUris && link.scheme === 'command'; + return !!webview.webview.contentOptions.enableCommandUris && link.scheme === 'command'; } private getWebview(handle: WebviewPanelHandle): WebviewEditorInput { @@ -369,13 +353,15 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews } } -function reviveWebviewOptions(options: WebviewInputOptions): WebviewInputOptions { +function reviveWebviewOptions(options: modes.IWebviewOptions): WebviewInputOptions { return { ...options, + allowScripts: options.enableScripts, localResourceRoots: Array.isArray(options.localResourceRoots) ? options.localResourceRoots.map(r => URI.revive(r)) : undefined, }; } + function reviveWebviewIcon( value: { light: UriComponents, dark: UriComponents } | undefined ): { light: URI, dark: URI } | undefined { diff --git a/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts b/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts index b1660fd9e5c..65d12c80877 100644 --- a/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts +++ b/src/vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts @@ -71,7 +71,7 @@ export class ReleaseNotesManager { } const html = await this.renderBody(this._lastText); if (this._currentReleaseNotes) { - this._currentReleaseNotes.html = html; + this._currentReleaseNotes.webview.html = html; } }); } @@ -88,7 +88,7 @@ export class ReleaseNotesManager { const activeControl = this._editorService.activeControl; if (this._currentReleaseNotes) { this._currentReleaseNotes.setName(title); - this._currentReleaseNotes.html = html; + this._currentReleaseNotes.webview.html = html; this._webviewEditorService.revealWebview(this._currentReleaseNotes, activeControl ? activeControl.group : this._editorGroupService.activeGroup, false); } else { this._currentReleaseNotes = this._webviewEditorService.createWebview( @@ -103,17 +103,17 @@ export class ReleaseNotesManager { URI.parse(require.toUrl('./media')) ] }, - undefined, { - onDidClickLink: uri => this.onDidClickLink(uri), - onDispose: () => { this._currentReleaseNotes = undefined; } - }); + undefined); + + this._currentReleaseNotes.webview.onDidClickLink(uri => this.onDidClickLink(uri)); + this._currentReleaseNotes.onDispose(() => { this._currentReleaseNotes = undefined; }); const iconPath = URI.parse(require.toUrl('./media/code-icon.svg')); this._currentReleaseNotes.iconPath = { light: iconPath, dark: iconPath }; - this._currentReleaseNotes.html = html; + this._currentReleaseNotes.webview.html = html; } return true; diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts index fc68d1dc91d..61a722d32c9 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts @@ -7,31 +7,27 @@ import * as DOM from 'vs/base/browser/dom'; import { CancellationToken } from 'vs/base/common/cancellation'; import { Emitter, Event } from 'vs/base/common/event'; import { DisposableStore, MutableDisposable } from 'vs/base/common/lifecycle'; -import { URI } from 'vs/base/common/uri'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IWindowService } from 'vs/platform/windows/common/windows'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { EditorOptions } from 'vs/workbench/common/editor'; import { WebviewEditorInput } from 'vs/workbench/contrib/webview/browser/webviewEditorInput'; -import { IWebviewService, KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE, Webview } from 'vs/workbench/contrib/webview/common/webview'; +import { KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE, Webview, WebviewEditorOverlay } from 'vs/workbench/contrib/webview/common/webview'; import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; - export class WebviewEditor extends BaseEditor { public static readonly ID = 'WebviewEditor'; - private _webview: Webview | undefined; + private _webview: WebviewEditorOverlay | undefined; private _findWidgetVisible: IContextKey; - private _editorFrame: HTMLElement; + private _editorFrame?: HTMLElement; private _content?: HTMLElement; - private _webviewContent: HTMLElement | undefined; private readonly _webviewFocusTrackerDisposables = this._register(new DisposableStore()); private readonly _onFocusWindowHandler = this._register(new MutableDisposable()); @@ -39,14 +35,10 @@ export class WebviewEditor extends BaseEditor { private readonly _onDidFocusWebview = this._register(new Emitter()); public get onDidFocus(): Event { return this._onDidFocusWebview.event; } - private _pendingMessages: any[] = []; - constructor( @ITelemetryService telemetryService: ITelemetryService, @IThemeService themeService: IThemeService, @IContextKeyService private _contextKeyService: IContextKeyService, - @IWebviewService private readonly _webviewService: IWebviewService, - @IWorkspaceContextService private readonly _contextService: IWorkspaceContextService, @IEditorService private readonly _editorService: IEditorService, @IWindowService private readonly _windowService: IWindowService, @IStorageService storageService: IStorageService @@ -57,64 +49,35 @@ export class WebviewEditor extends BaseEditor { } } + public get isWebviewEditor() { + return true; + } + protected createEditor(parent: HTMLElement): void { this._editorFrame = parent; this._content = document.createElement('div'); parent.appendChild(this._content); } - private doUpdateContainer() { - const webviewContainer = this.input && (this.input as WebviewEditorInput).container; - if (webviewContainer && webviewContainer.parentElement) { - const frameRect = this._editorFrame.getBoundingClientRect(); - const containerRect = webviewContainer.parentElement.getBoundingClientRect(); - - webviewContainer.style.position = 'absolute'; - webviewContainer.style.top = `${frameRect.top - containerRect.top}px`; - webviewContainer.style.left = `${frameRect.left - containerRect.left}px`; - webviewContainer.style.width = `${frameRect.width}px`; - webviewContainer.style.height = `${frameRect.height}px`; - } - } - public dispose(): void { - this._pendingMessages = []; - - // Let the editor input dispose of the webview. - this._webview = undefined; - this._webviewContent = undefined; - - if (this._content && this._content.parentElement) { - this._content.parentElement.removeChild(this._content); + if (this._content) { + this._content.remove(); this._content = undefined; } super.dispose(); } - public sendMessage(data: any): void { - if (this._webview) { - this._webview.sendMessage(data); - } else { - this._pendingMessages.push(data); - } - } public showFind() { - if (this._webview) { - this._webview.showFind(); + this.withWebview(webview => { + webview.showFind(); this._findWidgetVisible.set(true); - } + }); } public hideFind() { this._findWidgetVisible.reset(); - if (this._webview) { - this._webview.hideFind(); - } - } - - public get isWebviewEditor() { - return true; + this.withWebview(webview => webview.hideFind()); } public reload() { @@ -122,10 +85,10 @@ export class WebviewEditor extends BaseEditor { } public layout(_dimension: DOM.Dimension): void { - this.withWebview(webview => { - this.doUpdateContainer(); - webview.layout(); - }); + if (this._webview) { + this.doUpdateContainer(this._webview); + this._webview.layout(); + } } public focus(): void { @@ -149,23 +112,14 @@ export class WebviewEditor extends BaseEditor { } protected setEditorVisible(visible: boolean, group: IEditorGroup): void { - if (this.input && this.input instanceof WebviewEditorInput) { + const webview = (this.input && (this.input as WebviewEditorInput).webview) || this._webview; + if (webview) { if (visible) { - this.input.claimWebview(this); + webview.claim(this); } else { - this.input.releaseWebview(this); - } - - this.updateWebview(this.input as WebviewEditorInput); - } - - if (this._webviewContent) { - if (visible) { - this._webviewContent.style.visibility = 'visible'; - this.doUpdateContainer(); - } else { - this._webviewContent.style.visibility = 'hidden'; + webview.release(this); } + this.claimWebview(this.input as WebviewEditorInput); } super.setEditorVisible(visible, group); @@ -173,115 +127,76 @@ export class WebviewEditor extends BaseEditor { public clearInput() { if (this.input && this.input instanceof WebviewEditorInput) { - this.input.releaseWebview(this); + this.input.webview.release(this); } this._webview = undefined; - this._webviewContent = undefined; - this._pendingMessages = []; - super.clearInput(); } - setInput(input: WebviewEditorInput, options: EditorOptions, token: CancellationToken): Promise { - if (this.input) { - (this.input as WebviewEditorInput).releaseWebview(this); + public async setInput(input: WebviewEditorInput, options: EditorOptions, token: CancellationToken): Promise { + if (this.input && (this.input as WebviewEditorInput).webview) { + (this.input as WebviewEditorInput).webview!.release(this); this._webview = undefined; - this._webviewContent = undefined; - } - this._pendingMessages = []; - return super.setInput(input, options, token) - .then(() => input.resolve()) - .then(() => { - if (token.isCancellationRequested) { - return; - } - if (this.group) { - input.updateGroup(this.group.id); - } - this.updateWebview(input); - }); - } - - private updateWebview(input: WebviewEditorInput) { - const webview = this.getWebview(input); - input.claimWebview(this); - webview.update(input.html, { - allowScripts: input.options.enableScripts, - localResourceRoots: input.options.localResourceRoots || this.getDefaultLocalResourceRoots(), - portMappings: input.options.portMapping, - }, !!input.options.retainContextWhenHidden); - - if (this._webviewContent) { - this._webviewContent.style.visibility = 'visible'; } - this.doUpdateContainer(); - } - - private getDefaultLocalResourceRoots(): URI[] { - const rootPaths = this._contextService.getWorkspace().folders.map(x => x.uri); - const extension = (this.input as WebviewEditorInput).extension; - if (extension) { - rootPaths.push(extension.location); + await super.setInput(input, options, token); + await input.resolve(); + if (token.isCancellationRequested) { + return; } - return rootPaths; + + if (this.group) { + input.updateGroup(this.group.id); + } + this.claimWebview(input); } - private getWebview(input: WebviewEditorInput): Webview { + private claimWebview(input: WebviewEditorInput): void { if (this._webview) { - return this._webview; + this._webview.claim(this); + return; } - this._webviewContent = input.container; + this._webview = input.webview; + this._webview.claim(this); - if (input.webview) { - this._webview = input.webview; - } else { - if (input.options.enableFindWidget) { - this._contextKeyService = this._register(this._contextKeyService.createScoped(this._webviewContent)); - this._findWidgetVisible = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(this._contextKeyService); - } - - this._webview = this._webviewService.createWebview(input.id, - { - allowSvgs: true, - extension: input.extension, - enableFindWidget: input.options.enableFindWidget - }, {}); - this._webview.mountTo(this._webviewContent); - input.webview = this._webview; - - if (input.options.tryRestoreScrollPosition) { - this._webview.initialScrollProgress = input.scrollYPercentage; - } - - this._webview.state = input.state; - - this._content!.setAttribute('aria-flowto', this._webviewContent.id); - - this.doUpdateContainer(); + if (this._webview.options.enableFindWidget) { + this._contextKeyService = this._register(this._contextKeyService.createScoped(this._webview.container)); + this._findWidgetVisible = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(this._contextKeyService); } - for (const message of this._pendingMessages) { - this._webview.sendMessage(message); + if (this._content) { + this._content.setAttribute('aria-flowto', this._webview.container.id); } - this._pendingMessages = []; - this.trackFocus(); - - return this._webview; + this.doUpdateContainer(this._webview); + this.trackFocus(this._webview); } - private trackFocus() { + private doUpdateContainer(webview: WebviewEditorOverlay) { + const webviewContainer = webview.container; + if (webviewContainer && webviewContainer.parentElement && this._editorFrame) { + const frameRect = this._editorFrame.getBoundingClientRect(); + const containerRect = webviewContainer.parentElement.getBoundingClientRect(); + + webviewContainer.style.position = 'absolute'; + webviewContainer.style.top = `${frameRect.top - containerRect.top}px`; + webviewContainer.style.left = `${frameRect.left - containerRect.left}px`; + webviewContainer.style.width = `${frameRect.width}px`; + webviewContainer.style.height = `${frameRect.height}px`; + } + } + + private trackFocus(webview: WebviewEditorOverlay): void { this._webviewFocusTrackerDisposables.clear(); // Track focus in webview content - const webviewContentFocusTracker = DOM.trackFocus(this._webviewContent!); + const webviewContentFocusTracker = DOM.trackFocus(webview.container); this._webviewFocusTrackerDisposables.add(webviewContentFocusTracker); this._webviewFocusTrackerDisposables.add(webviewContentFocusTracker.onDidFocus(() => this._onDidFocusWebview.fire())); // Track focus in webview element - this._webviewFocusTrackerDisposables.add(this._webview!.onDidFocus(() => this._onDidFocusWebview.fire())); + this._webviewFocusTrackerDisposables.add(webview.onDidFocus(() => this._onDidFocusWebview.fire())); } } diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts index 6c95600c417..a5a176a42b9 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts @@ -4,14 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as dom from 'vs/base/browser/dom'; import { memoize } from 'vs/base/common/decorators'; -import { DisposableStore } from 'vs/base/common/lifecycle'; import { URI } from 'vs/base/common/uri'; import { IEditorModel } from 'vs/platform/editor/common/editor'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { EditorInput, EditorModel, GroupIdentifier, IEditorInput } from 'vs/workbench/common/editor'; -import { Webview, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; -import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService'; -import { WebviewEvents, WebviewInputOptions } from './webviewEditorService'; +import { WebviewEditorOverlay } from 'vs/workbench/contrib/webview/common/webview'; class WebviewIconsManager { private readonly _icons = new Map(); @@ -54,72 +51,36 @@ class WebviewIconsManager { export class WebviewEditorInput extends EditorInput { - private readonly iconsManager = new WebviewIconsManager(); - public static readonly typeId = 'workbench.editors.webviewInput'; + private readonly iconsManager = new WebviewIconsManager(); private _name: string; private _iconPath?: { light: URI, dark: URI }; - private _options: WebviewInputOptions; - private _html: string = ''; - private _currentWebviewHtml: string = ''; - public _events: WebviewEvents | undefined; - private _container?: HTMLElement; - private _webview?: Webview; - private _webviewOwner: any; - private readonly _webviewDisposables = this._register(new DisposableStore()); private _group?: GroupIdentifier; - private _scrollYPercentage: number = 0; - public state: string | undefined; - public readonly extension?: { - readonly location: URI; - readonly id: ExtensionIdentifier; - }; constructor( public readonly id: string, public readonly viewType: string, name: string, - options: WebviewInputOptions, - state: string | undefined, - events: WebviewEvents, - extension: undefined | { + public readonly extension: undefined | { readonly location: URI; readonly id: ExtensionIdentifier; }, - @IWorkbenchLayoutService private readonly _layoutService: IWorkbenchLayoutService, + public readonly webview: WebviewEditorOverlay, ) { super(); this._name = name; - this._options = options; - this._events = events; - this.state = state; this.extension = extension; + + this._register(webview); // The input owns this webview } public getTypeId(): string { return WebviewEditorInput.typeId; } - public dispose() { - this.disposeWebview(); - - if (this._container) { - this._container.remove(); - this._container = undefined; - } - - if (this._events && this._events.onDispose) { - this._events.onDispose(); - } - this._events = undefined; - - this._webview = undefined; - super.dispose(); - } - public getResource(): URI { return URI.from({ scheme: 'webview-panel', @@ -161,42 +122,6 @@ export class WebviewEditorInput extends EditorInput { return this._group; } - public get html(): string { - return this._html; - } - - public set html(value: string) { - if (value === this._currentWebviewHtml) { - return; - } - - this._html = value; - - if (this._webview) { - this._webview.html = value; - this._currentWebviewHtml = value; - } - } - - public get options(): WebviewInputOptions { - return this._options; - } - - public setOptions(value: WebviewOptions) { - this._options = { - ...this._options, - ...value - }; - - if (this._webview) { - this._webview.options = { - allowScripts: this._options.enableScripts, - localResourceRoots: this._options.localResourceRoots, - portMappings: this._options.portMapping, - }; - } - } - public resolve(): Promise { return Promise.resolve(new EditorModel()); } @@ -205,93 +130,11 @@ export class WebviewEditorInput extends EditorInput { return false; } - public get container(): HTMLElement { - if (!this._container) { - this._container = document.createElement('div'); - this._container.id = `webview-${this.id}`; - const part = this._layoutService.getContainer(Parts.EDITOR_PART); - part.appendChild(this._container); - } - return this._container; - } - - public get webview(): Webview | undefined { - return this._webview; - } - - public set webview(value: Webview | undefined) { - this._webviewDisposables.clear(); - - this._webview = value; - if (!this._webview) { - return; - } - - this._webview.onDidClickLink(link => { - if (this._events && this._events.onDidClickLink) { - this._events.onDidClickLink(link, this._options); - } - }, null, this._webviewDisposables); - - this._webview.onMessage(message => { - if (this._events && this._events.onMessage) { - this._events.onMessage(message); - } - }, null, this._webviewDisposables); - - this._webview.onDidScroll(message => { - this._scrollYPercentage = message.scrollYPercentage; - }, null, this._webviewDisposables); - - this._webview.onDidUpdateState(newState => { - if (this._events && this._events.onDidUpdateWebviewState) { - this._events.onDidUpdateWebviewState(newState); - } - }, null, this._webviewDisposables); - } - - public get scrollYPercentage() { - return this._scrollYPercentage; - } - - public claimWebview(owner: any) { - this._webviewOwner = owner; - } - - public releaseWebview(owner: any) { - if (this._webviewOwner === owner) { - this._webviewOwner = undefined; - if (this._options.retainContextWhenHidden && this._container) { - this._container.style.visibility = 'hidden'; - } else { - this.disposeWebview(); - } - } - } - - public disposeWebview() { - // The input owns the webview and its parent - if (this._webview) { - this._webview.dispose(); - this._webview = undefined; - } - - this._webviewDisposables.clear(); - this._webviewOwner = undefined; - - if (this._container) { - this._container.style.visibility = 'hidden'; - } - - this._currentWebviewHtml = ''; - } - public updateGroup(group: GroupIdentifier): void { this._group = group; } } - export class RevivedWebviewEditorInput extends WebviewEditorInput { private _revived: boolean = false; @@ -299,17 +142,14 @@ export class RevivedWebviewEditorInput extends WebviewEditorInput { id: string, viewType: string, name: string, - options: WebviewInputOptions, - state: string | undefined, - events: WebviewEvents, extension: undefined | { readonly location: URI; readonly id: ExtensionIdentifier }, private readonly reviver: (input: WebviewEditorInput) => Promise, - @IWorkbenchLayoutService partService: IWorkbenchLayoutService, + webview: WebviewEditorOverlay, ) { - super(id, viewType, name, options, state, events, extension, partService); + super(id, viewType, name, extension, webview); } public async resolve(): Promise { diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInputFactory.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInputFactory.ts index 2b4eb4551ff..b5f3ce40819 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInputFactory.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInputFactory.ts @@ -45,10 +45,10 @@ export class WebviewEditorInputFactory implements IEditorInputFactory { const data: SerializedWebview = { viewType: input.viewType, title: input.getName(), - options: input.options, + options: input.webview.options, extensionLocation: input.extension ? input.extension.location : undefined, extensionId: input.extension && input.extension.id ? input.extension.id.value : undefined, - state: input.state, + state: input.webview.state, iconPath: input.iconPath ? { light: input.iconPath.light, dark: input.iconPath.dark, } : undefined, group: input.group }; diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts index ead9999212d..3173d0afc4a 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts @@ -7,13 +7,14 @@ import { equals } from 'vs/base/common/arrays'; import { IDisposable, toDisposable } from 'vs/base/common/lifecycle'; import { values } from 'vs/base/common/map'; import { URI } from 'vs/base/common/uri'; -import { IWebviewOptions, IWebviewPanelOptions } from 'vs/editor/common/modes'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { createDecorator, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { GroupIdentifier } from 'vs/workbench/common/editor'; +import { IWebviewService, WebviewOptions, WebviewContentOptions } from 'vs/workbench/contrib/webview/common/webview'; import { IEditorGroup, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import { ACTIVE_GROUP_TYPE, IEditorService, SIDE_GROUP_TYPE } from 'vs/workbench/services/editor/common/editorService'; import { RevivedWebviewEditorInput, WebviewEditorInput } from './webviewEditorInput'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; export const IWebviewEditorService = createDecorator('webviewEditorService'); @@ -35,7 +36,6 @@ export interface IWebviewEditorService { location: URI, id: ExtensionIdentifier }, - events: WebviewEvents ): WebviewEditorInput; reviveWebview( @@ -77,25 +77,20 @@ export interface WebviewReviver { ): Promise; } -export interface WebviewEvents { - onMessage?(message: any): void; - onDispose?(): void; - onDidClickLink?(link: URI, options: IWebviewOptions): void; - onDidUpdateWebviewState?(newState: any): void; -} - -export interface WebviewInputOptions extends IWebviewOptions, IWebviewPanelOptions { - tryRestoreScrollPosition?: boolean; +export interface WebviewInputOptions extends WebviewOptions, WebviewContentOptions { + readonly tryRestoreScrollPosition?: boolean; + readonly retainContextWhenHidden?: boolean; + readonly enableCommandUris?: boolean; } export function areWebviewInputOptionsEqual(a: WebviewInputOptions, b: WebviewInputOptions): boolean { return a.enableCommandUris === b.enableCommandUris && a.enableFindWidget === b.enableFindWidget - && a.enableScripts === b.enableScripts + && a.allowScripts === b.allowScripts && a.retainContextWhenHidden === b.retainContextWhenHidden && a.tryRestoreScrollPosition === b.tryRestoreScrollPosition && (a.localResourceRoots === b.localResourceRoots || (Array.isArray(a.localResourceRoots) && Array.isArray(b.localResourceRoots) && equals(a.localResourceRoots, b.localResourceRoots, (a, b) => a.toString() === b.toString()))) - && (a.portMapping === b.portMapping || (Array.isArray(a.portMapping) && Array.isArray(b.portMapping) && equals(a.portMapping, b.portMapping, (a, b) => a.extensionHostPort === b.extensionHostPort && a.webviewPort === b.webviewPort))); + && (a.portMappings === b.portMappings || (Array.isArray(a.portMappings) && Array.isArray(b.portMappings) && equals(a.portMappings, b.portMappings, (a, b) => a.extensionHostPort === b.extensionHostPort && a.webviewPort === b.webviewPort))); } function canRevive(reviver: WebviewReviver, webview: WebviewEditorInput): boolean { @@ -132,6 +127,8 @@ export class WebviewEditorService implements IWebviewEditorService { @IEditorService private readonly _editorService: IEditorService, @IInstantiationService private readonly _instantiationService: IInstantiationService, @IEditorGroupsService private readonly _editorGroupService: IEditorGroupsService, + @IWebviewService private readonly _webviewService: IWebviewService, + @IWorkspaceContextService private readonly _contextService: IWorkspaceContextService, ) { } public createWebview( @@ -139,14 +136,15 @@ export class WebviewEditorService implements IWebviewEditorService { viewType: string, title: string, showOptions: ICreateWebViewShowOptions, - options: IWebviewOptions, + options: WebviewInputOptions, extension: undefined | { location: URI, id: ExtensionIdentifier }, - events: WebviewEvents ): WebviewEditorInput { - const webviewInput = this._instantiationService.createInstance(WebviewEditorInput, id, viewType, title, options, undefined, events, extension); + const webview = this.createWebiew(id, extension, options); + + const webviewInput = this._instantiationService.createInstance(WebviewEditorInput, id, viewType, title, extension, webview); this._editorService.openEditor(webviewInput, { pinned: true, preserveFocus: showOptions.preserveFocus }, showOptions.group); return webviewInput; } @@ -175,11 +173,14 @@ export class WebviewEditorService implements IWebviewEditorService { options: WebviewInputOptions, extension: undefined | { readonly location: URI, - readonly id?: ExtensionIdentifier + readonly id: ExtensionIdentifier }, group: number | undefined, ): WebviewEditorInput { - const webviewInput = this._instantiationService.createInstance(RevivedWebviewEditorInput, id, viewType, title, options, state, {}, extension, async (webview: WebviewEditorInput): Promise => { + const webview = this.createWebiew(id, extension, options); + webview.state = state; + + const webviewInput = new RevivedWebviewEditorInput(id, viewType, title, extension, async (webview: WebviewEditorInput): Promise => { const didRevive = await this.tryRevive(webview); if (didRevive) { return Promise.resolve(undefined); @@ -190,8 +191,10 @@ export class WebviewEditorService implements IWebviewEditorService { const promise = new Promise(r => { resolve = r; }); this._revivalPool.add(webview, resolve!); return promise; - }); + }, webview); + webviewInput.iconPath = iconPath; + if (typeof group === 'number') { webviewInput.updateGroup(group); } @@ -213,7 +216,7 @@ export class WebviewEditorService implements IWebviewEditorService { webview: WebviewEditorInput ): boolean { // Has no state, don't persist - if (!webview.state) { + if (!webview.webview.state) { return false; } @@ -237,4 +240,27 @@ export class WebviewEditorService implements IWebviewEditorService { } return false; } + + private createWebiew(id: string, extension: { location: URI; id: ExtensionIdentifier; } | undefined, options: WebviewInputOptions) { + return this._webviewService.createWebviewEditorOverlay(id, { + allowSvgs: true, + extension: extension, + enableFindWidget: options.enableFindWidget, + retainContextWhenHidden: options.retainContextWhenHidden + }, { + ...options, + localResourceRoots: options.localResourceRoots || this.getDefaultLocalResourceRoots(extension), + }); + } + + private getDefaultLocalResourceRoots(extension: undefined | { + location: URI, + id: ExtensionIdentifier + }): URI[] { + const rootPaths = this._contextService.getWorkspace().folders.map(x => x.uri); + if (extension) { + rootPaths.push(extension.location); + } + return rootPaths; + } } diff --git a/src/vs/workbench/contrib/webview/browser/webviewElement.ts b/src/vs/workbench/contrib/webview/browser/webviewElement.ts index 4c202ecef2c..22a9a4f7532 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewElement.ts @@ -155,7 +155,7 @@ export class IFrameWebview extends Disposable implements Webview { } } - public set options(options: WebviewContentOptions) { + public set contentOptions(options: WebviewContentOptions) { if (areWebviewInputOptionsEqual(options, this.content.options)) { return; } diff --git a/src/vs/workbench/contrib/webview/browser/webviewService.ts b/src/vs/workbench/contrib/webview/browser/webviewService.ts index a4125927d7b..8b326fa23aa 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewService.ts @@ -3,9 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { Emitter, Event } from 'vs/base/common/event'; +import { Disposable, DisposableStore, MutableDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { URI } from 'vs/base/common/uri'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IFrameWebview as WebviewElement } from 'vs/workbench/contrib/webview/browser/webviewElement'; -import { IWebviewService, WebviewOptions, WebviewContentOptions, Webview } from 'vs/workbench/contrib/webview/common/webview'; +import { IFrameWebview } from 'vs/workbench/contrib/webview/browser/webviewElement'; +import { IWebviewService, Webview, WebviewContentOptions, WebviewEditorOverlay, WebviewElement, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; +import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService'; +import { memoize } from 'vs/base/common/decorators'; export class WebviewService implements IWebviewService { _serviceBrand: any; @@ -18,10 +23,178 @@ export class WebviewService implements IWebviewService { id: string, options: WebviewOptions, contentOptions: WebviewContentOptions - ): Webview { - return this._instantiationService.createInstance(WebviewElement, - id, - options, - contentOptions); + ): WebviewElement { + return this._instantiationService.createInstance(IFrameWebview, id, options, contentOptions); + } + + createWebviewEditorOverlay( + id: string, + options: WebviewOptions, + contentOptions: WebviewContentOptions, + ): WebviewEditorOverlay { + return this._instantiationService.createInstance(DynamicWebviewEditorOverlay, id, options, contentOptions); + } +} + +/** + * Webview editor overlay that creates and destroys the underlying webview as needed. + */ +class DynamicWebviewEditorOverlay extends Disposable implements WebviewEditorOverlay { + + private readonly _pendingMessages = new Set(); + private readonly _webview = this._register(new MutableDisposable()); + private readonly _webviewEvents = this._register(new DisposableStore()); + + private _html: string = ''; + private _initialScrollProgress: number = 0; + private _state: string | undefined = undefined; + private _owner: any = undefined; + + public constructor( + private readonly id: string, + public readonly options: WebviewOptions, + private _contentOptions: WebviewContentOptions, + @IWorkbenchLayoutService private readonly _layoutService: IWorkbenchLayoutService, + @IWebviewService private readonly _webviewService: IWebviewService, + ) { + super(); + + this._register(toDisposable(() => this.container.remove())); + } + + @memoize + public get container() { + const container = document.createElement('div'); + container.id = `webview-${this.id}`; + this._layoutService.getContainer(Parts.EDITOR_PART).appendChild(container); + return container; + } + + public claim(owner: any) { + this._owner = owner; + this.show(); + } + + public release(owner: any) { + if (this._owner !== owner) { + return; + } + + this._owner = undefined; + if (this.options.retainContextWhenHidden) { + this.container.style.visibility = 'hidden'; + } else { + this._webview.clear(); + this._webviewEvents.clear(); + } + } + + private show() { + if (!this._webview.value) { + const webview = this._webviewService.createWebview(this.id, this.options, this._contentOptions); + this._webview.value = webview; + webview.html = this._html; + webview.state = this._state; + + if (this.options.tryRestoreScrollPosition) { + webview.initialScrollProgress = this._initialScrollProgress; + } + + this._webview.value.mountTo(this.container); + + this._webviewEvents.clear(); + + webview.onDidFocus(() => { + this._onDidFocus.fire(); + }, undefined, this._webviewEvents); + + webview.onDidClickLink(x => { + this._onDidClickLink.fire(x); + }, undefined, this._webviewEvents); + + webview.onDidScroll(x => { + this._initialScrollProgress = x.scrollYPercentage; + this._onDidScroll.fire(x); + }, undefined, this._webviewEvents); + + webview.onDidUpdateState(state => { + this._state = state; + this._onDidUpdateState.fire(state); + }, undefined, this._webviewEvents); + + webview.onMessage(x => { + this._onMessage.fire(x); + }, undefined, this._webviewEvents); + + this._pendingMessages.forEach(msg => webview.sendMessage(msg)); + this._pendingMessages.clear(); + } + this.container.style.visibility = 'visible'; + } + + public get html(): string { return this._html; } + public set html(value: string) { + this._html = value; + this.withWebview(webview => webview.html = value); + } + + public get initialScrollProgress(): number { return this._initialScrollProgress; } + public set initialScrollProgress(value: number) { + this._initialScrollProgress = value; + this.withWebview(webview => webview.initialScrollProgress = value); + } + + public get state(): string | undefined { return this._state; } + public set state(value: string | undefined) { + this._state = value; + this.withWebview(webview => webview.state = value); + } + + public get contentOptions(): WebviewContentOptions { return this._contentOptions; } + public set contentOptions(value: WebviewContentOptions) { + this._contentOptions = value; + this.withWebview(webview => webview.contentOptions = value); + } + + private readonly _onDidFocus = this._register(new Emitter()); + public readonly onDidFocus: Event = this._onDidFocus.event; + + private readonly _onDidClickLink = this._register(new Emitter()); + public readonly onDidClickLink: Event = this._onDidClickLink.event; + + private readonly _onDidScroll = this._register(new Emitter<{ scrollYPercentage: number; }>()); + public readonly onDidScroll: Event<{ scrollYPercentage: number; }> = this._onDidScroll.event; + + private readonly _onDidUpdateState = this._register(new Emitter()); + public readonly onDidUpdateState: Event = this._onDidUpdateState.event; + + private readonly _onMessage = this._register(new Emitter()); + public readonly onMessage: Event = this._onMessage.event; + + sendMessage(data: any): void { + if (this._webview.value) { + this._webview.value.sendMessage(data); + } else { + this._pendingMessages.add(data); + } + } + + update(value: string, options: WebviewContentOptions, retainContextWhenHidden: boolean): void { + this._contentOptions = options; + this.withWebview(webview => { + webview.update(value, options, retainContextWhenHidden); + }); + } + + layout(): void { this.withWebview(webview => webview.layout()); } + focus(): void { this.withWebview(webview => webview.focus()); } + reload(): void { this.withWebview(webview => webview.reload()); } + showFind(): void { this.withWebview(webview => webview.showFind()); } + hideFind(): void { this.withWebview(webview => webview.hideFind()); } + + private withWebview(f: (webview: Webview) => void): void { + if (this._webview.value) { + f(this._webview.value); + } } } \ No newline at end of file diff --git a/src/vs/workbench/contrib/webview/common/webview.ts b/src/vs/workbench/contrib/webview/common/webview.ts index bcc186c375e..c96522f5fab 100644 --- a/src/vs/workbench/contrib/webview/common/webview.ts +++ b/src/vs/workbench/contrib/webview/common/webview.ts @@ -7,10 +7,10 @@ import { Event } from 'vs/base/common/event'; import { IDisposable } from 'vs/base/common/lifecycle'; import { URI } from 'vs/base/common/uri'; import * as modes from 'vs/editor/common/modes'; +import * as nls from 'vs/nls'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import * as nls from 'vs/nls'; /** * Set when the find widget in a webview is visible. @@ -29,7 +29,13 @@ export interface IWebviewService { id: string, options: WebviewOptions, contentOptions: WebviewContentOptions, - ): Webview; + ): WebviewElement; + + createWebviewEditorOverlay( + id: string, + options: WebviewOptions, + contentOptions: WebviewContentOptions, + ): WebviewEditorOverlay; } export const WebviewResourceScheme = 'vscode-resource'; @@ -41,6 +47,8 @@ export interface WebviewOptions { readonly id?: ExtensionIdentifier; }; readonly enableFindWidget?: boolean; + readonly tryRestoreScrollPosition?: boolean; + readonly retainContextWhenHidden?: boolean; } export interface WebviewContentOptions { @@ -48,12 +56,13 @@ export interface WebviewContentOptions { readonly svgWhiteList?: string[]; readonly localResourceRoots?: ReadonlyArray; readonly portMappings?: ReadonlyArray; + readonly enableCommandUris?: boolean; } export interface Webview extends IDisposable { html: string; - options: WebviewContentOptions; + contentOptions: WebviewContentOptions; initialScrollProgress: number; state: string | undefined; @@ -71,7 +80,6 @@ export interface Webview extends IDisposable { ): void; layout(): void; - mountTo(parent: HTMLElement): void; focus(): void; reload(): void; @@ -79,4 +87,16 @@ export interface Webview extends IDisposable { hideFind(): void; } +export interface WebviewElement extends Webview { + mountTo(parent: HTMLElement): void; +} + +export interface WebviewEditorOverlay extends Webview { + readonly container: HTMLElement; + readonly options: WebviewOptions; + + claim(owner: any): void; + release(owner: any): void; +} + export const webviewDeveloperCategory = nls.localize('developer', "Developer"); diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewCommands.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewCommands.ts index 15f320ce9f1..d2b6f7d531b 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewCommands.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewCommands.ts @@ -8,7 +8,7 @@ import * as nls from 'vs/nls'; import { Command, ServicesAccessor } from 'vs/editor/browser/editorExtensions'; import { WebviewEditor } from 'vs/workbench/contrib/webview/browser/webviewEditor'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement'; +import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement'; export class OpenWebviewDeveloperToolsAction extends Action { static readonly ID = 'workbench.action.webview.openDeveloperTools'; @@ -86,11 +86,11 @@ function getActiveWebviewEditor(accessor: ServicesAccessor): WebviewEditor | und return activeControl.isWebviewEditor ? activeControl : undefined; } -function withActiveWebviewBasedWebview(accessor: ServicesAccessor, f: (webview: WebviewElement) => void): void { +function withActiveWebviewBasedWebview(accessor: ServicesAccessor, f: (webview: ElectronWebviewBasedWebview) => void): void { const webViewEditor = getActiveWebviewEditor(accessor); if (webViewEditor) { webViewEditor.withWebview(webview => { - if (webview instanceof WebviewElement) { + if (webview instanceof ElectronWebviewBasedWebview) { f(webview); } }); diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts index e0c1d79deb1..e42e1a4b401 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts @@ -13,7 +13,6 @@ import { endsWith } from 'vs/base/common/strings'; import { URI } from 'vs/base/common/uri'; import * as modes from 'vs/editor/common/modes'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { IFileService } from 'vs/platform/files/common/files'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ITunnelService } from 'vs/platform/remote/common/tunnel'; @@ -25,27 +24,6 @@ import { registerFileProtocol } from 'vs/workbench/contrib/webview/electron-brow import { areWebviewInputOptionsEqual } from '../browser/webviewEditorService'; import { WebviewFindWidget } from '../browser/webviewFindWidget'; -export interface WebviewPortMapping { - readonly port: number; - readonly resolvedPort: number; -} - -export interface WebviewOptions { - readonly allowSvgs?: boolean; - readonly extension?: { - readonly location: URI; - readonly id?: ExtensionIdentifier; - }; - readonly enableFindWidget?: boolean; -} - -export interface WebviewContentOptions { - readonly allowScripts?: boolean; - readonly svgWhiteList?: string[]; - readonly localResourceRoots?: ReadonlyArray; - readonly portMappings?: ReadonlyArray; -} - interface IKeydownEvent { key: string; keyCode: number; @@ -285,7 +263,7 @@ interface WebviewContent { readonly state: string | undefined; } -export class WebviewElement extends Disposable implements Webview { +export class ElectronWebviewBasedWebview extends Disposable implements Webview { private _webview: Electron.WebviewTag | undefined; private _ready: Promise; @@ -508,7 +486,7 @@ export class WebviewElement extends Disposable implements Webview { }; } - public set options(options: WebviewContentOptions) { + public set contentOptions(options: WebviewContentOptions) { if (areWebviewInputOptionsEqual(options, this.content.options)) { return; } diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts index aa7ffc5d9bc..75727aa6389 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts @@ -4,23 +4,24 @@ *--------------------------------------------------------------------------------------------*/ import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IWebviewService, Webview, WebviewContentOptions, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; -import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement'; +import { WebviewService as BrowserWebviewService } from 'vs/workbench/contrib/webview/browser/webviewService'; +import { IWebviewService, WebviewContentOptions, WebviewElement, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; +import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement'; -export class WebviewService implements IWebviewService { +export class WebviewService extends BrowserWebviewService implements IWebviewService { _serviceBrand: any; constructor( - @IInstantiationService private readonly _instantiationService: IInstantiationService, - ) { } + @IInstantiationService private readonly instantiationService: IInstantiationService, + ) { + super(instantiationService); + } createWebview( _id: string, options: WebviewOptions, contentOptions: WebviewContentOptions - ): Webview { - return this._instantiationService.createInstance(WebviewElement, - options, - contentOptions); + ): WebviewElement { + return this.instantiationService.createInstance(ElectronWebviewBasedWebview, options, contentOptions); } } \ No newline at end of file From 06c418c0dcb6328e936a862d2db74bf7d5994205 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 17 Jul 2019 18:28:02 -0700 Subject: [PATCH 337/710] Fix state being lost on first update of a revived webview --- src/vs/workbench/contrib/webview/browser/webviewService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewService.ts b/src/vs/workbench/contrib/webview/browser/webviewService.ts index 8b326fa23aa..344331a4898 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewService.ts @@ -93,8 +93,8 @@ class DynamicWebviewEditorOverlay extends Disposable implements WebviewEditorOve if (!this._webview.value) { const webview = this._webviewService.createWebview(this.id, this.options, this._contentOptions); this._webview.value = webview; - webview.html = this._html; webview.state = this._state; + webview.html = this._html; if (this.options.tryRestoreScrollPosition) { webview.initialScrollProgress = this._initialScrollProgress; From 7d842fa5d3c7907e331bff2cae9d04112f6f2ca6 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 17 Jul 2019 18:29:19 -0700 Subject: [PATCH 338/710] Make sure we update our stored html when using the update function too --- src/vs/workbench/contrib/webview/browser/webviewService.ts | 5 +++-- src/vs/workbench/contrib/webview/common/webview.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewService.ts b/src/vs/workbench/contrib/webview/browser/webviewService.ts index 344331a4898..18857b50296 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewService.ts @@ -179,10 +179,11 @@ class DynamicWebviewEditorOverlay extends Disposable implements WebviewEditorOve } } - update(value: string, options: WebviewContentOptions, retainContextWhenHidden: boolean): void { + update(html: string, options: WebviewContentOptions, retainContextWhenHidden: boolean): void { this._contentOptions = options; + this._html = html; this.withWebview(webview => { - webview.update(value, options, retainContextWhenHidden); + webview.update(html, options, retainContextWhenHidden); }); } diff --git a/src/vs/workbench/contrib/webview/common/webview.ts b/src/vs/workbench/contrib/webview/common/webview.ts index c96522f5fab..5f2d3053ff1 100644 --- a/src/vs/workbench/contrib/webview/common/webview.ts +++ b/src/vs/workbench/contrib/webview/common/webview.ts @@ -74,7 +74,7 @@ export interface Webview extends IDisposable { sendMessage(data: any): void; update( - value: string, + html: string, options: WebviewContentOptions, retainContextWhenHidden: boolean ): void; From eb0dc4c561ef1eba641b421ee57d0df4f2b38e68 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 17 Jul 2019 18:30:54 -0700 Subject: [PATCH 339/710] Use a single instance of webviewIconsManager --- .../workbench/contrib/webview/browser/webviewEditorInput.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts index a5a176a42b9..dd83d24f297 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts @@ -53,7 +53,8 @@ export class WebviewEditorInput extends EditorInput { public static readonly typeId = 'workbench.editors.webviewInput'; - private readonly iconsManager = new WebviewIconsManager(); + private static readonly iconsManager = new WebviewIconsManager(); + private _name: string; private _iconPath?: { light: URI, dark: URI }; private _group?: GroupIdentifier; @@ -111,7 +112,7 @@ export class WebviewEditorInput extends EditorInput { public set iconPath(value: { light: URI, dark: URI } | undefined) { this._iconPath = value; - this.iconsManager.setIcons(this.id, value); + WebviewEditorInput.iconsManager.setIcons(this.id, value); } public matches(other: IEditorInput): boolean { From 2091f715f00fa8eb8bdc456a54c9accd2cc57734 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 17 Jul 2019 18:51:16 -0700 Subject: [PATCH 340/710] Don't hang on to webview in `WebviewEditor` --- .../contrib/webview/browser/webviewEditor.ts | 51 ++++++++----------- .../webview/browser/webviewEditorInput.ts | 5 +- 2 files changed, 23 insertions(+), 33 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts index 61a722d32c9..d01dc751d00 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditor.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditor.ts @@ -23,7 +23,7 @@ export class WebviewEditor extends BaseEditor { public static readonly ID = 'WebviewEditor'; - private _webview: WebviewEditorOverlay | undefined; + private readonly _scopedContextKeyService = this._register(new MutableDisposable()); private _findWidgetVisible: IContextKey; private _editorFrame?: HTMLElement; @@ -38,15 +38,14 @@ export class WebviewEditor extends BaseEditor { constructor( @ITelemetryService telemetryService: ITelemetryService, @IThemeService themeService: IThemeService, - @IContextKeyService private _contextKeyService: IContextKeyService, + @IContextKeyService private readonly _contextKeyService: IContextKeyService, @IEditorService private readonly _editorService: IEditorService, @IWindowService private readonly _windowService: IWindowService, @IStorageService storageService: IStorageService ) { super(WebviewEditor.ID, telemetryService, themeService, storageService); - if (_contextKeyService) { - this._findWidgetVisible = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(_contextKeyService); - } + + this._findWidgetVisible = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(_contextKeyService); } public get isWebviewEditor() { @@ -85,16 +84,15 @@ export class WebviewEditor extends BaseEditor { } public layout(_dimension: DOM.Dimension): void { - if (this._webview) { - this.doUpdateContainer(this._webview); - this._webview.layout(); + if (this.input && this.input instanceof WebviewEditorInput) { + this.synchronizeWebviewContainerDimensions(this.input.webview); + this.input.webview.layout(); } } public focus(): void { super.focus(); if (!this._onFocusWindowHandler.value) { - // Make sure we restore focus when switching back to a VS Code window this._onFocusWindowHandler.value = this._windowService.onDidChangeFocus(focused => { if (focused && this._editorService.activeControl === this) { @@ -106,13 +104,13 @@ export class WebviewEditor extends BaseEditor { } public withWebview(f: (element: Webview) => void): void { - if (this._webview) { - f(this._webview); + if (this.input && this.input instanceof WebviewEditorInput) { + f(this.input.webview); } } protected setEditorVisible(visible: boolean, group: IEditorGroup): void { - const webview = (this.input && (this.input as WebviewEditorInput).webview) || this._webview; + const webview = this.input && (this.input as WebviewEditorInput).webview; if (webview) { if (visible) { webview.claim(this); @@ -130,14 +128,12 @@ export class WebviewEditor extends BaseEditor { this.input.webview.release(this); } - this._webview = undefined; super.clearInput(); } public async setInput(input: WebviewEditorInput, options: EditorOptions, token: CancellationToken): Promise { - if (this.input && (this.input as WebviewEditorInput).webview) { - (this.input as WebviewEditorInput).webview!.release(this); - this._webview = undefined; + if (this.input && this.input instanceof WebviewEditorInput) { + this.input.webview.release(this); } await super.setInput(input, options, token); @@ -149,32 +145,27 @@ export class WebviewEditor extends BaseEditor { if (this.group) { input.updateGroup(this.group.id); } + this.claimWebview(input); } private claimWebview(input: WebviewEditorInput): void { - if (this._webview) { - this._webview.claim(this); - return; - } + input.webview.claim(this); - this._webview = input.webview; - this._webview.claim(this); - - if (this._webview.options.enableFindWidget) { - this._contextKeyService = this._register(this._contextKeyService.createScoped(this._webview.container)); - this._findWidgetVisible = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(this._contextKeyService); + if (input.webview.options.enableFindWidget) { + this._scopedContextKeyService.value = this._contextKeyService.createScoped(input.webview.container); + this._findWidgetVisible = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(this._scopedContextKeyService.value); } if (this._content) { - this._content.setAttribute('aria-flowto', this._webview.container.id); + this._content.setAttribute('aria-flowto', input.webview.container.id); } - this.doUpdateContainer(this._webview); - this.trackFocus(this._webview); + this.synchronizeWebviewContainerDimensions(input.webview); + this.trackFocus(input.webview); } - private doUpdateContainer(webview: WebviewEditorOverlay) { + private synchronizeWebviewContainerDimensions(webview: WebviewEditorOverlay) { const webviewContainer = webview.container; if (webviewContainer && webviewContainer.parentElement && this._editorFrame) { const frameRect = this._editorFrame.getBoundingClientRect(); diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts index dd83d24f297..591784f328b 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts @@ -59,7 +59,6 @@ export class WebviewEditorInput extends EditorInput { private _iconPath?: { light: URI, dark: URI }; private _group?: GroupIdentifier; - constructor( public readonly id: string, public readonly viewType: string, @@ -123,8 +122,8 @@ export class WebviewEditorInput extends EditorInput { return this._group; } - public resolve(): Promise { - return Promise.resolve(new EditorModel()); + public async resolve(): Promise { + return new EditorModel(); } public supportsSplitEditor() { From 52b6e7c4f58466e5b67348fb67d359f6bc3bb7e8 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 17 Jul 2019 18:53:02 -0700 Subject: [PATCH 341/710] Make sure we hide the webview overlay when it is not in use --- src/vs/workbench/contrib/webview/browser/webviewService.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewService.ts b/src/vs/workbench/contrib/webview/browser/webviewService.ts index 18857b50296..a151f3840df 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewService.ts @@ -81,9 +81,8 @@ class DynamicWebviewEditorOverlay extends Disposable implements WebviewEditorOve } this._owner = undefined; - if (this.options.retainContextWhenHidden) { - this.container.style.visibility = 'hidden'; - } else { + this.container.style.visibility = 'hidden'; + if (!this.options.retainContextWhenHidden) { this._webview.clear(); this._webviewEvents.clear(); } From 5e0bcd6afebf9aebddd90f1ce92dbb2e8946510e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 Jul 2019 08:37:35 +0200 Subject: [PATCH 342/710] distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f8883efbe59..e722982183c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "3b7db3f93b5efe73eedab147ee9eb72a9abadc9d", + "distro": "efabeb59b721e11ddcfadfdd91810ca5bf54b51d", "author": { "name": "Microsoft Corporation" }, From 28473ed5f7ee886c2bff2c7dcdbf74a6059b9b95 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 Jul 2019 11:10:02 +0200 Subject: [PATCH 343/710] distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e722982183c..1dd944ac9ee 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "efabeb59b721e11ddcfadfdd91810ca5bf54b51d", + "distro": "fbc5990ccee25d91cab59677ff6624708306a412", "author": { "name": "Microsoft Corporation" }, From 8ffcb49f4fbeb2504050726990452c1bb5b129fd Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 11:19:54 +0200 Subject: [PATCH 344/710] disable some extension commands in web --- .../issue/issueReporterMain.ts | 2 +- .../sharedProcess/sharedProcessMain.ts | 2 +- src/vs/code/electron-main/app.ts | 2 +- src/vs/code/electron-main/main.ts | 4 +- src/vs/code/node/cliProcessMain.ts | 7 +- .../environment/common/environment.ts | 2 +- .../node/extensionManagementService.ts | 2 +- src/vs/platform/telemetry/node/telemetry.ts | 46 ++++++------ .../browser/extensions.contribution.ts | 72 ++++++++++++------- .../extensions/browser/extensionsActions.ts | 24 ++++--- .../environment/browser/environmentService.ts | 2 +- .../electron-browser/telemetryService.ts | 2 +- 12 files changed, 98 insertions(+), 69 deletions(-) diff --git a/src/vs/code/electron-browser/issue/issueReporterMain.ts b/src/vs/code/electron-browser/issue/issueReporterMain.ts index a6bb5723f58..2302d162f34 100644 --- a/src/vs/code/electron-browser/issue/issueReporterMain.ts +++ b/src/vs/code/electron-browser/issue/issueReporterMain.ts @@ -312,7 +312,7 @@ export class IssueReporter extends Disposable { const channel = getDelayedChannel(sharedProcess.then(c => c.getChannel('telemetryAppender'))); const appender = combinedAppender(new TelemetryAppenderClient(channel), new LogAppender(logService)); const commonProperties = resolveCommonProperties(product.commit || 'Commit unknown', pkg.version, configuration.machineId, this.environmentService.installSourcePath); - const piiPaths = [this.environmentService.appRoot, this.environmentService.extensionsPath]; + const piiPaths = this.environmentService.extensionsPath ? [this.environmentService.appRoot, this.environmentService.extensionsPath] : [this.environmentService.appRoot]; const config: ITelemetryServiceConfig = { appender, commonProperties, piiPaths }; const telemetryService = instantiationService.createInstance(TelemetryService, config); diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts index 31e2fa0a8fa..baeaa641903 100644 --- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts @@ -158,7 +158,7 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat const config: ITelemetryServiceConfig = { appender: combinedAppender(appInsightsAppender, new LogAppender(logService)), commonProperties: resolveCommonProperties(product.commit, pkg.version, configuration.machineId, installSourcePath), - piiPaths: [appRoot, extensionsPath] + piiPaths: extensionsPath ? [appRoot, extensionsPath] : [appRoot] }; telemetryService = new TelemetryService(config, configurationService); diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index cd81cc3dbb2..5682c0664c6 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -484,7 +484,7 @@ export class CodeApplication extends Disposable { const channel = getDelayedChannel(sharedProcessClient.then(client => client.getChannel('telemetryAppender'))); const appender = combinedAppender(new TelemetryAppenderClient(channel), new LogAppender(this.logService)); const commonProperties = resolveCommonProperties(product.commit, pkg.version, machineId, this.environmentService.installSourcePath); - const piiPaths = [this.environmentService.appRoot, this.environmentService.extensionsPath]; + const piiPaths = this.environmentService.extensionsPath ? [this.environmentService.appRoot, this.environmentService.extensionsPath] : [this.environmentService.appRoot]; const config: ITelemetryServiceConfig = { appender, commonProperties, piiPaths, trueMachineId }; services.set(ITelemetryService, new SyncDescriptor(TelemetryService, [config])); diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index 897fe6ef386..71891c9bafd 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -332,7 +332,9 @@ class CodeMain { if (error.code === 'EACCES' || error.code === 'EPERM') { this.showStartupWarningDialog( localize('startupDataDirError', "Unable to write program user data."), - localize('startupDataDirErrorDetail', "Please make sure the directories {0} and {1} are writeable.", environmentService.userDataPath, environmentService.extensionsPath) + environmentService.extensionsPath + ? localize('startupUserDataAndExtensionsDirErrorDetail', "Please make sure the directories {0} and {1} are writeable.", environmentService.userDataPath, environmentService.extensionsPath) + : localize('startupUserDataDirErrorDetail', "Please make sure the directory {0} is writeable.", environmentService.userDataPath) ); } } diff --git a/src/vs/code/node/cliProcessMain.ts b/src/vs/code/node/cliProcessMain.ts index 3a7b44232e3..68978614625 100644 --- a/src/vs/code/node/cliProcessMain.ts +++ b/src/vs/code/node/cliProcessMain.ts @@ -102,7 +102,7 @@ export class Main { const ids: string[] = typeof arg === 'string' ? [arg] : arg; await this.locateExtension(ids); } else if (argv['telemetry']) { - console.log(buildTelemetryMessage(this.environmentService.appRoot, this.environmentService.extensionsPath)); + console.log(buildTelemetryMessage(this.environmentService.appRoot, this.environmentService.extensionsPath ? this.environmentService.extensionsPath : undefined)); } } @@ -293,7 +293,8 @@ export async function main(argv: ParsedArgs): Promise { process.once('exit', () => logService.dispose()); logService.info('main', argv); - await Promise.all([environmentService.appSettingsHome.fsPath, environmentService.extensionsPath].map(p => mkdirp(p))); + await Promise.all([environmentService.appSettingsHome.fsPath, environmentService.extensionsPath] + .map((path): undefined | Promise => path ? mkdirp(path) : undefined)); const configurationService = new ConfigurationService(environmentService.settingsResource); disposables.add(configurationService); @@ -339,7 +340,7 @@ export async function main(argv: ParsedArgs): Promise { const config: ITelemetryServiceConfig = { appender: combinedAppender(...appenders), commonProperties: resolveCommonProperties(product.commit, pkg.version, stateService.getItem('telemetry.machineId'), installSourcePath), - piiPaths: [appRoot, extensionsPath] + piiPaths: extensionsPath ? [appRoot, extensionsPath] : [appRoot] }; services.set(ITelemetryService, new SyncDescriptor(TelemetryService, [config])); diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index e5e0f59d3ef..440b393833d 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -132,7 +132,7 @@ export interface IEnvironmentService { isExtensionDevelopment: boolean; disableExtensions: boolean | string[]; builtinExtensionsPath: string; - extensionsPath: string; + extensionsPath?: string; extensionDevelopmentLocationURI?: URI[]; extensionTestsLocationURI?: URI; diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index fdad3b308e7..725e477449a 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -135,7 +135,7 @@ export class ExtensionManagementService extends Disposable implements IExtension ) { super(); this.systemExtensionsPath = environmentService.builtinExtensionsPath; - this.extensionsPath = environmentService.extensionsPath; + this.extensionsPath = environmentService.extensionsPath!; this.uninstalledPath = path.join(this.extensionsPath, '.obsolete'); this.uninstalledFileLimiter = new Queue(); this.manifestCache = this._register(new ExtensionsManifestCache(environmentService, this)); diff --git a/src/vs/platform/telemetry/node/telemetry.ts b/src/vs/platform/telemetry/node/telemetry.ts index 31b4ca31d46..626af4983ca 100644 --- a/src/vs/platform/telemetry/node/telemetry.ts +++ b/src/vs/platform/telemetry/node/telemetry.ts @@ -8,34 +8,36 @@ import { readdirSync } from 'vs/base/node/pfs'; import { statSync, readFileSync } from 'fs'; import { join } from 'vs/base/common/path'; -export function buildTelemetryMessage(appRoot: string, extensionsPath: string): string { - // Gets all the directories inside the extension directory - const dirs = readdirSync(extensionsPath).filter(files => { - // This handles case where broken symbolic links can cause statSync to throw and error - try { - return statSync(join(extensionsPath, files)).isDirectory(); - } catch { - return false; - } - }); - const telemetryJsonFolders: string[] = []; - dirs.forEach((dir) => { - const files = readdirSync(join(extensionsPath, dir)).filter(file => file === 'telemetry.json'); - // We know it contains a telemetry.json file so we add it to the list of folders which have one - if (files.length === 1) { - telemetryJsonFolders.push(dir); - } - }); +export function buildTelemetryMessage(appRoot: string, extensionsPath?: string): string { const mergedTelemetry = Object.create(null); // Simple function to merge the telemetry into one json object const mergeTelemetry = (contents: string, dirName: string) => { const telemetryData = JSON.parse(contents); mergedTelemetry[dirName] = telemetryData; }; - telemetryJsonFolders.forEach((folder) => { - const contents = readFileSync(join(extensionsPath, folder, 'telemetry.json')).toString(); - mergeTelemetry(contents, folder); - }); + if (extensionsPath) { + // Gets all the directories inside the extension directory + const dirs = readdirSync(extensionsPath).filter(files => { + // This handles case where broken symbolic links can cause statSync to throw and error + try { + return statSync(join(extensionsPath, files)).isDirectory(); + } catch { + return false; + } + }); + const telemetryJsonFolders: string[] = []; + dirs.forEach((dir) => { + const files = readdirSync(join(extensionsPath, dir)).filter(file => file === 'telemetry.json'); + // We know it contains a telemetry.json file so we add it to the list of folders which have one + if (files.length === 1) { + telemetryJsonFolders.push(dir); + } + }); + telemetryJsonFolders.forEach((folder) => { + const contents = readFileSync(join(extensionsPath, folder, 'telemetry.json')).toString(); + mergeTelemetry(contents, folder); + }); + } let contents = readFileSync(join(appRoot, 'telemetry-core.json')).toString(); mergeTelemetry(contents, 'vscode-core'); contents = readFileSync(join(appRoot, 'telemetry-extensions.json')).toString(); diff --git a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts index 56cb0142584..7e7448ef8ea 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts @@ -9,9 +9,9 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { Registry } from 'vs/platform/registry/common/platform'; import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManagementService, IExtensionGalleryService, IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actions'; -import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; +import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions, IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IOutputChannelRegistry, Extensions as OutputExtensions } from 'vs/workbench/contrib/output/common/output'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { VIEWLET_ID, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions'; @@ -42,19 +42,11 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { ExtensionDependencyChecker } from 'vs/workbench/contrib/extensions/browser/extensionsDependencyChecker'; import { CancellationToken } from 'vs/base/common/cancellation'; import { ExtensionType } from 'vs/platform/extensions/common/extensions'; +import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; // Singletons registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService); -const workbenchRegistry = Registry.as(WorkbenchExtensions.Workbench); -workbenchRegistry.registerWorkbenchContribution(StatusUpdater, LifecyclePhase.Restored); -workbenchRegistry.registerWorkbenchContribution(MaliciousExtensionChecker, LifecyclePhase.Eventually); -workbenchRegistry.registerWorkbenchContribution(ConfigureRecommendedExtensionsCommandsContributor, LifecyclePhase.Eventually); -workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, LifecyclePhase.Restored); -workbenchRegistry.registerWorkbenchContribution(ExtensionsViewletViewsContribution, LifecyclePhase.Starting); -workbenchRegistry.registerWorkbenchContribution(ExtensionActivationProgress, LifecyclePhase.Eventually); -workbenchRegistry.registerWorkbenchContribution(ExtensionDependencyChecker, LifecyclePhase.Eventually); - Registry.as(OutputExtensions.OutputChannels) .registerChannel({ id: ExtensionsChannelId, label: ExtensionsLabel, log: false }); @@ -70,17 +62,6 @@ Registry.as(Extensions.Quickopen).registerQuickOpenHandler( ) ); -Registry.as(Extensions.Quickopen).registerQuickOpenHandler( - new QuickOpenHandlerDescriptor( - GalleryExtensionsHandler, - GalleryExtensionsHandler.ID, - 'ext install ', - undefined, - localize('galleryExtensionsCommands', "Install Gallery Extensions"), - true - ) -); - // Editor const editorDescriptor = new EditorDescriptor( ExtensionEditor, @@ -145,9 +126,6 @@ actionRegistry.registerWorkbenchAction(builtinActionDescriptor, 'Extensions: Sho const updateAllActionDescriptor = new SyncActionDescriptor(UpdateAllAction, UpdateAllAction.ID, UpdateAllAction.LABEL); actionRegistry.registerWorkbenchAction(updateAllActionDescriptor, 'Extensions: Update All Extensions', ExtensionsLabel); -const openExtensionsFolderActionDescriptor = new SyncActionDescriptor(OpenExtensionsFolderAction, OpenExtensionsFolderAction.ID, OpenExtensionsFolderAction.LABEL); -actionRegistry.registerWorkbenchAction(openExtensionsFolderActionDescriptor, 'Extensions: Open Extensions Folder', ExtensionsLabel); - const installVSIXActionDescriptor = new SyncActionDescriptor(InstallVSIXAction, InstallVSIXAction.ID, InstallVSIXAction.LABEL); actionRegistry.registerWorkbenchAction(installVSIXActionDescriptor, 'Extensions: Install from VSIX...', ExtensionsLabel); @@ -349,4 +327,46 @@ MenuRegistry.appendMenuItem(MenuId.GlobalActivity, { title: localize('showExtensions', "Extensions") }, order: 3 -}); \ No newline at end of file +}); + +const workbenchRegistry = Registry.as(WorkbenchExtensions.Workbench); + +class ExtensionsContributions implements IWorkbenchContribution { + + constructor( + @IWorkbenchEnvironmentService workbenchEnvironmentService: IWorkbenchEnvironmentService, + @IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService + ) { + + const canManageExtensions = extensionManagementServerService.localExtensionManagementServer || extensionManagementServerService.remoteExtensionManagementServer; + + if (canManageExtensions) { + Registry.as(Extensions.Quickopen).registerQuickOpenHandler( + new QuickOpenHandlerDescriptor( + GalleryExtensionsHandler, + GalleryExtensionsHandler.ID, + 'ext install ', + undefined, + localize('galleryExtensionsCommands', "Install Gallery Extensions"), + true + ) + ); + } + + if (workbenchEnvironmentService.extensionsPath) { + const openExtensionsFolderActionDescriptor = new SyncActionDescriptor(OpenExtensionsFolderAction, OpenExtensionsFolderAction.ID, OpenExtensionsFolderAction.LABEL); + actionRegistry.registerWorkbenchAction(openExtensionsFolderActionDescriptor, 'Extensions: Open Extensions Folder', ExtensionsLabel); + } + + } + +} + +workbenchRegistry.registerWorkbenchContribution(ExtensionsContributions, LifecyclePhase.Starting); +workbenchRegistry.registerWorkbenchContribution(StatusUpdater, LifecyclePhase.Restored); +workbenchRegistry.registerWorkbenchContribution(MaliciousExtensionChecker, LifecyclePhase.Eventually); +workbenchRegistry.registerWorkbenchContribution(ConfigureRecommendedExtensionsCommandsContributor, LifecyclePhase.Eventually); +workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, LifecyclePhase.Restored); +workbenchRegistry.registerWorkbenchContribution(ExtensionsViewletViewsContribution, LifecyclePhase.Starting); +workbenchRegistry.registerWorkbenchContribution(ExtensionActivationProgress, LifecyclePhase.Eventually); +workbenchRegistry.registerWorkbenchContribution(ExtensionDependencyChecker, LifecyclePhase.Eventually); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 5ba999de322..c1fe0d73c90 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -2815,18 +2815,22 @@ export class OpenExtensionsFolderAction extends Action { } run(): Promise { - const extensionsHome = URI.file(this.environmentService.extensionsPath); + if (this.environmentService.extensionsPath) { - return Promise.resolve(this.fileService.resolve(extensionsHome)).then(file => { - let itemToShow: URI; - if (file.children && file.children.length > 0) { - itemToShow = file.children[0].resource; - } else { - itemToShow = extensionsHome; - } + const extensionsHome = URI.file(this.environmentService.extensionsPath); - return this.windowsService.showItemInFolder(itemToShow); - }); + return Promise.resolve(this.fileService.resolve(extensionsHome)).then(file => { + let itemToShow: URI; + if (file.children && file.children.length > 0) { + itemToShow = file.children[0].resource; + } else { + itemToShow = extensionsHome; + } + + return this.windowsService.showItemInFolder(itemToShow); + }); + } + return Promise.resolve(); } } diff --git a/src/vs/workbench/services/environment/browser/environmentService.ts b/src/vs/workbench/services/environment/browser/environmentService.ts index ff6cefe4491..2bd39c97554 100644 --- a/src/vs/workbench/services/environment/browser/environmentService.ts +++ b/src/vs/workbench/services/environment/browser/environmentService.ts @@ -149,7 +149,7 @@ export class BrowserWorkbenchEnvironmentService implements IEnvironmentService { isExtensionDevelopment: boolean; disableExtensions: boolean | string[]; builtinExtensionsPath: string; - extensionsPath: string; + extensionsPath?: string; extensionDevelopmentLocationURI?: URI[]; extensionTestsPath?: string; debugExtensionHost: IExtensionHostDebugParams; diff --git a/src/vs/workbench/services/telemetry/electron-browser/telemetryService.ts b/src/vs/workbench/services/telemetry/electron-browser/telemetryService.ts index 5583a243cb2..6eaaf220ce5 100644 --- a/src/vs/workbench/services/telemetry/electron-browser/telemetryService.ts +++ b/src/vs/workbench/services/telemetry/electron-browser/telemetryService.ts @@ -39,7 +39,7 @@ export class TelemetryService extends Disposable implements ITelemetryService { const config: ITelemetryServiceConfig = { appender: combinedAppender(new TelemetryAppenderClient(channel), new LogAppender(logService)), commonProperties: resolveWorkbenchCommonProperties(storageService, productService.commit, productService.version, environmentService.configuration.machineId, environmentService.installSourcePath, environmentService.configuration.remoteAuthority), - piiPaths: [environmentService.appRoot, environmentService.extensionsPath] + piiPaths: environmentService.extensionsPath ? [environmentService.appRoot, environmentService.extensionsPath] : [environmentService.appRoot] }; this.impl = this._register(new BaseTelemetryService(config, configurationService)); From 88ac0fd7cf6364dbd41422fac99703157a43c035 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 Jul 2019 11:24:17 +0200 Subject: [PATCH 345/710] update gulp-atom-electron --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 1dd944ac9ee..4177d62c91a 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "fast-plist": "0.1.2", "glob": "^5.0.13", "gulp": "^4.0.0", - "gulp-atom-electron": "^1.20.0", + "gulp-atom-electron": "^1.21.1", "gulp-azure-storage": "^0.10.0", "gulp-buffer": "0.0.2", "gulp-concat": "^2.6.1", @@ -159,4 +159,4 @@ "windows-mutex": "0.2.1", "windows-process-tree": "0.2.4" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 6aa4b28cf28..00537c4bdfd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3763,10 +3763,10 @@ growl@1.9.2: resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" integrity sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8= -gulp-atom-electron@^1.20.0: - version "1.20.0" - resolved "https://registry.yarnpkg.com/gulp-atom-electron/-/gulp-atom-electron-1.20.0.tgz#10b01f6a4c0257a8468c4da4ec9c67ecb28a32ed" - integrity sha512-gs7xvZvq8Mq60+DmbfCeXZnhqhOaJa/wrctix0RP/lCfSgusJnBTBssC6er1JIiqdHmQ8zFiYaYZh41mdG36kQ== +gulp-atom-electron@^1.21.1: + version "1.21.1" + resolved "https://registry.yarnpkg.com/gulp-atom-electron/-/gulp-atom-electron-1.21.1.tgz#4017144bf659fbbf7d0644664fcc47c64efac0f0" + integrity sha512-UHEf2pZrJD/u+AAzKCbhdPXaKrReFDa+OEJjBCAdN2SHnD+dfZqSJAz/u2OD6YR/eREuUbQOCw+VWUwex20klQ== dependencies: event-stream "3.3.4" github-releases-ms "^0.5.0" From 71b6beff35c7df83c6a2e4d78b01e0e67e41882c Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 11:26:32 +0200 Subject: [PATCH 346/710] :lipstick: --- .../contrib/extensions/browser/extensionsActions.ts | 2 +- .../extensions/browser/extensionsWorkbenchService.ts | 6 +++--- src/vs/workbench/contrib/extensions/common/extensions.ts | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index c1fe0d73c90..1fb6bc1692c 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -2862,7 +2862,7 @@ export class InstallVSIXAction extends Action { return Promise.resolve(); } - return Promise.all(result.map(vsix => this.extensionsWorkbenchService.install(vsix))) + return Promise.all(result.map(vsix => this.extensionsWorkbenchService.install(URI.file(vsix)))) .then(extensions => { for (const extension of extensions) { const requireReload = !(extension.local && this.extensionService.canAddExtension(toExtensionDescription(extension.local))); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index f9f0abe3e5c..572272c85c7 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -775,10 +775,10 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension return false; } - install(extension: string | IExtension): Promise { - if (typeof extension === 'string') { + install(extension: URI | IExtension): Promise { + if (extension instanceof URI) { return this.installWithProgress(async () => { - const { identifier } = await this.extensionService.install(URI.file(extension)); + const { identifier } = await this.extensionService.install(extension); this.checkAndEnableDisabledDependencies(identifier); return this.local.filter(local => areSameExtensions(local.identifier, identifier))[0]; }); diff --git a/src/vs/workbench/contrib/extensions/common/extensions.ts b/src/vs/workbench/contrib/extensions/common/extensions.ts index e0e9a941d9c..86ca4b4b4fe 100644 --- a/src/vs/workbench/contrib/extensions/common/extensions.ts +++ b/src/vs/workbench/contrib/extensions/common/extensions.ts @@ -14,6 +14,7 @@ import { CancellationToken } from 'vs/base/common/cancellation'; import { Disposable } from 'vs/base/common/lifecycle'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IExtensionManifest, ExtensionType } from 'vs/platform/extensions/common/extensions'; +import { URI } from 'vs/base/common/uri'; export const VIEWLET_ID = 'workbench.view.extensions'; export const VIEW_CONTAINER: ViewContainer = Registry.as(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer(VIEWLET_ID); @@ -81,7 +82,7 @@ export interface IExtensionsWorkbenchService { queryGallery(token: CancellationToken): Promise>; queryGallery(options: IQueryOptions, token: CancellationToken): Promise>; canInstall(extension: IExtension): boolean; - install(vsix: string): Promise; + install(vsix: URI): Promise; install(extension: IExtension, promptToInstallDependencies?: boolean): Promise; uninstall(extension: IExtension): Promise; installVersion(extension: IExtension, version: string): Promise; From fb0e9f7d0337ade4dd5fbd8450123140aba880bc Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 18 Jul 2019 11:56:22 +0200 Subject: [PATCH 347/710] cleanup ExtensionHostDebugService --- src/vs/code/electron-main/app.ts | 10 +- .../debug}/common/extensionHostDebug.ts | 0 .../debug}/common/extensionHostDebugIpc.ts | 61 ++++++++- .../api/browser/mainThreadConsole.ts | 2 +- .../workbench/browser/web.simpleservices.ts | 62 ++------- .../contrib/debug/browser/debugService.ts | 2 +- .../common/remoteExtensionHostClient.ts | 2 +- .../electron-browser/extensionHost.ts | 2 +- .../extensionHostDebugService.ts | 123 +----------------- 9 files changed, 77 insertions(+), 187 deletions(-) rename src/vs/{workbench/services/extensions => platform/debug}/common/extensionHostDebug.ts (100%) rename src/vs/{workbench/services/extensions => platform/debug}/common/extensionHostDebugIpc.ts (50%) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 5682c0664c6..f7e670c79b6 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -86,6 +86,7 @@ import { DiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsIpc' import { FileService } from 'vs/platform/files/common/fileService'; import { IFileService } from 'vs/platform/files/common/files'; import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider'; +import { ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc'; export class CodeApplication extends Disposable { @@ -279,12 +280,6 @@ export class CodeApplication extends Disposable { } }); - ipc.on('vscode:extensionHostDebug', (_: Event, windowId: number, broadcast: any) => { - if (this.windowsMainService) { - this.windowsMainService.sendToAll('vscode:extensionHostDebug', broadcast, [windowId]); // Send to all windows (except sender window) - } - }); - ipc.on('vscode:toggleDevTools', (event: Event) => event.sender.toggleDevTools()); ipc.on('vscode:openDevTools', (event: Event) => event.sender.openDevTools()); @@ -577,6 +572,9 @@ export class CodeApplication extends Disposable { electronIpcServer.registerChannel('loglevel', logLevelChannel); sharedProcessClient.then(client => client.registerChannel('loglevel', logLevelChannel)); + // ExtensionHost Debug broadcast service + electronIpcServer.registerChannel(ExtensionHostDebugBroadcastChannel.ChannelName, new ExtensionHostDebugBroadcastChannel()); + // Signal phase: ready (services set) this.lifecycleService.phase = LifecycleMainPhase.Ready; diff --git a/src/vs/workbench/services/extensions/common/extensionHostDebug.ts b/src/vs/platform/debug/common/extensionHostDebug.ts similarity index 100% rename from src/vs/workbench/services/extensions/common/extensionHostDebug.ts rename to src/vs/platform/debug/common/extensionHostDebug.ts diff --git a/src/vs/workbench/services/extensions/common/extensionHostDebugIpc.ts b/src/vs/platform/debug/common/extensionHostDebugIpc.ts similarity index 50% rename from src/vs/workbench/services/extensions/common/extensionHostDebugIpc.ts rename to src/vs/platform/debug/common/extensionHostDebugIpc.ts index e9410a83c83..af7f1e526b8 100644 --- a/src/vs/workbench/services/extensions/common/extensionHostDebugIpc.ts +++ b/src/vs/platform/debug/common/extensionHostDebugIpc.ts @@ -3,12 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IServerChannel } from 'vs/base/parts/ipc/common/ipc'; -import { RemoteAgentConnectionContext } from 'vs/platform/remote/common/remoteAgentEnvironment'; -import { IReloadSessionEvent, ICloseSessionEvent, IAttachSessionEvent, ILogToSessionEvent, ITerminateSessionEvent } from 'vs/workbench/services/extensions/common/extensionHostDebug'; +import { IServerChannel, IChannel } from 'vs/base/parts/ipc/common/ipc'; +import { IReloadSessionEvent, ICloseSessionEvent, IAttachSessionEvent, ILogToSessionEvent, ITerminateSessionEvent, IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug'; import { Event, Emitter } from 'vs/base/common/event'; +import { IRemoteConsoleLog } from 'vs/base/common/console'; -export class EchoChannel implements IServerChannel { +export class ExtensionHostDebugBroadcastChannel implements IServerChannel { + + static readonly ChannelName = 'extensionhostdebugservice'; private _onCloseEmitter = new Emitter(); private _onReloadEmitter = new Emitter(); @@ -16,7 +18,7 @@ export class EchoChannel implements IServerChannel private _onLogToEmitter = new Emitter(); private _onAttachEmitter = new Emitter(); - call(ctx: RemoteAgentConnectionContext, command: string, arg?: any): Promise { + call(ctx: TContext, command: string, arg?: any): Promise { switch (command) { case 'close': return Promise.resolve(this._onCloseEmitter.fire({ sessionId: arg[0] })); @@ -32,7 +34,7 @@ export class EchoChannel implements IServerChannel throw new Error('Method not implemented.'); } - listen(ctx: RemoteAgentConnectionContext, event: string, arg?: any): Event { + listen(ctx: TContext, event: string, arg?: any): Event { switch (event) { case 'close': return this._onCloseEmitter.event; @@ -48,3 +50,50 @@ export class EchoChannel implements IServerChannel throw new Error('Method not implemented.'); } } + +export class ExtensionHostDebugChannelClient implements IExtensionHostDebugService { + + _serviceBrand: any; + + constructor(private channel: IChannel) { } + + reload(sessionId: string): void { + this.channel.call('reload', [sessionId]); + } + + get onReload(): Event { + return this.channel.listen('reload'); + } + + close(sessionId: string): void { + this.channel.call('close', [sessionId]); + } + + get onClose(): Event { + return this.channel.listen('close'); + } + + attachSession(sessionId: string, port: number, subId?: string): void { + this.channel.call('attach', [sessionId, port, subId]); + } + + get onAttachSession(): Event { + return this.channel.listen('attach'); + } + + logToSession(sessionId: string, log: IRemoteConsoleLog): void { + this.channel.call('log', [sessionId, log]); + } + + get onLogToSession(): Event { + return this.channel.listen('log'); + } + + terminateSession(sessionId: string, subId?: string): void { + this.channel.call('terminate', [sessionId, subId]); + } + + get onTerminateSession(): Event { + return this.channel.listen('terminate'); + } +} \ No newline at end of file diff --git a/src/vs/workbench/api/browser/mainThreadConsole.ts b/src/vs/workbench/api/browser/mainThreadConsole.ts index af983213492..160f9f0b773 100644 --- a/src/vs/workbench/api/browser/mainThreadConsole.ts +++ b/src/vs/workbench/api/browser/mainThreadConsole.ts @@ -9,7 +9,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { IRemoteConsoleLog, log, parse } from 'vs/base/common/console'; import { parseExtensionDevOptions } from 'vs/workbench/services/extensions/common/extensionDevOptions'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { IExtensionHostDebugService } from 'vs/workbench/services/extensions/common/extensionHostDebug'; +import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug'; @extHostNamedCustomer(MainContext.MainThreadConsole) export class MainThreadConsole implements MainThreadConsoleShape { diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index e5d4842aaa8..06e190a6ad8 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -24,8 +24,7 @@ import { IRecentlyOpened, IRecent, isRecentFile, isRecentFolder } from 'vs/platf import { ISerializableCommandAction } from 'vs/platform/actions/common/actions'; import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing'; import { ITunnelService } from 'vs/platform/remote/common/tunnel'; -import { IReloadSessionEvent, IExtensionHostDebugService, ICloseSessionEvent, IAttachSessionEvent, ILogToSessionEvent, ITerminateSessionEvent } from 'vs/workbench/services/extensions/common/extensionHostDebug'; -import { IRemoteConsoleLog } from 'vs/base/common/console'; +import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug'; // tslint:disable-next-line: import-patterns import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { addDisposableListener, EventType } from 'vs/base/browser/dom'; @@ -37,9 +36,9 @@ import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { IProcessEnvironment } from 'vs/base/common/platform'; import { toStoreData, restoreRecentlyOpened } from 'vs/platform/history/common/historyStorage'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; -import { IChannel } from 'vs/base/parts/ipc/common/ipc'; // tslint:disable-next-line: import-patterns import { IExperimentService, IExperiment, ExperimentActionType, ExperimentState } from 'vs/workbench/contrib/experiments/common/experimentService'; +import { ExtensionHostDebugChannelClient, ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc'; //#region Download @@ -614,63 +613,18 @@ registerSingleton(IWindowService, SimpleWindowService); //#region ExtensionHostDebugService -export class SimpleExtensionHostDebugService implements IExtensionHostDebugService { - _serviceBrand: any; - - private channel: IChannel; +export class SimpleExtensionHostDebugService extends ExtensionHostDebugChannelClient { constructor( - @IRemoteAgentService private remoteAgentService: IRemoteAgentService + @IRemoteAgentService remoteAgentService: IRemoteAgentService ) { - const connection = this.remoteAgentService.getConnection(); - if (connection) { - this.channel = connection.getChannel('extensionhostdebugservice'); - } - } + const connection = remoteAgentService.getConnection(); - reload(sessionId: string): void { - if (this.channel) { - this.channel.call('reload', [sessionId]); + if (!connection) { + throw new Error('Missing agent connection'); } - } - get onReload(): Event { - return this.channel ? this.channel.listen('reload') : Event.None; - } - close(sessionId: string): void { - if (this.channel) { - this.channel.call('close', [sessionId]); - } - } - get onClose(): Event { - return this.channel ? this.channel.listen('close') : Event.None; - } - - attachSession(sessionId: string, port: number, subId?: string): void { - if (this.channel) { - this.channel.call('attach', [sessionId, port, subId]); - } - } - get onAttachSession(): Event { - return this.channel ? this.channel.listen('attach') : Event.None; - } - - logToSession(sessionId: string, log: IRemoteConsoleLog): void { - if (this.channel) { - this.channel.call('log', [sessionId, log]); - } - } - get onLogToSession(): Event { - return this.channel ? this.channel.listen('log') : Event.None; - } - - terminateSession(sessionId: string, subId?: string): void { - if (this.channel) { - this.channel.call('terminate', [sessionId, subId]); - } - } - get onTerminateSession(): Event { - return this.channel ? this.channel.listen('terminate') : Event.None; + super(connection.getChannel(ExtensionHostDebugBroadcastChannel.ChannelName)); } } registerSingleton(IExtensionHostDebugService, SimpleExtensionHostDebugService); diff --git a/src/vs/workbench/contrib/debug/browser/debugService.ts b/src/vs/workbench/contrib/debug/browser/debugService.ts index 0b24d9395b1..1ae35d5a248 100644 --- a/src/vs/workbench/contrib/debug/browser/debugService.ts +++ b/src/vs/workbench/contrib/debug/browser/debugService.ts @@ -45,7 +45,7 @@ import { IDebugService, State, IDebugSession, CONTEXT_DEBUG_TYPE, CONTEXT_DEBUG_ import { isExtensionHostDebugging } from 'vs/workbench/contrib/debug/common/debugUtils'; import { isErrorWithActions, createErrorWithActions } from 'vs/base/common/errorsWithActions'; import { RunOnceScheduler } from 'vs/base/common/async'; -import { IExtensionHostDebugService } from 'vs/workbench/services/extensions/common/extensionHostDebug'; +import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug'; import { isCodeEditor } from 'vs/editor/browser/editorBrowser'; const DEBUG_BREAKPOINTS_KEY = 'debug.breakpoint'; diff --git a/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts b/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts index 9dc5b940cf1..c9b9ef57c67 100644 --- a/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts +++ b/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts @@ -24,7 +24,7 @@ import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { PersistentProtocol } from 'vs/base/parts/ipc/common/ipc.net'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { VSBuffer } from 'vs/base/common/buffer'; -import { IExtensionHostDebugService } from 'vs/workbench/services/extensions/common/extensionHostDebug'; +import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug'; import { IProductService } from 'vs/platform/product/common/product'; import { ISignService } from 'vs/platform/sign/common/sign'; diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts index 7b8225ca6ac..4d11f6a9459 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts @@ -35,7 +35,7 @@ import { withNullAsUndefined } from 'vs/base/common/types'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { parseExtensionDevOptions } from '../common/extensionDevOptions'; import { VSBuffer } from 'vs/base/common/buffer'; -import { IExtensionHostDebugService } from 'vs/workbench/services/extensions/common/extensionHostDebug'; +import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug'; import { IExtensionHostStarter } from 'vs/workbench/services/extensions/common/extensions'; import { isEqualOrParent } from 'vs/base/common/resources'; diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionHostDebugService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionHostDebugService.ts index aa4a35f54dd..e292a9ecd31 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionHostDebugService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionHostDebugService.ts @@ -3,128 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Event, Emitter } from 'vs/base/common/event'; -import { IWindowService } from 'vs/platform/windows/common/windows'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { IExtensionHostDebugService, IAttachSessionEvent, ITerminateSessionEvent, ILogToSessionEvent, IReloadSessionEvent, ICloseSessionEvent } from 'vs/workbench/services/extensions/common/extensionHostDebug'; -import { IRemoteConsoleLog } from 'vs/base/common/console'; -import { ipcRenderer as ipc } from 'electron'; +import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug'; +import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService'; +import { ExtensionHostDebugChannelClient, ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc'; -interface IReloadBroadcast extends IReloadSessionEvent { - type: 'vscode:extensionReload'; -} - -interface IAttachSessionBroadcast extends IAttachSessionEvent { - type: 'vscode:extensionAttach'; -} - -interface ICloseBroadcast extends ICloseSessionEvent { - type: 'vscode:extensionCloseExtensionHost'; -} - -interface ILogToSessionBroadcast extends ILogToSessionEvent { - type: 'vscode:extensionLog'; -} - -interface ITerminateSessionBroadcast extends ITerminateSessionEvent { - type: 'vscode:extensionTerminate'; -} - -const CHANNEL = 'vscode:extensionHostDebug'; - -class ExtensionHostDebugService implements IExtensionHostDebugService { - _serviceBrand: any; - - private windowId: number; - private readonly _onReload = new Emitter(); - private readonly _onClose = new Emitter(); - private readonly _onAttachSession = new Emitter(); - private readonly _onLogToSession = new Emitter(); - private readonly _onTerminateSession = new Emitter(); +export class ExtensionHostDebugService extends ExtensionHostDebugChannelClient { constructor( - @IWindowService readonly windowService: IWindowService, + @IMainProcessService readonly windowService: IMainProcessService, ) { - this.windowId = windowService.windowId; - - ipc.on(CHANNEL, (_: unknown, broadcast: IReloadBroadcast | ICloseBroadcast | IAttachSessionBroadcast | ILogToSessionBroadcast | ITerminateSessionBroadcast) => { - switch (broadcast.type) { - case 'vscode:extensionReload': - this._onReload.fire(broadcast); - break; - case 'vscode:extensionCloseExtensionHost': - this._onClose.fire(broadcast); - break; - case 'vscode:extensionAttach': - this._onAttachSession.fire(broadcast); - break; - case 'vscode:extensionLog': - this._onLogToSession.fire(broadcast); - break; - case 'vscode:extensionTerminate': - this._onTerminateSession.fire(broadcast); - break; - } - }); - } - - reload(sessionId: string): void { - ipc.send(CHANNEL, this.windowId, { - type: 'vscode:extensionReload', - sessionId - }); - } - - get onReload(): Event { - return this._onReload.event; - } - - close(sessionId: string): void { - ipc.send(CHANNEL, this.windowId, { - type: 'vscode:extensionCloseExtensionHost', - sessionId - }); - } - - get onClose(): Event { - return this._onClose.event; - } - - attachSession(sessionId: string, port: number, subId?: string): void { - ipc.send(CHANNEL, this.windowId, { - type: 'vscode:extensionAttach', - sessionId, - port, - subId - }); - } - - get onAttachSession(): Event { - return this._onAttachSession.event; - } - - logToSession(sessionId: string, log: IRemoteConsoleLog): void { - ipc.send(CHANNEL, this.windowId, { - type: 'vscode:extensionLog', - sessionId, - log - }); - } - - get onLogToSession(): Event { - return this._onLogToSession.event; - } - - terminateSession(sessionId: string, subId?: string): void { - ipc.send(CHANNEL, this.windowId, { - type: 'vscode:extensionTerminate', - sessionId, - subId - }); - } - - get onTerminateSession(): Event { - return this._onTerminateSession.event; + super(windowService.getChannel(ExtensionHostDebugBroadcastChannel.ChannelName)); } } From db8cc94a06f7767e8273a7407ba7aaed57ac130e Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 11:44:35 +0200 Subject: [PATCH 348/710] Move enablement and servers to workbench --- .../common/extensionManagement.ts | 61 ---------------- .../api/browser/mainThreadExtensionService.ts | 2 +- .../workbench/browser/web.simpleservices.ts | 3 +- .../experimentService.test.ts | 4 +- .../browser/extensions.contribution.ts | 3 +- .../extensions/browser/extensionsActions.ts | 3 +- .../extensions/browser/extensionsList.ts | 2 +- .../extensions/browser/extensionsViewlet.ts | 3 +- .../extensions/browser/extensionsViews.ts | 3 +- .../extensions/browser/extensionsWidgets.ts | 3 +- .../browser/extensionsWorkbenchService.ts | 3 +- .../contrib/extensions/common/extensions.ts | 3 +- .../extensions/common/extensionsUtils.ts | 3 +- .../runtimeExtensionsEditor.ts | 2 +- .../extensionsActions.test.ts | 5 +- .../extensionsTipsService.test.ts | 3 +- .../electron-browser/extensionsViews.test.ts | 5 +- .../extensionsWorkbenchService.test.ts | 5 +- .../format/browser/formatActionsMultiple.ts | 2 +- .../issue/electron-browser/issueService.ts | 3 +- .../preferences/browser/preferencesSearch.ts | 3 +- .../welcome/page/browser/welcomePage.ts | 3 +- .../common/extensionManagement.ts | 71 +++++++++++++++++++ .../extensionManagementServerService.ts | 2 +- .../common/extensionManagementService.ts | 4 +- .../extensionManagementServerService.ts | 3 +- .../node/extensionEnablementService.ts | 3 +- .../extensionEnablementService.test.ts | 3 +- .../extensions/browser/extensionService.ts | 2 +- .../common/abstractExtensionService.ts | 2 +- .../common/inactiveExtensionUrlHandler.ts | 3 +- .../cachedExtensionScanner.ts | 2 +- .../electron-browser/extensionService.ts | 3 +- 33 files changed, 128 insertions(+), 97 deletions(-) create mode 100644 src/vs/workbench/services/extensionManagement/common/extensionManagement.ts diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts index 0c4035b4a8f..21b66fa717c 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagement.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts @@ -206,67 +206,6 @@ export interface IExtensionManagementService { updateMetadata(local: ILocalExtension, metadata: IGalleryMetadata): Promise; } -export const IExtensionManagementServerService = createDecorator('extensionManagementServerService'); - -export interface IExtensionManagementServer { - extensionManagementService: IExtensionManagementService; - authority: string; - label: string; -} - -export interface IExtensionManagementServerService { - _serviceBrand: any; - readonly localExtensionManagementServer: IExtensionManagementServer | null; - readonly remoteExtensionManagementServer: IExtensionManagementServer | null; - getExtensionManagementServer(location: URI): IExtensionManagementServer | null; -} - -export const enum EnablementState { - Disabled, - WorkspaceDisabled, - Enabled, - WorkspaceEnabled -} - -export const IExtensionEnablementService = createDecorator('extensionEnablementService'); - -export interface IExtensionEnablementService { - _serviceBrand: any; - - readonly allUserExtensionsDisabled: boolean; - - /** - * Event to listen on for extension enablement changes - */ - onEnablementChanged: Event; - - /** - * Returns the enablement state for the given extension - */ - getEnablementState(extension: IExtension): EnablementState; - - /** - * Returns `true` if the enablement can be changed. - */ - canChangeEnablement(extension: IExtension): boolean; - - /** - * Returns `true` if the given extension identifier is enabled. - */ - isEnabled(extension: IExtension): boolean; - - /** - * Enable or disable the given extension. - * if `workspace` is `true` then enablement is done for workspace, otherwise globally. - * - * Returns a promise that resolves to boolean value. - * if resolves to `true` then requires restart for the change to take effect. - * - * Throws error if enablement is requested for workspace and there is no workspace - */ - setEnablement(extensions: IExtension[], state: EnablementState): Promise; -} - export interface IExtensionsConfigContent { recommendations: string[]; unwantedRecommendations: string[]; diff --git a/src/vs/workbench/api/browser/mainThreadExtensionService.ts b/src/vs/workbench/api/browser/mainThreadExtensionService.ts index 3089f46e97b..8a63fccb827 100644 --- a/src/vs/workbench/api/browser/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/browser/mainThreadExtensionService.ts @@ -12,7 +12,7 @@ import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensio import { INotificationService } from 'vs/platform/notification/common/notification'; import { localize } from 'vs/nls'; import { Action } from 'vs/base/common/actions'; -import { EnablementState } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IWindowService } from 'vs/platform/windows/common/windows'; import { IExtensionsWorkbenchService, IExtension } from 'vs/workbench/contrib/extensions/common/extensions'; diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index 06e190a6ad8..e92ca34d171 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -11,7 +11,8 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' // tslint:disable-next-line: import-patterns no-standalone-editor import { IDownloadService } from 'vs/platform/download/common/download'; import { CancellationToken } from 'vs/base/common/cancellation'; -import { IGalleryExtension, IExtensionIdentifier, IReportedExtension, IExtensionManagementService, ILocalExtension, IGalleryMetadata, IExtensionTipsService, ExtensionRecommendationReason, IExtensionRecommendation, IExtensionEnablementService, EnablementState } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IGalleryExtension, IExtensionIdentifier, IReportedExtension, IExtensionManagementService, ILocalExtension, IGalleryMetadata, IExtensionTipsService, ExtensionRecommendationReason, IExtensionRecommendation } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionType, ExtensionIdentifier, IExtension } from 'vs/platform/extensions/common/extensions'; import { IURLHandler, IURLService } from 'vs/platform/url/common/url'; import { ConsoleLogService, ILogService } from 'vs/platform/log/common/log'; diff --git a/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts b/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts index fdea7523dbb..f44b4d3904e 100644 --- a/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts +++ b/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts @@ -10,9 +10,9 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/ import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { TestLifecycleService } from 'vs/workbench/test/workbenchTestServices'; import { - IExtensionManagementService, DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, - IExtensionEnablementService, ILocalExtension + IExtensionManagementService, DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService'; import { Emitter } from 'vs/base/common/event'; import { TestExtensionEnablementService } from 'vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts index 7e7448ef8ea..eb55efed49b 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts @@ -9,7 +9,8 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { Registry } from 'vs/platform/registry/common/platform'; import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManagementService, IExtensionGalleryService, IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actions'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions, IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IOutputChannelRegistry, Extensions as OutputExtensions } from 'vs/workbench/contrib/output/common/output'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 1fb6bc1692c..b4e68f57be4 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -15,7 +15,8 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { dispose, Disposable } from 'vs/base/common/lifecycle'; import { IExtension, ExtensionState, IExtensionsWorkbenchService, VIEWLET_ID, IExtensionsViewlet, AutoUpdateConfigurationKey, IExtensionContainer, EXTENSIONS_CONFIG } from 'vs/workbench/contrib/extensions/common/extensions'; import { ExtensionsConfigurationInitialContent } from 'vs/workbench/contrib/extensions/common/extensionsFileTemplate'; -import { IExtensionEnablementService, IExtensionTipsService, EnablementState, ExtensionsLabel, IExtensionRecommendation, IGalleryExtension, IExtensionsConfigContent, IExtensionGalleryService, INSTALL_ERROR_MALICIOUS, INSTALL_ERROR_INCOMPATIBLE, IGalleryExtensionVersion, ILocalExtension, IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionTipsService, ExtensionsLabel, IExtensionRecommendation, IGalleryExtension, IExtensionsConfigContent, IExtensionGalleryService, INSTALL_ERROR_MALICIOUS, INSTALL_ERROR_INCOMPATIBLE, IGalleryExtensionVersion, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionType, ExtensionIdentifier, IExtensionDescription, IExtensionManifest, isLanguagePackExtension } from 'vs/platform/extensions/common/extensions'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsList.ts b/src/vs/workbench/contrib/extensions/browser/extensionsList.ts index 0946dc134d9..cbb9f190f03 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsList.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsList.ts @@ -17,7 +17,7 @@ import { InstallAction, UpdateAction, ManageExtensionAction, ReloadAction, Malic import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { Label, RatingsWidget, InstallCountWidget, RecommendationWidget, RemoteBadgeWidget, TooltipWidget } from 'vs/workbench/contrib/extensions/browser/extensionsWidgets'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; -import { IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { isLanguagePackExtension } from 'vs/platform/extensions/common/extensions'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts index d9272d6d014..9d24e8584de 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts @@ -24,7 +24,8 @@ import { ShowOutdatedExtensionsAction, ClearExtensionsInputAction, ChangeSortAction, UpdateAllAction, CheckForUpdatesAction, DisableAllAction, EnableAllAction, EnableAutoUpdateAction, DisableAutoUpdateAction, ShowBuiltInExtensionsAction, InstallVSIXAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; -import { IExtensionManagementService, IExtensionManagementServerService, IExtensionManagementServer, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput'; import { ExtensionsListView, EnabledExtensionsView, DisabledExtensionsView, RecommendedExtensionsView, WorkspaceRecommendedExtensionsView, BuiltInExtensionsView, BuiltInThemesExtensionsView, BuiltInBasicsExtensionsView, ServerExtensionsView, DefaultRecommendedExtensionsView } from 'vs/workbench/contrib/extensions/browser/extensionsViews'; import { OpenGlobalSettingsAction } from 'vs/workbench/contrib/preferences/browser/preferencesActions'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts index 4b160a91004..8aad9e22872 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts @@ -9,7 +9,8 @@ import { assign } from 'vs/base/common/objects'; import { Event, Emitter } from 'vs/base/common/event'; import { isPromiseCanceledError, getErrorMessage } from 'vs/base/common/errors'; import { PagedModel, IPagedModel, IPager, DelayedPagedModel } from 'vs/base/common/paging'; -import { SortBy, SortOrder, IQueryOptions, IExtensionTipsService, IExtensionRecommendation, IExtensionManagementServer, IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { SortBy, SortOrder, IQueryOptions, IExtensionTipsService, IExtensionRecommendation } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementServer, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts index 6d8e9578422..9b27879aa2e 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts @@ -9,7 +9,8 @@ import { IExtension, IExtensionsWorkbenchService, IExtensionContainer, Extension import { append, $, addClass } from 'vs/base/browser/dom'; import * as platform from 'vs/base/common/platform'; import { localize } from 'vs/nls'; -import { IExtensionManagementServerService, IExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ILabelService } from 'vs/platform/label/common/label'; import { extensionButtonProminentBackground, extensionButtonProminentForeground, DisabledLabelAction, ReloadAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index 572272c85c7..a3084a6de46 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -14,8 +14,9 @@ import { IPager, mapPager, singlePagePager } from 'vs/base/common/paging'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IExtensionManagementService, IExtensionGalleryService, ILocalExtension, IGalleryExtension, IQueryOptions, - InstallExtensionEvent, DidInstallExtensionEvent, DidUninstallExtensionEvent, IExtensionEnablementService, IExtensionIdentifier, EnablementState, IExtensionManagementServerService, IExtensionManagementServer + InstallExtensionEvent, DidInstallExtensionEvent, DidUninstallExtensionEvent, IExtensionIdentifier } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { getGalleryExtensionTelemetryData, getLocalExtensionTelemetryData, areSameExtensions, getMaliciousExtensionsSet, groupByExtension, ExtensionIdentifierWithVersion } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; diff --git a/src/vs/workbench/contrib/extensions/common/extensions.ts b/src/vs/workbench/contrib/extensions/common/extensions.ts index 86ca4b4b4fe..5e6d7cf3993 100644 --- a/src/vs/workbench/contrib/extensions/common/extensions.ts +++ b/src/vs/workbench/contrib/extensions/common/extensions.ts @@ -7,7 +7,8 @@ import { IViewlet } from 'vs/workbench/common/viewlet'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Event } from 'vs/base/common/event'; import { IPager } from 'vs/base/common/paging'; -import { IQueryOptions, EnablementState, ILocalExtension, IGalleryExtension, IExtensionIdentifier, IExtensionManagementServer } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IQueryOptions, ILocalExtension, IGalleryExtension, IExtensionIdentifier } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { EnablementState, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { IViewContainersRegistry, ViewContainer, Extensions as ViewContainerExtensions } from 'vs/workbench/common/views'; import { Registry } from 'vs/platform/registry/common/platform'; import { CancellationToken } from 'vs/base/common/cancellation'; diff --git a/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts b/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts index edf2a12d6fd..87af1da1d88 100644 --- a/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts +++ b/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts @@ -9,7 +9,8 @@ import { Event } from 'vs/base/common/event'; import { onUnexpectedError } from 'vs/base/common/errors'; import { Disposable } from 'vs/base/common/lifecycle'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IExtensionManagementService, ILocalExtension, IExtensionEnablementService, IExtensionTipsService, IExtensionIdentifier, EnablementState, InstallOperation } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService, ILocalExtension, IExtensionTipsService, IExtensionIdentifier, InstallOperation } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; diff --git a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts index d5666b2f5f8..92c40276e84 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts @@ -23,7 +23,7 @@ import { ActionBar, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { RunOnceScheduler } from 'vs/base/common/async'; import { clipboard } from 'electron'; -import { EnablementState } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows'; import { writeFile } from 'vs/base/node/pfs'; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index 19740cf5365..e9b47535d20 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -10,9 +10,10 @@ import { IExtensionsWorkbenchService, ExtensionContainers } from 'vs/workbench/c import * as ExtensionsActions from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; import { - IExtensionManagementService, IExtensionGalleryService, IExtensionEnablementService, IExtensionTipsService, ILocalExtension, IGalleryExtension, - DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, EnablementState, InstallOperation, IExtensionManagementServerService, IExtensionManagementServer + IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, ILocalExtension, IGalleryExtension, + DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, InstallOperation } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService'; import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService'; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts index eb1c1c0aa08..cd6d14c858d 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts @@ -12,8 +12,9 @@ import * as uuid from 'vs/base/common/uuid'; import { mkdirp, rimraf, RimRafMode } from 'vs/base/node/pfs'; import { IExtensionGalleryService, IGalleryExtensionAssets, IGalleryExtension, IExtensionManagementService, - IExtensionEnablementService, DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier + DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService'; import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts index 67ae23cae17..84a2299389a 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts @@ -11,9 +11,10 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/ import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions'; import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; import { - IExtensionManagementService, IExtensionGalleryService, IExtensionEnablementService, IExtensionTipsService, ILocalExtension, IGalleryExtension, IQueryOptions, - DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, IExtensionManagementServerService, EnablementState, ExtensionRecommendationReason, SortBy, IExtensionManagementServer + IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, ILocalExtension, IGalleryExtension, IQueryOptions, + DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, ExtensionRecommendationReason, SortBy } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService'; import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService'; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts index a6b3f07d04c..d2285753ef2 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts @@ -11,9 +11,10 @@ import { generateUuid } from 'vs/base/common/uuid'; import { IExtensionsWorkbenchService, ExtensionState, AutoCheckUpdatesConfigurationKey, AutoUpdateConfigurationKey } from 'vs/workbench/contrib/extensions/common/extensions'; import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; import { - IExtensionManagementService, IExtensionGalleryService, IExtensionEnablementService, IExtensionTipsService, ILocalExtension, IGalleryExtension, - DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IGalleryExtensionAssets, IExtensionIdentifier, EnablementState, InstallOperation, IExtensionManagementServerService + IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, ILocalExtension, IGalleryExtension, + DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IGalleryExtensionAssets, IExtensionIdentifier, InstallOperation } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService'; import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService'; diff --git a/src/vs/workbench/contrib/format/browser/formatActionsMultiple.ts b/src/vs/workbench/contrib/format/browser/formatActionsMultiple.ts index 496534157ce..4b726da442f 100644 --- a/src/vs/workbench/contrib/format/browser/formatActionsMultiple.ts +++ b/src/vs/workbench/contrib/format/browser/formatActionsMultiple.ts @@ -27,7 +27,7 @@ import { ITextModel } from 'vs/editor/common/model'; import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ILabelService } from 'vs/platform/label/common/label'; -import { IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; type FormattingEditProvider = DocumentFormattingEditProvider | DocumentRangeFormattingEditProvider; diff --git a/src/vs/workbench/contrib/issue/electron-browser/issueService.ts b/src/vs/workbench/contrib/issue/electron-browser/issueService.ts index 203cacfd8e1..e93eac14556 100644 --- a/src/vs/workbench/contrib/issue/electron-browser/issueService.ts +++ b/src/vs/workbench/contrib/issue/electron-browser/issueService.ts @@ -7,7 +7,8 @@ import { IssueReporterStyles, IIssueService, IssueReporterData, ProcessExplorerD import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; import { textLinkForeground, inputBackground, inputBorder, inputForeground, buttonBackground, buttonHoverBackground, buttonForeground, inputValidationErrorBorder, foreground, inputActiveOptionBorder, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, editorBackground, editorForeground, listHoverBackground, listHoverForeground, listHighlightForeground, textLinkActiveForeground } from 'vs/platform/theme/common/colorRegistry'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; -import { IExtensionManagementService, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { webFrame } from 'electron'; import { assign } from 'vs/base/common/objects'; import { IWorkbenchIssueService } from 'vs/workbench/contrib/issue/electron-browser/issue'; diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesSearch.ts b/src/vs/workbench/contrib/preferences/browser/preferencesSearch.ts index ac442c4d75e..2887abfc0f3 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesSearch.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesSearch.ts @@ -15,7 +15,8 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { Disposable } from 'vs/base/common/lifecycle'; import { IPreferencesSearchService, ISearchProvider, IWorkbenchSettingsConfiguration } from 'vs/workbench/contrib/preferences/common/preferences'; import { IRequestService, asJson } from 'vs/platform/request/common/request'; -import { IExtensionManagementService, ILocalExtension, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ILogService } from 'vs/platform/log/common/log'; import { CancellationToken } from 'vs/base/common/cancellation'; import { canceled } from 'vs/base/common/errors'; diff --git a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts index 64a9afe8fe8..b33fed82b15 100644 --- a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts +++ b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts @@ -22,7 +22,8 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { Schemas } from 'vs/base/common/network'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { getInstalledExtensions, IExtensionStatus, onExtensionChanged, isKeymapExtension } from 'vs/workbench/contrib/extensions/common/extensionsUtils'; -import { IExtensionEnablementService, IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, EnablementState, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { used } from 'vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page'; import { ILifecycleService, StartupKind } from 'vs/platform/lifecycle/common/lifecycle'; import { Disposable } from 'vs/base/common/lifecycle'; diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts new file mode 100644 index 00000000000..be68a990b34 --- /dev/null +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts @@ -0,0 +1,71 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Event } from 'vs/base/common/event'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { URI } from 'vs/base/common/uri'; +import { IExtension } from 'vs/platform/extensions/common/extensions'; +import { IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; + +export const IExtensionManagementServerService = createDecorator('extensionManagementServerService'); + +export interface IExtensionManagementServer { + extensionManagementService: IExtensionManagementService; + authority: string; + label: string; +} + +export interface IExtensionManagementServerService { + _serviceBrand: any; + readonly localExtensionManagementServer: IExtensionManagementServer | null; + readonly remoteExtensionManagementServer: IExtensionManagementServer | null; + getExtensionManagementServer(location: URI): IExtensionManagementServer | null; +} + +export const enum EnablementState { + Disabled, + WorkspaceDisabled, + Enabled, + WorkspaceEnabled +} + +export const IExtensionEnablementService = createDecorator('extensionEnablementService'); + +export interface IExtensionEnablementService { + _serviceBrand: any; + + readonly allUserExtensionsDisabled: boolean; + + /** + * Event to listen on for extension enablement changes + */ + onEnablementChanged: Event; + + /** + * Returns the enablement state for the given extension + */ + getEnablementState(extension: IExtension): EnablementState; + + /** + * Returns `true` if the enablement can be changed. + */ + canChangeEnablement(extension: IExtension): boolean; + + /** + * Returns `true` if the given extension identifier is enabled. + */ + isEnabled(extension: IExtension): boolean; + + /** + * Enable or disable the given extension. + * if `workspace` is `true` then enablement is done for workspace, otherwise globally. + * + * Returns a promise that resolves to boolean value. + * if resolves to `true` then requires restart for the change to take effect. + * + * Throws error if enablement is requested for workspace and there is no workspace + */ + setEnablement(extensions: IExtension[], state: EnablementState): Promise; +} diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts index fda5c0332b9..0a48d2989fb 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts @@ -5,7 +5,7 @@ import { localize } from 'vs/nls'; import { URI } from 'vs/base/common/uri'; -import { IExtensionManagementServer, IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementServer, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/common/extensionManagementIpc'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts index 825d9ef62e6..ff5534b4901 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts @@ -5,9 +5,9 @@ import { Event, EventMultiplexer } from 'vs/base/common/event'; import { - IExtensionManagementService, ILocalExtension, IGalleryExtension, InstallExtensionEvent, DidInstallExtensionEvent, IExtensionIdentifier, DidUninstallExtensionEvent, IReportedExtension, IGalleryMetadata, - IExtensionManagementServerService, IExtensionManagementServer, IExtensionGalleryService + IExtensionManagementService, ILocalExtension, IGalleryExtension, InstallExtensionEvent, DidInstallExtensionEvent, IExtensionIdentifier, DidUninstallExtensionEvent, IReportedExtension, IGalleryMetadata, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementServer, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionType, isLanguagePackExtension } from 'vs/platform/extensions/common/extensions'; import { URI } from 'vs/base/common/uri'; import { Disposable } from 'vs/base/common/lifecycle'; diff --git a/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts b/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts index c5b08097ce4..c3921f17a54 100644 --- a/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts +++ b/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts @@ -6,7 +6,8 @@ import { localize } from 'vs/nls'; import { Schemas } from 'vs/base/common/network'; import { URI } from 'vs/base/common/uri'; -import { IExtensionManagementServer, IExtensionManagementServerService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementServer, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/common/extensionManagementIpc'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; diff --git a/src/vs/workbench/services/extensionManagement/node/extensionEnablementService.ts b/src/vs/workbench/services/extensionManagement/node/extensionEnablementService.ts index 705ea4028c1..d4243701c05 100644 --- a/src/vs/workbench/services/extensionManagement/node/extensionEnablementService.ts +++ b/src/vs/workbench/services/extensionManagement/node/extensionEnablementService.ts @@ -6,7 +6,8 @@ import { localize } from 'vs/nls'; import { Event, Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; -import { IExtensionManagementService, DidUninstallExtensionEvent, IExtensionEnablementService, IExtensionIdentifier, EnablementState, DidInstallExtensionEvent, InstallOperation, IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService, DidUninstallExtensionEvent, IExtensionIdentifier, DidInstallExtensionEvent, InstallOperation } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IStorageService, StorageScope, IWorkspaceStorageChangeEvent } from 'vs/platform/storage/common/storage'; diff --git a/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts b/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts index ec939ce04b0..99b4fa29e22 100644 --- a/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts +++ b/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; import * as sinon from 'sinon'; -import { IExtensionManagementService, IExtensionEnablementService, DidUninstallExtensionEvent, EnablementState, ILocalExtension, DidInstallExtensionEvent, InstallOperation, IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService, DidUninstallExtensionEvent, ILocalExtension, DidInstallExtensionEvent, InstallOperation } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionEnablementService } from 'vs/workbench/services/extensionManagement/node/extensionEnablementService'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { Emitter } from 'vs/base/common/event'; diff --git a/src/vs/workbench/services/extensions/browser/extensionService.ts b/src/vs/workbench/services/extensions/browser/extensionService.ts index 23fa0b21c4a..14d0da31fad 100644 --- a/src/vs/workbench/services/extensions/browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/browser/extensionService.ts @@ -5,7 +5,7 @@ import * as nls from 'vs/nls'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; -import { IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; diff --git a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts index f19abf44e9b..eed7a616357 100644 --- a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts +++ b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts @@ -10,7 +10,7 @@ import { Disposable } from 'vs/base/common/lifecycle'; import * as perf from 'vs/base/common/performance'; import { isEqualOrParent } from 'vs/base/common/resources'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; -import { IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { BetterMergeId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; diff --git a/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts b/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts index 351bbe5ddc9..28503d4e7dc 100644 --- a/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts +++ b/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts @@ -8,7 +8,8 @@ import { Action } from 'vs/base/common/actions'; import { IDisposable, toDisposable, combinedDisposable } from 'vs/base/common/lifecycle'; import { URI } from 'vs/base/common/uri'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; -import { EnablementState, IExtensionEnablementService, IExtensionGalleryService, IExtensionIdentifier, IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionGalleryService, IExtensionIdentifier, IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { INotificationHandle, INotificationService, Severity } from 'vs/platform/notification/common/notification'; diff --git a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts index f24f320674b..737395b0d42 100644 --- a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts +++ b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts @@ -15,7 +15,7 @@ import { originalFSPath } from 'vs/base/common/resources'; import { URI } from 'vs/base/common/uri'; import * as pfs from 'vs/base/node/pfs'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { BUILTIN_MANIFEST_CACHE_FILE, MANIFEST_CACHE_FOLDER, USER_MANIFEST_CACHE_FILE, ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import pkg from 'vs/platform/product/node/package'; import product from 'vs/platform/product/node/product'; diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index 4d8357796eb..4c580ce9e6d 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -14,7 +14,8 @@ import * as path from 'vs/base/common/path'; import { runWhenIdle } from 'vs/base/common/async'; import { URI } from 'vs/base/common/uri'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; -import { IExtensionEnablementService, IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IInitDataProvider, RemoteExtensionHostClient } from 'vs/workbench/services/extensions/common/remoteExtensionHostClient'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; From 6d09bf0f80f96ed07e0f1d74991b87c8de8e2e8e Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 11:51:13 +0200 Subject: [PATCH 349/710] Move extensions tips service to workbench --- .../common/extensionManagement.ts | 44 ------------------- .../workbench/browser/web.simpleservices.ts | 4 +- .../extensions/browser/extensionEditor.ts | 2 +- .../extensions/browser/extensionsActions.ts | 4 +- .../extensions/browser/extensionsViews.ts | 4 +- .../extensions/browser/extensionsWidgets.ts | 3 +- .../extensions/common/extensionsUtils.ts | 4 +- .../electron-browser/extensionTipsService.ts | 6 +-- .../extensions.contribution.ts | 2 +- .../extensionsActions.test.ts | 4 +- .../electron-browser/extensionsViews.test.ts | 6 +-- .../extensionsWorkbenchService.test.ts | 4 +- .../welcome/page/browser/welcomePage.ts | 4 +- .../common/extensionManagement.ts | 44 +++++++++++++++++++ 14 files changed, 66 insertions(+), 69 deletions(-) diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts index 21b66fa717c..b075553498d 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagement.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts @@ -8,7 +8,6 @@ import { Event } from 'vs/base/common/event'; import { IPager } from 'vs/base/common/paging'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { URI } from 'vs/base/common/uri'; -import { IWorkspaceFolder, IWorkspace } from 'vs/platform/workspace/common/workspace'; import { CancellationToken } from 'vs/base/common/cancellation'; import { IExtensionManifest, IExtension, ExtensionType } from 'vs/platform/extensions/common/extensions'; @@ -206,49 +205,6 @@ export interface IExtensionManagementService { updateMetadata(local: ILocalExtension, metadata: IGalleryMetadata): Promise; } -export interface IExtensionsConfigContent { - recommendations: string[]; - unwantedRecommendations: string[]; -} - -export type RecommendationChangeNotification = { - extensionId: string, - isRecommended: boolean -}; - -export type DynamicRecommendation = 'dynamic'; -export type ExecutableRecommendation = 'executable'; -export type CachedRecommendation = 'cached'; -export type ApplicationRecommendation = 'application'; -export type ExtensionRecommendationSource = IWorkspace | IWorkspaceFolder | URI | DynamicRecommendation | ExecutableRecommendation | CachedRecommendation | ApplicationRecommendation; - -export interface IExtensionRecommendation { - extensionId: string; - sources: ExtensionRecommendationSource[]; -} - -export const IExtensionTipsService = createDecorator('extensionTipsService'); - -export interface IExtensionTipsService { - _serviceBrand: any; - getAllRecommendationsWithReason(): { [id: string]: { reasonId: ExtensionRecommendationReason, reasonText: string }; }; - getFileBasedRecommendations(): IExtensionRecommendation[]; - getOtherRecommendations(): Promise; - getWorkspaceRecommendations(): Promise; - getKeymapRecommendations(): IExtensionRecommendation[]; - toggleIgnoredRecommendation(extensionId: string, shouldIgnore: boolean): void; - getAllIgnoredRecommendations(): { global: string[], workspace: string[] }; - onRecommendationChange: Event; -} - -export const enum ExtensionRecommendationReason { - Workspace, - File, - Executable, - DynamicWorkspace, - Experimental -} - export const ExtensionsLabel = localize('extensions', "Extensions"); export const ExtensionsChannelId = 'extensions'; export const PreferencesLabel = localize('preferences', "Preferences"); diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index e92ca34d171..099f2db171d 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -11,8 +11,8 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' // tslint:disable-next-line: import-patterns no-standalone-editor import { IDownloadService } from 'vs/platform/download/common/download'; import { CancellationToken } from 'vs/base/common/cancellation'; -import { IGalleryExtension, IExtensionIdentifier, IReportedExtension, IExtensionManagementService, ILocalExtension, IGalleryMetadata, IExtensionTipsService, ExtensionRecommendationReason, IExtensionRecommendation } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IExtensionEnablementService, EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { IGalleryExtension, IExtensionIdentifier, IReportedExtension, IExtensionManagementService, ILocalExtension, IGalleryMetadata } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionTipsService, ExtensionRecommendationReason, IExtensionRecommendation } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionType, ExtensionIdentifier, IExtension } from 'vs/platform/extensions/common/extensions'; import { IURLHandler, IURLService } from 'vs/platform/url/common/url'; import { ConsoleLogService, ILogService } from 'vs/platform/log/common/log'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index 714ee465961..5456cb5f4a7 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -20,7 +20,7 @@ import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; -import { IExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { IExtensionManifest, IKeyBinding, IView, IViewContainer, ExtensionType } from 'vs/platform/extensions/common/extensions'; import { ResolvedKeybinding, KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index b4e68f57be4..4a68163faa6 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -15,8 +15,8 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { dispose, Disposable } from 'vs/base/common/lifecycle'; import { IExtension, ExtensionState, IExtensionsWorkbenchService, VIEWLET_ID, IExtensionsViewlet, AutoUpdateConfigurationKey, IExtensionContainer, EXTENSIONS_CONFIG } from 'vs/workbench/contrib/extensions/common/extensions'; import { ExtensionsConfigurationInitialContent } from 'vs/workbench/contrib/extensions/common/extensionsFileTemplate'; -import { IExtensionTipsService, ExtensionsLabel, IExtensionRecommendation, IGalleryExtension, IExtensionsConfigContent, IExtensionGalleryService, INSTALL_ERROR_MALICIOUS, INSTALL_ERROR_INCOMPATIBLE, IGalleryExtensionVersion, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { ExtensionsLabel, IGalleryExtension, IExtensionGalleryService, INSTALL_ERROR_MALICIOUS, INSTALL_ERROR_INCOMPATIBLE, IGalleryExtensionVersion, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionTipsService, IExtensionRecommendation, IExtensionsConfigContent } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionType, ExtensionIdentifier, IExtensionDescription, IExtensionManifest, isLanguagePackExtension } from 'vs/platform/extensions/common/extensions'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts index 8aad9e22872..2e889a62b7f 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts @@ -9,8 +9,8 @@ import { assign } from 'vs/base/common/objects'; import { Event, Emitter } from 'vs/base/common/event'; import { isPromiseCanceledError, getErrorMessage } from 'vs/base/common/errors'; import { PagedModel, IPagedModel, IPager, DelayedPagedModel } from 'vs/base/common/paging'; -import { SortBy, SortOrder, IQueryOptions, IExtensionTipsService, IExtensionRecommendation } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IExtensionManagementServer, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { SortBy, SortOrder, IQueryOptions } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementServer, IExtensionManagementServerService, IExtensionTipsService, IExtensionRecommendation } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts index 9b27879aa2e..fd3ec77d79d 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts @@ -9,8 +9,7 @@ import { IExtension, IExtensionsWorkbenchService, IExtensionContainer, Extension import { append, $, addClass } from 'vs/base/browser/dom'; import * as platform from 'vs/base/common/platform'; import { localize } from 'vs/nls'; -import { IExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { IExtensionTipsService, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ILabelService } from 'vs/platform/label/common/label'; import { extensionButtonProminentBackground, extensionButtonProminentForeground, DisabledLabelAction, ReloadAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; diff --git a/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts b/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts index 87af1da1d88..282978991f9 100644 --- a/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts +++ b/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts @@ -9,8 +9,8 @@ import { Event } from 'vs/base/common/event'; import { onUnexpectedError } from 'vs/base/common/errors'; import { Disposable } from 'vs/base/common/lifecycle'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IExtensionManagementService, ILocalExtension, IExtensionTipsService, IExtensionIdentifier, InstallOperation } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IExtensionEnablementService, EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService, ILocalExtension, IExtensionIdentifier, InstallOperation } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts index 816a5521610..f4af7a1c9b6 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts @@ -9,10 +9,8 @@ import { forEach } from 'vs/base/common/collections'; import { Disposable } from 'vs/base/common/lifecycle'; import { match } from 'vs/base/common/glob'; import * as json from 'vs/base/common/json'; -import { - IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, ExtensionRecommendationReason, EXTENSION_IDENTIFIER_PATTERN, - IExtensionsConfigContent, RecommendationChangeNotification, IExtensionRecommendation, ExtensionRecommendationSource, InstallOperation, ILocalExtension -} from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService, IExtensionGalleryService, EXTENSION_IDENTIFIER_PATTERN, InstallOperation, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionTipsService, ExtensionRecommendationReason, IExtensionsConfigContent, RecommendationChangeNotification, IExtensionRecommendation, ExtensionRecommendationSource } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ITextModel } from 'vs/editor/common/model'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts index b2982429480..643c6e1b456 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts @@ -7,7 +7,7 @@ import { localize } from 'vs/nls'; import { Registry } from 'vs/platform/registry/common/platform'; import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { IExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actions'; import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index e9b47535d20..ab4af28558b 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -10,10 +10,10 @@ import { IExtensionsWorkbenchService, ExtensionContainers } from 'vs/workbench/c import * as ExtensionsActions from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; import { - IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, ILocalExtension, IGalleryExtension, + IExtensionManagementService, IExtensionGalleryService, ILocalExtension, IGalleryExtension, DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, InstallOperation } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer, IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService'; import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService'; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts index 84a2299389a..00b4e80ab1f 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts @@ -11,10 +11,10 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/ import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions'; import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; import { - IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, ILocalExtension, IGalleryExtension, IQueryOptions, - DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, ExtensionRecommendationReason, SortBy + IExtensionManagementService, IExtensionGalleryService, ILocalExtension, IGalleryExtension, IQueryOptions, + DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, SortBy } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer, IExtensionTipsService, ExtensionRecommendationReason } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService'; import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService'; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts index d2285753ef2..ff52c3d1cda 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts @@ -11,10 +11,10 @@ import { generateUuid } from 'vs/base/common/uuid'; import { IExtensionsWorkbenchService, ExtensionState, AutoCheckUpdatesConfigurationKey, AutoUpdateConfigurationKey } from 'vs/workbench/contrib/extensions/common/extensions'; import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService'; import { - IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, ILocalExtension, IGalleryExtension, + IExtensionManagementService, IExtensionGalleryService, ILocalExtension, IGalleryExtension, DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IGalleryExtensionAssets, IExtensionIdentifier, InstallOperation } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService'; import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService'; diff --git a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts index b33fed82b15..8317f147dfa 100644 --- a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts +++ b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts @@ -22,8 +22,8 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { Schemas } from 'vs/base/common/network'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { getInstalledExtensions, IExtensionStatus, onExtensionChanged, isKeymapExtension } from 'vs/workbench/contrib/extensions/common/extensionsUtils'; -import { IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IExtensionEnablementService, EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService, IExtensionGalleryService, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { used } from 'vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page'; import { ILifecycleService, StartupKind } from 'vs/platform/lifecycle/common/lifecycle'; import { Disposable } from 'vs/base/common/lifecycle'; diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts index be68a990b34..5bab26ebce4 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts @@ -8,6 +8,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' import { URI } from 'vs/base/common/uri'; import { IExtension } from 'vs/platform/extensions/common/extensions'; import { IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IWorkspace, IWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; export const IExtensionManagementServerService = createDecorator('extensionManagementServerService'); @@ -69,3 +70,46 @@ export interface IExtensionEnablementService { */ setEnablement(extensions: IExtension[], state: EnablementState): Promise; } + +export interface IExtensionsConfigContent { + recommendations: string[]; + unwantedRecommendations: string[]; +} + +export type RecommendationChangeNotification = { + extensionId: string, + isRecommended: boolean +}; + +export type DynamicRecommendation = 'dynamic'; +export type ExecutableRecommendation = 'executable'; +export type CachedRecommendation = 'cached'; +export type ApplicationRecommendation = 'application'; +export type ExtensionRecommendationSource = IWorkspace | IWorkspaceFolder | URI | DynamicRecommendation | ExecutableRecommendation | CachedRecommendation | ApplicationRecommendation; + +export interface IExtensionRecommendation { + extensionId: string; + sources: ExtensionRecommendationSource[]; +} + +export const IExtensionTipsService = createDecorator('extensionTipsService'); + +export interface IExtensionTipsService { + _serviceBrand: any; + getAllRecommendationsWithReason(): { [id: string]: { reasonId: ExtensionRecommendationReason, reasonText: string }; }; + getFileBasedRecommendations(): IExtensionRecommendation[]; + getOtherRecommendations(): Promise; + getWorkspaceRecommendations(): Promise; + getKeymapRecommendations(): IExtensionRecommendation[]; + toggleIgnoredRecommendation(extensionId: string, shouldIgnore: boolean): void; + getAllIgnoredRecommendations(): { global: string[], workspace: string[] }; + onRecommendationChange: Event; +} + +export const enum ExtensionRecommendationReason { + Workspace, + File, + Executable, + DynamicWorkspace, + Experimental +} From 02b527084209e35d337596f2838cab961c5ca214 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 11:59:16 +0200 Subject: [PATCH 350/710] fix icon urls --- .../contrib/extensions/browser/extensionsWorkbenchService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index a3084a6de46..46d215b018a 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -36,6 +36,7 @@ import { IFileService } from 'vs/platform/files/common/files'; import { IExtensionManifest, ExtensionType, IExtension as IPlatformExtension, isLanguagePackExtension } from 'vs/platform/extensions/common/extensions'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IProductService } from 'vs/platform/product/common/product'; +import { asDomUri } from 'vs/base/browser/dom'; interface IExtensionStateProvider { (extension: Extension): T; @@ -130,7 +131,7 @@ class Extension implements IExtension { private get localIconUrl(): string | null { if (this.local && this.local.manifest.icon) { - return resources.joinPath(this.local.location, this.local.manifest.icon).toString(); + return asDomUri(resources.joinPath(this.local.location, this.local.manifest.icon)).toString(); } return null; } From 75ce377f744644792d010f30996128d0e9049f79 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 12:15:39 +0200 Subject: [PATCH 351/710] Support enablement in web --- .../{node => common}/extensionEnablementService.ts | 0 .../test/electron-browser/extensionEnablementService.test.ts | 2 +- src/vs/workbench/workbench.main.ts | 2 +- src/vs/workbench/workbench.web.main.ts | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename src/vs/workbench/services/extensionManagement/{node => common}/extensionEnablementService.ts (100%) diff --git a/src/vs/workbench/services/extensionManagement/node/extensionEnablementService.ts b/src/vs/workbench/services/extensionManagement/common/extensionEnablementService.ts similarity index 100% rename from src/vs/workbench/services/extensionManagement/node/extensionEnablementService.ts rename to src/vs/workbench/services/extensionManagement/common/extensionEnablementService.ts diff --git a/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts b/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts index 99b4fa29e22..29f0ad1ef3f 100644 --- a/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts +++ b/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import * as sinon from 'sinon'; import { IExtensionManagementService, DidUninstallExtensionEvent, ILocalExtension, DidInstallExtensionEvent, InstallOperation } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; -import { ExtensionEnablementService } from 'vs/workbench/services/extensionManagement/node/extensionEnablementService'; +import { ExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionEnablementService'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { Emitter } from 'vs/base/common/event'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index 7ade525b350..633fac6915a 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -124,11 +124,11 @@ import 'vs/workbench/services/textfile/common/textResourcePropertiesService'; import 'vs/workbench/services/mode/common/workbenchModeService'; import 'vs/workbench/services/commands/common/commandService'; import 'vs/workbench/services/themes/browser/workbenchThemeService'; -import 'vs/workbench/services/extensionManagement/node/extensionEnablementService'; import 'vs/workbench/services/extensions/electron-browser/extensionService'; import 'vs/workbench/services/contextmenu/electron-browser/contextmenuService'; import 'vs/workbench/services/label/common/labelService'; import 'vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService'; +import 'vs/workbench/services/extensionManagement/common/extensionEnablementService'; import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; import 'vs/workbench/services/notification/common/notificationService'; import 'vs/workbench/services/window/electron-browser/windowService'; diff --git a/src/vs/workbench/workbench.web.main.ts b/src/vs/workbench/workbench.web.main.ts index da6555d131f..d7ed222d705 100644 --- a/src/vs/workbench/workbench.web.main.ts +++ b/src/vs/workbench/workbench.web.main.ts @@ -118,11 +118,11 @@ import 'vs/workbench/services/textfile/common/textResourcePropertiesService'; import 'vs/workbench/services/mode/common/workbenchModeService'; import 'vs/workbench/services/commands/common/commandService'; import 'vs/workbench/services/themes/browser/workbenchThemeService'; -// import 'vs/workbench/services/extensionManagement/node/extensionEnablementService'; import 'vs/workbench/services/extensions/browser/extensionService'; // import 'vs/workbench/services/contextmenu/electron-browser/contextmenuService'; import 'vs/workbench/services/label/common/labelService'; import 'vs/workbench/services/extensionManagement/common/extensionManagementServerService'; +import 'vs/workbench/services/extensionManagement/common/extensionEnablementService'; // import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl'; import 'vs/workbench/services/notification/common/notificationService'; // import 'vs/workbench/services/window/electron-browser/windowService'; From 79a71f5d23594a648265a5468551c80701bfc455 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 12:16:03 +0200 Subject: [PATCH 352/710] update distro --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 685e5fed361..39c463d3c05 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "fbc5990ccee25d91cab59677ff6624708306a412", + "distro": "21fb8f9bbe268518be5189b0f46b8077f24a14e4", "author": { "name": "Microsoft Corporation" }, @@ -159,4 +159,4 @@ "windows-mutex": "0.2.1", "windows-process-tree": "0.2.4" } -} +} \ No newline at end of file From 29801104f14132a2f5242b46d71ed469a459a231 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 18 Jul 2019 12:18:16 +0200 Subject: [PATCH 353/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 39c463d3c05..2791d98df45 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "21fb8f9bbe268518be5189b0f46b8077f24a14e4", + "distro": "fb0e9f7d0337ade4dd5fbd8450123140aba880bc", "author": { "name": "Microsoft Corporation" }, From ac34471f1cefcdde7454018cd1f887d4d33834f7 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 18 Jul 2019 12:22:03 +0200 Subject: [PATCH 354/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2791d98df45..93340dfb1cb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "fb0e9f7d0337ade4dd5fbd8450123140aba880bc", + "distro": "8dcd7590deff4d860f0fda2554b4c7daa7950c03", "author": { "name": "Microsoft Corporation" }, From ccbd05eed34de1fb016f14a830ceeb19b96184b2 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 Jul 2019 12:22:27 +0200 Subject: [PATCH 355/710] bump windows-mutex --- package.json | 2 +- yarn.lock | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 685e5fed361..64fc6ee29de 100644 --- a/package.json +++ b/package.json @@ -156,7 +156,7 @@ "vscode-windows-ca-certs": "0.1.0", "vscode-windows-registry": "1.0.1", "windows-foreground-love": "0.2.0", - "windows-mutex": "0.2.1", + "windows-mutex": "0.3.0", "windows-process-tree": "0.2.4" } } diff --git a/yarn.lock b/yarn.lock index e0d9deffb5f..01fcf201ba0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5942,11 +5942,6 @@ nan@2.14.0, nan@^2.0.0, nan@^2.13.2, nan@^2.14.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== -nan@^2.10.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.0.tgz#574e360e4d954ab16966ec102c0c049fd961a099" - integrity sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw== - nan@^2.12.1: version "2.12.1" resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552" @@ -9735,13 +9730,13 @@ windows-foreground-love@0.2.0: resolved "https://registry.yarnpkg.com/windows-foreground-love/-/windows-foreground-love-0.2.0.tgz#b291832d8a02a966bc046ba0e498cc789809076b" integrity sha512-72ZDshnt8Q3/ImLMt4wxsY8eVnUd1KDb5QfvZX09AxJJJa0hGdyzPfd/ms0pKSYYwKlEhB1ri+WDKNvdIpJknQ== -windows-mutex@0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/windows-mutex/-/windows-mutex-0.2.1.tgz#05a8da8018f22874d7fbbd775c0141876d1c28fc" - integrity sha512-TaLGQa+qBcPZ2EH94BD/3Hy8fycrZjzqxI/lOMdXPyvffNnIJOvKwEyvNRC25bVFQ2mliJBziKhCMEhk9Dhhhg== +windows-mutex@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/windows-mutex/-/windows-mutex-0.3.0.tgz#2f51a0c97b3979c98952b23c086035f1f3715fab" + integrity sha512-IDWzyHOEpQr7m590pT90jMbCYNe525d7BgP6F80TjispEu2gWMvTIoSuO6Sy4atIEhvs3ys7DVlKdLzIAyRviQ== dependencies: bindings "^1.2.1" - nan "^2.10.0" + nan "^2.14.0" windows-process-tree@0.2.4: version "0.2.4" From bd57ca7066c3c7a70a85cbb7893b1ec16b361c85 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 Jul 2019 13:57:45 +0200 Subject: [PATCH 356/710] Expand Selection not working as intended. Fixes #77194. Fixes #77087 --- .../client/src/cssMain.ts | 22 +------------------ .../server/src/cssServerMain.ts | 6 ++--- .../client/src/htmlMain.ts | 22 +------------------ .../server/src/htmlServerMain.ts | 6 ++--- .../client/src/jsonMain.ts | 22 +------------------ .../server/src/jsonServerMain.ts | 3 ++- 6 files changed, 11 insertions(+), 70 deletions(-) diff --git a/extensions/css-language-features/client/src/cssMain.ts b/extensions/css-language-features/client/src/cssMain.ts index 8d8542f5a1e..ee8c9973d3a 100644 --- a/extensions/css-language-features/client/src/cssMain.ts +++ b/extensions/css-language-features/client/src/cssMain.ts @@ -9,7 +9,7 @@ import * as fs from 'fs'; import * as nls from 'vscode-nls'; const localize = nls.loadMessageBundle(); -import { languages, window, commands, ExtensionContext, Range, Position, CompletionItem, CompletionItemKind, TextEdit, SnippetString, workspace, TextDocument, SelectionRange } from 'vscode'; +import { languages, window, commands, ExtensionContext, Range, Position, CompletionItem, CompletionItemKind, TextEdit, SnippetString, workspace } from 'vscode'; import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, Disposable } from 'vscode-languageclient'; import { getCustomDataPathsInAllWorkspaces, getCustomDataPathsFromAllExtensions } from './customData'; @@ -78,26 +78,6 @@ export function activate(context: ExtensionContext) { client.onReady().then(() => { context.subscriptions.push(initCompletionProvider()); - - documentSelector.forEach(selector => { - context.subscriptions.push(languages.registerSelectionRangeProvider(selector, { - async provideSelectionRanges(document: TextDocument, positions: Position[]): Promise { - const textDocument = client.code2ProtocolConverter.asTextDocumentIdentifier(document); - const rawResult = await client.sendRequest('$/textDocument/selectionRanges', { textDocument, positions: positions.map(client.code2ProtocolConverter.asPosition) }); - if (Array.isArray(rawResult)) { - return rawResult.map(rawSelectionRanges => { - return rawSelectionRanges.reduceRight((parent: SelectionRange | undefined, selectionRange: SelectionRange) => { - return { - range: client.protocol2CodeConverter.asRange(selectionRange.range), - parent - }; - }, undefined)!; - }); - } - return []; - } - })); - }); }); function initCompletionProvider(): Disposable { diff --git a/extensions/css-language-features/server/src/cssServerMain.ts b/extensions/css-language-features/server/src/cssServerMain.ts index 76374165b7c..884306d299a 100644 --- a/extensions/css-language-features/server/src/cssServerMain.ts +++ b/extensions/css-language-features/server/src/cssServerMain.ts @@ -374,7 +374,7 @@ connection.onFoldingRanges((params, token) => { }, null, `Error while computing folding ranges for ${params.textDocument.uri}`, token); }); -connection.onRequest('$/textDocument/selectionRanges', async (params, token) => { +connection.onSelectionRanges((params, token) => { return runSafe(() => { const document = documents.get(params.textDocument.uri); const positions: Position[] = params.positions; @@ -383,8 +383,8 @@ connection.onRequest('$/textDocument/selectionRanges', async (params, token) => const stylesheet = stylesheets.get(document); return getLanguageService(document).getSelectionRanges(document, positions, stylesheet); } - return Promise.resolve(null); - }, null, `Error while computing selection ranges for ${params.textDocument.uri}`, token); + return []; + }, [], `Error while computing selection ranges for ${params.textDocument.uri}`, token); }); diff --git a/extensions/html-language-features/client/src/htmlMain.ts b/extensions/html-language-features/client/src/htmlMain.ts index 6fe90190729..5f98f732b52 100644 --- a/extensions/html-language-features/client/src/htmlMain.ts +++ b/extensions/html-language-features/client/src/htmlMain.ts @@ -8,7 +8,7 @@ import * as fs from 'fs'; import * as nls from 'vscode-nls'; const localize = nls.loadMessageBundle(); -import { languages, ExtensionContext, IndentAction, Position, TextDocument, Range, CompletionItem, CompletionItemKind, SnippetString, workspace, SelectionRange } from 'vscode'; +import { languages, ExtensionContext, IndentAction, Position, TextDocument, Range, CompletionItem, CompletionItemKind, SnippetString, workspace } from 'vscode'; import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, RequestType, TextDocumentPositionParams } from 'vscode-languageclient'; import { EMPTY_ELEMENTS } from './htmlEmptyTagsShared'; import { activateTagClosing } from './tagClosing'; @@ -87,26 +87,6 @@ export function activate(context: ExtensionContext) { } }); toDispose.push(disposable); - - documentSelector.forEach(selector => { - context.subscriptions.push(languages.registerSelectionRangeProvider(selector, { - async provideSelectionRanges(document: TextDocument, positions: Position[]): Promise { - const textDocument = client.code2ProtocolConverter.asTextDocumentIdentifier(document); - const rawResult = await client.sendRequest('$/textDocument/selectionRanges', { textDocument, positions: positions.map(client.code2ProtocolConverter.asPosition) }); - if (Array.isArray(rawResult)) { - return rawResult.map(rawSelectionRanges => { - return rawSelectionRanges.reduceRight((parent: SelectionRange | undefined, selectionRange: SelectionRange) => { - return { - range: client.protocol2CodeConverter.asRange(selectionRange.range), - parent - }; - }, undefined)!; - }); - } - return []; - } - })); - }); }); languages.setLanguageConfiguration('html', { diff --git a/extensions/html-language-features/server/src/htmlServerMain.ts b/extensions/html-language-features/server/src/htmlServerMain.ts index e3e62991aca..6eb8fc298fe 100644 --- a/extensions/html-language-features/server/src/htmlServerMain.ts +++ b/extensions/html-language-features/server/src/htmlServerMain.ts @@ -454,7 +454,7 @@ connection.onFoldingRanges((params, token) => { }, null, `Error while computing folding regions for ${params.textDocument.uri}`, token); }); -connection.onRequest('$/textDocument/selectionRanges', async (params, token) => { +connection.onSelectionRanges((params, token) => { return runSafe(() => { const document = documents.get(params.textDocument.uri); const positions: Position[] = params.positions; @@ -465,8 +465,8 @@ connection.onRequest('$/textDocument/selectionRanges', async (params, token) => return htmlMode.getSelectionRanges(document, positions); } } - return Promise.resolve(null); - }, null, `Error while computing selection ranges for ${params.textDocument.uri}`, token); + return []; + }, [], `Error while computing selection ranges for ${params.textDocument.uri}`, token); }); diff --git a/extensions/json-language-features/client/src/jsonMain.ts b/extensions/json-language-features/client/src/jsonMain.ts index 3515c4a8aa6..323e5f0ed94 100644 --- a/extensions/json-language-features/client/src/jsonMain.ts +++ b/extensions/json-language-features/client/src/jsonMain.ts @@ -10,7 +10,7 @@ import { xhr, XHRResponse, getErrorStatusDescription } from 'request-light'; const localize = nls.loadMessageBundle(); -import { workspace, window, languages, commands, ExtensionContext, extensions, Uri, LanguageConfiguration, Diagnostic, StatusBarAlignment, TextEditor, TextDocument, Position, SelectionRange } from 'vscode'; +import { workspace, window, languages, commands, ExtensionContext, extensions, Uri, LanguageConfiguration, Diagnostic, StatusBarAlignment, TextEditor } from 'vscode'; import { LanguageClient, LanguageClientOptions, RequestType, ServerOptions, TransportKind, NotificationType, DidChangeConfigurationNotification, HandleDiagnosticsSignature, ResponseError } from 'vscode-languageclient'; import TelemetryReporter from 'vscode-extension-telemetry'; @@ -216,26 +216,6 @@ export function activate(context: ExtensionContext) { extensions.onDidChange(_ => { client.sendNotification(SchemaAssociationNotification.type, getSchemaAssociation(context)); }); - - documentSelector.forEach(selector => { - toDispose.push(languages.registerSelectionRangeProvider(selector, { - async provideSelectionRanges(document: TextDocument, positions: Position[]): Promise { - const textDocument = client.code2ProtocolConverter.asTextDocumentIdentifier(document); - const rawResult = await client.sendRequest('$/textDocument/selectionRanges', { textDocument, positions: positions.map(client.code2ProtocolConverter.asPosition) }); - if (Array.isArray(rawResult)) { - return rawResult.map(rawSelectionRanges => { - return rawSelectionRanges.reduceRight((parent: SelectionRange | undefined, selectionRange: SelectionRange) => { - return { - range: client.protocol2CodeConverter.asRange(selectionRange.range), - parent, - }; - }, undefined)!; - }); - } - return []; - } - })); - }); }); diff --git a/extensions/json-language-features/server/src/jsonServerMain.ts b/extensions/json-language-features/server/src/jsonServerMain.ts index b3d5ab47b8f..699e73a9c91 100644 --- a/extensions/json-language-features/server/src/jsonServerMain.ts +++ b/extensions/json-language-features/server/src/jsonServerMain.ts @@ -433,7 +433,8 @@ connection.onFoldingRanges((params, token) => { }, null, `Error while computing folding ranges for ${params.textDocument.uri}`, token); }); -connection.onRequest('$/textDocument/selectionRanges', async (params, token) => { + +connection.onSelectionRanges((params, token) => { return runSafe(() => { const document = documents.get(params.textDocument.uri); if (document) { From d685337db2e58c97c52387f080d698c5fa22753d Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 15:29:41 +0200 Subject: [PATCH 357/710] Use semver-umd everywhere --- package.json | 3 +- remote/package.json | 3 +- remote/web/package.json | 2 +- remote/web/yarn.lock | 8 +- remote/yarn.lock | 10 +- src/typings/semver-umd.d.ts | 206 ++++++++++++++++++ src/vs/code/browser/workbench/workbench.js | 2 +- src/vs/code/node/cliProcessMain.ts | 2 +- .../node/extensionManagementService.ts | 2 +- .../browser/extensionsWorkbenchService.ts | 2 +- .../tasks/electron-browser/taskService.ts | 2 +- .../contrib/update/electron-browser/update.ts | 2 +- .../extensions/node/extensionPoints.ts | 2 +- yarn.lock | 8 +- 14 files changed, 229 insertions(+), 25 deletions(-) create mode 100644 src/typings/semver-umd.d.ts diff --git a/package.json b/package.json index e067a40bcfe..10673638030 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,7 @@ "node-pty": "0.9.0-beta19", "nsfw": "1.2.5", "onigasm-umd": "^2.2.2", - "semver": "^5.5.0", - "semver-umd": "^5.5.0", + "semver-umd": "^5.5.3", "spdlog": "^0.9.0", "sudo-prompt": "9.0.0", "v8-inspect-profiler": "^0.0.20", diff --git a/remote/package.json b/remote/package.json index 16edc649482..57b51c1b82d 100644 --- a/remote/package.json +++ b/remote/package.json @@ -14,8 +14,7 @@ "node-pty": "0.9.0-beta19", "nsfw": "1.2.5", "onigasm-umd": "^2.2.2", - "semver": "^5.5.0", - "semver-umd": "^5.5.0", + "semver-umd": "^5.5.3", "spdlog": "^0.9.0", "vscode-chokidar": "2.1.7", "vscode-proxy-agent": "0.4.0", diff --git a/remote/web/package.json b/remote/web/package.json index 6c18cb53937..c7a487b6c2d 100644 --- a/remote/web/package.json +++ b/remote/web/package.json @@ -7,6 +7,6 @@ "xterm": "3.15.0-beta67", "xterm-addon-search": "0.2.0-beta2", "xterm-addon-web-links": "0.1.0-beta10", - "semver-umd": "^5.5.0" + "semver-umd": "^5.5.3" } } \ No newline at end of file diff --git a/remote/web/yarn.lock b/remote/web/yarn.lock index 6839b2e5af6..b624eb37290 100644 --- a/remote/web/yarn.lock +++ b/remote/web/yarn.lock @@ -19,10 +19,10 @@ oniguruma@^7.2.0: dependencies: nan "^2.14.0" -semver-umd@^5.5.0: - version "5.5.1" - resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.1.tgz#ad0211c4addc9d93b22c807ef5166a3d0581c79b" - integrity sha512-BogOfRyzUCjHU3dENRlf3HxliVcQRjQRy+mx+1/ILZSV6WCOGniAxcg45Rol3CGFfKaCiodeTgfaGAswWBOU+g== +semver-umd@^5.5.3: + version "5.5.3" + resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.3.tgz#b64d7a2d4f5a717b369d56e31940a38e47e34d1e" + integrity sha512-HOnQrn2iKnVe/xlqCTzMXQdvSz3rPbD0DmQXYuQ+oK1dpptGFfPghonQrx5JHl2O7EJwDqtQnjhE7ME23q6ngw== vscode-textmate@^4.1.1: version "4.2.2" diff --git a/remote/yarn.lock b/remote/yarn.lock index 2e8118c8bc3..78b7393ad6d 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -876,17 +876,17 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -semver-umd@^5.5.0: - version "5.5.1" - resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.1.tgz#ad0211c4addc9d93b22c807ef5166a3d0581c79b" - integrity sha512-BogOfRyzUCjHU3dENRlf3HxliVcQRjQRy+mx+1/ILZSV6WCOGniAxcg45Rol3CGFfKaCiodeTgfaGAswWBOU+g== +semver-umd@^5.5.3: + version "5.5.3" + resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.3.tgz#b64d7a2d4f5a717b369d56e31940a38e47e34d1e" + integrity sha512-HOnQrn2iKnVe/xlqCTzMXQdvSz3rPbD0DmQXYuQ+oK1dpptGFfPghonQrx5JHl2O7EJwDqtQnjhE7ME23q6ngw== semver@^5.3.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== -semver@^5.5.0, semver@^5.6.0: +semver@^5.6.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== diff --git a/src/typings/semver-umd.d.ts b/src/typings/semver-umd.d.ts new file mode 100644 index 00000000000..f79d658a1fd --- /dev/null +++ b/src/typings/semver-umd.d.ts @@ -0,0 +1,206 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +declare module 'semver-umd' { + + // Type definitions for semver 5.5 + // Project: https://github.com/npm/node-semver + // Definitions by: Bart van der Schoor + // BendingBender + // Lucian Buzzo + // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/semver + + export const SEMVER_SPEC_VERSION: "2.0.0"; + + export type ReleaseType = "major" | "premajor" | "minor" | "preminor" | "patch" | "prepatch" | "prerelease"; + + /** + * Return the parsed version as a SemVer object, or null if it's not valid. + */ + export function parse(v: string | SemVer, loose?: boolean): SemVer | null; + /** + * Return the parsed version, or null if it's not valid. + */ + export function valid(v: string | SemVer, loose?: boolean): string | null; + /** + * Returns cleaned (removed leading/trailing whitespace, remove '=v' prefix) and parsed version, or null if version is invalid. + */ + export function clean(version: string, loose?: boolean): string | null; + /** + * Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid. + */ + export function inc(v: string | SemVer, release: ReleaseType, loose?: boolean, identifier?: string): string | null; + /** + * Return the major version number. + */ + export function major(v: string | SemVer, loose?: boolean): number; + /** + * Return the minor version number. + */ + export function minor(v: string | SemVer, loose?: boolean): number; + /** + * Return the patch version number. + */ + export function patch(v: string | SemVer, loose?: boolean): number; + /** + * Returns an array of prerelease components, or null if none exist. + */ + export function prerelease(v: string | SemVer, loose?: boolean): string[] | null; + + // Comparison + /** + * v1 > v2 + */ + export function gt(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; + /** + * v1 >= v2 + */ + export function gte(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; + /** + * v1 < v2 + */ + export function lt(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; + /** + * v1 <= v2 + */ + export function lte(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; + /** + * v1 == v2 This is true if they're logically equivalent, even if they're not the exact same string. You already know how to compare strings. + */ + export function eq(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; + /** + * v1 != v2 The opposite of eq. + */ + export function neq(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; + + /** + * Pass in a comparison string, and it'll call the corresponding semver comparison function. + * "===" and "!==" do simple string comparison, but are included for completeness. + * Throws if an invalid comparison string is provided. + */ + export function cmp(v1: string | SemVer, operator: Operator, v2: string | SemVer, loose?: boolean): boolean; + export type Operator = '===' | '!==' | '' | '=' | '==' | '!=' | '>' | '>=' | '<' | '<='; + + /** + * Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater. Sorts in ascending order if passed to Array.sort(). + */ + export function compare(v1: string | SemVer, v2: string | SemVer, loose?: boolean): 1 | 0 | -1; + /** + * The reverse of compare. Sorts an array of versions in descending order when passed to Array.sort(). + */ + export function rcompare(v1: string | SemVer, v2: string | SemVer, loose?: boolean): 1 | 0 | -1; + + /** + * Compares two identifiers, must be numeric strings or truthy/falsy values. Sorts in ascending order if passed to Array.sort(). + */ + export function compareIdentifiers(a: string | null, b: string | null): 1 | 0 | -1; + /** + * The reverse of compareIdentifiers. Sorts in descending order when passed to Array.sort(). + */ + export function rcompareIdentifiers(a: string | null, b: string | null): 1 | 0 | -1; + + /** + * Sorts an array of semver entries in ascending order. + */ + export function sort(list: Array, loose?: boolean): Array; + /** + * Sorts an array of semver entries in descending order. + */ + export function rsort(list: Array, loose?: boolean): Array; + + /** + * Returns difference between two versions by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if the versions are the same. + */ + export function diff(v1: string, v2: string, loose?: boolean): ReleaseType | null; + + // Ranges + /** + * Return the valid range or null if it's not valid + */ + export function validRange(range: string | Range, loose?: boolean): string; + /** + * Return true if the version satisfies the range. + */ + export function satisfies(version: string | SemVer, range: string | Range, loose?: boolean): boolean; + /** + * Return the highest version in the list that satisfies the range, or null if none of them do. + */ + export function maxSatisfying(versions: Array, range: string | Range, loose?: boolean): string; + /** + * Return the lowest version in the list that satisfies the range, or null if none of them do. + */ + export function minSatisfying(versions: Array, range: string, loose?: boolean): string; + /** + * Return true if version is greater than all the versions possible in the range. + */ + export function gtr(version: string | SemVer, range: string | Range, loose?: boolean): boolean; + /** + * Return true if version is less than all the versions possible in the range. + */ + export function ltr(version: string | SemVer, range: string | Range, loose?: boolean): boolean; + /** + * Return true if the version is outside the bounds of the range in either the high or low direction. + * The hilo argument must be either the string '>' or '<'. (This is the function called by gtr and ltr.) + */ + export function outside(version: string | SemVer, range: string | Range, hilo: '>' | '<', loose?: boolean): boolean; + /** + * Return true if any of the ranges comparators intersect + */ + export function intersects(range1: string | Range, range2: string | Range, loose?: boolean): boolean; + + // Coercion + /** + * Coerces a string to semver if possible + */ + export function coerce(version: string | SemVer): SemVer | null; + + export class SemVer { + constructor(version: string | SemVer, loose?: boolean); + + raw: string; + loose: boolean; + format(): string; + inspect(): string; + + major: number; + minor: number; + patch: number; + version: string; + build: string[]; + prerelease: string[]; + + compare(other: string | SemVer): 1 | 0 | -1; + compareMain(other: string | SemVer): 1 | 0 | -1; + comparePre(other: string | SemVer): 1 | 0 | -1; + inc(release: ReleaseType, identifier?: string): SemVer; + } + + export class Comparator { + constructor(comp: string | Comparator, loose?: boolean); + + semver: SemVer; + operator: string; + value: boolean; + parse(comp: string): void; + test(version: string | SemVer): boolean; + intersects(comp: Comparator, loose?: boolean): boolean; + } + + export class Range { + constructor(range: string | Range, loose?: boolean); + + range: string; + raw: string; + loose: boolean; + format(): string; + inspect(): string; + + set: Comparator[][]; + parseRange(range: string): Comparator[]; + test(version: string | SemVer): boolean; + intersects(range: Range, loose?: boolean): boolean; + } + +} \ No newline at end of file diff --git a/src/vs/code/browser/workbench/workbench.js b/src/vs/code/browser/workbench/workbench.js index 2f62dceb9ed..65fae7c82df 100644 --- a/src/vs/code/browser/workbench/workbench.js +++ b/src/vs/code/browser/workbench/workbench.js @@ -15,7 +15,7 @@ 'xterm': `${window.location.origin}/node_modules/xterm/lib/xterm.js`, 'xterm-addon-search': `${window.location.origin}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`, 'xterm-addon-web-links': `${window.location.origin}/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`, - 'semver': `${window.location.origin}/node_modules/semver-umd/lib/semver-umd.js`, + 'semver-umd': `${window.location.origin}/node_modules/semver-umd/lib/semver-umd.js`, } }); diff --git a/src/vs/code/node/cliProcessMain.ts b/src/vs/code/node/cliProcessMain.ts index 68978614625..1f3aeb31063 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/node/product'; import pkg from 'vs/platform/product/node/package'; import * as path from 'vs/base/common/path'; -import * as semver from 'semver'; +import * as semver from 'semver-umd'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index 725e477449a..564b0981fba 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -26,7 +26,7 @@ import { localizeManifest } from '../common/extensionNls'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { Limiter, createCancelablePromise, CancelablePromise, Queue } from 'vs/base/common/async'; import { Event, Emitter } from 'vs/base/common/event'; -import * as semver from 'semver'; +import * as semver from 'semver-umd'; import { URI } from 'vs/base/common/uri'; import pkg from 'vs/platform/product/node/package'; import { isMacintosh, isWindows } from 'vs/base/common/platform'; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index 46d215b018a..fbefd13d378 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as nls from 'vs/nls'; -import * as semver from 'semver'; +import * as semver from 'semver-umd'; import { Event, Emitter } from 'vs/base/common/event'; import { index, distinct } from 'vs/base/common/arrays'; import { ThrottledDelayer } from 'vs/base/common/async'; diff --git a/src/vs/workbench/contrib/tasks/electron-browser/taskService.ts b/src/vs/workbench/contrib/tasks/electron-browser/taskService.ts index 631275db0d0..decffe55e63 100644 --- a/src/vs/workbench/contrib/tasks/electron-browser/taskService.ts +++ b/src/vs/workbench/contrib/tasks/electron-browser/taskService.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as Objects from 'vs/base/common/objects'; -import * as semver from 'semver'; +import * as semver from 'semver-umd'; import { IStringDictionary } from 'vs/base/common/collections'; import { WorkbenchState, IWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; import { ITaskSystem } from 'vs/workbench/contrib/tasks/common/taskSystem'; diff --git a/src/vs/workbench/contrib/update/electron-browser/update.ts b/src/vs/workbench/contrib/update/electron-browser/update.ts index e56a8a3e64e..f21b80c1f21 100644 --- a/src/vs/workbench/contrib/update/electron-browser/update.ts +++ b/src/vs/workbench/contrib/update/electron-browser/update.ts @@ -17,7 +17,7 @@ import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IUpdateService, State as UpdateState, StateType, IUpdate } from 'vs/platform/update/common/update'; -import * as semver from 'semver'; +import * as semver from 'semver-umd'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { INotificationService, INotificationHandle, Severity } from 'vs/platform/notification/common/notification'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; diff --git a/src/vs/workbench/services/extensions/node/extensionPoints.ts b/src/vs/workbench/services/extensions/node/extensionPoints.ts index f6e5afbc6aa..5a7efd1462b 100644 --- a/src/vs/workbench/services/extensions/node/extensionPoints.ts +++ b/src/vs/workbench/services/extensions/node/extensionPoints.ts @@ -5,7 +5,7 @@ import * as nls from 'vs/nls'; import * as path from 'vs/base/common/path'; -import * as semver from 'semver'; +import * as semver from 'semver-umd'; import * as json from 'vs/base/common/json'; import * as arrays from 'vs/base/common/arrays'; import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; diff --git a/yarn.lock b/yarn.lock index 01fcf201ba0..57cbaeb0fac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7970,10 +7970,10 @@ semver-greatest-satisfied-range@^1.1.0: dependencies: sver-compat "^1.5.0" -semver-umd@^5.5.0: - version "5.5.1" - resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.1.tgz#ad0211c4addc9d93b22c807ef5166a3d0581c79b" - integrity sha512-BogOfRyzUCjHU3dENRlf3HxliVcQRjQRy+mx+1/ILZSV6WCOGniAxcg45Rol3CGFfKaCiodeTgfaGAswWBOU+g== +semver-umd@^5.5.3: + version "5.5.3" + resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.3.tgz#b64d7a2d4f5a717b369d56e31940a38e47e34d1e" + integrity sha512-HOnQrn2iKnVe/xlqCTzMXQdvSz3rPbD0DmQXYuQ+oK1dpptGFfPghonQrx5JHl2O7EJwDqtQnjhE7ME23q6ngw== "semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0: version "5.4.1" From fd5985489982fe14381dd56e6f0b29c53d5f991b Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 15:33:42 +0200 Subject: [PATCH 358/710] re export from semver --- src/typings/semver-umd.d.ts | 198 +----------------------------------- 1 file changed, 1 insertion(+), 197 deletions(-) diff --git a/src/typings/semver-umd.d.ts b/src/typings/semver-umd.d.ts index f79d658a1fd..372f000c617 100644 --- a/src/typings/semver-umd.d.ts +++ b/src/typings/semver-umd.d.ts @@ -5,202 +5,6 @@ declare module 'semver-umd' { - // Type definitions for semver 5.5 - // Project: https://github.com/npm/node-semver - // Definitions by: Bart van der Schoor - // BendingBender - // Lucian Buzzo - // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/semver - - export const SEMVER_SPEC_VERSION: "2.0.0"; - - export type ReleaseType = "major" | "premajor" | "minor" | "preminor" | "patch" | "prepatch" | "prerelease"; - - /** - * Return the parsed version as a SemVer object, or null if it's not valid. - */ - export function parse(v: string | SemVer, loose?: boolean): SemVer | null; - /** - * Return the parsed version, or null if it's not valid. - */ - export function valid(v: string | SemVer, loose?: boolean): string | null; - /** - * Returns cleaned (removed leading/trailing whitespace, remove '=v' prefix) and parsed version, or null if version is invalid. - */ - export function clean(version: string, loose?: boolean): string | null; - /** - * Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid. - */ - export function inc(v: string | SemVer, release: ReleaseType, loose?: boolean, identifier?: string): string | null; - /** - * Return the major version number. - */ - export function major(v: string | SemVer, loose?: boolean): number; - /** - * Return the minor version number. - */ - export function minor(v: string | SemVer, loose?: boolean): number; - /** - * Return the patch version number. - */ - export function patch(v: string | SemVer, loose?: boolean): number; - /** - * Returns an array of prerelease components, or null if none exist. - */ - export function prerelease(v: string | SemVer, loose?: boolean): string[] | null; - - // Comparison - /** - * v1 > v2 - */ - export function gt(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; - /** - * v1 >= v2 - */ - export function gte(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; - /** - * v1 < v2 - */ - export function lt(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; - /** - * v1 <= v2 - */ - export function lte(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; - /** - * v1 == v2 This is true if they're logically equivalent, even if they're not the exact same string. You already know how to compare strings. - */ - export function eq(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; - /** - * v1 != v2 The opposite of eq. - */ - export function neq(v1: string | SemVer, v2: string | SemVer, loose?: boolean): boolean; - - /** - * Pass in a comparison string, and it'll call the corresponding semver comparison function. - * "===" and "!==" do simple string comparison, but are included for completeness. - * Throws if an invalid comparison string is provided. - */ - export function cmp(v1: string | SemVer, operator: Operator, v2: string | SemVer, loose?: boolean): boolean; - export type Operator = '===' | '!==' | '' | '=' | '==' | '!=' | '>' | '>=' | '<' | '<='; - - /** - * Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater. Sorts in ascending order if passed to Array.sort(). - */ - export function compare(v1: string | SemVer, v2: string | SemVer, loose?: boolean): 1 | 0 | -1; - /** - * The reverse of compare. Sorts an array of versions in descending order when passed to Array.sort(). - */ - export function rcompare(v1: string | SemVer, v2: string | SemVer, loose?: boolean): 1 | 0 | -1; - - /** - * Compares two identifiers, must be numeric strings or truthy/falsy values. Sorts in ascending order if passed to Array.sort(). - */ - export function compareIdentifiers(a: string | null, b: string | null): 1 | 0 | -1; - /** - * The reverse of compareIdentifiers. Sorts in descending order when passed to Array.sort(). - */ - export function rcompareIdentifiers(a: string | null, b: string | null): 1 | 0 | -1; - - /** - * Sorts an array of semver entries in ascending order. - */ - export function sort(list: Array, loose?: boolean): Array; - /** - * Sorts an array of semver entries in descending order. - */ - export function rsort(list: Array, loose?: boolean): Array; - - /** - * Returns difference between two versions by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if the versions are the same. - */ - export function diff(v1: string, v2: string, loose?: boolean): ReleaseType | null; - - // Ranges - /** - * Return the valid range or null if it's not valid - */ - export function validRange(range: string | Range, loose?: boolean): string; - /** - * Return true if the version satisfies the range. - */ - export function satisfies(version: string | SemVer, range: string | Range, loose?: boolean): boolean; - /** - * Return the highest version in the list that satisfies the range, or null if none of them do. - */ - export function maxSatisfying(versions: Array, range: string | Range, loose?: boolean): string; - /** - * Return the lowest version in the list that satisfies the range, or null if none of them do. - */ - export function minSatisfying(versions: Array, range: string, loose?: boolean): string; - /** - * Return true if version is greater than all the versions possible in the range. - */ - export function gtr(version: string | SemVer, range: string | Range, loose?: boolean): boolean; - /** - * Return true if version is less than all the versions possible in the range. - */ - export function ltr(version: string | SemVer, range: string | Range, loose?: boolean): boolean; - /** - * Return true if the version is outside the bounds of the range in either the high or low direction. - * The hilo argument must be either the string '>' or '<'. (This is the function called by gtr and ltr.) - */ - export function outside(version: string | SemVer, range: string | Range, hilo: '>' | '<', loose?: boolean): boolean; - /** - * Return true if any of the ranges comparators intersect - */ - export function intersects(range1: string | Range, range2: string | Range, loose?: boolean): boolean; - - // Coercion - /** - * Coerces a string to semver if possible - */ - export function coerce(version: string | SemVer): SemVer | null; - - export class SemVer { - constructor(version: string | SemVer, loose?: boolean); - - raw: string; - loose: boolean; - format(): string; - inspect(): string; - - major: number; - minor: number; - patch: number; - version: string; - build: string[]; - prerelease: string[]; - - compare(other: string | SemVer): 1 | 0 | -1; - compareMain(other: string | SemVer): 1 | 0 | -1; - comparePre(other: string | SemVer): 1 | 0 | -1; - inc(release: ReleaseType, identifier?: string): SemVer; - } - - export class Comparator { - constructor(comp: string | Comparator, loose?: boolean); - - semver: SemVer; - operator: string; - value: boolean; - parse(comp: string): void; - test(version: string | SemVer): boolean; - intersects(comp: Comparator, loose?: boolean): boolean; - } - - export class Range { - constructor(range: string | Range, loose?: boolean); - - range: string; - raw: string; - loose: boolean; - format(): string; - inspect(): string; - - set: Comparator[][]; - parseRange(range: string): Comparator[]; - test(version: string | SemVer): boolean; - intersects(range: Range, loose?: boolean): boolean; - } + export * from "semver"; } \ No newline at end of file From e6067d99a57ab9845b2e872e6c7115542f1c5b92 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 16:15:00 +0200 Subject: [PATCH 359/710] remove enablement service from simple services --- .../workbench/browser/web.simpleservices.ts | 38 +------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index 099f2db171d..cf48dcdeba7 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -12,8 +12,8 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' import { IDownloadService } from 'vs/platform/download/common/download'; import { CancellationToken } from 'vs/base/common/cancellation'; import { IGalleryExtension, IExtensionIdentifier, IReportedExtension, IExtensionManagementService, ILocalExtension, IGalleryMetadata } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IExtensionEnablementService, EnablementState, IExtensionTipsService, ExtensionRecommendationReason, IExtensionRecommendation } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; -import { ExtensionType, ExtensionIdentifier, IExtension } from 'vs/platform/extensions/common/extensions'; +import { IExtensionTipsService, ExtensionRecommendationReason, IExtensionRecommendation } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { ExtensionType, ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { IURLHandler, IURLService } from 'vs/platform/url/common/url'; import { ConsoleLogService, ILogService } from 'vs/platform/log/common/log'; import { Disposable, IDisposable } from 'vs/base/common/lifecycle'; @@ -57,40 +57,6 @@ registerSingleton(IDownloadService, SimpleDownloadService, true); //#endregion -//#region Extension Management - -//#region Extension Enablement - -export class SimpleExtensionEnablementService implements IExtensionEnablementService { - - _serviceBrand: any; - - readonly onEnablementChanged = Event.None; - - readonly allUserExtensionsDisabled = false; - - getEnablementState(extension: IExtension): EnablementState { - return EnablementState.Enabled; - } - - canChangeEnablement(extension: IExtension): boolean { - return false; - } - - setEnablement(extensions: IExtension[], newState: EnablementState): Promise { - throw new Error('not implemented'); - } - - isEnabled(extension: IExtension): boolean { - return true; - } - -} - -registerSingleton(IExtensionEnablementService, SimpleExtensionEnablementService, true); - -//#endregion - //#region Extension Tips export class SimpleExtensionTipsService implements IExtensionTipsService { From 034e0a9f995fc3518181ee8640a23b459170a62a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 16:36:52 +0200 Subject: [PATCH 360/710] Use Enablement service to check if an extension is enabled or not --- .../api/browser/mainThreadExtensionService.ts | 23 +++++++----- .../extensions/browser/extensionsActions.ts | 37 ++++++++++++------- 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadExtensionService.ts b/src/vs/workbench/api/browser/mainThreadExtensionService.ts index 8a63fccb827..e4453a9d4fe 100644 --- a/src/vs/workbench/api/browser/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/browser/mainThreadExtensionService.ts @@ -12,11 +12,12 @@ import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensio import { INotificationService } from 'vs/platform/notification/common/notification'; import { localize } from 'vs/nls'; import { Action } from 'vs/base/common/actions'; -import { EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IWindowService } from 'vs/platform/windows/common/windows'; -import { IExtensionsWorkbenchService, IExtension } from 'vs/workbench/contrib/extensions/common/extensions'; +import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions'; import { CancellationToken } from 'vs/base/common/cancellation'; +import { ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; @extHostNamedCustomer(MainContext.MainThreadExtensionService) export class MainThreadExtensionService implements MainThreadExtensionServiceShape { @@ -25,18 +26,21 @@ export class MainThreadExtensionService implements MainThreadExtensionServiceSha private readonly _notificationService: INotificationService; private readonly _extensionsWorkbenchService: IExtensionsWorkbenchService; private readonly _windowService: IWindowService; + private readonly _extensionEnablementService: IExtensionEnablementService; constructor( extHostContext: IExtHostContext, @IExtensionService extensionService: IExtensionService, @INotificationService notificationService: INotificationService, @IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService, - @IWindowService windowService: IWindowService + @IWindowService windowService: IWindowService, + @IExtensionEnablementService extensionEnablementService: IExtensionEnablementService ) { this._extensionService = extensionService; this._notificationService = notificationService; this._extensionsWorkbenchService = extensionsWorkbenchService; this._windowService = windowService; + this._extensionEnablementService = extensionEnablementService; } public dispose(): void { @@ -74,30 +78,31 @@ export class MainThreadExtensionService implements MainThreadExtensionServiceSha const local = await this._extensionsWorkbenchService.queryLocal(); const installedDependency = local.filter(i => areSameExtensions(i.identifier, { id: missingDependency }))[0]; if (installedDependency) { - await this._handleMissingInstalledDependency(extension, installedDependency); + await this._handleMissingInstalledDependency(extension, installedDependency.local!); } else { await this._handleMissingNotInstalledDependency(extension, missingDependency); } } } - private async _handleMissingInstalledDependency(extension: IExtensionDescription, missingInstalledDependency: IExtension): Promise { + private async _handleMissingInstalledDependency(extension: IExtensionDescription, missingInstalledDependency: ILocalExtension): Promise { const extName = extension.displayName || extension.name; - if (missingInstalledDependency.enablementState === EnablementState.Enabled || missingInstalledDependency.enablementState === EnablementState.WorkspaceEnabled) { + if (this._extensionEnablementService.isEnabled(missingInstalledDependency)) { this._notificationService.notify({ severity: Severity.Error, - message: localize('reload window', "Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is not loaded. Would you like to reload the window to load the extension?", extName, missingInstalledDependency.displayName), + message: localize('reload window', "Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is not loaded. Would you like to reload the window to load the extension?", extName, missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name), actions: { primary: [new Action('reload', localize('reload', "Reload Window"), '', true, () => this._windowService.reloadWindow())] } }); } else { + const enablementState = this._extensionEnablementService.getEnablementState(missingInstalledDependency); this._notificationService.notify({ severity: Severity.Error, - message: localize('disabledDep', "Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is disabled. Would you like to enable the extension and reload the window?", extName, missingInstalledDependency.displayName), + message: localize('disabledDep', "Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is disabled. Would you like to enable the extension and reload the window?", extName, missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name), actions: { primary: [new Action('enable', localize('enable dep', "Enable and Reload"), '', true, - () => this._extensionsWorkbenchService.setEnablement([missingInstalledDependency], missingInstalledDependency.enablementState === EnablementState.Disabled ? EnablementState.Enabled : EnablementState.WorkspaceEnabled) + () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === EnablementState.Disabled ? EnablementState.Enabled : EnablementState.WorkspaceEnabled) .then(() => this._windowService.reloadWindow(), e => this._notificationService.error(e)))] } }); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 4a68163faa6..069634a1c0e 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -893,8 +893,10 @@ export class EnableForWorkspaceAction extends ExtensionAction { update(): void { this.enabled = false; - if (this.extension) { - this.enabled = this.extension.state === ExtensionState.Installed && (this.extension.enablementState === EnablementState.Disabled || this.extension.enablementState === EnablementState.WorkspaceDisabled) && !!this.extension.local && this.extensionEnablementService.canChangeEnablement(this.extension.local); + if (this.extension && this.extension.local) { + this.enabled = this.extension.state === ExtensionState.Installed + && (this.extension.enablementState === EnablementState.Disabled || this.extension.enablementState === EnablementState.WorkspaceDisabled) + && this.extensionEnablementService.canChangeEnablement(this.extension.local); } } @@ -919,7 +921,9 @@ export class EnableGloballyAction extends ExtensionAction { update(): void { this.enabled = false; if (this.extension && this.extension.local) { - this.enabled = this.extension.state === ExtensionState.Installed && this.extension.enablementState === EnablementState.Disabled && this.extensionEnablementService.canChangeEnablement(this.extension.local); + this.enabled = this.extension.state === ExtensionState.Installed + && this.extension.enablementState === EnablementState.Disabled + && this.extensionEnablementService.canChangeEnablement(this.extension.local); } } @@ -944,8 +948,10 @@ export class DisableForWorkspaceAction extends ExtensionAction { update(): void { this.enabled = false; - if (this.extension && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier) && this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY)) { - this.enabled = this.extension.state === ExtensionState.Installed && (this.extension.enablementState === EnablementState.Enabled || this.extension.enablementState === EnablementState.WorkspaceEnabled) && !!this.extension.local && this.extensionEnablementService.canChangeEnablement(this.extension.local); + if (this.extension && this.extension.local && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier) && this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY)) { + this.enabled = this.extension.state === ExtensionState.Installed + && (this.extension.enablementState === EnablementState.Enabled || this.extension.enablementState === EnablementState.WorkspaceEnabled) + && this.extensionEnablementService.canChangeEnablement(this.extension.local); } } @@ -969,8 +975,10 @@ export class DisableGloballyAction extends ExtensionAction { update(): void { this.enabled = false; - if (this.extension && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier))) { - this.enabled = this.extension.state === ExtensionState.Installed && (this.extension.enablementState === EnablementState.Enabled || this.extension.enablementState === EnablementState.WorkspaceEnabled) && !!this.extension.local && this.extensionEnablementService.canChangeEnablement(this.extension.local); + if (this.extension && this.extension.local && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier))) { + this.enabled = this.extension.state === ExtensionState.Installed + && (this.extension.enablementState === EnablementState.Enabled || this.extension.enablementState === EnablementState.WorkspaceEnabled) + && this.extensionEnablementService.canChangeEnablement(this.extension.local); } } @@ -1057,6 +1065,7 @@ export class CheckForUpdatesAction extends Action { id = CheckForUpdatesAction.ID, label = CheckForUpdatesAction.LABEL, @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, @IViewletService private readonly viewletService: IViewletService, @INotificationService private readonly notificationService: INotificationService ) { @@ -1072,7 +1081,7 @@ export class CheckForUpdatesAction extends Action { let msgAvailableExtensions = outdated.length === 1 ? localize('singleUpdateAvailable', "An extension update is available.") : localize('updatesAvailable', "{0} extension updates are available.", outdated.length); - const disabledExtensionsCount = outdated.filter(ext => ext.enablementState === EnablementState.Disabled || ext.enablementState === EnablementState.WorkspaceDisabled).length; + const disabledExtensionsCount = outdated.filter(ext => ext.local && !this.extensionEnablementService.isEnabled(ext.local)).length; if (disabledExtensionsCount) { if (outdated.length === 1) { msgAvailableExtensions = localize('singleDisabledUpdateAvailable', "An update to an extension which is disabled is available."); @@ -2714,7 +2723,7 @@ export class DisableAllAction extends Action { } private update(): void { - this.enabled = this.extensionsWorkbenchService.local.some(e => e.type === ExtensionType.User && (e.enablementState === EnablementState.Enabled || e.enablementState === EnablementState.WorkspaceEnabled) && !!e.local && this.extensionEnablementService.canChangeEnablement(e.local)); + this.enabled = this.extensionsWorkbenchService.local.some(e => e.type === ExtensionType.User && !!e.local && this.extensionEnablementService.isEnabled(e.local) && this.extensionEnablementService.canChangeEnablement(e.local)); } run(): Promise { @@ -2731,7 +2740,8 @@ export class DisableAllWorkpsaceAction extends Action { constructor( id: string = DisableAllWorkpsaceAction.ID, label: string = DisableAllWorkpsaceAction.LABEL, @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, - @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService ) { super(id, label); this.update(); @@ -2740,7 +2750,7 @@ export class DisableAllWorkpsaceAction extends Action { } private update(): void { - this.enabled = this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY && this.extensionsWorkbenchService.local.some(e => e.type === ExtensionType.User && (e.enablementState === EnablementState.Enabled || e.enablementState === EnablementState.WorkspaceEnabled)); + this.enabled = this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY && this.extensionsWorkbenchService.local.some(e => e.type === ExtensionType.User && !!e.local && this.extensionEnablementService.isEnabled(e.local) && this.extensionEnablementService.canChangeEnablement(e.local)); } run(): Promise { @@ -2965,7 +2975,8 @@ export class InstallSpecificVersionOfExtensionAction extends Action { @INotificationService private readonly notificationService: INotificationService, @IWindowService private readonly windowService: IWindowService, @IInstantiationService private readonly instantiationService: IInstantiationService, - @IExtensionService private readonly extensionService: IExtensionService + @IExtensionService private readonly extensionService: IExtensionService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, ) { super(id, label); } @@ -2987,7 +2998,7 @@ export class InstallSpecificVersionOfExtensionAction extends Action { } private isEnabled(extension: IExtension): boolean { - return !!extension.gallery && (extension.enablementState === EnablementState.Enabled || extension.enablementState === EnablementState.WorkspaceEnabled); + return !!extension.gallery && !!extension.local && this.extensionEnablementService.isEnabled(extension.local); } private async getExtensionEntries(): Promise<(IQuickPickItem & { extension: IExtension, versions: IGalleryExtensionVersion[] })[]> { From 6163b862430055d32694964e8e0fda6a63b04117 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 Jul 2019 16:56:08 +0200 Subject: [PATCH 361/710] add gotoLineMode to IOpenSettings --- src/vs/code/electron-main/app.ts | 7 +++++-- src/vs/code/electron-main/windows.ts | 3 +-- src/vs/platform/launch/electron-main/launchService.ts | 3 ++- src/vs/platform/menubar/electron-main/menubar.ts | 3 ++- src/vs/platform/windows/common/windows.ts | 1 + src/vs/platform/windows/electron-main/windows.ts | 1 + src/vs/platform/windows/electron-main/windowsService.ts | 5 +++-- src/vs/workbench/api/node/extHostCLIServer.ts | 5 +++-- 8 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index f7e670c79b6..69d059b4e40 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -241,6 +241,7 @@ export class CodeApplication extends Disposable { context: OpenContext.DOCK /* can also be opening from finder while app is running */, cli: this.environmentService.args, urisToOpen: macOpenFileURIs, + gotoLineMode: false, preferNewWindow: true /* dropping on the dock or opening from finder prefers to open in a new window */ }); @@ -595,8 +596,8 @@ export class CodeApplication extends Disposable { urlService.registerHandler({ async handleURL(uri: URI): Promise { if (windowsMainService.getWindowCount() === 0) { - const cli = { ...environmentService.args, goto: true }; - const [window] = windowsMainService.open({ context: OpenContext.API, cli, forceEmpty: true }); + const cli = { ...environmentService.args }; + const [window] = windowsMainService.open({ context: OpenContext.API, cli, forceEmpty: true, gotoLineMode: true }); await window.ready(); @@ -647,6 +648,7 @@ export class CodeApplication extends Disposable { urisToOpen: macOpenFiles.map(file => this.getURIToOpenFromPathSync(file)), noRecentEntry, waitMarkerFileURI, + gotoLineMode: false, initialStartup: true }); } @@ -659,6 +661,7 @@ export class CodeApplication extends Disposable { diffMode: args.diff, noRecentEntry, waitMarkerFileURI, + gotoLineMode: args.goto, initialStartup: true }); } diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index be336e02113..5e50acec4dc 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -844,8 +844,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService { private doExtractPathsFromAPI(openConfig: IOpenConfiguration): IPathToOpen[] { const pathsToOpen: IPathToOpen[] = []; - const cli = openConfig.cli; - const parseOptions: IPathParseOptions = { gotoLineMode: cli && cli.goto }; + const parseOptions: IPathParseOptions = { gotoLineMode: openConfig.gotoLineMode }; for (const pathToOpen of openConfig.urisToOpen || []) { if (!pathToOpen) { continue; diff --git a/src/vs/platform/launch/electron-main/launchService.ts b/src/vs/platform/launch/electron-main/launchService.ts index c192151f915..626a376d04b 100644 --- a/src/vs/platform/launch/electron-main/launchService.ts +++ b/src/vs/platform/launch/electron-main/launchService.ts @@ -228,7 +228,8 @@ export class LaunchService implements ILaunchService { diffMode: args.diff, addMode: args.add, noRecentEntry: !!args['skip-add-to-recently-opened'], - waitMarkerFileURI + waitMarkerFileURI, + gotoLineMode: args.goto }); } diff --git a/src/vs/platform/menubar/electron-main/menubar.ts b/src/vs/platform/menubar/electron-main/menubar.ts index c8091409e3f..76185f93da8 100644 --- a/src/vs/platform/menubar/electron-main/menubar.ts +++ b/src/vs/platform/menubar/electron-main/menubar.ts @@ -478,7 +478,8 @@ export class Menubar { context: OpenContext.MENU, cli: this.environmentService.args, urisToOpen: [uriToOpen], - forceNewWindow: openInNewWindow + forceNewWindow: openInNewWindow, + gotoLineMode: false }).length > 0; if (!success) { diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index d9e25ebfa2c..9af1792f70c 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -183,6 +183,7 @@ export interface IOpenSettings { forceReuseWindow?: boolean; diffMode?: boolean; addMode?: boolean; + gotoLineMode?: boolean; noRecentEntry?: boolean; waitMarkerFileURI?: URI; args?: ParsedArgs; diff --git a/src/vs/platform/windows/electron-main/windows.ts b/src/vs/platform/windows/electron-main/windows.ts index cb72892f40e..3e64f5f5d0b 100644 --- a/src/vs/platform/windows/electron-main/windows.ts +++ b/src/vs/platform/windows/electron-main/windows.ts @@ -132,6 +132,7 @@ export interface IOpenConfiguration { readonly forceEmpty?: boolean; readonly diffMode?: boolean; addMode?: boolean; + readonly gotoLineMode?: boolean; readonly initialStartup?: boolean; readonly noRecentEntry?: boolean; } diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index f74d5c79849..910c4e8d594 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -295,6 +295,7 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH forceReuseWindow: options.forceReuseWindow, diffMode: options.diffMode, addMode: options.addMode, + gotoLineMode: options.gotoLineMode, noRecentEntry: options.noRecentEntry, waitMarkerFileURI: options.waitMarkerFileURI }); @@ -459,10 +460,10 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH } private openFileForURI(uri: IURIToOpen): void { - const cli = assign(Object.create(null), this.environmentService.args, { goto: true }); + const cli = assign(Object.create(null), this.environmentService.args); const urisToOpen = [uri]; - this.windowsMainService.open({ context: OpenContext.API, cli, urisToOpen }); + this.windowsMainService.open({ context: OpenContext.API, cli, urisToOpen, gotoLineMode: true }); } async resolveProxy(windowId: number, url: string): Promise { diff --git a/src/vs/workbench/api/node/extHostCLIServer.ts b/src/vs/workbench/api/node/extHostCLIServer.ts index 2c549734a17..3b06ea4c064 100644 --- a/src/vs/workbench/api/node/extHostCLIServer.ts +++ b/src/vs/workbench/api/node/extHostCLIServer.ts @@ -18,6 +18,7 @@ export interface OpenCommandPipeArgs { forceNewWindow?: boolean; diffMode?: boolean; addMode?: boolean; + gotoLineMode?: boolean; forceReuseWindow?: boolean; waitMarkerFilePath?: string; } @@ -93,7 +94,7 @@ export class CLIServer { } private open(data: OpenCommandPipeArgs, res: http.ServerResponse) { - let { fileURIs, folderURIs, forceNewWindow, diffMode, addMode, forceReuseWindow, waitMarkerFilePath } = data; + let { fileURIs, folderURIs, forceNewWindow, diffMode, addMode, forceReuseWindow, gotoLineMode, waitMarkerFilePath } = data; const urisToOpen: IURIToOpen[] = []; if (Array.isArray(folderURIs)) { for (const s of folderURIs) { @@ -125,7 +126,7 @@ export class CLIServer { } if (urisToOpen.length) { const waitMarkerFileURI = waitMarkerFilePath ? URI.file(waitMarkerFilePath) : undefined; - const windowOpenArgs: IOpenSettings = { forceNewWindow, diffMode, addMode, forceReuseWindow, waitMarkerFileURI }; + const windowOpenArgs: IOpenSettings = { forceNewWindow, diffMode, addMode, gotoLineMode, forceReuseWindow, waitMarkerFileURI }; this._commands.executeCommand('_files.windowOpen', urisToOpen, windowOpenArgs); } res.writeHead(200); From 44d410567333dfbd9da5eab6f56bb2c83c31412e Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 18 Jul 2019 08:20:01 -0700 Subject: [PATCH 362/710] Bump vscode-ripgrep --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 10673638030..4a0241ff117 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "v8-inspect-profiler": "^0.0.20", "vscode-chokidar": "2.1.7", "vscode-proxy-agent": "0.4.0", - "vscode-ripgrep": "^1.3.1", + "vscode-ripgrep": "^1.5.4", "vscode-sqlite3": "4.0.8", "vscode-textmate": "^4.2.2", "xterm": "3.15.0-beta71", @@ -158,4 +158,4 @@ "windows-mutex": "0.3.0", "windows-process-tree": "0.2.4" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 57cbaeb0fac..7876a802c5c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9561,10 +9561,10 @@ vscode-proxy-agent@0.4.0: https-proxy-agent "2.2.1" socks-proxy-agent "4.0.1" -vscode-ripgrep@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.3.1.tgz#51fb93debcd0c18a8b90dbc37f84f94333d0c486" - integrity sha512-4WLB/n4ZeWNi5AEzPTkfYrqbKtXlv0SlgmxbRVdulwZzGx/lfWeWPu9Shy32orM27IofQAQDuirbRBOYNJVzBA== +vscode-ripgrep@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.4.tgz#dae1c3eef350513299341cdf96e622c00b548eff" + integrity sha512-Bs8SvFAkR0QHf09J46VgNo19yRikOtj/f0zHzK3AM3ICjCGNN/BNoG9of6zGVHUTO+6Mk1RbKglyOHLKr8D1lg== vscode-sqlite3@4.0.8: version "4.0.8" From 8d560cd153e9760787c8795a1b2cd0e21f57772c Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Thu, 18 Jul 2019 08:44:33 -0700 Subject: [PATCH 363/710] Using vscode-telemetry-extractor npm package. (#77305) * Revert commit change * Revert commit change * Revert commit change * Revert commit change * Revert commit change * Initial work to move to utilizing the NPM module * Fix some paths * Bump NPM module * Update move command * Remove wrong directory in config * More build testing * Remove some debugging stuff * Fix relative dirs * Move node module to build package.json * Bump vscode-telemetry-extractor to 1.4.1 * Bump telemetry extractor version --- .../common/extract-telemetry.sh | 25 ++----- .../common/telemetry-config.json | 72 +++++++++++++++++++ build/package.json | 1 + package.json | 2 +- 4 files changed, 81 insertions(+), 19 deletions(-) create mode 100644 build/azure-pipelines/common/telemetry-config.json diff --git a/build/azure-pipelines/common/extract-telemetry.sh b/build/azure-pipelines/common/extract-telemetry.sh index 916c87c82ce..84bbd9c537c 100755 --- a/build/azure-pipelines/common/extract-telemetry.sh +++ b/build/azure-pipelines/common/extract-telemetry.sh @@ -2,29 +2,18 @@ set -e cd $BUILD_STAGINGDIRECTORY -git clone https://github.com/microsoft/vscode-telemetry-extractor.git -cd vscode-telemetry-extractor -git checkout 4e64f3de30f8fccb58ebdc0d85c4861a135d46cf -npm i -npm run compile -cd src -mkdir telemetry-sources -cd telemetry-sources +mkdir extraction +cd extraction git clone --depth 1 https://github.com/Microsoft/vscode-extension-telemetry.git git clone --depth 1 https://github.com/Microsoft/vscode-chrome-debug-core.git -git clone --depth 1 https://github.com/Microsoft/vscode-chrome-debug.git git clone --depth 1 https://github.com/Microsoft/vscode-node-debug2.git git clone --depth 1 https://github.com/Microsoft/vscode-node-debug.git -git clone --depth 1 https://github.com/Microsoft/vscode-docker.git -git clone --depth 1 https://github.com/Microsoft/vscode-go.git -git clone --depth 1 https://github.com/Microsoft/vscode-azure-account.git git clone --depth 1 https://github.com/Microsoft/vscode-html-languageservice.git git clone --depth 1 https://github.com/Microsoft/vscode-json-languageservice.git -git clone --depth 1 https://github.com/Microsoft/vscode-mono-debug.git -git clone --depth 1 https://github.com/Microsoft/TypeScript.git -cd ../../ -node ./out/cli-extract.js --sourceDir $BUILD_SOURCESDIRECTORY --excludedDirPattern extensions --outputDir . --applyEndpoints --includeIsMeasurement -node ./out/cli-extract-extensions.js --sourceDir ./src/telemetry-sources --outputDir . --applyEndpoints --includeIsMeasurement +$BUILD_SOURCESDIRECTORY/build/node_modules/.bin/vscode-telemetry-extractor --sourceDir $BUILD_SOURCESDIRECTORY --excludedDir $BUILD_SOURCESDIRECTORY/extensions --outputDir . --applyEndpoints +$BUILD_SOURCESDIRECTORY/build/node_modules/.bin/vscode-telemetry-extractor --config $BUILD_SOURCESDIRECTORY/build/azure-pipelines/common/telemetry-config.json -o . mkdir -p $BUILD_SOURCESDIRECTORY/.build/telemetry mv declarations-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-core.json -mv declarations-extensions-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-extensions.json \ No newline at end of file +mv config-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-extensions.json +cd .. +rm -rf extraction \ No newline at end of file diff --git a/build/azure-pipelines/common/telemetry-config.json b/build/azure-pipelines/common/telemetry-config.json new file mode 100644 index 00000000000..fcba1e042ba --- /dev/null +++ b/build/azure-pipelines/common/telemetry-config.json @@ -0,0 +1,72 @@ +[ + { + "eventPrefix": "typescript-language-features/", + "sourceDirs": [ + "../../s/extensions/typescript-language-features" + ], + "excludedDirs": [], + "applyEndpoints": true + }, + { + "eventPrefix": "git/", + "sourceDirs": [ + "../../s/extensions/git" + ], + "excludedDirs": [], + "applyEndpoints": true + }, + { + "eventPrefix": "extension-telemetry/", + "sourceDirs": [ + "vscode-extension-telemetry" + ], + "excludedDirs": [], + "applyEndpoints": true + }, + { + "eventPrefix": "vscode-markdown/", + "sourceDirs": [ + "../../s/extensions/markdown-language-features" + ], + "excludedDirs": [], + "applyEndpoints": true + }, + { + "eventPrefix": "html-language-features/", + "sourceDirs": [ + "../../s/extensions/html-language-features", + "vscode-html-languageservice" + ], + "excludedDirs": [], + "applyEndpoints": true + }, + { + "eventPrefix": "json-language-features/", + "sourceDirs": [ + "../../s/extensions/json-language-features", + "vscode-json-languageservice" + ], + "excludedDirs": [], + "applyEndpoints": true + }, + { + "eventPrefix": "ms-vscode.node2/", + "sourceDirs": [ + "vscode-chrome-debug-core", + "vscode-node-debug2" + ], + "excludedDirs": [], + "applyEndpoints": true, + "patchDebugEvents": true + }, + { + "eventPrefix": "ms-vscode.node/", + "sourceDirs": [ + "vscode-chrome-debug-core", + "vscode-node-debug" + ], + "excludedDirs": [], + "applyEndpoints": true, + "patchDebugEvents": true + } +] \ No newline at end of file diff --git a/build/package.json b/build/package.json index 622b7b59351..d217cae2443 100644 --- a/build/package.json +++ b/build/package.json @@ -42,6 +42,7 @@ "tslint": "^5.9.1", "typescript": "3.5.2", "vsce": "1.48.0", + "vscode-telemetry-extractor": "1.4.3", "xml2js": "^0.4.17" }, "scripts": { diff --git a/package.json b/package.json index 4a0241ff117..4f231bcd688 100644 --- a/package.json +++ b/package.json @@ -158,4 +158,4 @@ "windows-mutex": "0.3.0", "windows-process-tree": "0.2.4" } -} +} \ No newline at end of file From 27c59a0b494104b1bacab208a2b68c555db0effe Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 Jul 2019 17:53:46 +0200 Subject: [PATCH 364/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f231bcd688..e5b3a5e80fe 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "8dcd7590deff4d860f0fda2554b4c7daa7950c03", + "distro": "02f64b63759f873b1fe125ef9e4f3d20e73d30e5", "author": { "name": "Microsoft Corporation" }, From 3ed735d3650f6fee9b0a41904ea58e6463bb5301 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Wed, 17 Jul 2019 23:58:44 +0200 Subject: [PATCH 365/710] support debug broadcast svc for web --- .../workbench/browser/web.simpleservices.ts | 6 +-- .../common/extensionHostDebugIpc.ts | 50 +++++++++++++++++++ 2 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 src/vs/workbench/services/extensions/common/extensionHostDebugIpc.ts diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index b6e17d60b4e..9cfaf411337 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -38,12 +38,10 @@ import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings'; import { IProcessEnvironment } from 'vs/base/common/platform'; import { toStoreData, restoreRecentlyOpened } from 'vs/platform/history/common/historyStorage'; -// tslint:disable-next-line: import-patterns -import { IExperimentService, IExperiment, ExperimentActionType, ExperimentState } from 'vs/workbench/contrib/experiments/common/experimentService'; -//import { IServerChannel } from 'vs/base/parts/ipc/common/ipc'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; -//import { RemoteAgentConnectionContext } from 'vs/platform/remote/common/remoteAgentEnvironment'; +// tslint:disable-next-line: import-patterns +import { IExperimentService, IExperiment, ExperimentActionType, ExperimentState } from 'vs/workbench/contrib/experiments/common/experimentService'; //#region Download diff --git a/src/vs/workbench/services/extensions/common/extensionHostDebugIpc.ts b/src/vs/workbench/services/extensions/common/extensionHostDebugIpc.ts new file mode 100644 index 00000000000..e9410a83c83 --- /dev/null +++ b/src/vs/workbench/services/extensions/common/extensionHostDebugIpc.ts @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { IServerChannel } from 'vs/base/parts/ipc/common/ipc'; +import { RemoteAgentConnectionContext } from 'vs/platform/remote/common/remoteAgentEnvironment'; +import { IReloadSessionEvent, ICloseSessionEvent, IAttachSessionEvent, ILogToSessionEvent, ITerminateSessionEvent } from 'vs/workbench/services/extensions/common/extensionHostDebug'; +import { Event, Emitter } from 'vs/base/common/event'; + +export class EchoChannel implements IServerChannel { + + private _onCloseEmitter = new Emitter(); + private _onReloadEmitter = new Emitter(); + private _onTerminateEmitter = new Emitter(); + private _onLogToEmitter = new Emitter(); + private _onAttachEmitter = new Emitter(); + + call(ctx: RemoteAgentConnectionContext, command: string, arg?: any): Promise { + switch (command) { + case 'close': + return Promise.resolve(this._onCloseEmitter.fire({ sessionId: arg[0] })); + case 'reload': + return Promise.resolve(this._onReloadEmitter.fire({ sessionId: arg[0] })); + case 'terminate': + return Promise.resolve(this._onTerminateEmitter.fire({ sessionId: arg[0] })); + case 'log': + return Promise.resolve(this._onLogToEmitter.fire({ sessionId: arg[0], log: arg[1] })); + case 'attach': + return Promise.resolve(this._onAttachEmitter.fire({ sessionId: arg[0], port: arg[1], subId: arg[2] })); + } + throw new Error('Method not implemented.'); + } + + listen(ctx: RemoteAgentConnectionContext, event: string, arg?: any): Event { + switch (event) { + case 'close': + return this._onCloseEmitter.event; + case 'reload': + return this._onReloadEmitter.event; + case 'terminate': + return this._onTerminateEmitter.event; + case 'log': + return this._onLogToEmitter.event; + case 'attach': + return this._onAttachEmitter.event; + } + throw new Error('Method not implemented.'); + } +} From d44f9dae34f0f8ddc07ab7d8bf394225c8b02a75 Mon Sep 17 00:00:00 2001 From: Pine Wu Date: Wed, 17 Jul 2019 15:07:31 -0700 Subject: [PATCH 366/710] Use array of string for applicable builtin settings --- extensions/git/package.json | 6 ++++++ extensions/markdown-language-features/package.json | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 814f53020aa..4a789aaa6ad 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -1246,12 +1246,18 @@ }, "git.ignoredRepositories": { "type": "array", + "items": { + "type": "string" + }, "default": [], "scope": "window", "description": "%config.ignoredRepositories%" }, "git.scanRepositories": { "type": "array", + "items": { + "type": "string" + }, "default": [], "scope": "resource", "description": "%config.scanRepositories%" diff --git a/extensions/markdown-language-features/package.json b/extensions/markdown-language-features/package.json index 8e841a982aa..0d74e1ac674 100644 --- a/extensions/markdown-language-features/package.json +++ b/extensions/markdown-language-features/package.json @@ -4,8 +4,8 @@ "description": "%description%", "version": "1.0.0", "icon": "icon.png", - "publisher": "vscode", - "enableProposedApi": true, + "publisher": "vscode", + "enableProposedApi": true, "license": "MIT", "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", "engines": { @@ -187,6 +187,9 @@ "properties": { "markdown.styles": { "type": "array", + "items": { + "type": "string" + }, "default": [], "description": "%markdown.styles.dec%", "scope": "resource" From 0d4f1bca5325a3358a5ef0a7e4910544018228aa Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Thu, 18 Jul 2019 11:56:52 -0400 Subject: [PATCH 367/710] Updates to the latest icon theme from seti-ui --- .../theme-seti/build/update-icon-theme.js | 4 +- extensions/theme-seti/cgmanifest.json | 2 +- extensions/theme-seti/icons/seti.woff | Bin 33904 -> 34420 bytes .../theme-seti/icons/vs-seti-icon-theme.json | 666 +++++++++++------- 4 files changed, 416 insertions(+), 256 deletions(-) diff --git a/extensions/theme-seti/build/update-icon-theme.js b/extensions/theme-seti/build/update-icon-theme.js index c60de74fe2c..6819e853339 100644 --- a/extensions/theme-seti/build/update-icon-theme.js +++ b/extensions/theme-seti/build/update-icon-theme.js @@ -10,7 +10,7 @@ let fs = require('fs'); let https = require('https'); let url = require('url'); -// list of languagesIs not shipped with VSCode. The information is used to associate an icon with a langauge association +// list of languagesIs not shipped with VSCode. The information is used to associate an icon with a language association let nonBuiltInLanguages = { // { fileNames, extensions } "r": { extensions: ['r', 'rhistory', 'rprofile', 'rt'] }, "argdown": { extensions: ['ad', 'adown', 'argdown', 'argdn'] }, @@ -35,7 +35,7 @@ let nonBuiltInLanguages = { // { fileNames, extensions } "todo": { fileNames: ['todo'] } }; -let FROM_DISK = false; // set to true to take content from a repo checkedout next to the vscode repo +let FROM_DISK = true; // set to true to take content from a repo checked out next to the vscode repo let font, fontMappingsFile, fileAssociationFile, colorsFile; if (!FROM_DISK) { diff --git a/extensions/theme-seti/cgmanifest.json b/extensions/theme-seti/cgmanifest.json index 2b449830f50..c742c019ea3 100644 --- a/extensions/theme-seti/cgmanifest.json +++ b/extensions/theme-seti/cgmanifest.json @@ -6,7 +6,7 @@ "git": { "name": "seti-ui", "repositoryUrl": "https://github.com/jesseweed/seti-ui", - "commitHash": "89175d7f9e0c70cd325b80a18a3c77fc8eb7c798" + "commitHash": "904c16acced1134a81b31d71d60293288c31334b" } }, "version": "0.1.0" diff --git a/extensions/theme-seti/icons/seti.woff b/extensions/theme-seti/icons/seti.woff index e590d77f6840c65388f761b878df92e329bb897e..b85727d01e463fc89c0bfaf2006eecb73d5d5244 100644 GIT binary patch delta 34142 zcmV)NK)1i}hywJC0u*;oMn(Vu00000hI9Z600000%vg~WKYu}EZDDW#00D#m00Srh z013eNT1>-dYoz6yRXk}pl z0Dw3E000~S001NhyahvOZFG150Dx2g001Qb00KxpH~;`_Z)0Hq0Dyb|00AZd00AZ! zcJ9b+VR&!=05*Z70000V0000W0&5BoZeeX@004o+0003V0005z-bxwFaBp*T004sI z000Ay000FdelE@clL!H7f0OwIkQ)Uiff_*s08&5<(EtE=obA+wRvcLvMd97hfd~n4 zcX#)Y5O*c+?(R;ExH6N>3~$$OlBrXB9%EpAb({X{?hCzY0dxcE3o{Elxi$tXrMhOvxeJQJA6BqlS3sZ3)!Gm76~7PHImIm~4q^I5<` z7O|KmEM*zXSwRacSyk+BWi@M9%R1JxfsJfpb8+3mR<^OdSa-0KUF>ELZR}+q`#Hct z4sn$y!A)*)n>*a)9`|{`Lmu&%Cp_gD z&uQmH@z=iO6|Z?i2XA@Ddp_`yPkiPJU-`y&e$ZKbWDWfP)s#zP%YQ$0<*8EnoYje} z^~&>Ft13@kt()>J*BV6DMv=9<$l60>?WsKDwO%4?lk(fue|n3oeMHt~k+rYL+D~Nd zFR~6$dH+C_uLp_D2aC*yh|GtI%!i50hl|Wdh|EWd%twjLM~lqIh|I@|%*Tn$$BWD- zh|DL7%qNM=CyUIdh|H&o%%_RWr;E&Ih|Fh-%x8(rXDk1&YI8*9b4BL!RKA|C^7R6d zeG5hQEfU$ce^_MS5|MpNMfNQd*|%I|-wKg^Eh76?itJk@vaeNS-)fP4Yee>~71_5= z<>$X%q_IJyu~DS4Nu;q^q_IV$u~nq8O{B41q_IP!u~X$eyF_}sMS6QgdTk=Ty(;hD zC(_<8(mo*4J}A;YB+@=C(mo>6J}S~aCel7G(mo;5e?BSFJ|)sVEz&+C(mpHFJ}1&X zFVems(!MCtz9iDVEYiLr(!MIvz9!PXF4Dds(!MFuz9rJWEz-Ut(!MLwz9-VYFVcP> z(taq?ek9UF4ArnX}=I@zZ7Y|5^28{X}=L^cZjs#inQN}wBM`z zpZr1Of1HmZ=X?@5=d;K;UqsINDss*@k#oL_obyBEoKBH*{t!9mPmyzeik$OHGQ7V=|0`( z(1&jNNw*CRjUcTpC6a-Bqkf0Ix)kQ1g=Jni8mxh zM<*DJ%$OfZCfrNSd~5AG-FUCL_cvXqs&?(Y_S)<5J^tTgtyWY8{t*j5rC3Ty*{vK> z6x3QmgALTHq0m93<)E;J`n~aJ(Cs8~{;H#F8Fjjyc@$-SKR*|82Cr@wZKBb5)E#v@ ze;IoI=nyvQbl1LiC@`DLZW;G7|(`-@#x$uh9?&?H>57LjKH!h zE_VYxwc*3|^uP^R>;*a_glW5GQ?G6mVw*8fw=2n>l4fe9vfj~&PPD31RM99#l($m!{kng`YL1GN?e4bW>DzX94GC!e`8l~(3|UJeRRk7zPD%3%U|)ke;rSwhGsEC z)4ae7Yi>cCv6vn*&Cr5I?3H+defPs3{_e*g{Ebge`>=@rPN^sx%9WCSTF~5O4Ae3l z2+|miM?eCRAM%X1w`l-KDW@G^h0b`?lQa`S@4Dgk)d4VxxH=TYL=7CW|~H5f4Q+|#kMvUbZYo| zu~Qxw;alZVN2@ARI{F(@P)@)P9>x7Ju+VhS1Q)^xBsG-t&T!O$Q=@Sgcy$9OHGIAl z5QXH^@kolB{Dr@@7va6cu(iU>YSJxPYo+-C5V$++>?jAg*;^^-6{2UlxqhG$RZUuc zjT<|a$aM9{35_D7e_VCc`ug0l&3aazA$A+13iM4gR4b`_WvH;$d)2(}Q7bOZCNrhF z69bD57xYDtJxKp0& zE>|7mF%qs8(l|M@QL7Slmr=3&4m=PMLMhOurP3h4D%Eu6a08Ttrm8?MqyTam>MJZc ztQx@#7GrGvT96`8GoVT|m8u-1E1kDnr6MC-#h|yaf97eb#Z5bM496oUEtM?JfTSia zsl;A|xgcdI!bSy7osL_Lq()#DTt3rC zqaf66X7OXqMQBFj`0u*`3aeqDVv~3v`VFWDsT5l_Q;}^DtW%6>t(+S3CC1zU=tGRp zux_dt)%RN#!0NY2UQ?$f!+xXPuG02q+`}Edl;!@kWEmS=@#SA zLUGJZ)i~W+YBpCIUt|W1t%g+#+eA087Fb5Me~jsl#u`!)s6|Yml_2C|JvA(y=_<65 zU+-56VKG>PesHYo)D&!$%j%=}Qwjl%V=5W&RMZ@Ts>%o`4>}Npp7fVMbW2dv8;yY~ zv5hugy!Z6!&CN|z8qU_2jWgQd_)_mwuXpM-R}?=oJ46p$eKjgg-h)nEy*WF|Dhmg8 ze@Hyi-!W2%e5Ql{L0M1^E5|^?4FuPU2XU#_K$$r>3V~k$LX8v23ELo}o$+j(4g2!l z=kgt8@|}g_E}Z{%dt)&hFCR(wYo1|*PF#pfg}UGE1(CC_3J;iHo^QC8X2s~qy4A5e z%WQVZZd-MD&-U0{&u(+S!RqLrcVE2`f4c4T7_%|qhLMfy2kSv#7=>faFz}p)TXgH) z+L0rzUhBw_{0nz3>WS{ow~Cj=r4^Hd+eMSQ=JM7K|F`T_Dj z0MP5JUKrPFowoT;!`7R=ipj44ZQ3kO%OkGR3Xo;T6D$eDPASl$Y8Q7f4Lj=;7fd76 zJ=3TBLiEk%<;T1y7t(KL=mV*~f0-65#b!`6=N_QlD^k_k;s!0)tDQx|;%fxs6m+wl z5(=yum1<#IWt;z8cLEF?2RYO`%1x`YG_m0Cc6Bhg0y zom0FD1xO}!27pxwONAtFOL)s*WI%M+gji4dq6YMQdr;cZO6LJ+8*Vszf5AoC@wqp? z+AfA^Y(xg;2&>s*$giX->KB)eF6Nu0!o#dj))iJvOtQDLb zKo8SE-O>+~lgY1_G8HwP5M5PlsrcJlIw@~Wu9lalMT5yrP^MHw*L4bpxZ@nXlXbGB zG~mYu>I*6u8l3HR7>FqsDmOV$0+ViAt!t-Az%ujX$4x%Kve@3@vuIHP*FG~mysZ` zuH>#&2_gVx33kpae;E#1(oX7hTjEKABC)M$Yr(wZ$1{~aC!h~XMd)T_t)svE1Y!tB&_BBD2UuI%4()K(iT63ne5{rM*wAjYUue@j6ZJ%!bhu6jm6x46b_ z4N5q+YP$$jqHlqsO)DBfi>gKR)CY7%r1AnAh=-nobgSqSIE8W9vWWXyJ@!(gV7QtQ zR%@P)5oHL^6ubq{UqPoBbo5fis(0MwL0CFrac)Hd9l-6D$@uxXbcmx2m5Y>XguRqc z54=KPUl>s_f2hI^5cmtp8GzTQBVgGS3H3&#hBvUhCW|NH5)j>RR1>rz{)CCzA3=>n z^!<)j(bkqb(VQ+i=WY&bNworyeU2q`&y_7tGl7BOiqou)dqe8|IokXB+i%=Jcx$wC z@5c4D#=ih;*_jfMdpf55mYZ?crY5oTdzzyI#Gx;#f9xes0b!XxeMhsVlF4^Buir#_ zZ`u--Vsyc1ZJp?9TZlYLbem?0ld4R6(j^-II6AMlL!v1TaNGsTtA%9%!&61VLX<-T z`Z`YXfyoCe=yXAmE+J`ZON&tub?&Gbv#di}j7xzjNE!}=DaqwUxIqpo`k_%&NmBOe zx@GF8f2yrkRW+DjFrZ^z!Fj4}x93(*toUxli07N_0y*-Ii}!Erp4~B{-?#tPPBtIK zzJ(cTXRDVi57YHV6$luii#NB>4}z5%FW3N9!ba(L;|mUL#(wNHW)hf>`Gf*vkiyC( zE1j8UnG`EK?ZUs9WKhOktfA&SYD#;FR8}#CLv^(4K@f-LLKo8e* z3Bf@2a{-N)r*s1%NgzMo*TiUD5uYw$ z0LAoc@2Awyij=CiTtn6GqMh-=CoXwte93uP_lt{K2+Y=D|rLN00zJK{i?F{4~p%YkS~ zi>NC~IAC{$S?-dO*TpGm;DKouvWSZU0@(B-se}?C4sw%E0)w6aV|@vI#6v+Oe~5!| zZXn8+kl;eb!%YlNG}j^|(;2ByU(c9oa^k8g45n_`HP0%5aYM~nU~%k1flY%`mw+@@ zJ<44RE>p_@A^X!R0eudYa1XfZr&Yqh(6Q9K68J&Pe_T8j1+4}7iJtsd?y!Y@E$%QF z)y@CMa~TDLj>4VrT&q_3|9Gsde*{Vz8gqW4k`|YZ7u1zE-Y)IjZWMf;$7d73_-o2O znC1T^j2~rDKk5(r!)!b}{{!IWp2ciULVI5~Lpu&4fcD-jKznj)@M2-D4M1W-OK=w{(~Gc34H(=9snh5LpJe`{+CWMgBv zwKd$P(>>%Su#5m~0oD1m?RUvCYI5}a|MmzvgbqFO!sVBvD=sHDz4DclJHPM+^tM+{ zUiSX?zkk~Q{9aoLUUGMLobV)oQ5bj6Rq~zR`JK6UzVrC+{Lbt<-tp3^E_(m_=5BaB zQr`D|_{!UZ{|5h`N?FRXe}Byk8fSbHWgKm#$4wt9*yv~e;@kw4}JQ*M>_4Z z4{wexzYM+b_IIM^w`y1I{>bFBC(dJs3MoSkRizEJ2;q^nfQqBAj(~E69UvU=ovew3 z{22O(l;3uZRyK>yC#+X!(bNBO-Q>^AP>cCRU>Z+;h)z9oi^gV!AD%Nv`2q>Tgn0z?boOlt>@0ye0)ms$lcrYWfARBP!{KcA;o)VMe-01hK2c4qGpxEdQcZP% z;c={*@Qdppa&(Nfo4{N#NJxdX>1Wok0Lf5==Y{CSTD9UEowXe_^I()e}IU)|RyhUf z+pch?$CWlw)5#}=<_`R7)P>n9U~pkTTQI;=yxre6W%AMO&~5i5m(J2@G>di60A68GIh!Icu?y`t^o+f_LG`3YGf*|mj_ELzD864k5=)6PGZ}Mvma27 zs+qB=Q?OaG^SEp;{=bx#Kpnt_(t=nL+?Ysif6Kk-(D9-8B=gZl71eX%1-sDSXEH)$6fHPcpEr?%3$v^&TaJSQm3c3#m2XmW7Q zO9=mzH^h&YtA1mq(5SU{92?BX1!B1~i-#^adHC4D8{BMRWm43URS&$T@)PaZQjVN& z&rfen0$N^}&C{rq2tV-Lf*uY81{jFIf8hBhpVHiawZTxkX>1;^FIT-nr%@UvPNi0^ zTzI@WQ(K%_Tl9YATz9V4+<&bz&H2S9+Bd4tgcgt8v=Rk}ZO$%SYc6-HTS<^{&Zx?>MhN7V!@ODfmjH zDB~QAMpB%02w)!{P|#!5T~{PmC1*F62kF=D+Sqtu`4zu3bN>u^;>?jt<_Ws$vBxIQ zY;2sXZx84r3hnlV1SUZr0%V6jHu=zpK7`KPKl$wAk3T;7>>YR9LF~yh zA{hDoo4$S9ZQp+Efg?vAII%t7A0buf{UX#Pgu_r8P`N!W+6auaM1)+0@8rlfoqIdMm(bHS|>!h>rf8^YJ?Cf+l zDyreV6H%sB+)P85WE=J1V1V#P;FhJA`U|RZb_7=;!Bu1&wNaGt=xLT%cJ%8p~4|TrurOtzYL3Tf0 zf8bl!Ui+;F>f5>vKToaze?AsI*ov^ZyCP5-(Ll(>K&W;x5CI7`P=faz*lO_tpZxQe z|3df4{{KR4(=_S#zWn8vW1Hj4x88NJX@32m&|6yuvnOwS4*^pcle^GcC-1^LY+{}F z`~DmWl=my2Q2vARl=5fN%g3`(mxDboBymTEtMb9m-M>i;?br?wf6k*}ZtL@Ljwrf) z2`Z#VPI>}_9;k~T>W1(r3yUicpp8YW%0>M#n66{#PV2^X-0!|5Qa|c;1g&nOA!QQ0 zfG$qr(KP5L;mb(G*hKY==atV(xeLXoK4;Oi5xH5#1~xXZQ6yT`Cq`;i7Hu#!tq7&b z2G<=GkUOYP!aWsKf2s&FsVcW{$suvERO zX+g}KYcaa+?s&d3xc%07?Q=+_MnrX0qs%a^g5i82z%Hjie*sZyM^}xg?dw{pMxCNj zbAYmSt4u?@cEZ;?Rk!Rov6;FA^gVRQ;2INdHKGgKO0#fn)dk4OQRH>ns@qS3fH_Q0 zc*P+E&(H)Jo&liq zM;&tK(p7&Gv_$ko2ZRMbH6z*zUM zV*v3VLU^Z20jOb0e~~e*R4#bsk^#T&>50&8e-P0|!HX~%5(ae=8Sl|TsPwr?`<{NOhnP##l8o@1MmVb^3AC15JpYa5QdS-(}1wUhoFmr?z$EQqYmsY ze+n|gTAE2cn~_pn^t_5o5n-urG>R3^);sNktr?ZGSeE7hJZWK7#kNHX1+bvN48p`}G@%>i8jD%8D|{y@K?Y^TiV7mjt%fj!yE(^B z(%ZNHvIDnX;<#yg^RbIBK5}zP4d+Pce}bBhq<;Bt(U9?u`Z_Z=fr!Xg2j@B?Flm0MIMx z!Rbg`gEB2CsI%61u!(v@A@@f~PkMW^Jca^)kwE`LknE6#|j%r{gDF4yc?02+F^N-W2MziTZU2$K~k20GQSv~|eQyr{T5$V9HQKQt;RY%pB&6ujvrOiX@ zga9*X>a!jTViILbPN>rCJ#MwE^GR$8ubd$hN78><>q^5wN9b zvPMPBm|4JcSf|kbk{A}(e{6xq`(Qp6I+UXV1>I;69aGO@7HHySDDV+5gF!KVs#Gk6 zzRr0g49c9W>9$<}sI=cEkjy%C$!0?IrnF3S zl@g2{!plL}a7;IZp58U?Ci89QWkrHx$H1OboC&Nr9&|)j)j&wIe+{q=M982gZeocLf$|4P zK;hPx%@A2sd5UB_8pond0M*eMJ>?{dHG&vYRA1F$;xPeM(`{-@{?LR`EI1f_28<12 zy4Z3P(>LaCzGcBqU9+GQ3?)^;og&0(5SZ&2IJ2N?{AXWjn#^u_zygRd8SK+7K>xp) zbm#Uoa1wr`e-;*TYv+9Tm6*ZZpjUL7gtkSsl-CTk0tv9XCk=@V*- z+5IO5Rsyr^v}3`y!Q2#G9Oyv7?MgCZa7>JX!I?-wvTA!)in9$Da52xcW>O9@kQzWg zQYt~~YfCdD!`56dsKSa<44u&6(TB*6Qgbn@WpRLUe<5nuvZY3G4)_Mz;ZhI}&=A|B z9(E#39c$ZWB`ZJ|Rb_|pIwgJKV*@RZ0Jn(z!`z|N2i!C6hR*pEY4q5quY8Sp#n!%y zFIYkQPe1qOt9xsEckDQL=eg_B;i*jmt<1#`jY7iZ;s2-q&Nc1!}&-U-|wDEeSwln$sM1nJ&Pq?e^pTDLVG1Y857rQ=Xf5o`*e|F_C9Dc1IoQK$NjK2j#H6C1J0K?f_eg)Un~93ua_2eTpK08T9I? zHx7g+I%#eF9CrPhpN9y*) zL{sm9;hh<@;oFW@9m|_EfWtovC2aCpe_bRHItlpL-{%O6_*Z;wLC2wmrY=;F>C74Hsw!ngzd_gdzit6Q{ zNFPSKMIPkj3l9UAmnSy|!6k&8&)EU)Q9hzP0;8EbTc@rwK)&5!XBsjXWUEs{e_D{H z43Wybd!TJ`PDr;g0ObsDGmG-12oW5WaGJw;35sO?gmj+E0H}agB1u(bvP!xaafx1( zd&+aK?{+#E6cK1^xPf>df06LWunmwLRCTz zst7d`pu>a;>z1XwGOVO5WuU-`f2Dd3#sFz-kZ;_uyfg*b>-o4s9e0MX${H`0i}lcO zO{}9qO|RP~Xj7OExDjy03-3igKm?4`Qjw`{IZ0aZAcq0!0LkhL^0$ph+@5&@vh>_-Gh+M}3heyq(t8mHwGrLG}}19(fPGh1t4iE}0oJP{%b0 zR_!-`0>&(EwAL=#V+z+he_%a>li&M2i=V=biezhMTFaK9aouvXp`kkVgV5ph!01VMH{ab_e&TVAba=mZ@^OUVd+W;ce(k47LAgr#g*>lZ81W+20;D|d zifBP55sUEn%trsK%Wa`7RS1C6@d?$hZ3 z&;XbmY#O{0cm}@-I76i^#!a<^RJ&wq7O6AgxIwq?6?w=oR|GeU7En1688oVie&_UCzC9KE$D+NR4rs?^n#uO&y;Je6mz%7>I0jE@zP986uTCpugU-~0? z=?`=buD|%*f62%}l?4u;2gspG*(V z`==K1*Oi(wRCa-uQ;^8%kCRLShrx>AS(tmV;zVTs3*96nEYw2ZQ-4xNbln@GgNm(iGZ6Q1yP(j~^m2KfLvdlo*<9bNtC zvy)@He}DMsqd!EyyZ$VC%THdFNB2Cs{_L~sPdvK&hdyE~KP!Q>Bk)G-dU1>V?U59tX7hHAv$c4uS?p4OF$3FdXiSajJRA-f)%1NQKheFXZ=_Hxz)ufe&^MxeX6stN$W0s7;7-Bs4pyUbQxtiv2 zf0E~8%Yn&PbKs|#TJ|=HKKhyAtM`E#DprHG$gB%=L#4i_582N4Xk%&c7V1YeF!qg6 z+q5TIU1N3LUZ^t?7_WY#u39W0N7iq<%E2GCLDd?YBtpsj>kOAwi(X3Hz%YGRHEyrZ z9%vpr@_x4z={hL7&e%Pp&*@r4YiA3rf54ABs-*{>9o?XB#~~d29L)5xa)EMKxl(Yd z-xP^!qCK17JK*cSvL`;CT6)@9@x(q4@8jH~>)rtWk;|eI{$Z+k*e{+5x zkga7PGEWhv__-H*XA+`{6iYa`jUpHDH+_=AMY46;4qRKe z>;OOx!)qys!PO}pRPjG38px{v=v+a$EDGbcNRMgyUEbv|Dt*6+KbSO|%gyHG574(K zYv|KA?f=D_QE#$uH@Y2twE-8Fe;dC&Ig9RyCZD|h#Qpc7k53*&m2G*nLUsVH^^`-( zB~lj&Ni?4uD^>K8Aia=Dogr#XQv+qntZo5QO0kjb4trc}`=fPX|qr0Ye?K-e0 zo64jmvJ>pjcZfL?EAgg_G{q}xMY)qZ%AMcS3vfD*+X>~*cqTERf53;^!8?iZMVvLa zrDFjG!3+>f(*UIl2J7W1i(O%qPNQw&6j{_M&@&h&Oyvfn+z0?30^ZhD!{>?PmOMN3 zN){%nGjy~9(^Z#{M!8g1W7;XTY76yJfmxutRfgG2$tVmvYZfE($B+1`!HdY$Ok1xk zaW&J)pvFxeur$)8 z9S4v_S>zZAkIPJbHJAs~4i8m5%RY4^pqgO`Bf_YvcA++dT}{PCTD7(e>Vg5ni5fz` z&e>H>(o{l;BP8X7d5-@`uEp+lg4n@b*6EG~;f#c;e*VNofBRLk|8(cWgTpMdcjwM^X$M%`XL1KURtIax4H z`^oD7fsd5^VAo%*yixfZv=bdfSEHXt??w-xPoXD-bX(7}Wk>lcOMzFXNkVyIawek4 z!v8MPI>y6+@ZT@vmS9(5J%TD^Q;Hnqc5Ilms$vZpf809;ohK4^^V&d>#)0rA0F)Xn zV;L^UADW#{fexc2w_~@HV3KK^ESh=};cwiN-~BxJG#amp^j;Wlk;9(!R$i4gce8C za}g=cU0}qeg#|0oF|a9^As~}d%>$Fo0ENOYQi-c-mJAT+d;EfmV?-C`641S%;khHy zQ zx<*N~k_rDm0)tGmSD_TPVUQ_C%s?DjF4$!4Hy~`YqE>_FARN2gA!4zPeF7>|xo{E@ z)wMilCN=a1K8-^Wf96qH@H}sHdy#|{Ea1qKg3J}vLzZF6qjQ?!W^$gDR@|AOI*&0;N%bJrC z;*@pI$EvQ=Zbb+9RB%-oyLo7@#iNGb9LyPN8H!(|Lca;L9!yZxavCBdlpv19e^YST zv68P=VlX2`7zY8cOajNl*iwPqfL9YUL`93}jFO;Y>CEF%L8KcHP4{d=Tdc0lq`D9N z)I6&KO3RB>F;qlNuGiDRM;OOq6`(+=o~_E2v8wQN`bm}Ph38ZTvs}n#+A%ar%-~(j zgki5kTXsS7)UpF-KZC|hhwA_$e>biKcqr%vt4kOeOjWhAYxxNMcO(`(TT!797ix_p z@@xG)yZd~a7j_i?rSdi9&z0{ff3N&E<$2{rk>9>8s^k*PXge2GL?cF^baGJ#f{BCm z1%fW;Ss_M38H$wQ5|An5ez(v2!!f|M@ia|Ngi@ywRr zRA92RJU#eaWIlHzvskW*l-GrGdXTkSkqF^MU~dcs)DasN$kk@~RwY9Lengg!T%#ka z=|9^Lfl$2GPi+xYIzGhSkdW(BD-MXde|?pNk(Kt=fDS+egC*jc zk)8#C&sUb#)0A1R#_WR8ffJe+w#|ZVxh751_0z3(w#=6GOb=S8hiT6S^SK>*8ux>a zQLve}QY7n3EAo0|y60^Zg#Qt&zEmK~Ae7lWgC*o(dhWR8pzce5Jkwm;T5HM=)H#2A z|4UB4p}Bq3e-H=qxY1bqVN-m{Qs?rn@K=c{@*GhV^oRYVPljXRDMjgZ%jpdde(vLs zT$U2_z~t5kA4IYD!Y|%^uHB$YWDY9;zp;*+I`+}`Pyu-_ej61g&xto~eJ}r-d<)G^ zzB8HN*3_T#1@a2zZsp6$H{rQUBAhCdIK-lgJVthIe_sudal--FoI?Rd@uIC(dRxSuDK!$}P@SmQ1mIvG5k3NaN~x;O){47;sqy-L z3STih0(!4f`$HtNM7M-To@Drn{$A29XL_x=f26CG*~PgYDELCOFY8pGJ+=Yb6I#ig z#J8!vN&^}?VRUjQJYc?3zHX3)8cTWUy0W*|0~pvIHTPW96xb@YBc{q_o!A0^rMUp~ zG~vz-O;w|T3h+a>lM5%0TOd~)2aGpeZlt8zoFeF#VKAZ_6z(;SAMOKeGEnc}i5}6Y zf4kd#6im*Qud|SX&G~S}1EqUv>I_&sOZtZSBH%s%={#f`_Q$!X$=8r1-FVyD5XonPbjKT53aP1?F4L2Q zv;JJzEe<-FSZOI~RZ!8mHyjV-qY|+Qe?^vxrppIKZnVf zZdl9{2{ljzKAy34vFOio6S0Dm8^-)fX(n(9nCBj|0ZvuwSPcl~)%I+u0t)h%e+0nP z^|Vk1Yz5Q{KTXS96zM=N5CG8&zD`nJpf>115Vm0K2L}twb+Pw}c%TlA;9TW)g^7F` zu?rHR0Pi2tGVPjvL{K1FMgipmbY+bTH3EuEBU)3h2gjBzsF*IU)@(Ry=ynRqnmR+r zKj_CNV`5p{^es^31?YWRVhxp)f0vgcs8B5GAeLQIRRbEa1_)iFJgv-zZS-=XH}s^o zQz%X`Y!;~%ibJ;qI!4ptx(J>SkxEP=N9>fM13R+GtG0x_LxfT%u?`Qf$42}}JzZ`f zVu`>Da41jNhPUOGuP+0so<8TVdIkZNg2cKAy$r19YtdWLyU?$pkD}i~e;-Hx9(^AD z0s15K6#8@YSLi>ZXVBlHe*kRxqO@PYYQPQ-0MRD6h*Mm{bv%RHxP#~M3LfHJcoXl# zhww3cDZT=~9AAlFiC=|ZgI|kpz&GJH;kV$o;j{Sd_!qz?dk4N7zZ?HDz8AkAKY$;^ z58;RLzr&xvpTv*i&*0y~f4`3(!+(IkfWL_U6Mh^&iJ!v%2mXrCCOx?bxj!22LPI$2 z?LmWeBwU95T{89s)@dIK0VC}ZiK$=*y9h`(lWxUq)D!V%u@_aC-xacX+<_B)8MJGK z5nP489cX&cV(})*U6L$o3hsd4P4TmKo+X*^7I)5he~s7Sfq*tfU0-e@ z7Dv8Bti7Q>O5ilK%oh@1=nJMAC4G<_qW!%A8HtL4?L^8l2k^W7ls3R)U%IYYH0zr+`9*@{KPp?NyIY|e+nDANSw)!d2coAZ=!IO z!;{5Ygz+l8hbwR?+C(cHe!-WxdhQEKK@D(QcY31B*>-dxTmbFfyWQoa?I0N2n2^!<7Y$>_F#7Ky0x$0Yi2^s?x`&?vd#W<7Ww25R+$x zoB%0?0EbQr{9XKqNgYaeJVvDxwvTP*;kZY+=~` z_{U(js*@iv^*Ssoyc2%?AzBmFPySfNzt7$TR>%>4e-%b=0YmpbC_%vj+JZ-Yk*d(X zrM2c{>&SjEpy~dD1U-stXKxWtLuiXE0PL`@n0ySH^(aR{or08V?EsCvbCQqI^c>?ab)Lwp@kmKhnK+=Uy}x+rKBOc?5z3c=s0s8b4>`p86|V-96?3A$*VwBS5l7YX0^ z03ioO7T^Yz4MC5?gz(7;%xzO;=rtm-lJm*ee^N_KPXLpJjy(YCjr=8@I6^nCQ<<}= zZc%i-nAVR9S`fResE@-PP*ndSBkW6Jnjc^v6#ACOVmQ=Pn9M`y;N)R0o-=uS0|-t7 z_;k%C%a4)9(v|0n0@hf7w9nqOl}^VHJ`7+or zZ^+P-ht3{4ys`J0Tv~nX(AoFBJ?mg}XwT;T zXMYc&udQs!0xh_omgme+ijCS zLC>d;Pi@BuDan=Cz6iX-ZPSnlzWXg#eP;46Z?MLdUermJNizA9tA7u9Xt&-eG*YLz zZF_!z9G9#A7(cg>NozSb{6^hjz7vvIUw@XTjfsUiVEdsLtgvMVzNcAE)qoE6fR)fl%Ede}4|3 zK!p3nX0zzk__8t1Dk~NE`_*6l`110?@-lkUVm1kjm=Lb}uZKyk-2gt}tyCc|Y7S1%Zzw|6cj zthUte>Y46(R-_xc$bh$ls0|v4Ic896ma~&PhxK+i8;@6Zt74y1Bi2Ddy=W7PxD|m+ zY78b85E6m< zwE^c!rkWQ!1jtIn?5`u46<$T~gdwhy`-$fHHwW>vA7Ui7$u|Ryrz%INbo0&gU{v?_ zQ`$aw`sKSQ-QQ33puO4YY=0i!Y_~Vvwr*QSTddKT)l5^Hg#(aDiy%(#C+xJ!*m7KW z(~Ex%=7LIXvw%xwgFJZ4Et3VY`P0e4(xqd&b9A*eIO#C7*1q7-<_zj=9@?0Bi|OkN zT(|g~>6&vKj2us8E;%<=H{iP!4&0i6ROte}$h}XRLz;<=P=@_Pet*Wing5o*XcqO) ze)AD@%ZuNcojdu+S1&vH2#Ceb?A*faWiL!VJvWE%eqmwm#jo9Z>m!dWe5H5Ot?=)W zg%isE>zT3AlK!oq{!IF>Kl1CBo%|?4t^fZg=JMpP@Ym(Oh$6ZzoJd`g1l>`--FmSF0c85>;5=Se&V&gyF_1x=W1dbJDG+d zHjfi)8089RVgJP8)HRwfS(BcCo^Wa<+f3c>4VTccJr>(%=6_4yqyv;Ca#uN-CO8sq zg{(h}1|XnD!czc`PCDH|CIxDTO??UZbHP|*G6`gR(+1&rAd9M6*5wkRNn~YW!)s5| z01|2%mAhDnrnKUj23EesZL!Qpk6rFZo?)9I1v8oyN;&<%Vr(j#1zsLtaE5P3<%SEDdnZp5@kk90_nrv1(KJ z$FNxT#E4k2Ycfv*F=zU~Q98gTH?8E^zyin^qCYm)X@9{G;6le$z*_JyEAR-5bzU@x zh)qfWDBLMxGh(jMD@oZGK`PZiIu4+@>joBS6($kBF~A$D*h1X`Ky9f*Xf(H2qsWoi z|Dztjs3VhTu_lU&Ey*|qTY%_pVY;q{*u<3hp$dH01s%4m^p&y5t7-{@G8Q%~*tQ*% z=ShW3?0@zXo&QKOu|v}NH~!+}`sU(d6W!lj#0!)6HCF&ZEMM`&<3#@b#pBa|#8_-j zZjvSMYc5U-t9w^hw^p7S4v)cKulN07JWSy&nwb0L?jwgm%MO%1%00*>&Biy(P1K@qG7HW_P{Q+1;6ZZFarWUGJK^4_vhCZGpRg@fs)k z_a`cbwwhG>=VWLIa_2OR%`M8EVlT=dPk=p&W-a-1AhRtAR~mHq$^oJPlw3&916ht7Jm6bzD6M5 z;pJ&y@={BW7qHs)s7ni~M%4&#qp2D|$OO=Uo-6^Aw6xE$~f`JOtaR2FCh6& z!R`sOCaxE&zMmS*@&y~ySUqAC-dvtxjF?2_#HW?X7Z56!L_UF`sdjWf0CZg}xPKBR z1aK~@*cOMUSb>UH-SO%_9%hOeBJ8vii zjPiDvJEfiFOP80?a69o{1RT0@&wqKjBq+~+0pY#91NXMZsEMd)CKFUdcnlP!2u5tD za>?^7f*OScA9N&LNTL{w&+qjo&H;G-$TBqC7g={^QqUc}UroFY3yhWlXiqJbLf6EW zfv^|OgpFo*F=lSey-Gc>xZ_%mbPC`Y<6zhY0jU~T1Rp$1K}4I&Cb3yUgMU3`5OW0^ z@Q`JJO8LcxQEUf~sR3q=7CK*&n_trAYj)01#$a;A-oI*4N*0Q~?y}0DI9sf_x|g`6 z(e7$tt#92Jmc3SL%^o}2)(n2{ec5`DI3R=zx@+T$)9LPh`JP!a zGLZCQvCB_OhJi!~DsIEYC>GZSd6sFWv&m-)tz-?WO?zkBS-^PqDcTjA#xY_S3k46W z2`{ixf=RtJI|rg&uiJo(p);=T7_>9_A68UK(;A~bLDq|3Vfqg!!GAXy6wQIMP?u+B zcOIN`M4>3P zgj*7vh!rbL<|P8i7Jo=;Bj3EfBh%{SV)IO#9(Be4Ixqz&;?7ts6CcZreGuj&bPp}X z0n-f-2?hfi6fBvD4X%6`1`UhU5Q6ObE|qruqLpqg4Q)8JSa&=wm+-<&fF|EFlL>^N zveEp;+`&|A_aqXJRN_^Hx(1!jO%O~Np1}>xZ!Lfs0&1Vv8h8bWbDoNe$?kcU7cIc3XwXt=v<(WVka7}Y={pn6?{+?a_8WhP$Om@e-~5fZ;!lp!ze(-{{z?ANg?eE{OYo-`o>#b~ z@JiqZ?y{Y8VSB2WPJ(R_rXq4|wS4cEji!qk?Q|-?H`y+mLYb#i*#bqksEE~O`R=VI zwC?`RN`E`SBfw=ZbfZ$W6oxbPRH>-7*j`HOo%v@LS&}ZtogngOYujsX6jh>#bU5lj z!}v&OS+eN(rIH`+G`e%um3G!DR_6@6H&YLyAS1|xF()>|j?wRc+Tg(jFbAR<(dOL1Ri!&%p8h>!mEXRInrgX5h zuyX!pZ)K^OChQ~hh{xQtR-bDPW({j;@w#VB?-JMx=KFrAT~Q|O$w8b!cVH$yYYv)U zf9#v=*70lkvGMP+E7+@Fb?2}C;Pl@VuP#h;T>MAaiyF^u`bsA_Zk@?*j691TdyM%H zJ%2R*+?T)n$}?yF@DJJPn{FCEj}G?s_E_x@TRzP84n1^u_s}7-jt|{`2u0;Ma=*<# zPql3n&MRC)bn)K8`wJf}e7x}K!siPQQn?42B37WcPSaNIr91`8ZV$6j?v{>ij0uW- z?vTFAvd&H)QcrKU=NKsIx%CcnTQ6m3jDKQyOR0(mW=;kHYwW|DfqNm$oA>fqMliXl z(S|oXp_BFYsd2P*ke&OnbA%=3!B#RD@-LlmtzulXoyMZ}s&nSr+l%v#p`)hS-!ScZ zt5%#7X0+ijmu8#AR1{PrJ~yt@<#WYas~&iM$ir$FNoH9Fce%a6?zk9}T(p|S%YQHD z794}34I4%bnFB(3%vzBkzV#*FO=^kjFRde>OJ)i?5AXpnG}_VlLyXl+wc6s$%$Kv$ z%*cWC{sqD%2Wn`35 z5fxIXiY4ilOYMNn5SO0{hMQmb0)H1Cd* zrsNW9Uu;%x4a!mIxWO&E`G2LPSm&4WoBy**xzTMNaI!{icX`Va5u78J+O{toU;3`? z`Y&!SiqAM9MxmOkL zAT8oOh2JWCDvxmdF@Whg*38x2JQEktxdtPI$ zg}TXr<~5Z@CH03p-9G=fdVerD(%qW119!GqawHQzNpmIr*{5blW`x1dK90@xhUHju zPic6_m(Z}}_oEuVMSp>5m>-uF8QVc1&G;p0fZd*!pp&5?jM(Ik+NATyeiI7kv=9iv z@(dak+bo&#AjxIe_dY*jD6P1Vq3;W+BQi+(t%SrK$f>mtB7Fa=bp^RZ*2lonAs zxsuovQQ>&u`Gub=+*x=xasLMkj}*RM_)g)U3;$a9LE%SOtxYQB>Fm&?vcX4FZ<*ZT zCPyHec%M%;L4UNLpyu8aEZc4mcJ6*824V$N4%^+}x$4jbRO>Wm1FF94PY~?&9i5>L zdKv9wM^#c2o;X_N%_*54Wj+bXbEspd+pXzx-X!8S-^9S`GJT2Ln&forRHZ{!b!SAR zJkm!q{xLb9rnBY66u6LKeQS=%EUwkcyb_VI1NRZ8)PHKdRx72XT=wb9&)})GFZdgSNj@6w5#`yoxoBAdl_hpscDa<2B zmbmFU)lk(umrTcO_n7B#c9I_1=XSes67QRN42reVFXrV?a9YZp_QZa#348Qj@v3~>V#MCJQA<(yrWVKX%gXBMHNIvlHgwl}o zWML7*Y^F1-UhK;X*(;2M7*U%Te?|H2a?L9z&2o2E9)8Bx?QktR`(e}ML3RGJQ*&e} zSqj^*RIiz4F?4-ARoHltOLRfDft-`|dSfqINbF8rQkF7J!~@oL=d!SDOJUARaeu-a z?=D@{IOqF1=Hon~3i;S_JPYk~6d)#FFOO+dg?zh6dm;~iET1G_yOpYTn5LWyj3>Kz zwAi|{MRpf4#knp5Du|QDrF4FEb$dXpeJsKuG4&d~?)jyQZD1;5)xt1Zv&8-*W(j}b z&3W4kEAt!m1>ewmKGDrUtg&aY_kXg#VE>!_5Xpadna^>=q9tj6mm@Zl#3pGR3L6Ls z=^_1j0r{JhAtCcfCWMuj>1>_t2U=k_Fdub}^e5DKVwt4C$Yh=)2&>yxvJa1M3XvaJEAiATMKo2)9No9qjT^9~&4{=9h5*@#0~^xmkp_rBs!EQ>j{C7q+u!L> zIZCh6wxNVJ7*%PI!po_LMrd@?$~laJDd=8jY6Hjl5iF2QVsZHg1ljsJz*fk*0~U^D zx0txL1$c)VSuGxNFDctGYQm!n%@R`Qa4a<-e!|d+Q9e99;j<9FKdw&FFPGn?_F zH`1@;o&x+M_1{TxUk*{n-khV>jUTn};lAA|x{mFCMd75wzkdL0!^Rztx%hY zHPTmySg9{{jwHh+9g_sQCrnFwGSNU13+5I=m*8M4Dp((rBWU{(r&^XXfG9Rfk zY9t_i8>sz8ts>++NCLW^4fL{nB+k|5C&s~`VbC-t$krrI6-g>f4-VXrJe{tH>na%V z3XW}(#&lEt$$u0QGe=Obc{!h4(E5T!b_QmEEIZ#yz#%_({*O)&3~oge3x>a$o()*h3-V&e3yT) zaATfdk9Yz0ae5=oZ_3DAo2NFOY}ia?a9i6^ZOvP>MWwNPLN-DB=^~{MQj6+fTAj11 zU+HhN*DoXzo{GL8eqJhu37Ha}szo*Bo1Q~GtnA1Q>Px1t$fmcj8fuw#G`E+KNT%)% zgy+Z7G=Dvxq!dxF*>7W7z0WL4)4=p5doqF7m}e^Gmx82*48?IoEPqg zDcTMFn{1X$aHggfsCI`TiKg!XT>M~iG=B*1mw!5=Qs@pA$#j-+-HAQBQnWbckFhde zvlHco%g1j#wyPR)amFi;vXiSogarY#s})Tyjgozg>vHv|K?vLEbJr!&Ihnh^eR#+%8?@NTso&(r<^0zf+PV zQr>tw41QA?mWD>S9UBae?b4;@bo~|>9KFIG5S`&Oi1|Oy(>!}i8z{Isge~OLN#AXC zH#q51qbJ9J-Dd~KZX7PmRQp$xaew0^I@0kTDy^n{gVkHbMc2l);k8@x^!lmmPi=0{ z+Xi2#%~W@u+9Uh$!W%}*@m3eEoA)5J*q1dD} zUZGN0&?{ya6iybd)!E?yL!mYF|x z!MVfx&tfl{$vDsYc>9RwEG;=6uaCdXdXDG4v9^C|e2M2E?+ec28gKj;`o10F)*WVj znNE0TAMu>K?xHKc)0)|xX*TJtb!F^$yB_^_V%vL-KBP}xNk8>*n=W`wtG0*h_iC*} zd%hjpeuZ9p{yASKQ%It6Xn*VhG7jmyMyX1uA9T_b`uua=A9oHNVmFWPdF(N^IsS@} z$X#@Nv$wf)V)^*;xwXzB&6D}UHf)o)h@}V}%b>S|i@ARf@@}>@?u6b80lE$L=CNJ@ zK*{!S^r&#>JM66_ZI^4N63%=%8NXQn5?4CqW=smeL-1E=l{Vjc$$#a4C1ZJbW|gh! zJC=$i5p)A<{90&)=WhpB5){oiEfYso4}* zTO%CI@2`&VcBZsz9)MQTp+;C~>nwHp&>JK?#X6GOIFLu*Yo_~J5KYlK|XT5*w+8YA;_V)G7 z!Z|+tMv{#;P4QeNfUVQzy@Av)@Ka;Ir(^y|NbO{r;qCGLZOr{ViXi$O8vO|}-#KyC z-O0!h@k=Eq9(A|oeHPlKzzz+vh3rZ#%C>83Uce#gRe5}0v|-~&VM3sd>R;E1!}l-WC8wd+!L>tl8mlHr%pewx8VAmdsfkONP9C>WBbTOjjOl2 zh9s?v$8mA|z+8YOXwtcX&||jF^RC*tdMi}6a-mwU5fMsy_+>xy60_o#BIQo|D;7&M zFP;aViOJ+vKL#A7m8!fSNOKbvz3aQPk4Q9_On)ClE^1`=97h!L0BgJb7JR7t@ZZ%C z@>2MAy`D9)SHJASZpC%&c4w_Uf9$}Sqw{}VOuX9Gjx9@uXm7`MB%@MhBu>eWNRBpl zha$#aR8lHe$R4$<*}$pH3da#u1Q&24upNi1@KArHITLIh&URbPcDHruXgFK75<7j% z;gg78B!5IYfB}0~2ZtEmR;4!Wvl%g`bMMeB0ZZj{u5&uvN&$HMJK12ed{>#~HJBta7-*mvI*+cN7wIJI zQwL9LH?4dKat{q{Vd&Hme6r3_XIQs6r!!+UBYzKv?eBw4=v@-MT(0wH=8@5&yTjI? z`*>tEdofI=inPmKBl3EFR;hUnqfVA7a_uNplbI12$1-jp-GxIsFd5PpZmY<>w&i==CL_`$ZLVfJEnBQs7QAI(Iw(uZdeE@U3f0RKq#`o2d)~^5jGe@ZN;G=X z>m3j0!{LUgldzy)bl|(WO4ct{5iBxPWn@N1?>YgHbq7A9+%sor=-paL)}>Q3 zB2(6V(qZ>~j-Dbee^TDMH0gF!GQwwrC4XJ^#)ltffAa9dXOBGm@DmR|%pd-lKf4(( zb~(L$h+gM(jA!!uh_dWLt8l#VQpnkUr>j!|8tb;C$wmMHP3?PmGp^S<363_koX+dvRHKN&FswTrgv=Yt$*FQ zOv2YTI`VP5BMj5AYyS5KC13F@<75@~(!>zFV?Wwxe9c=*-xY3b+Aj_R$xrkIO(-wA zF%sFbb4wJM;(`OV6Gk_&cP||~CR&}Pr7s#@c>I=V&L%E6e()OZMA2i zCt}}b*L#lR9XLs>%BT=&H8v}7))Ow$j3n!;{c4HFH!ETLPih~$`cGg-p{H9nZJHiK z8dfAj-R0VEc0=s!a=qj*&^uVjm5Sza4QT)oHfH}2mdoL|Oz&*z508zm4Li%7xyUKi z0=MW}%8i_A#gai#DwR94(SO{0#R+ZKB{aV zZQJu{^1H&MhI6|-UzyE($8>$=E5iu%*5SiipS)MhlQta|X2{;yE*vdfN%qDKB(Gmy zxUKMx!ut!KD*TVacMJc*Ox9vUb|HHjdp3J1dmZ~#_CfYZ_7Ho7eSeMpBUgNzU%+qF zG0kt~Z{zRczsv9CU*P|fKf=GpzsY~V&yr-TiaF5|T`?4g#ZhrwTrRE_uNH3>Zxg>J z&WQJl4~mb7-xK$WKN5c}z9zmYo-pQ(ma%MHVq9VTl<^|tHO6hmFB)$)K5Bg2_Ye%XG~R^M9my+Pv2M74u!@N6n9$UogLHe%1WC`7QH%l1xvzAQ$DbyhL6h zpDwSLKOOUBNUy`qxcXN zCiaslSas>-dEFMUkQ8o2-H6#_bQIxAX#zLY_OOf8yF<0L(?`cB9XwL$4lDTr2z4Ez zI-qf-z<`@%zZz!xp24K|sENE^k!83K!>uyuB0|4QydZxHl?hO%QMxmtW?{uF##TiYXSt>KA)?jP+y z%}Xi@I2^=X5r5LsvG5asJUIV>PRgncU<=$c9Cdq%YWGJl%jngGL&y+ndY0~FeN{&E zWtvfQu$wZZ@^XX?z!1>=TSw?je$v@@dW)2o6}BLc?K zj7$^c38HFkkNRZ=;?^0Z=%%y{knIui)e%4$yW2^dYBI=>G+9wih7B@qQ;Dp3gJHL# ztG6>4C2i{8q?{mlkbdKP3UB@%h%bOUMJw-YECA(}C*42lBM}N!ub*ZL0x1L3R+fS` z>wgT-8d23peQINOyQ~H~?S4W7N);Pof}z~*7D=}e&C51YCJc28^|&Gw2pNoq8OaN3 zx#}X35~fL+x{7S}F7@;dY4!P{YCl&8F{yR>Tr5quG70MGQWxo#Ztu`|VV6yhMxt*_ z+FcBnrks&ZZPcaFfC114UFo2L3>29rpnsz-b;C#x5#8EVfF;z;Jk0u3MoL}ZO?J9^ zpwP$g5XK%FP4mHy&Ui+x%Db3IVU%olF~b342w1Y-C~3(qI)-%FksMaYz9VjwOonNg zjq=PKP=Rxx)NZ!j)yd?6a5hBdm{c#f>$oklcjhp1APX$SYe)YLh9nix9WOxmw%Y>2xFjO zN~!XrZ7Os?kET)U5i63IEc)bxUlXMgK@8y1K@HWZ(@C8ks@8N-s69pSJi@j|!+yCn zBC$ghlu$>ftujOvm;#s*)qMvNEXgfxg{Y>a+pgdT4QxVeW0XwTZ-(sE18uTtKU%s! z(@xlEBQeqL4j?UtKmpZlD}SS=#K+nS%z{RlkRLwTg`sff@T7SHczDoPx7#LAaGks*TAr3%9T~1q?RQp>xuOm`ALbE^$xjr~2 zm8z$3w@m7jd9CeChBQq>E(sY$EQ$%gVtJki_h8Yw~`2~uiNIhMiZfMlT& zDX{@+00bll83A@}!t>;NCLAtqqFXsBj0WIbT~yt$FTamvg8Q#Il`-%jkzo55fb42C^-qJdKhXD^`m~|z@@~e?u-^j^zHXzMf@%mOV(d=3)QC#T@(yb6R{dW; z>wdP(#XITiGZ64XBd@VHgy~Xqf$%b9tWu;Cx`Aa>%`l$H*ykC0C*yRV_F&OD>(Ce~ z^?p>0-hV#GI_Po@F`{qN>vejZC%_}<9Pt3pPq7@S=PP7KvU@mR!c&&m+v(WnCLQ%z zU1xf|ULXQllZfsFAp-h1iqgJ_y61>LIUMOHbT4sGuV8sU!|MUVgs@(Tg6?MQ&3Usy zMf#bV@~K(J=*tnVH`GmCePN1sa6TP84HqnQaewqiwfGbx1yn~MGaU=9Kg`K^VtA=V z?9b`WuS`ng>`%}g7+B@d0YrJTO~!wnv3Kb6C{y*6GEB*T z56@G!9$$v6%I4c9Ph+gk*lpl=nnqG^LVryq@V}5vo}(B|CJIyhXNj5Xsl^@a9oT4$ z01IFbvm8fPpJJ=pIf$|M z?_>Lj=P+S`9NvP)a`grz5`}QFA{(P5iS;T|{4wfF{S`BI9mxk1whf_d1FmmG@3uw|_hOPNK>Rin!CP(S z5*>QVvEL0JrC+9&7>YZ#VW!9>s>J8?Jmt*yFvX}%ciRvYZ(^*8S@CqZZR`2g(GXf} zMdKY&wLo}u%N8n$y3@1FZAdfj2k2{Ms6C9Asjx>#T`5)tWVJLCIt5?zmVZG0KscNc zQM#Dbrs-j598=7(h{iGqNU|vOU?O53p;}TaOmKu%G{TZiQX=hv*D>j2f>c0yZ5 zfiwkRtPKm{@V4!k7HG&u0g|N#lrSysT+%PhK$)^CK!~JE`CinFtRjo7PG*I~FjiEc zmLw9*0w29bgye)0!GCH2k(|H`Q#KHVFUdM|rw2Db-qPHSZVtmsNOTx_{!3CfTQYR0 zffkJ~JP)bktMrrDi3F(%os!G|s1Cy6Oh;>4a2RF&JWzJSz?pAh7(9#+v^K*5Ga}Be zh=@XtO;^KJ9&uD~6RNZW*Hz(I2{!^u1;m)?sgN`lB&7kjM}N(UgR+>&qEOIWkh|6^i8oW!!L)O%<4cG*6T(r7O7z1L`VfVSfyB#5P3~ z!mFOKNFpGg+jO*8)VdjhiAX*Q6~OD>Vrm|+q?qB*@W3T72+A^)ZE{EFX<$;9qcuMK zw;Z|`UYsEbWPf1<9#TLHK100{2S5QQ8kb?>fRYTK2-9;dbf52NgcE8~SvSk#i&TPX z!xzfMq_UA`6nd-SA?<5Pgc1m@=mw%vOKJ@fny85f(Y&HbiDdFVkz~~+?!iO=JsBw# zWzOPrre@P1d9hWb0=QeFLGcl3O=ALh8G|b0T4j=IG=I}$51xpC@E3Y(ojE>{E~6vJ zv7odl(~P4`eMgMM)bb1HDyGUMA`K>zITO#&`5&|t(<39XrS5r}tK?cWM%m)bIXsTO87h_6+Su4mI zY@jTn3S##PN)uJl)Q;R58_15S;c0?W=>R>7BTTmq`LMbg^Rpd&<|RAvx*2-t>n_dpeJJ}1KBo{4PP9DJVUsK+eN z3V-3|#2_=c%XN^g9xMYrZ)%tg*iH)irs;T~%&Ntx`5F?_aEL<~0W?@(aNt&{l_m{d zi6Jw!uRMrQTZc$o3b-~X(vYc4Ur3s*;V~8Iia8A3X#z?Vwr+zhz(Td4k@H+#%N6CR z`7r&Nzj0$?VL(B5o$BPGJPku=DUTYC)PJ9O(*krBX+*-*HW{=x62R0tl2kG`AVGUf zF97I=BLo`srPCy68&r!QKGmLWXq+0mQQN#f`M2-)v&et9V8Q>AwTtv`&`i>utUFDe zh43E4@wT^sjtc{6J~ZYk+mW$S{hwcL5tQs=nslz$H| z#8%|Z963KOWxGe0H;oe&d%oBr748+|2iWexgI{wak^sUIaeZ!evtDmEw}P@0Rx71I zO4BNhwyRyQzR(#gz($UzIZhuJ{lcNb6@?oMFD=}G{kMIfj*v|pk@B$md5%CD?QzrF z_rBW?t?X-GK{!!QW4+J;+U0zLgG8TilNQG)jl9YGo;4V^!M3Q73PQWnmV z6d_{qWN9h2qB&mxU6!la_6&ETQnLs!E$**oo1N@cE5S^*da9E#br^qfZKneOpw|!~ znOTCrnP*S5Xb3CU&*;uGuhwxN_$${KBlM6i84wCHwWS6Y>@ z>=)CU94|n#R%5p$Ng03eNd>c=DQ$%!D8z+%pmt83A9YV^k9JY)@3Af9Z`@&zU;etR z%h~07M^9dUTPNe}ioFZ|n>Z`Phpy$1UU9*NCr|vsVusJlUb~pFhsMA8VR6d=ZcNMh zb>ZbXDp}lC-FDMuZPJymeb4C=Cr+~)A9&z4b|L-y0V}`mb>n}Jv8SB<3g7%O{2RMa zEiC95#A379)=4BqKONz}YGYBjP2bzyHhs2L|54t1WND*&FstJ)+iccN-)a8ofz1_X z(_VRs6HL-7rrmBje&_}Cci$^#c3bz|x4C)G#ru93yZmDXuTZ9v3#_Z!)AE3!+^28- zF1@i2?CtKIJi33jySKY`^b~VmbHx?Wv!YX~=G#8q$#=hw#^-C$}0g#mvp zZ0JpWtjtzh19T~%-K6~-=K>^^rLC!dJTgw~azxJo-COT4B>Omn{R&Z_&iHITnQX;IoitxtRBP5; zd-i{d?Ro3AnGvrrlCtu zH{0RNPeHbFIha{5Y86d!pY64)mEHmjM%z+GAc|2yr5-PZHFl|K_@YEgf$6WfmPZUC zCT+(Q6(~O?f6F?U5u+?^dro3nPYs>&k!*jrTZJy!o86eBE|5HQg?j@NyGu0(Yka&U zN#zvjyxn1ZKc;!(oNwDC_w9gniarya?tMR^Kccv+#=pa^X7t9t+WtP9{eJtatg=1+ zOTIAv>&+jY^Lt+x-NJU^7Yd()mnq=q;r`zaCPDael@;erkhVr+#nws>5xK>*XXbx7 zU)m&`;KVeE&&1{_Vpb6=)j}=~MDc1bdb$hgVl)6h_K|kQ9^1jLOiOmk+k>J8KAa{8 z(2jM(3DQ0t`%g~kDvf$#J#fFZO4_Bn=B~zTwPOuWc)c1@0yQ@6N}ch?fL12h_(OFp z50L_6%UEZX5Xfqd75W-kX(gWqyCZ*KHX-qaXdqRs%@JA2crAj0cl5jWegY=JC-41z z=t%TE|NV*l_q~jNizxE-S32Q=9371`csUMrG7SeAECyN)wgr2>SbL>cL!6S-oYL*NaFae%~}OE2bzfZ`DY!#wTMar`K)@zn5-8m6oqzY<%bdwQY{GdJBI5arBgh zx{l$jXZrUh(cu)2XkE+|whG4!cM*SlN8#5C?)i1+U8JGRlsuqDIE@&dwTYV zI$P>Q>gK*-xkB6|$(-eoI8xj-7l1L~klp5%eTyt(>ECpX@GVlBd-ZmUq^?^s zTo~1+rvlU3iwu9P)9GxGk~H5ZlHp&V?i{RPQ+#tz7f=nPsC{o6C&(LZavY^&~T% ztf`&Ds69lM*@cBm3MUGu3Rf4d(fBci&cvU!Kk;v6{bGMR{tsEextI9=oGVUVX$DiK zrGxFH4#@4cTN^~#+oK*eR-7D{m1QaR57M^AKP;EcBR}ys*!_2ZujdL$H3oBJ)KZsM zlA}rG1P@Cr4tW@}(r0YRua>qg&wf;M3GoMT{QU|@d100b->KqT{J21W){FbM!Y-vbJG zoMT{MU|@bhIcC`b%LFw0K%QE1_0a=^>?33+t=vR!zfu|rp8(~+g7yFa0F%6aIe!QY zjts61J`LOs7!EcLeh%^vC=XB%b`Qc27e1Q3{jm1`uiVQgll-R};JJ`h$oQ0z}hO==T=ipqN zhx2g(F2qH+7?%Ga2M{z zJ-8S5;eI@T2k{Ud#v^zXkKu7VfhX}4p2jnH7SG{%ynq++5?;nDconbVb-aO-coT2o zZM=hb@gCmC2lx;l;bVM)J$wp=3LFB28Vy=VbeKb-hlYX0J{&v(1}w0|3TvFgXZRdn z;7fdkukj7O#dr9B9zWnm{DhzJ3x36K_#J=XPyB_y@efYp-w94;%vwbSbB!=doiN{L zY!K396{|>Pm06NYDz6GY^DT20JmqXo+9nW`hbx1zAU&g;;6Ejm<^8lH4u{8H_tDO`Xq4$(3|RHet_mCv8Yb^%*&5Tuxp| z9ZCuy)mCGY#+=9-$AqFW zNac$dY`d?2vc?TMq|Kmg*)l#?OgCxEdNpn1C`e1)_@ZTgPD;i773HxRGar(cR%si0 zRmesgM`A}RHTd9Iq?koL8%m|FO%^qfJnfjE2n#kHVZ*fONYADAStoVJ(#{*5b%T;D zn={w5d~QPIUnt2*d&-sEAEcNnxuDJW={U(m4Xo^c4=BK4oz-{C}7C#I<%45f$Etf#zPq~lI>OQOcc$gZm8A~ ze3*KFrpU*#oKnxCzkC%k&zWMmC+2utdJ18jNp^5w8XeN-KGF{B+*=plZ2PcQG#V!# zv%wdBsNyL~{G!SHQr2NRM1Qfd`6R?C1`}lpe&fqDEM+qdYkNlIMZ7#)NI@o943sY8 yFPSV^D3(;&=$B;K#9ZpAx=)wJiDadGvg%b6x@Jx%>s}?Nq@7Iu0}P;!RR93RR??9G delta 33620 zcmV)RK(oK}i~{h80u*;oMn(Vu00000gm3^000000$j*xd$*4vtj|5e{O;KYX59tQ2dFPBC{&@YlS=W5N=NZ- zrF_4h0pxVKsq8|X_v`WO2Kf6~Yx2Ghh4hBB;J zn;6arMly=gjA1O}7|#SIGKtAdVJg#@&J1QUi`mR!F7udQ{0`0K_d*u2m?bP_8OvG0 zN>;I&HLPV_v3ETi*vKX}vxOG6vW@M>qddE{ z29dR|$l6b2?Ju$pP@d`9K#{dk`R!_hMApF~Ym>-2L}VQ*f3gk}S%<50 zeXB+Gtr6L`e^zAQI+10?IMjGB8{CQ zja?#*-6D-WB8|N&@7X8P+b_~PAksT1(mSN`{=*{eBO>jiBJE=$?c*Zt6C&-CBJEQm z?b9OdGa~J?BJFb`?N*WYd6D)7k@iKA_9c<_Ws&w3f06c8k@hu__H~i=4UzUuk@hW- z_HB{&9g%jMNV{F6-67JxE7HCv(!MX!ejw6*DAMi}X+IKaKNe{}5otdaX+INbKNo4g z5NW>@X}=O_zZPk~5ovd+{Qvn@;nUtCdyfe{2{27ehHnMuuj-`aJ$f5W|a@9%b-jzY-(#&VX(jl_ zZ2DBmE>%m1OQ%XD(pe{?T{38r$R(`flBh|BgXv_{@1;rcYLR?{^!mLO66fV%aW0Yq zUj01YBa`W*Kk4^!^7PgBUVZhwzkna@LoYsf@WqF28y`9}HaWM1E+{?z!$To7omXG@ zf4@6rC$wD03LJlO=#bR8B*c}1+%UND2X7n>;bTD7Iy=XA@>cuaPV)IQ8^MRk!qN&FC4- zV0y!?XyollRMTzU_ZXF$5yhVFI*i;d#O8YBGKUFa2u%}0NMaa%XxA2dOPR+*e_ppu zJM2BjloIL^hAEgPthVR{vf?DrwsymF3HiOO*>1W*qs&Vj(~@@P7@DN4L~so0e`4*D z1tU1L$grH2(`k81f8v$j{q8HzudSUYU!HxPWaQ}1?B|9<^2(i3L0jwe8xGP~%}0bp)+BKR1DbcH<6$}-#`#$0{rFSY zuUx;H-k2;LU3l$gE%IQ*jW}$@UX~r`bq-{KZRu7R^qa1m4ZFW|XfPTq5Aq?o@2g)u za^(3h`1PKzb5pm4sq22|M@=u#7j0ogLO1nrA@Qp+5MTM_U;fI6AO59}f6n``M*p@{ zFYT6YQS{S+=5A1+mhlKlV?3Pz3B=_{=CZp_13*dz?EowErjvo9nHYN4kM^&QfJyM` z7;nQ85*YziuB(S&Ja&oVw1hmP>Eir=u{ZhLvF{TP7=dIqV`Np+Dp6B&9fNaXk_{ug z$+l%|^t_5j$+@xS*`}sxehb1lkANodzCQ{sKx zcC?F5uz2kyUgFkc%QIp(GAn{h&DB~v%V+mmd2Nw7T}tZEH{I0iwB^^J zz~si1l8WhK z*Y$#)m|6O<(odIuwe)1^Pe@4Wqz|K^IO5UWe!d1y@^Dh9b2!2=%2d;LKYiB4|>Z5gJ61lroq zlVZMd7rF>sfRYz_GU|;J)!?E@>NSK;r9&i${$Q8%IwDH?(8UzX?Dv?@K=vItx1vSB z0X}6^qe;DIe*txXc$U+6uBHy|CMCFzt|8x63`KkTAwM(59{NFr*sS4dF@? zl!UHnKrbu+xeVn6>#k_TFoTtZ+CLv=1k?XWMJgjD>4|(+f$|h(e88%m>kLLODd^)OLhM9FtLl zQ_7pQ%v`Ao;e|jSI6mW+rD@E)rhCigg`3=(Z8C=%&@0MapPQz}xnU5vgA!0c9`qOZ zIVe{_f2T6xG0-$xS%5xaG)aTxR)cU`5Y0f2XOtaFYaVEv)Nc7u1d%rAoyhbJy=+wt zDuy+m60HWZ32qjKEhMxMkENxV=R51|_U6K8gb8D-Q_ZFhGfb+7wwZ5GeqdpnXav+E zWzb3xa*2_dwjm4++9>ZV*Mq1MZbLsLH4JVce_Iu@`fB>I5(AB6m2%*zxIG3{l`~Kt ze1wFa4%b0+D^N3-Oo1w?L-w9|$NBSndwZlhUTSTa7xdA!>w}vHgPUG*bL9g|WAe~# zw~^}XZRDog_Le4jef7ivg-3=5CMBlobm>2oR!gT#XFE?(PAP>SF3FL-v4`H=sp-N>3Iuj=%7fObJ9`2w@0AVvge}M?Y zJl6+skv?dq@x8OVzCrwV1N8a>KT2B7Uf24^apzTkK-td$Z8{>!Y7?pPI*?`0N0tO) z=NxEJb1DafPTd_&1IvsI-zszY9P+2_8_)Vru4aFllXqvvURJ4B+F`|7eu(#P&NTa& zG zvK0W@rWY+;ag~1U@+)8LRH7^~W0Oku&{-*V&+j?WLOoarmT!8gGXANY}#av~Nq$MP1=wj3A+N_!!jeOZK>;RpH23?Oa7 z1gyz#|&0GHoHw-p5GeI z?t*)&6>>)}F!6~?^v-tJdT9ZE?2;ks)B=x6K|!Ozc&iBkt6-Fn_fk%O=6<&p+ZD?b z)}gN*3RmMN8VxHn!z}zUjoicJAO3ErxiZw9n)AHbuRSm0@e}pBe;XKK_!?fYgZl93 zAC{JZ8{UmpiU+LLgGop2uhjbh+tGxx{hk2v1wUZ!^B#9eEYuh!gE{1cuXO@UftnW4 zY7VLzs7OYwIfRO%Ik`-b#QKW6wiJi}l!feE6fz!ll%3S;cd#a;Nb2bNcDUk}lg0W_ zGSCOr3Usr+-P4nUbqprSQl3n0e0 z+sr^0Jw>&uq4{QD*ix5{4tKbY=6D2DV%Y{oo7Htj)-;cY6J%nX*Bs7??Cf%j#nz}v3 zOF(qvNfT)UfB(=#9ZsOcG5K0guj|_zy?EKc&Ut&|X4ZMW{Xn~^vDsJl?%X3s?>dHsQgX#)dxsfX7eyXte}=>J)Xg-ZKj|@DewbX=+Y!@C zE^yoxr5B@R0K?NDXd$Yh0ezjM#lRGU754g|NY{xnwUxz)L|r&4rXugLj*v=VB1yvm znvzmoga_21l5d$6jioieW!RQ+Q=`*qXr?F!CUndX+^4!ucX{i&&9YZFla+QiU}xTV z&GFsCe@h1zjR%guwwJHON!g}?bn~t2H^$k{LIVhxkZbmik#B^XO&K@5jrn-Gik7U z?%;x#LpMMwU<-EeVcJ~i(?JMM9vigzh-#fkjvMl^zpyd~$ z<=gKmKb$RzhK*pd+QHt`toIGdX{jeWzY910zM{yQtrkSp!xAxt{Bh ze{OC>dDyYi)t6tq`$R94ap<=y7J4Cw)C^wXo+Gu^F`jXQ0h%P?AU{y8XHhI7E2=bB zZn!P2)U&W#ty+NGc~Sw&%K^kg-F9u|1?$h}+KV=}Ll1SZZpCI91O{Qma84$02B^}O z{*uSt@bR06Q-JyOFF9p_UuEY_oL3*AYj*wU^I3? zO{^1-bjCeAKr?1i=xQ|(9c2;q@eUX4t|%{DQtCRMQU)HFc9DoB-hjYn5Gy5=qBtl_ zJ_QU02*!pA`e3CX67XPJ7>MeH5*%ebJS6B$_iV;;L$Eq88@bRd$vjPi!8B~Af9cx+ z7&qKn0v4wp+^}a#?lF+Yn$M+Y!)0!pAY{K^A)wEp5a|O~eZN8k7&^9A6aqh(^O3r{#`U*i*|;D+^ot5&A*aGX!amwy11eqJLAJt+c|$E@_Pv7854$;PXNkCfnf#Lwxhsv z+g`^emiugjv?Y1^e|?0Ue+C%@E{$Hh^xRX$X8O$nmn0uU1GcsrOP{W=6lg0g}^P|5&2h{^@r(*7&9zXBQk&{964f@r^u3y3hJ^II&=CDNCV9=u@7{1H!CO<_Up56X8e}kW7F#8<& z+~kwfPflkan_k9Y^v@IyyAAECIrNIrTP2m+?DV%rmmu(Df8U)rEc|Oq#&$b!vvRSa zpK1&?*Bq~*3kybbiuTqD5eh2tL<<@FffsM2{e{~ZOL)L-BhhUO-}($hq`M}yOx3U>(-?(l6seE+3cgJIm2=z?+}f!?QLVf!5$VBuFY}WibgR+;@xStqf3N#74iqFS{gv&vA3Zc0EG5R0 z=>Y}#Y*sTpC-J;@SaID>TQ;|4V2xf%zqo7eI=gS1zwzH#XzQLY!)8DBOh6D$Ic>U= zgtSF9tV`6=~iMH9BhXCGA=qw|68epS|8X@A^3IV##C`z z;l+lIe~H2ezIyM^Sk}2`gZxY&oF=&BW zu^dhGnw!1n^+)-t?}our?*(0e1}B&Ol*y0zWBO>VQC?UK7Mk4yXGbeZz-(`E?bH?L zPM;=H3f+C>y|d52_lsu#@P>E1f8!mqKYSBec=LU;?~`?|3@>t{0&FQV_#l4MD z_D65o-Tm&y3x0a>!A17Og)`T$Fmmf-kIlZmyL+j;BcP8sw7ZNFn1$_-_s7#Tf9}R9 zkRAQd?0xThAGz@0?6)3&{PEdu-FM%8%$a>1gMnYW>r40C^QFfgI&-OjS1FQkP zUxSiRIEQvr`;(RW=-$_^=$|ASH)C#S zIv1v82d4Y!kb05>e+9&u6W==FPTA0_P3~6ArVEs9*fk!}?d!@$ui@2PH?cC0fxd?h znNk<%)?x=p=r#wyZGp{fTL2alLkHB(1{5@YFXgmV7Glhp zTXoEC2(w&v>h-^GG`<1E30TbLVcq#vDh={&Ll*$?-%IF0jRR1lod1*%dbJk#wWg}{#~8#4iAG8J#pBPjIS_4?l$OcJ;?ta`u7b$dPzBX*#4r}Dwi*&EYD zCIGwh!Y`foRG0g6_!$?lD^=cB3}0`l7*RjRppg=3gDGH#IkMQLAWZPq!o_`rKm~MF zR^(n>bD7|lW};za$t+~z^eO0KXn3B@sbPTKf5ky&*z1d#?+8{+D!yO$IAJ0)%!Nwb zcZ^>5WM@%hSH9}_bFVr5iX@7nJ5SpV14(f^Jn3&tc5PdC0iJZIrcuXcK>!vMm_d}; z3vK8|ttk@G?xXJ_W5nd5QrAFad5s8$@UWEBO$S#Vzv0AduXnvHd-d6Ct~vASjGOM6 zf5-zh9V`9vpV(odHDndl@TV{(E#pS+m-5cv`Edh#~%0C^AE znrd8d03{lY{U{ksMi{s6D=Sva{YdFZMdkr|r2{w}<2AUaqXc!{nU40zV2pBqk`9!& zH7{Zq@E0TcAA_972qF@;#Iz~&^~9O7{Tyc{Lz08`NvLWBn8$lv>kSp~T4ZP22fU@N1;O^Q&3O-2QFZxTE`PeFkj z(++y$QuNQoA{op{25GSal-Nthqje@?crZ$)(8NASGM7r_3_^z}cC;{grlU?Ye}qR0 z^JkFA0bE1VGD$nwB^WErlbA-G(J)ScgGX=%`aus@bFM}1N*u;Cjm@K$XIWCWUQrJ` zsXI#mG>lq<*{%(Lx7!X7rU*C%I@PJ`IwIx(jHo6wX4;NpQXP~YmzqIYhZ`Wi0VkM( zk~&ydoN$Me4+>2%POY-+m>?QLe_I-ci%vlSR=jBe4R2I5Ua6ivx7pIouopNnv%&K9 zd@$R&0oE!;8mMMAIrk0C)pX$qp=o@5@6--sz)ZUKO<#lwi}Q6i(s=$huTe8(ud-Oy zr57A_1juYC!l9;XyBzT!qprCY>7?QImT>-4LnB;4(+evuy|Gne>C2Eim@=@ zK8`5pJ^*GgD8`RfE7hoMNVyP&HOaOO#|Z!`ZMjZAXmYU7vURy@ z*mh{!MhoN}V=OSa#x#&qB5**lOQ~tBBMg&*+~m@MMh^tnflVEo5@?kPvR|Wiz%c89 z&{>Uf&K=j%8e48`XTizPf7ak06I97wYqDZ%OlEc#+nh&w%@tLhn@)EDt{#}4>}ibp z8dk{#V@42L9lw^2a}6c40bOzgir$RZn4xh-smo+7j22wWi=d}>@wIxKP~Hssj(Z+J z3}|*hExL)}Zul7+LI_Yq=X_c;)^K$$VW4dXejtwUFy%xFs=Y>yf0V;8mw=jTfI><@ zbWv@aQCl}P3x@g_j0dxXMyXV;^1>%a|BekxW~l}me53Tb(*30eOCKtIyj1E=lHol0 zjVtdea_iia+C|2Vqr5laog)fqHc8k+VYE&PQ}I$pR191Wf?p-m?dL_s$gxvk&pFNn zR-BG{nAJ2wX|@Zte*wDe2l$XkQ3R?VAOX>>u9|^aOht-fGMOgWCV=YXf{{rUCpsg7 zl(e#Dz{FDqtY$deoc)dkqZqi9d;*LOW_i^1QmbsPy!!4{C-bbpU=;4ukUKHNXfl}V z1UNI$bonDMv@GFtd|&}0gbKD9HlY81llGU7EYLLiKr^b)f6l>`{tKyqr$Mh6JdGTi z>zQntTGaz)wX0twF6d_qc*UU>1*Olpg|qvQ0;~jKJ6X?$Z&P>~xh6D#g1hx}(Ug># zfhh&10NKqWo0X*n4{))}^>$i|D3BUJKUS?m>znI~6VuT>FsP!sTZ!Drl=1u6fogj# zZ{|rzX%KgtfBE`CWf}Me+Tn2!56}?D=RS2~%3XWkW@Vc|7md;Z^g5+O^s#}KCxBZp z|F3W;4FUH|`;mJ&MVUPI@mpSE-F)oIYp&QN$IpNJ$8H;JA3bp3BDERCX~HK3&SLtC+!Q?7Des7E^e!9*ny?2ztoP-G8F)hEzgpodhr zY@*5rT}i%XFta6r%O!9$=eMNYazx4JlHPN-G-m06Q_xSsd8NQrtX(;JRj>?U046kI)}xvu^q~*p!mC?& zDECu`;1)y%<6R<$^fOGxregw?bItXmmP!?{!4x-`mquwd_Cw8r@kfRglJL}aH4IBK ze;Birqa`LXSs&LkkqJ;X%+`FDQc%AR@S-$rKg&Q)_+?t>uD8fUeOp#)l~!bW7B$GI zX|x;*BtLT;co1~pcYlU_gD^0tsuiJmwKVNOMXmr12~wbpQ{|X3=6Hj~3^~)86@id< zLa-Jgi?h`jdi4cX1$DS5)e`x9gXjD^LRns=@EDxA&a69uW)poV+$aRx> z926bX44@ff)ih%-4nX}o<;<#&gZO`$^AG*k?2UjrM=E{+bguH6CB{2(=6aa%-5)0* zrqD-oHv*tN6*)x%Wt{XUL(D1NPl4(yUqT_whv}e2)HC#M;TXQPZso)zJ8Flf~keyTcha~is`7OQa4l8w?W=2R`+W-WnE26FFF%vpuGVzgbcfyxAJm6jpTSeFg0mee%aE+r8NbgFEvZ!(xK8Z7*8D4oElAEw2fG0e-f3nFtE1AX8(c?{6xxukRcNsP_2A(-${BOg~?HdF{FPJ%=SXC+MqzFUA%hSXA%Xm8{%wA7-z) zodqX?*09D_ZoGy5f2Wh|F+xtVxjzx}oYGPiH1~qaxa~tbbB}D0JZ?cJ;^7`NcsSl5 zQ{GQyD!XZ)nY+8}-R$B;__%a*+oRu{ojv@mM<4wb`SqP|lGl9iRdw|CM|ZyY&7CJ6 zJ^Zb29p2Z~^fAyU3#DOc0(Gy`yfx zOtv5X+iS1=f2C`${Tq;&?(84lhX3~Y^V{_QC<%}r&yM%>$LV(;d;8lTBTs+o9q;%Q z4IjPk;>GJ8Wsjb_c=6n$a~ezNAH&!zl@6B9p}rlXk`&4qpXuR39^yEOfO%0qB8FF^yL78JOehBF5g;*`!}s z?`R#2ItV|6Om@fsq#JXd`5YbmeG8-ts1U9l1Faouv;&A240cfma}Z2tP#4fxN^a8Z z1fUqLgF=l>&xw8aHvvJ}CSfa_P)@)7%-=r&j4f+oyy=0d{(8?u(J{|PmbTJL0UGB@i zgi#rm+w?tYyS>qF&wiVHX|_#1e%JAzdNmo$t~^ZcC4aC07d94tb#{^57tcO=?{yD8 ze?UGwdz94o{j!_v0MOc?bgFc{(jzFzRtiwuAkPX0qfG0KNoSq{rcxu(0XOYnl4*Yo z$1#jFK(`eT9^?LgYuOrKYro)NyD_-s>YEZ_u1v2#xIXxi=N=7l9mwp7lSd98KXGL5 z)QQ*Ti}cjtT|mSN9bd>=h8fl$yFG0#f2=kasDJ9j)=}3mwomSR2Tnth8A=f*hti zlk;>$)#qXz(}<{yH%ui?g;ZIJKtXDCCB-bybpUkXMkmZp{lE<;!7L#M4xBjoe=B%2 z`#sgKA3t&39^kh1+?Lr@uRWRXERxQl6ZpA9-w<56=}cDkpHR=TflA-7?p>0j>+1Lq9-wV5~6LQ_O(EucL3GNsH8B78OlDk>VmSwM<}$QVU%o!{R2K zn*Ml@ZYA>?P*Y%%BFaCUUSL?dfomUSH0J1B#g%ILut`(3GIpv=+(Lp*rtv;0U_yvW za|RL#qg(*yy<{XK2^EI)zIPwNfA3PZ2rJT@ix!|j!7x9TuGV{Ce1kQr3 zYaCRES&LGWhgxE~e;Ofl_5fIJ0dG`HOOq@M6Li)ow`aBxfY8d1E+@9`l}){)w|pOz z3?|4}7I04Hgt@*D@Px};zY@x?>tRdpc(`B=l!Rd~cwuW9EmSz^m|A0}s9Wf8x5uOjlRFP^;YvS3@yi zT#r^YnTS@u9bzgIz;@|clIxlf4zTS&*scMlF_@_bDMKf#CYEGf@Wjf*Ip`B;e{}GI z<)(G~u9JbyYbo9WwFv0jcIw-C;2S(K5)S3?X!dnNkChqY>V-2{M#y#j> zveNMUICP+$e-x9pmZ{cqLfZgi+~j(|h^|Qy+EHxkL^JKEQE_K~e$RK<>nuxm9eb+* z#W}se_v%SdUdq5u30k2gOjFu*za0623FvtrR{jVlfqE?Ea!P|FP% z&=Riu23yh6VHO<51(9%#NwsuOU~Kv1GH8euOW-W|T3WAO!Obg>+!x%&&l+e^d z0cku+k&;ZjijhvtiSltJpvj<-=m%%`hnIJ7ITKJN_6B~3`|ZNMY7~oR`UDCM4L3^M z$ixA_e`~(N*>lM+&fb0NcjkEaztG<(`5+N7|12uj`c9QWIi9at87Yy63?>Ve zgbT(~mE>RK-jdsISZp8j7A+&p>Tda$gG#N^Y}WHTu6fQF=rXY4q}K55rNKsT`E+9; zi|EI`eNDc=`IUwj92l5Vk9(=Tc=cc}JPzFze{sh${BY7Av~rz;;P#Zzg z(hkB0^hANE6LSqYDtuy5+G*h0MR;}!7#tJEi_!qtC*eB5QsFdJVX~sq{Br7j6sLtx ze{4VbE1k!O5*9%KZkXfz&k| zPwLgU&}=KB_fjvDOeUdcguYUe;O2E z1IQ7;NSW>f-T(LU0I-~NF-??GKcG~Xp`GYV%-#>0 z#l*B1csY(IxM2qtw1Q|Dui?ndlo0bkTHbAWW!C^{O^E}R4bd1+J*(VK!ZdIrkWogA zsghe}*}mUEPqD6zu`jx{imQate+j~M0~btF&h)s^G+a<$hR#{MnPc3G=#=Qr7TiT0 z7-SBXwh6M(_CVxyUqPrNDtZ&@AvE!%%W#pHa~%|>NiJaoG|%?k#mqDo=y@7p-i3^7 znv~Ff&Ug?z7I)F^l0<`A9ZnM+gsdf@<1b~nP%O|ZEcQ5ErK~An2AS>zfASZZ7x_f9 zUqUSgb{Z)%X^1dpzY;+iLjFj_^Gzv?+AYi5`8E_TYr30(Vy_u~nQDf?`*j1%xxmw4 z>{g(?wu~3b?a{KS)!_E4H0U>oPfvn0x7`KIga&m$u@+i$?eq`oi3D_j%T~b9O+(kG z)YgF9fLBv1A{85iH)mnpe+Ho};{elam~QxvsjoG*7c-*_{nUNC4j|f(H5@9YrFR-x zSO(3L;ObMfntex8E3!3I%;mHpjNscEh;SCd0Nedv!5VS zVZe1TYIkn|a~0`@YU`AkLeun`XO{{2uLKv`+i?&iL31IE%gy1Df5SsL&xgF4{zd7J zN`F@RYU%Gv|GD&Z=^0#Cu`jCB(%*PL2OFbslfwOUBR;`Mj{o0S7Abs zDbrzpD2L-In2*zWdMM)Kd1ir3Wj>zb8xApilYp!pNEIF^{E$#Xe;DICP0$mHQT#DF z2*w~*;VG3g0!nGzf5-KBVDoLw)6*^|kfU^*z+8>fVH8K0bdsZ}nL*z;)Zq1@Y!p9Kbwf-LpZaj@LF< zP?mYb2tcNIk(~lM)t$(7xy6Le=#A2FBv3GjYl^$#P>H5JQe~D(jkwPjk*?Ex`e<>rS2uX=V zt;SW?G0-*2yPX(A*KxE$#t3zAqYSmmv9R*S2!1fTO|1=6#SFi>fC&I}dzd*Gb0ySw zn@toMIQof`y;P2=KW6Ms0P`W!_OG%iwzI)D&;f|x1?qcNY~*2BmYeH4Ste{x7fxXI z;Dqi+e_bnZY|r9ZwsXGI%{Rn`ksD#>{5TspdQ0y{zAnpQ&kP*lZ&ujO`lh-bTi#_~ z38DW5EZ(ftgVBjp7Tai@xRhTy?zp7?>>pomZy(!ks}ItUd#c z`&(`NRCis7{SG|cZMaX1`LAt;nVVyS#_cM_K3Ls92i@H=}htR>W0g6RI$`+Av04?)8|nkH=Vr=WZh+Zh0dO!0<}rXi1!Kfc$9T(xzTK_8(Mv7ZFv9+K8UZ(dv$1!V}kaCR!TQ5JKWjgA&=ZBK6el*e^{y4 z?igi}4pwIMj+%ee2N>9$w2xfXMr@TivC!0VVrm1x(meorI);WK3oQCj1NdP$>2qd} z+aOn5H-ceM8+d7sjq5c-eK=irn#G+7ZDh3+WYH1 zDBYV%V!qB`t#r0@U+KN2kCr}NfBKGEhZf^bWg;(JD7YB_E_@nKFgXpxiGt<`({U;3 zxLABX1R!0cDn!F+A!-WWQ`%4Vtqn}NMADt^QYED3t|*n3hk?IKA^arl<+#FE(Q2aH zEaT}&Rh8o6D|J^qU$%;C0x)NDE(A#$E2oP`I`i$=fL;N*PmYj56t_r|e-4s;cYWcl zq!UafJue$lPtEB1$Y}zZ0I);E4oXL}4^mBUM^%{!)JRS&OpOi=oG)C4J!loT|5|7J`A?=q^?3pdf!50j6POK@G4KP%r$nY<~^Y;5;Az zW&~w}WisGSVfp6<3r_|ce=Xc|2P-t75mIW>sSEU-;O<+D1H6B)p6fp_j2Q{BWgJjG zKv%Kw9G!t8)0y5jTH)CZ8w%!YTTKVfnue2svgYpCEuSnW=MrXv&0n@bl?TxKtSS~X zR@+#Qp+H>B#B8UjX(lvc8xXqAWmaE`y5#w&H;lA-5EUm5o6VX*e`V}dLC5HN(!xM2 zn*M^tF7D7{06U7=i;khaqg)*2*oExJg%v`1IyCLPm5bdO$1PtmjVdGu!be0mFgA$<{j3H?F( zGI|$%6@3kTJ-tZZKz{;kvNzKE>09Z~(s$5z(TC{6^u6@`^k37D(2vqb=_lxK(BGtw z(ch+@rk|nzjy_JGq)*X*PtiXc57grK;beS>jNy22gp76we}*uIhg2LLtkWUf1dMb9 z6SBb$_6U$}uEHGoWPrIWxCdHPJQax*+Jh5Al>pF*Vz>%_2gv-OBa%H*gh)i*M(%*$ zZT#KtcqB@P?fq-GS5A)6tKOw3)(%t%Xk*eZtIg|@xU3NCU|gQ0a2i@xMhP%3BU4S% zAxI8v|6s%>e^@ZE9j59_0KfaSbO9chRVYow<6co{3g^b^9Ndymii+`mF#MsIL=_|R zOP%QDED>=z%As<6Fke=84-$gs2BQ=Q6rX_-0s5p3+;~Wi``E$W6eL4BL3xEjK@|uR zgb(2s+@KM9+!>8YJnE&xeh1n$@CcSCIx@}4I8Gv2f3$U&$Ua<)J=}3ej?h<(pI}dn z#__lx#bY@g4df(}>a!nprgDlOsl*%b&?8g0E$?@7PNwnZ7$4aj=0iFEp^gXep^8*T z`0Np~`90^bkXYsz+8=ua&lJaUu$2$@NVFxPW?X|a-GcXc6E4MjWK+T~_`<7~zThqo zBM8I(fBZyWsBao=jpON-y5Z8@lsrw9YeQKEMkuL@B@)sBfsr#!m(tKwZc~#n1Fo!6 z;)I4g17b_O3K+8YL5)8?caO|plzx+e1u^?3$_bES1aRo=VZm~Zkq>E<>a#Iaa8g5m z=pJSl9S1EL6Bz;ri_R!EY!s{TRZo!8fG;F`~9WYz9+20H84yp=#6a4xevW>;h{!fkm zrg#-tA!p>Rl)MHE-3Q+qqKSPZmf-vV{8>* ze}{AP>_gD3N2%6aq~vOqYfZ`9aa0m$9VrjUK};%!0#ViIYKs(g=z}fRFcI=Y_`#L0I1W(PsL7gNBx?JfM{pw>|4s3S4qF(GX|9pf5Rn8&pw_}0?ZASePB;qw zUR|40(A-CceNND+Z79&iTdV`;`3^30peGnRiO%|6t{OrfhY69h>!@@rO^}yhLa~&y zKgw*Jo)9LBoP7w?8~Y1Bb5S?%aFwg99pmIqoYoH_E#U3|Pe8E0KHB5(1l($TMlkVN zoPXwr#CuTR$^?f)%g|&VLkDN?msrp24GTbUI>7%o0X>j}Jq(Z&DTsDqWZnsd{naaf zRHI*4UXHq`GfeS&oN9Z@L-RD$_@3ibyN(jD;>q%C^(>GB6y9P?FYht7%$OZ|e-BT` z==k^XA@wA>2pR4~0&1%ufK7pO@#AoGBY(yWzP2#?!c90aH=Mgp5dk@KQcafn1iS>p zw)+Gg|J!1U)#v;0QF@sUE>pnw(!$GxI@IQbfD`+@v@nkm59xm`d1{Sfxm_Nj!9dkw zqXk%lm?AD<%R6qk(!Mt@i8 zC!ZBR_evGa9qM+9oPZ)S=#sElWisjwarp#hqC|o`dFtY+)4NBnIeAaMcsybVy7MPy^eKeAkXTPFVJJ+ijT8!C`VbbccXN{bSv}otAaiIbv~=-XdLg(0}x5c2G%g zTv|)Q@QN$rAAbEE=NZUnV=sv}T~x8GnGm)C=?(WgpDsak55R#e1ge{;Vf zZtkb{N!%f0wb)-R_-~_+Y>op$RNa`13s4}Y!%Dkd@tbnPoaXh-I{f{sfA!&wjn$0} z@~YV_caF#8gZ)F>Mm?Opet&c80(nzZBcEw+EChbOQs3C#sBgUQ$q#LO_6sk289li4 zo!<8Bqfzbbwc^9|@bY@WtLe?9YjKaoezBk^x$JLKd!DL*D-P*yv1?WuV}$lnoI!;X z=An@OJl7bX_&Vbr?ipr!V!<;4)Ax@qXG}ELhkYYAJl~ED)4-Jt>E>Y#_t!NO0~FLV4&y}HF~~HTdAcubo^&%IIvu^GyPR5ysdEbY$XLLr zOP+a#&JE6-Uez^xBal%!*$pj6<6PD*&yxf`SuFKSJEfDQA401RV;c>OCyf=v%ge?7 zfGWqfJVG0;o%Z8!zJI^iF2zI+6~3PD=?zvJaIRvi72Fv^6@s(BL)2=B27wyJw80)^ zx?g^En0)hnf+Y_7(@>Y0CJCv&`qe97R1c4H-aUE#`G+_^KFo};yVvXOo!;wq_q?v* z*k%{kCN1ffr7yt&$fPw8rw=l5UK3&?310QgUxB%xamNa1wSQ)^hwr|7wu+mMog1w` zZ|d}}-s+6bxq@tWuQ;{0NP2sxb{Ah`m5o(t*mBwOtYryCj;{%iT^g&G(fdmhxHSc- z(g%7`d+xNyJjV@q#=}&7CbC`pR=;>24=?`dBjoO9zPz-2?vX#Z;oKu27JEy}t4lY0 zclPn+WqSX2SAUnE`J>mq_K``#iVrez3nspmxP=XPRu_10J2x@^SRdL=YAZoP}1 zw^!Pu$-)79_Qjm^?9RgSax3>{f6=+@r#r-C>E}wni+|pOZh5qy4Fr%s%2hg7lrI(cMF1-o&_YC(_rIgD}B}Eo02@KsL0 zm7Jt9pF8Sw7tT$KC^~>Opnuc>d@~;wq5fhYsSqqn^f`};wKT=9JzoR@u6B%Mm49ko zpL;yebgspKi7d^uRmz7j(sdw!&aqAw3TZN~3CVo6*lsSs7ffd_a0Uq3lUAisE@!5& z%SfU;(axB`kJT21U>4IPEA#s7(}dKj7%Mk*&50ib@M+*8I)ukSm89<25^AwSjh^XQ zD;8U6be5x-88R?@Cu;W?^yGBmevk;f|>)iGY&EC)5jzIsu0p_mM&5QiB4Km(e zpn}fyzS_rME%PdJJ3uh)?`pm;4VxGd%vJIQhJHW^prd_1S5BQ5F_ehXX@AsHbfJi1 zG`+lkBAx?a_<;>*co{QXtu!!PW7tUjo(Rp32}nk(RwK`%wn?ZTEk+CN{#qiuMEdns zXiL|#U1jjngwk-_2jE8XxhEu_NL zBlojvLs8y-$-zY~1WYdOr+=)4)pWH|Hat-uRhBAE&+t>PIyu}3wuko1qnh8z?4`3; zcXd;~I?Mx=CucIZl75$?dKaK zhL@#U>9pE0dE71|qj!;IP*ash`(RLQ$JAH(-SZt2i+#|P*E<~~xPNm~M};^rypnX` zVw~W$QIXM|8)Ei}pp$M>t?eAldaIN!J;nRD5uadAB?x?~r7{rJl(JTJX&J+1vbFG}w$eW>*7#SWCp@t*E)VKx^F z$}^9`W`DccIRH+R{T&eS!Ev!GKQ6RN3NvJc&cV5cj3c~jopzMs#g$z`~_Clg%yKgG1}6a@5yyq#B*P=6REhy+sr4I)dXm>yS# zVbCe2Juu?54r#n!uGrb$`q+U}Yc1E8YFReS1Zb%vi#cjP?SJ<5EpU=m<(+lTx%Zs= zzPIYuty|Sy-PKjqb*o>~k9y9~Gu<#SFfhZ6z$hpR!5^r>$BNI5h6IpkBq}B-Ml-HI zAMvr#teTjJ5`QqPBxKD>%*JdYyCz25n4g<$HepxAALV}kbE|t$lkJ&$-Pd`2=X;#< zeg996R(F<<*Wj)Ory4^9E@tY+nk)v6Xb}NYFr7iz#Qy1ah8mTz?vJuXf;~;}^|&QWY(CWpQ?4 zV4J`nLtHkG?a(3ZVSV#r%QJx-;hN^$foD6R$xLZ5$1o%x&60ZH6|GaQXR6o=WNjhz zWJ0{lin9g`1`|i4m(pOC1pMt{_&*w!c%^CCR26&5r@EqCkOc>^BHf{x_^df>e&g|P zvfCy<&wr0iev4hse)jcu{mS>w{I}v&g}rA_aq>bs*xTJ@wQaV1nC)&qa(HKZn=Fd$2e%9R{?5O_zd*HZ z6wWJLU3hlk{e=$|K2i8o;d6yA6dtB>4>3g~rhm7a(pK&!ya#OE9%bV^v;a%LQ^fZ? zs9=X>ok1VmRBut{cq!>Q8`0d-=AXtBhKGr&Xz$`=7_i1Z6dGm)9FTc0k0r(A*;91! zh9`8gUb?SLY#w6gehiMVq&(bAh9myRCtRx-7j37ps6COKx%SrLykqF7wf5hbcD+?A z&VLCrT6dUBqi8V|1=WbpP3m;{T(Q=w2c94Duo^~^S(d?FZm+X9Uku_At!DA$Np8WJ zB3ieh_>l@Fl*gu;jZ*Eph#&0|=;-nZjx<_Dv0qj5PTuWA#$4wm38M<*YO_ zvskOu8UNJ7rZ1&$2HUN+PpYG$|0O?;T7TPbHtc%EgePaTG4@ZRE-Yx5%ARarMv5#I zQ6WKHEJ?3iY6qmcx%_l6+W6uZ;n7PRjhi7>l?zp5& z0l){s^E+&&?njHn^pr_L-ZPDp;fS%DQPss7DHHm02J2VcVvL=$SqkFrLP@V=6o2A= zgTbL93ppS~hh2^6S)|wBe4pLKe(!!Rp3lDj;0s>x;F&AwPrU7co1SFG^B;Wj1$VsQ z!&gn*EB9m!6IS5>X_Ge<{tY6*^?rhOM%R(b{oWBB+_IBjN(x(kDZlw&yObN<=0PWG)OMCPEfK+?Y^iPg!ttf=+OGfd z=A!t#6Go+ghu`Wp57|F{DG9c~)R*3}aPCs-E??WFPx0?*Y==XIlQg?;q<@}!ec{a{ zo!(dY_l3{q5vD%^20h1`xf+#c%>t6waEy?8nt@|X$8P?edS;j)<5*hmZ}rfBLyg2K zmG+9z=G&k<%-Y>{1;+vIQfXk-W7HjLPYUd>46?!ID$|c6?QJOalgHB%#)GalUjZ_Z z3~63dX;e~wH0bvE59_{_A`LS3*@6+7 zbSYKkA*yK%Gr$w}R~QURNk_!HMJ%bRqy)+#CI&D1ac${uFIq-_aTA zz@_m%&Qv8e;k}?$shpDOQRbefPQKouOWIoknMOS43%^*Aqkk`PTa%n_ovL)mTI-C7 zl*jsL#y=_N({#4Hm;ysGtZ&XSnZ>nQnO7oGqOs-9lv=IVYNeEvmR^0KkLR$BOs>4wU;i4;Y+V7S9Nnd&Ma)5Z=whjbVjzcaS$2OE`2R14W{UQFW|dtR*> z%+!imGWl4qPJb$XX`$vflV?Z1dirYpds8z!m6*cTrlSdewbEVO!mJ=_vN()jf z{(@gi%RL+3s;s;c!*x(8N7ab%{S(J!O{(bChE=rSjM_P9O#U~$sc+J8Usl;&!aQ&GMUzP2ci~ zJ{k9Wb;ILxTaKU(nekmWsFfqETvmG(?|3mScB7)J?ydKP=ryDt+QpS9EZH4XaaPL` zr)b%6J+6fdCe6G?v7SW4JtMm+E1B*5wRG!#T24!3tk`8$%jB_Qsi?xO%1lHWrBJ3V zJ;!B3tAB2(s{g|ReY)`h71WDEb@-@Le*RJ0pX>V_pVX15@8F|k(;Nd*aVID8sb5yU z{+8)15V@Yxn?}_SbqtMk5~E>y3?Zo!Z0_^>&d?O4hNVss2!Fm^ zBn`Fd8zhrSYw>|shrkUN&dHLPSTmhj^MJ45&tk)a6(L!Q(;*zqI zX(Gjq#zKCj#IU)yoQhGLC9kG-G$8T&i-eI(D}Wj@C< z_=}|d9gdh+5@n)bP)}BmwTABbs%T{y`_Dv+pVDv(+$yG!)(|cKSGZ+%a(eYuvikvUU_ICLWYjB-*Q$wTb>q$qz-UoGEr3V+XN@C{A zV|mC%I|oS6i^=JEI<|2*=xytCckB6b%5>cZ3o+;gJ#$#QmB$|r))@kir;a#CM@L#2 z0zxV|o;vQwc2j@Qp>mX7k!wRSY=1DS(lCX$Mh}h9=%kgY9@vs>4>Yf{x2qZFM_>$3 zW1RVi$EzvLrlP2WL4(O?Y&nSwiX=#8_cB*)Vh>HV&7r z46Cs;r(y%)9Jcg5EZ$)i520KFZXL+TW_ZHokzEnCK&-8aum*)d5Bgsr^M7)`LJcyY zg$Apl`XKs%^9tN79Z46OW~~A>q>c@FTN-w3>OFtMY+7cn3nd)pn)V7%zrI}V8BsORInBz zNdRFn++=mfpmCs|WYSS*)JSOgHc1qPL9HWbUG;h>e}MkHb@bXNi@lm=3kGBx?Suu@raNUAO| zu|w?GBMMW?&`?2s#Hp7f!?ypnME$9AxiKC!I-K9L3U5myvQX#|@+SX;PuH2HHI@c9sZHR4S9Y#;sscC$d|9R)&Fv;6lBv4`;rX#NP0uGOMbvBd+n81#G>g(SFulpfOW^(Dk!kOjf~1BF zzi~t?fu@Th`+r_JR$vC zXJuS>V$ZG=EsptPtjyQ!M0w%z@f(iqsD@me@yg@u)PE|FvY3u_S=d@_EN)uX;{1U# z&)lflJ}GZCZ=398&)--gGJMm@e9`1l*iHbH_a!%NEw3%Enuan;D@~`YEYAjx2X|)Y zYhkojSzOs|Rgs=K9A)P(R7=XJ`aQ2-7~;bM992lLG!Y5XZw7f5Fx^emhj8VD*l1Rg=>?-y95DIh#^p3& zw|0K!{UKt3j%kqtYc;#*N17PG52P ziIYn0e=-@-*QKU`?+o4G}%kvi}&HEznAiX zwe^p4X?k-Eo;(a+@ek7E3`isL4_@0NOZoVEd!yQ&H$vnR4d!L97Hvn%hvtQxy?OTd zPSN%zze!RdJ{~uF)#WC!28*VCy4XAxT(RVqg#QL10v(7>_rF1ShN(>D5K~bfeuH$8 zV}F#!ib{V2T$P=YB$4u_H^2xtm0@Yfi8o*|*|A-^)ZE+q0k%o6unRL; zX>8b}3))G(mX(=5a>2R7`_E!8o5?uO`gr@e=PWHb9LdnxV2T=#r3Ia?lgg*b2_a~k0 zZFckI-p3zj8#vymDIjkp zIAWY{umCj(`>e~Bxcax*3c;1TS*w@Mpt zzvSd!$XFhpS!HYbj-_Hr1l_=zyqp=VRS6CHCD^rIZM94mO=q=yaHSNx<$r6+&GYx? z_UFV2UFQq+>SneFjIATJ=l54E0IH>3i~wMhjx=&jTW5LGhqkrPH63D494%TRXu^gz zR$GIc`y0zPsbb}(MZ!O3)N`r>pbF=H1W^u3Fvb^%k+milnUsIB#XIf}ioqRr2I{wKnw9c=mPvR;E1!}Z(WC4CU+!J?7Nk-T9=`%0vEx11Co>ep* z(%uZ!*gA4iGVMamPTgJu~i`t zu-@8l!56d-KST`y544ziJ!@n?`>G4O71y=fowfG-u~LI)kIw&PG4X1f16!61(cX&f zNJgd1NSu-#ksNLAj6{t6p`=u5Y6^7|XM?3T&h{LaRu>CAx>XO`OQH%{(8r^BrjfTusmhSTM{%3fZAX(EE5 z2E3s2=<0cqPQ%x95U6&^$%i1{jn@{2PW`~A>l}54b(?cKGgdS5f3Uv(e$c$$xzJ14 z8m=gh@D$wvTZ8W7k=5+QFqtaSE_;p0>-kxw<~58uS*FO9qf||1Mr0hzxPf#P4(Y&T zNME?6BD10c*D_lOlV*9T6vU)9O^~I(ue{IY6xJ^c+N!nb^c3QSrtt@!Uh)q|Pl=YxtnH8#+CrCwPX7{|6 z6&X8;6P0N6q}Mwh&WEFQQ72=`6B`GeO6b4`ZI!HFtRh%ssLIHUjNY{ZAn6W#-?(Sa z(9pZJlB`RoW<;i}`=rC}`X^UhE{jeUx73bd2Zn`-!sbLaT7R@Jh(pey6Ka_=b|&1dlUpHTS!1)z7Ef zHjDFvbBs( zf#fH8f+my~-4Kav*|{YOOmV?M+Xp@g~IF^0Xhe>G;_aK^Da`??f-dy+y{xGZ1i z1%PK+gLXA@*Pd}PDd&!TWMjh7uac+dCZgZBGl*-+si`r=6=P3)x^qy8jSgAZllN_G zuV)o@o$U+PoqWJ^#0f$CV$~(~yu8~4VurE}5j7f}*jw<9lNc8MdRzLFv)Lh2oOgiT zuyjyOfByEiy}EFF;a!Cf6+T<|FNN`TqS;1yj8qI{Hi!B-Y-5PJ}!P++$a7({H6H1_@;Q$m^WI+vT=!Vx$#rR z%Zyu%+l@CGZ#6z)e9HJ8<8#Iz7>^l$WqiwY&2{sXdB(iP{AKe!<|oWgnO`)&Y<|`J ze}?%j^B*OdXmUX=%4K$U)x2un;2h|^{uc^OM|5yFMnz1_8ignn!(7M#R(z@Pyk@afp zR_jjd-PQ-J->^PyJz#yw`V;HVt*={;e_MZN{e$&A>xZ^!d-e>mq=WX3eVKiQ{T%xy z`^EMx_G|3h>^ItX+4tD*wLfm(Z~tfetM)hSZ`*%w{~!AYj*;UwZMBCA+x$tprM5kh|V?fZwH*!^pdE5tl9dSV&^Bp1#mf2!QC zjCGaXUxQx@mn3{!^rI2^29>cM=1NI=W5M{nWx@B80&5ee@*qYO-53sd}e+_B0$|LxX z&erd6_uSkXV+#sTq^G6h0o0+Sq7ZjaTnPT=Egkzh1;m0&BIu;7+6ZLFJ)?2Am#B7s z4D*FvT{tr!Bm5vs2U%a05p9)b)Ew+OjHtXkq8?$#bpPfNI@*@mC>^C+I7L~O<)R^>0#65G+K$@jZoya}UH9z!jjCcQzJEatn>_ zANP^)gR0k0GX=(-0a_qyH!@hLA#&OfKtUqf0$q>x4TJFU`+F} zO+AM(r55UOh3h{u^^CH9(x;ZIE)oV|nv|)l$hPfLPY+1@%@-g0x!QzDt<%I}3AdF= zP*0b-NVjxrK;wnoC_Ng9zAb>=BV{Z77 zoa?m`GRTR%Fb{B17ama+8dJT`4bz}c&o8H70W<^JhqCOpO%Xjnq3{CJBB9nzy|)Oy5gcpphNuEl08^s64WLp$q_Zc6f(l$2gyc7cbBf&h-x8xnm%ytRQL0ZFqpA{vn!xeFsr zgEk3M8ZaUdy&R6bi+Bb#Ce!*%s!&g=W}Aq8yiFzv@1wKQK3E2ZR1*!&$^>Z+h^otJ ze@oM9e^VzgMD9YU7RZ&>2kWF#^&IZ@iTH?5Y*CkPX%iaFL2@P#0WgoLw(yM@5@`U< zi0BrCoycylkNS{S2hZlMo`&C2Lw-Bsmb*|2e1WweKd=mGnuc5wGKyFf8QhitJ`v1{ zxFJ@UApxxCgc_&M^Mz@fmW32qSg(5_e>P2@WtgsEnl~UG{6);*rfu225nxl6S#+C= zEoE-mQpbeb5@F#6+=R(&GO(t?eE63$Q`&91!ix}_k9;u5>uKe&+jxr5$1LvnbfV5R zm?M?T420GrejwniNG17*38za8mjiN8Dmns)PB}TKLYMJ!jxB%ypYw1T{c!0)c!1ET6;cG7Ix?P_hCYfd zb(z-PQy&t&#X>j(t`hHWNHgsLy%h*}=+Zrhsg{ZwK zdSOJ2-9?ugQAt_eA?=!}|LbQx$d*b+ElKU1}~M9Y%~*igZFZu#Bo1 z#&a3_0%PxHobJ=E9y&Q28bhT%h>FqMM_314t}zAlZF*r#kMk610G%Tqf8zNmmP2!V zg$zk{FXu~m$`X4g9eZHfQNO3_Os_iuw49TO?gSwM`Z$WxzN9gXHN;1bKlo|gOB~cI zSl-WY55O=Xj!&YXdl-9b-fU2jex{~;YSuCOa)j%hXH!>SnBrZW?+u>D2Nk+FdZSu= zmXQXkLk^h^e$*f4bUZPGOEZryY7IQ!W`4+S82>9cez-7cNHF|7;F$X*H!kqR#RoX#j z8Y7PfplZWy9}}KR_zTmfi{u}G2z8~n24MamW1j>xC&PtIL#E9te?4QZl)l@N{{}i7 zmHsmOHZdw4@42KY8{-BV{VZCjG`a)7PdAQ^8q}3dGLP5hta zdf>HN3zdHP9zW3(%&AW>X5yZIcwTu~(t00*JbXP__Xd zF`{={Lk4>>e@PWU{F;g2tu}Ls4n5`A?}anZFHuVj#U0x)QzXq);sHHRIrBYCF>2F2 zHU!067;9oyJR3g8dcJiuW)54?04G!}5FXvKiAtjG^el4=(v157`dS%k7vp6rY^G6H zid6wwEzN{Z!BM&;kSGtHSwxgBX0>U07#hbEb1b5!G8zj&NR2899+!ay0XG?0Mw1joK#jNOigqcaO3{q&FB6GsN|2rxm%)48#Iqwk z7Y&;`fAkDPa{|SSb7}!I*e|<*@Guh`VHJ(AWYd(TOByp(&#-cGSAG~6F|e*NT@_az z_eAI`WI-h&CMp6U3tRV%3rrwyPWk%E(z}wEmCb5l zoRZz4F5>fRR?u|-V{JR3Eu%o10=Tt?g&1Mmc1#O2WTODdQUgku7I!Y`7iOSLSrs5e z(xrSaYDQL(MOG)XLSh&zDo{%j8C3y@Tq8nqLL@BU0g;@*3{y5BL@&uYbf*V@INs9S ze~oSq!%IkX7<&FoQa4*Nbf|$AjW1mEsN<{jlh}y_sS2IX%m9i8V!2F5Yg+KEWd1y0 zHN(J}Z($fbj1aUo!vQlQ&aQ}vLXO=@!&M$}RB#ijv;!Yc;aCYb0!szNnCYpIG!`VK z0slbFiG#A3%A!!vT;xDtfWX6wPQF#Rng*-(MZ?FeL!Wni!dvPUd%Wl?W( zjcN_e848DX{lyl#3o&46=}sIM@SXG^;!td%Y`H}m;IdW-FqLeD3|mkGf3@jBs-|*H ztx5QEvd5f@@sBmXhgEuxDtrNFEeWDODx3K~uipmL1n z20Sbgj^QG^3ud|0^O|NLfAvP-KJ&GeUfJa)P zFSQv1-x-F6fERIXC2-h9@C?_P6tzugq6baQ)>&KvjIKq}+R{i2M4wb<5E55Gk3v#H z!A150>Q~Q1T4)YFPjl2`mS=_V2SOGWqFSyaMD<`9=y_9P55RU(f6zBg#{*?nEk@1P zj*+I}5Q{JZsIWjLz`asyO&YEaV`gfva!{c*50Um108P-OAyk>ZkW^d4W3s4g<}mc9 z3GhG|yA8Gg6V-xB&U1Y&*Od3{hrOTq8#ksV1~hcnsZKA-f!9MzQ87Lehvsby&|9Pu z2~!(oP~S)bQ}akvf63f}1o1Jw0-zs`0A3K721eILsFpu`Pkpwba%!|TZS?;5-_&&9Ne0U+YB5&r%`Ee=RIl8=IoT%9If5jGQaIc*_#C8rH`nnrg zNcbY+`rPV9z20ta24yF#R!V`Crd1kmRl8n&p)*{7i5&0cM}0!{3)_Xu3pW&AS$H${ z-}b=^LN;~S$wR{DIRZ|!XG(A1OKm?au%G97q7!>DQRo2enmxt6&Nq~GGT_`5dAP%L zl1Lmu+7u0yFg=A&NchZB7S56oAyV;VX(_d$IbQ%xlB?PF40obZvk34U?yqJWo$U21 z!A!P#x|8m97=JNsrvp%wTZxR#k~?dPB#3P9YH5;uife%z1eR9%`8Brkt4Zp((ox|| zXu=1M)YPICRP1u>d$xycKxW_#x=q6jHg4Ova(;;_bnS^&>=@OxEiZOLG8u#T#DRI+ zP|7J~jkZG)*ghUwbi1%Ctx8z-i|LJy7ob_Iv0IX)3xD{ef!WTUUrZ>1LR^>!O5dK7 zpzcZS`7Mh5UABq*kpuR`$vd(xXD4@$o;rDZC*$n$-3$JMcuI(mUc(=|{DKQlo%p%M z44;?%{9?u)nf&_4#4QK8u~*Ko2`|r)$>O%^wwo?%ld62p`_7y=afaRS&_lPg3+dnY zSow}SCV!t~&v@!9eB(zjLF_`cuuxdcy*b-DiKXbLWBgZbEDE>jd%N4F&$jA6#(Q5| zTJIjp>iEkxnsw86n*ZtG#)`9HuROyErfD71Za1Ag@)G*H|8+Avt^4oa*tqxNeSd`= z{>g$@C{xJ=)>ZAj@_?DzN9wRHy|EAP?(CjAx_`E_yR&xmG;?mf{PO5|(do}r8&!7b z$tT%sAEUp?o7rn8Z+_nM&c5X>dp>+j9QX-r2IN^)!*N6efYt%XKQEAe(b$x&$1JDzxwCNTp(tlHb zk}u!+cBxA0qAhB3b~`Fwb|HH*cwU8c2CL|;t8puG4R;O*3V*9g-ijJ`l7Lq)i2NDT zIuhvQH%CbhS=yW;CAz#Fc`-ZRbzf7J2kK>jlq6&lKougcZMFV%u5w_m2xD$EyIHkh zNMKEh&5Iqf*ouuhDZaL-)~vbq?0@B3^VaP%C*rVfs0C7WndOFVrq&mdAl3$fd~xcN zOb;D8Sl4k+)TAI)4YpEDLzkXzw!@j9f@I}#ICG$=H8jP2w%e{&dJC`@ZA%$}C`JL5 zdb||Y*rlf7ixQ~>roZA^9x;fRlpRx4p!<~kP3urbjIy-lIf-dKGjz&FvVWa!6{=)! zc72YzK=RNP?)6OUEY%z=@$r%*jZ>uac8Br39L-|=oDbME_wJB&iarya?)^WcKccuR zC%?(AV)Vwp+Wsz^{ciiKtg}MP48yIu___63Gr}usZ@)6Mum2MFXjFZH@>; z#%mGOyQAN^@6)gdK6BsiKtrPM`R`BXzwcxGTSSp}Ug3lXbHpf8;N>LL;Q0;^>xWtk zwgr2!SbLpULp+bxx|}7)>-oYL*NI3Y{N6Y;E2bzfZ`Me##;0QFrq^r;zn5-6la{wK zHrYN%ZJXn)-U4VAJ%44Pu45hRnf|>&bhwA5b3n`$HVelKcN2enSK-$R?<;%|sIdqE zSY-(YPhqTz(|nnE)=n|*!()%gYwF?mo8KK?`$|p?1-42 zBx1n+!7{S~9|ljuB5u;YA^+nKPp&3?H`>AEw?#g9(6j%TZpLB|**O?ezU>ps$%Zlg ztI(^nP5pjNMSt!b)u|MRYovQ$ge{fiIuS3mQ59e}SIpP|_O#2Rg?WUK3U+ijoP1z7 zyk|JPZ8*GlINXng_yT{R;1}w^?qpCOReK%6Cu4b1c0Db6I@J_>#z(yh+j!~q&$(G# zA=a)w@8AW3`BymcrRT}W;MZUN-1js$8oasDo`WChu({kLvOm(<5vNi&_YKPx;@*h8*2*`$)J!UU8n~kASt%#uFODiS21Ski zU;uVeHGek991R@gPO=eeNH$`149ng~Xv&kJWwmFmk`sou0<_`qNwUYj8 z8_n8WX3Q57J^!yGnelW@?HnfMHd$sD7A`5AD4Z@_Rk&JXpAqOaG;~q6uoSKxCWhwSQrEN{VUoM+Re(Z0! z^Amq}as?3m;T)N?)a8}rXi_=B!xD=_9>%Qnd0Xz`7NcznsDe()D}xYk$ zKqT{J21W){&;80oMT{MU|@bhIcC{Fx;kR@kgAqae-N^Znr@+&zbLU6qy`oM z*64ellYD?Ve@+Z;4E_zA4cHC#4n7XD4(JaM4>k{i52O#g5B3o}5mph%5=;{86*d+^ z7Kj%%7$_LB82}l&8Xg*68nhbF8tfZx8}J+=9G)Eh9l#(+Ae874nB}R>_2=zqCfmVU_k6aR6*=QhC--AibJkMNJO|&!T1 zWK^J3&Q%mvj8?K&rdWbl!dY@zrdm({0C=2ZU}Rum=;C5!IL`nAOhC*9gbWP-!F&b) zD)It`ony!8z4vU2(|hmT>2-r(Bq1TdfVMcjC(b_|)_eXf zeBTTsfoA5-dz$P`c562I|8)*~V91c8K#3{#F~b24aSRvXI8NYVoWv!#6qn(0T!AZb z6|TlLxE9ypdfb2;aT9LFEw~l8;db1CJ8>88#yz+fbAQ~2`|$uC#3?+4hw%s=#bbCJ zPvA*Bg{Schp2c%`9xvcUyo8qlxdKN0@d{qWYj_=R;7z=RxA6|%#d~-kAK)}T#7FoT zpWst`hR^W@zQkAf8sA`nZ^2PPK!Q-CK?{WrJv0UwSU8-4M?l1gC01BtgR}S!-{S}T zh@bE?e!;K!4ZnZm5B!P0@HhU!Is7}p>6|;KspP(qc4Zh3L(WI3Y+mt-bY9sNc~%8o zig{?ccMzH2Jx#Z6;aYc6v?ThhqB(mEo;71Da*80 zo+=)w+y=E>7j^2Ld{$c%S)*c+tR1Vp#0wPps%-m_wY1LKm=0BAtS5P(v>rqBJmJaH+#1T1scoJBE0J|vQgTZ^ z+qxaBvLn+g6Y@@(j%Qu4ChtbAc;0hA@S?Xdfi1NXWC9ghof(y!X|<%?_t};)rbj*< z63eyHlmg#x1(FYZNrny5PKVSKPgGA0t>)WH%(#EyAlc%m@u?Y2H;O*wRwS^wl{|9h zWSu$kdf&A++R$3Zl8k0jznZ`Yzj9zN3n35*d`FWX?o%!7T%_@xXh2$ zCb102|ji#** zifvvrhBAy*x?&k9rt6B3r|%B786g=N}I)%YG!fcE=+HkYUWEN$+G20*(&{0 wY{g@_qRJ)q*{VsgGHIM4TUjsJS_ifsbhhE%u+5;^S>+~^{{Smja)AH<0C%Jmv;Y7A diff --git a/extensions/theme-seti/icons/vs-seti-icon-theme.json b/extensions/theme-seti/icons/vs-seti-icon-theme.json index 4aec2074092..2b5d276a515 100644 --- a/extensions/theme-seti/icons/vs-seti-icon-theme.json +++ b/extensions/theme-seti/icons/vs-seti-icon-theme.json @@ -206,6 +206,14 @@ "fontCharacter": "\\E017", "fontColor": "#a074c4" }, + "_cpp_2_light": { + "fontCharacter": "\\E017", + "fontColor": "#b7b73b" + }, + "_cpp_2": { + "fontCharacter": "\\E017", + "fontColor": "#cbcb41" + }, "_crystal_light": { "fontCharacter": "\\E018", "fontColor": "#bfc2c1" @@ -246,999 +254,1103 @@ "fontCharacter": "\\E01C", "fontColor": "#cc3e44" }, - "_db_light": { + "_dart_light": { "fontCharacter": "\\E01D", + "fontColor": "#498ba7" + }, + "_dart": { + "fontCharacter": "\\E01D", + "fontColor": "#519aba" + }, + "_db_light": { + "fontCharacter": "\\E01E", "fontColor": "#dd4b78" }, "_db": { - "fontCharacter": "\\E01D", + "fontCharacter": "\\E01E", "fontColor": "#f55385" }, "_default_light": { - "fontCharacter": "\\E01E", + "fontCharacter": "\\E01F", "fontColor": "#bfc2c1" }, "_default": { - "fontCharacter": "\\E01E", + "fontCharacter": "\\E01F", "fontColor": "#d4d7d6" }, "_docker_light": { - "fontCharacter": "\\E020", + "fontCharacter": "\\E021", "fontColor": "#498ba7" }, "_docker": { - "fontCharacter": "\\E020", + "fontCharacter": "\\E021", "fontColor": "#519aba" }, "_docker_1_light": { - "fontCharacter": "\\E020", + "fontCharacter": "\\E021", "fontColor": "#455155" }, "_docker_1": { - "fontCharacter": "\\E020", + "fontCharacter": "\\E021", "fontColor": "#4d5a5e" }, "_docker_2_light": { - "fontCharacter": "\\E020", + "fontCharacter": "\\E021", "fontColor": "#7fae42" }, "_docker_2": { - "fontCharacter": "\\E020", + "fontCharacter": "\\E021", "fontColor": "#8dc149" }, "_docker_3_light": { - "fontCharacter": "\\E020", + "fontCharacter": "\\E021", "fontColor": "#dd4b78" }, "_docker_3": { - "fontCharacter": "\\E020", + "fontCharacter": "\\E021", "fontColor": "#f55385" }, "_ejs_light": { - "fontCharacter": "\\E022", + "fontCharacter": "\\E023", "fontColor": "#b7b73b" }, "_ejs": { - "fontCharacter": "\\E022", + "fontCharacter": "\\E023", "fontColor": "#cbcb41" }, "_elixir_light": { - "fontCharacter": "\\E023", + "fontCharacter": "\\E024", "fontColor": "#9068b0" }, "_elixir": { - "fontCharacter": "\\E023", + "fontCharacter": "\\E024", "fontColor": "#a074c4" }, "_elixir_script_light": { - "fontCharacter": "\\E024", + "fontCharacter": "\\E025", "fontColor": "#9068b0" }, "_elixir_script": { - "fontCharacter": "\\E024", + "fontCharacter": "\\E025", "fontColor": "#a074c4" }, "_elm_light": { - "fontCharacter": "\\E025", + "fontCharacter": "\\E026", "fontColor": "#498ba7" }, "_elm": { - "fontCharacter": "\\E025", + "fontCharacter": "\\E026", "fontColor": "#519aba" }, "_eslint_light": { - "fontCharacter": "\\E027", + "fontCharacter": "\\E028", "fontColor": "#9068b0" }, "_eslint": { - "fontCharacter": "\\E027", + "fontCharacter": "\\E028", "fontColor": "#a074c4" }, "_eslint_1_light": { - "fontCharacter": "\\E027", + "fontCharacter": "\\E028", "fontColor": "#455155" }, "_eslint_1": { - "fontCharacter": "\\E027", + "fontCharacter": "\\E028", "fontColor": "#4d5a5e" }, "_ethereum_light": { - "fontCharacter": "\\E028", + "fontCharacter": "\\E029", "fontColor": "#498ba7" }, "_ethereum": { - "fontCharacter": "\\E028", + "fontCharacter": "\\E029", "fontColor": "#519aba" }, "_f-sharp_light": { - "fontCharacter": "\\E029", + "fontCharacter": "\\E02A", "fontColor": "#498ba7" }, "_f-sharp": { - "fontCharacter": "\\E029", + "fontCharacter": "\\E02A", "fontColor": "#519aba" }, "_favicon_light": { - "fontCharacter": "\\E02A", + "fontCharacter": "\\E02B", "fontColor": "#b7b73b" }, "_favicon": { - "fontCharacter": "\\E02A", + "fontCharacter": "\\E02B", "fontColor": "#cbcb41" }, "_firebase_light": { - "fontCharacter": "\\E02B", + "fontCharacter": "\\E02C", "fontColor": "#cc6d2e" }, "_firebase": { - "fontCharacter": "\\E02B", + "fontCharacter": "\\E02C", "fontColor": "#e37933" }, "_firefox_light": { - "fontCharacter": "\\E02C", + "fontCharacter": "\\E02D", "fontColor": "#cc6d2e" }, "_firefox": { - "fontCharacter": "\\E02C", + "fontCharacter": "\\E02D", "fontColor": "#e37933" }, "_font_light": { - "fontCharacter": "\\E02E", + "fontCharacter": "\\E02F", "fontColor": "#b8383d" }, "_font": { - "fontCharacter": "\\E02E", + "fontCharacter": "\\E02F", "fontColor": "#cc3e44" }, "_git_light": { - "fontCharacter": "\\E02F", + "fontCharacter": "\\E030", "fontColor": "#3b4b52" }, "_git": { - "fontCharacter": "\\E02F", + "fontCharacter": "\\E030", "fontColor": "#41535b" }, "_go_light": { - "fontCharacter": "\\E033", + "fontCharacter": "\\E034", "fontColor": "#498ba7" }, "_go": { - "fontCharacter": "\\E033", + "fontCharacter": "\\E034", "fontColor": "#519aba" }, "_go2_light": { - "fontCharacter": "\\E034", + "fontCharacter": "\\E035", "fontColor": "#498ba7" }, "_go2": { - "fontCharacter": "\\E034", + "fontCharacter": "\\E035", "fontColor": "#519aba" }, "_gradle_light": { - "fontCharacter": "\\E035", + "fontCharacter": "\\E036", "fontColor": "#7fae42" }, "_gradle": { - "fontCharacter": "\\E035", + "fontCharacter": "\\E036", "fontColor": "#8dc149" }, "_grails_light": { - "fontCharacter": "\\E036", + "fontCharacter": "\\E037", "fontColor": "#7fae42" }, "_grails": { - "fontCharacter": "\\E036", + "fontCharacter": "\\E037", "fontColor": "#8dc149" }, + "_graphql_light": { + "fontCharacter": "\\E038", + "fontColor": "#dd4b78" + }, + "_graphql": { + "fontCharacter": "\\E038", + "fontColor": "#f55385" + }, "_grunt_light": { - "fontCharacter": "\\E037", + "fontCharacter": "\\E039", "fontColor": "#cc6d2e" }, "_grunt": { - "fontCharacter": "\\E037", + "fontCharacter": "\\E039", "fontColor": "#e37933" }, "_gulp_light": { - "fontCharacter": "\\E038", + "fontCharacter": "\\E03A", "fontColor": "#b8383d" }, "_gulp": { - "fontCharacter": "\\E038", + "fontCharacter": "\\E03A", "fontColor": "#cc3e44" }, "_haml_light": { - "fontCharacter": "\\E03A", + "fontCharacter": "\\E03C", "fontColor": "#b8383d" }, "_haml": { - "fontCharacter": "\\E03A", + "fontCharacter": "\\E03C", "fontColor": "#cc3e44" }, + "_happenings_light": { + "fontCharacter": "\\E03D", + "fontColor": "#498ba7" + }, + "_happenings": { + "fontCharacter": "\\E03D", + "fontColor": "#519aba" + }, "_haskell_light": { - "fontCharacter": "\\E03B", + "fontCharacter": "\\E03E", "fontColor": "#9068b0" }, "_haskell": { - "fontCharacter": "\\E03B", + "fontCharacter": "\\E03E", "fontColor": "#a074c4" }, "_haxe_light": { - "fontCharacter": "\\E03C", + "fontCharacter": "\\E03F", "fontColor": "#cc6d2e" }, "_haxe": { - "fontCharacter": "\\E03C", + "fontCharacter": "\\E03F", "fontColor": "#e37933" }, "_haxe_1_light": { - "fontCharacter": "\\E03C", + "fontCharacter": "\\E03F", "fontColor": "#b7b73b" }, "_haxe_1": { - "fontCharacter": "\\E03C", + "fontCharacter": "\\E03F", "fontColor": "#cbcb41" }, "_haxe_2_light": { - "fontCharacter": "\\E03C", + "fontCharacter": "\\E03F", "fontColor": "#498ba7" }, "_haxe_2": { - "fontCharacter": "\\E03C", + "fontCharacter": "\\E03F", "fontColor": "#519aba" }, "_haxe_3_light": { - "fontCharacter": "\\E03C", + "fontCharacter": "\\E03F", "fontColor": "#9068b0" }, "_haxe_3": { - "fontCharacter": "\\E03C", + "fontCharacter": "\\E03F", "fontColor": "#a074c4" }, "_heroku_light": { - "fontCharacter": "\\E03D", + "fontCharacter": "\\E040", "fontColor": "#9068b0" }, "_heroku": { - "fontCharacter": "\\E03D", + "fontCharacter": "\\E040", "fontColor": "#a074c4" }, "_hex_light": { - "fontCharacter": "\\E03E", + "fontCharacter": "\\E041", "fontColor": "#b8383d" }, "_hex": { - "fontCharacter": "\\E03E", + "fontCharacter": "\\E041", "fontColor": "#cc3e44" }, "_html_light": { - "fontCharacter": "\\E03F", - "fontColor": "#cc6d2e" + "fontCharacter": "\\E042", + "fontColor": "#498ba7" }, "_html": { - "fontCharacter": "\\E03F", + "fontCharacter": "\\E042", + "fontColor": "#519aba" + }, + "_html_1_light": { + "fontCharacter": "\\E042", + "fontColor": "#7fae42" + }, + "_html_1": { + "fontCharacter": "\\E042", + "fontColor": "#8dc149" + }, + "_html_2_light": { + "fontCharacter": "\\E042", + "fontColor": "#b7b73b" + }, + "_html_2": { + "fontCharacter": "\\E042", + "fontColor": "#cbcb41" + }, + "_html_3_light": { + "fontCharacter": "\\E042", + "fontColor": "#cc6d2e" + }, + "_html_3": { + "fontCharacter": "\\E042", "fontColor": "#e37933" }, "_html_erb_light": { - "fontCharacter": "\\E040", + "fontCharacter": "\\E043", "fontColor": "#b8383d" }, "_html_erb": { - "fontCharacter": "\\E040", + "fontCharacter": "\\E043", "fontColor": "#cc3e44" }, "_ignored_light": { - "fontCharacter": "\\E041", + "fontCharacter": "\\E044", "fontColor": "#3b4b52" }, "_ignored": { - "fontCharacter": "\\E041", + "fontCharacter": "\\E044", "fontColor": "#41535b" }, "_illustrator_light": { - "fontCharacter": "\\E042", + "fontCharacter": "\\E045", "fontColor": "#b7b73b" }, "_illustrator": { - "fontCharacter": "\\E042", + "fontCharacter": "\\E045", "fontColor": "#cbcb41" }, "_image_light": { - "fontCharacter": "\\E043", + "fontCharacter": "\\E046", "fontColor": "#9068b0" }, "_image": { - "fontCharacter": "\\E043", + "fontCharacter": "\\E046", "fontColor": "#a074c4" }, "_info_light": { - "fontCharacter": "\\E044", + "fontCharacter": "\\E047", "fontColor": "#498ba7" }, "_info": { - "fontCharacter": "\\E044", + "fontCharacter": "\\E047", "fontColor": "#519aba" }, "_ionic_light": { - "fontCharacter": "\\E045", + "fontCharacter": "\\E048", "fontColor": "#498ba7" }, "_ionic": { - "fontCharacter": "\\E045", + "fontCharacter": "\\E048", "fontColor": "#519aba" }, "_jade_light": { - "fontCharacter": "\\E046", + "fontCharacter": "\\E049", "fontColor": "#b8383d" }, "_jade": { - "fontCharacter": "\\E046", + "fontCharacter": "\\E049", "fontColor": "#cc3e44" }, "_java_light": { - "fontCharacter": "\\E047", + "fontCharacter": "\\E04A", "fontColor": "#b8383d" }, "_java": { - "fontCharacter": "\\E047", + "fontCharacter": "\\E04A", "fontColor": "#cc3e44" }, "_javascript_light": { - "fontCharacter": "\\E048", + "fontCharacter": "\\E04B", "fontColor": "#b7b73b" }, "_javascript": { - "fontCharacter": "\\E048", + "fontCharacter": "\\E04B", "fontColor": "#cbcb41" }, "_javascript_1_light": { - "fontCharacter": "\\E048", + "fontCharacter": "\\E04B", "fontColor": "#cc6d2e" }, "_javascript_1": { - "fontCharacter": "\\E048", + "fontCharacter": "\\E04B", "fontColor": "#e37933" }, "_javascript_2_light": { - "fontCharacter": "\\E048", + "fontCharacter": "\\E04B", "fontColor": "#498ba7" }, "_javascript_2": { - "fontCharacter": "\\E048", + "fontCharacter": "\\E04B", "fontColor": "#519aba" }, "_jenkins_light": { - "fontCharacter": "\\E049", + "fontCharacter": "\\E04C", "fontColor": "#b8383d" }, "_jenkins": { - "fontCharacter": "\\E049", + "fontCharacter": "\\E04C", "fontColor": "#cc3e44" }, "_jinja_light": { - "fontCharacter": "\\E04A", + "fontCharacter": "\\E04D", "fontColor": "#b8383d" }, "_jinja": { - "fontCharacter": "\\E04A", + "fontCharacter": "\\E04D", "fontColor": "#cc3e44" }, "_json_light": { - "fontCharacter": "\\E04C", + "fontCharacter": "\\E04F", "fontColor": "#b7b73b" }, "_json": { - "fontCharacter": "\\E04C", + "fontCharacter": "\\E04F", "fontColor": "#cbcb41" }, "_json_1_light": { - "fontCharacter": "\\E04C", + "fontCharacter": "\\E04F", "fontColor": "#7fae42" }, "_json_1": { - "fontCharacter": "\\E04C", + "fontCharacter": "\\E04F", "fontColor": "#8dc149" }, "_julia_light": { - "fontCharacter": "\\E04D", + "fontCharacter": "\\E050", "fontColor": "#9068b0" }, "_julia": { - "fontCharacter": "\\E04D", + "fontCharacter": "\\E050", "fontColor": "#a074c4" }, "_karma_light": { - "fontCharacter": "\\E04E", + "fontCharacter": "\\E051", "fontColor": "#7fae42" }, "_karma": { - "fontCharacter": "\\E04E", + "fontCharacter": "\\E051", "fontColor": "#8dc149" }, "_kotlin_light": { - "fontCharacter": "\\E04F", + "fontCharacter": "\\E052", "fontColor": "#cc6d2e" }, "_kotlin": { - "fontCharacter": "\\E04F", + "fontCharacter": "\\E052", "fontColor": "#e37933" }, "_less_light": { - "fontCharacter": "\\E050", + "fontCharacter": "\\E053", "fontColor": "#498ba7" }, "_less": { - "fontCharacter": "\\E050", + "fontCharacter": "\\E053", "fontColor": "#519aba" }, "_license_light": { - "fontCharacter": "\\E051", + "fontCharacter": "\\E054", "fontColor": "#b7b73b" }, "_license": { - "fontCharacter": "\\E051", + "fontCharacter": "\\E054", "fontColor": "#cbcb41" }, "_license_1_light": { - "fontCharacter": "\\E051", + "fontCharacter": "\\E054", "fontColor": "#cc6d2e" }, "_license_1": { - "fontCharacter": "\\E051", + "fontCharacter": "\\E054", "fontColor": "#e37933" }, "_license_2_light": { - "fontCharacter": "\\E051", + "fontCharacter": "\\E054", "fontColor": "#b8383d" }, "_license_2": { - "fontCharacter": "\\E051", + "fontCharacter": "\\E054", "fontColor": "#cc3e44" }, "_liquid_light": { - "fontCharacter": "\\E052", + "fontCharacter": "\\E055", "fontColor": "#7fae42" }, "_liquid": { - "fontCharacter": "\\E052", + "fontCharacter": "\\E055", "fontColor": "#8dc149" }, "_livescript_light": { - "fontCharacter": "\\E053", + "fontCharacter": "\\E056", "fontColor": "#498ba7" }, "_livescript": { - "fontCharacter": "\\E053", + "fontCharacter": "\\E056", "fontColor": "#519aba" }, "_lock_light": { - "fontCharacter": "\\E054", + "fontCharacter": "\\E057", "fontColor": "#7fae42" }, "_lock": { - "fontCharacter": "\\E054", + "fontCharacter": "\\E057", "fontColor": "#8dc149" }, "_lua_light": { - "fontCharacter": "\\E055", + "fontCharacter": "\\E058", "fontColor": "#498ba7" }, "_lua": { - "fontCharacter": "\\E055", + "fontCharacter": "\\E058", "fontColor": "#519aba" }, "_makefile_light": { - "fontCharacter": "\\E056", + "fontCharacter": "\\E059", "fontColor": "#cc6d2e" }, "_makefile": { - "fontCharacter": "\\E056", + "fontCharacter": "\\E059", "fontColor": "#e37933" }, "_makefile_1_light": { - "fontCharacter": "\\E056", + "fontCharacter": "\\E059", "fontColor": "#9068b0" }, "_makefile_1": { - "fontCharacter": "\\E056", + "fontCharacter": "\\E059", "fontColor": "#a074c4" }, "_makefile_2_light": { - "fontCharacter": "\\E056", + "fontCharacter": "\\E059", "fontColor": "#627379" }, "_makefile_2": { - "fontCharacter": "\\E056", + "fontCharacter": "\\E059", "fontColor": "#6d8086" }, "_makefile_3_light": { - "fontCharacter": "\\E056", + "fontCharacter": "\\E059", "fontColor": "#498ba7" }, "_makefile_3": { - "fontCharacter": "\\E056", + "fontCharacter": "\\E059", "fontColor": "#519aba" }, "_markdown_light": { - "fontCharacter": "\\E057", + "fontCharacter": "\\E05A", "fontColor": "#498ba7" }, "_markdown": { - "fontCharacter": "\\E057", + "fontCharacter": "\\E05A", "fontColor": "#519aba" }, "_maven_light": { - "fontCharacter": "\\E058", + "fontCharacter": "\\E05B", "fontColor": "#b8383d" }, "_maven": { - "fontCharacter": "\\E058", + "fontCharacter": "\\E05B", "fontColor": "#cc3e44" }, "_mdo_light": { - "fontCharacter": "\\E059", + "fontCharacter": "\\E05C", "fontColor": "#b8383d" }, "_mdo": { - "fontCharacter": "\\E059", + "fontCharacter": "\\E05C", "fontColor": "#cc3e44" }, "_mustache_light": { - "fontCharacter": "\\E05A", + "fontCharacter": "\\E05D", "fontColor": "#cc6d2e" }, "_mustache": { - "fontCharacter": "\\E05A", + "fontCharacter": "\\E05D", "fontColor": "#e37933" }, "_npm_light": { - "fontCharacter": "\\E05C", + "fontCharacter": "\\E05F", "fontColor": "#3b4b52" }, "_npm": { - "fontCharacter": "\\E05C", + "fontCharacter": "\\E05F", "fontColor": "#41535b" }, "_npm_1_light": { - "fontCharacter": "\\E05C", + "fontCharacter": "\\E05F", "fontColor": "#b8383d" }, "_npm_1": { - "fontCharacter": "\\E05C", + "fontCharacter": "\\E05F", "fontColor": "#cc3e44" }, "_npm_ignored_light": { - "fontCharacter": "\\E05D", + "fontCharacter": "\\E060", "fontColor": "#3b4b52" }, "_npm_ignored": { - "fontCharacter": "\\E05D", + "fontCharacter": "\\E060", "fontColor": "#41535b" }, "_nunjucks_light": { - "fontCharacter": "\\E05E", + "fontCharacter": "\\E061", "fontColor": "#7fae42" }, "_nunjucks": { - "fontCharacter": "\\E05E", + "fontCharacter": "\\E061", "fontColor": "#8dc149" }, "_ocaml_light": { - "fontCharacter": "\\E05F", + "fontCharacter": "\\E062", "fontColor": "#cc6d2e" }, "_ocaml": { - "fontCharacter": "\\E05F", + "fontCharacter": "\\E062", "fontColor": "#e37933" }, "_odata_light": { - "fontCharacter": "\\E060", + "fontCharacter": "\\E063", "fontColor": "#cc6d2e" }, "_odata": { - "fontCharacter": "\\E060", + "fontCharacter": "\\E063", "fontColor": "#e37933" }, + "_pddl_light": { + "fontCharacter": "\\E064", + "fontColor": "#9068b0" + }, + "_pddl": { + "fontCharacter": "\\E064", + "fontColor": "#a074c4" + }, "_pdf_light": { - "fontCharacter": "\\E061", + "fontCharacter": "\\E065", "fontColor": "#b8383d" }, "_pdf": { - "fontCharacter": "\\E061", + "fontCharacter": "\\E065", "fontColor": "#cc3e44" }, "_perl_light": { - "fontCharacter": "\\E062", + "fontCharacter": "\\E066", "fontColor": "#498ba7" }, "_perl": { - "fontCharacter": "\\E062", + "fontCharacter": "\\E066", "fontColor": "#519aba" }, "_photoshop_light": { - "fontCharacter": "\\E063", + "fontCharacter": "\\E067", "fontColor": "#498ba7" }, "_photoshop": { - "fontCharacter": "\\E063", + "fontCharacter": "\\E067", "fontColor": "#519aba" }, "_php_light": { - "fontCharacter": "\\E064", + "fontCharacter": "\\E068", "fontColor": "#9068b0" }, "_php": { - "fontCharacter": "\\E064", + "fontCharacter": "\\E068", "fontColor": "#a074c4" }, + "_plan_light": { + "fontCharacter": "\\E069", + "fontColor": "#7fae42" + }, + "_plan": { + "fontCharacter": "\\E069", + "fontColor": "#8dc149" + }, + "_platformio_light": { + "fontCharacter": "\\E06A", + "fontColor": "#cc6d2e" + }, + "_platformio": { + "fontCharacter": "\\E06A", + "fontColor": "#e37933" + }, "_powershell_light": { - "fontCharacter": "\\E065", + "fontCharacter": "\\E06B", "fontColor": "#498ba7" }, "_powershell": { - "fontCharacter": "\\E065", + "fontCharacter": "\\E06B", "fontColor": "#519aba" }, "_pug_light": { - "fontCharacter": "\\E067", + "fontCharacter": "\\E06D", "fontColor": "#b8383d" }, "_pug": { - "fontCharacter": "\\E067", + "fontCharacter": "\\E06D", "fontColor": "#cc3e44" }, "_puppet_light": { - "fontCharacter": "\\E068", + "fontCharacter": "\\E06E", "fontColor": "#b7b73b" }, "_puppet": { - "fontCharacter": "\\E068", + "fontCharacter": "\\E06E", "fontColor": "#cbcb41" }, "_python_light": { - "fontCharacter": "\\E069", + "fontCharacter": "\\E06F", "fontColor": "#498ba7" }, "_python": { - "fontCharacter": "\\E069", + "fontCharacter": "\\E06F", "fontColor": "#519aba" }, "_react_light": { - "fontCharacter": "\\E06B", + "fontCharacter": "\\E071", "fontColor": "#498ba7" }, "_react": { - "fontCharacter": "\\E06B", + "fontCharacter": "\\E071", "fontColor": "#519aba" }, + "_react_1_light": { + "fontCharacter": "\\E071", + "fontColor": "#cc6d2e" + }, + "_react_1": { + "fontCharacter": "\\E071", + "fontColor": "#e37933" + }, + "_react_2_light": { + "fontCharacter": "\\E071", + "fontColor": "#b7b73b" + }, + "_react_2": { + "fontCharacter": "\\E071", + "fontColor": "#cbcb41" + }, + "_reasonml_light": { + "fontCharacter": "\\E072", + "fontColor": "#b8383d" + }, + "_reasonml": { + "fontCharacter": "\\E072", + "fontColor": "#cc3e44" + }, "_rollup_light": { - "fontCharacter": "\\E06C", + "fontCharacter": "\\E073", "fontColor": "#b8383d" }, "_rollup": { - "fontCharacter": "\\E06C", + "fontCharacter": "\\E073", "fontColor": "#cc3e44" }, "_ruby_light": { - "fontCharacter": "\\E06D", + "fontCharacter": "\\E074", "fontColor": "#b8383d" }, "_ruby": { - "fontCharacter": "\\E06D", + "fontCharacter": "\\E074", "fontColor": "#cc3e44" }, "_rust_light": { - "fontCharacter": "\\E06E", + "fontCharacter": "\\E075", "fontColor": "#627379" }, "_rust": { - "fontCharacter": "\\E06E", + "fontCharacter": "\\E075", "fontColor": "#6d8086" }, "_salesforce_light": { - "fontCharacter": "\\E06F", + "fontCharacter": "\\E076", "fontColor": "#498ba7" }, "_salesforce": { - "fontCharacter": "\\E06F", + "fontCharacter": "\\E076", "fontColor": "#519aba" }, "_sass_light": { - "fontCharacter": "\\E070", + "fontCharacter": "\\E077", "fontColor": "#dd4b78" }, "_sass": { - "fontCharacter": "\\E070", + "fontCharacter": "\\E077", "fontColor": "#f55385" }, "_sbt_light": { - "fontCharacter": "\\E071", + "fontCharacter": "\\E078", "fontColor": "#498ba7" }, "_sbt": { - "fontCharacter": "\\E071", + "fontCharacter": "\\E078", "fontColor": "#519aba" }, "_scala_light": { - "fontCharacter": "\\E072", + "fontCharacter": "\\E079", "fontColor": "#b8383d" }, "_scala": { - "fontCharacter": "\\E072", + "fontCharacter": "\\E079", "fontColor": "#cc3e44" }, "_shell_light": { - "fontCharacter": "\\E075", + "fontCharacter": "\\E07C", "fontColor": "#455155" }, "_shell": { - "fontCharacter": "\\E075", + "fontCharacter": "\\E07C", "fontColor": "#4d5a5e" }, "_slim_light": { - "fontCharacter": "\\E076", + "fontCharacter": "\\E07D", "fontColor": "#cc6d2e" }, "_slim": { - "fontCharacter": "\\E076", + "fontCharacter": "\\E07D", "fontColor": "#e37933" }, "_smarty_light": { - "fontCharacter": "\\E077", + "fontCharacter": "\\E07E", "fontColor": "#b7b73b" }, "_smarty": { - "fontCharacter": "\\E077", + "fontCharacter": "\\E07E", "fontColor": "#cbcb41" }, "_spring_light": { - "fontCharacter": "\\E078", + "fontCharacter": "\\E07F", "fontColor": "#7fae42" }, "_spring": { - "fontCharacter": "\\E078", + "fontCharacter": "\\E07F", "fontColor": "#8dc149" }, "_stylelint_light": { - "fontCharacter": "\\E079", + "fontCharacter": "\\E080", "fontColor": "#bfc2c1" }, "_stylelint": { - "fontCharacter": "\\E079", + "fontCharacter": "\\E080", "fontColor": "#d4d7d6" }, "_stylelint_1_light": { - "fontCharacter": "\\E079", + "fontCharacter": "\\E080", "fontColor": "#455155" }, "_stylelint_1": { - "fontCharacter": "\\E079", + "fontCharacter": "\\E080", "fontColor": "#4d5a5e" }, "_stylus_light": { - "fontCharacter": "\\E07A", + "fontCharacter": "\\E081", "fontColor": "#7fae42" }, "_stylus": { - "fontCharacter": "\\E07A", + "fontCharacter": "\\E081", "fontColor": "#8dc149" }, "_sublime_light": { - "fontCharacter": "\\E07B", + "fontCharacter": "\\E082", "fontColor": "#cc6d2e" }, "_sublime": { - "fontCharacter": "\\E07B", + "fontCharacter": "\\E082", "fontColor": "#e37933" }, "_svg_light": { - "fontCharacter": "\\E07C", + "fontCharacter": "\\E083", "fontColor": "#9068b0" }, "_svg": { - "fontCharacter": "\\E07C", + "fontCharacter": "\\E083", "fontColor": "#a074c4" }, "_svg_1_light": { - "fontCharacter": "\\E07C", + "fontCharacter": "\\E083", "fontColor": "#498ba7" }, "_svg_1": { - "fontCharacter": "\\E07C", + "fontCharacter": "\\E083", "fontColor": "#519aba" }, "_swift_light": { - "fontCharacter": "\\E07D", + "fontCharacter": "\\E084", "fontColor": "#cc6d2e" }, "_swift": { - "fontCharacter": "\\E07D", + "fontCharacter": "\\E084", "fontColor": "#e37933" }, "_terraform_light": { - "fontCharacter": "\\E07E", + "fontCharacter": "\\E085", "fontColor": "#9068b0" }, "_terraform": { - "fontCharacter": "\\E07E", + "fontCharacter": "\\E085", "fontColor": "#a074c4" }, "_tex_light": { - "fontCharacter": "\\E07F", + "fontCharacter": "\\E086", "fontColor": "#498ba7" }, "_tex": { - "fontCharacter": "\\E07F", + "fontCharacter": "\\E086", "fontColor": "#519aba" }, "_tex_1_light": { - "fontCharacter": "\\E07F", + "fontCharacter": "\\E086", "fontColor": "#b7b73b" }, "_tex_1": { - "fontCharacter": "\\E07F", + "fontCharacter": "\\E086", "fontColor": "#cbcb41" }, "_tex_2_light": { - "fontCharacter": "\\E07F", + "fontCharacter": "\\E086", "fontColor": "#cc6d2e" }, "_tex_2": { - "fontCharacter": "\\E07F", + "fontCharacter": "\\E086", "fontColor": "#e37933" }, "_tex_3_light": { - "fontCharacter": "\\E07F", + "fontCharacter": "\\E086", "fontColor": "#bfc2c1" }, "_tex_3": { - "fontCharacter": "\\E07F", + "fontCharacter": "\\E086", "fontColor": "#d4d7d6" }, "_todo": { - "fontCharacter": "\\E081" + "fontCharacter": "\\E088" + }, + "_tsconfig_light": { + "fontCharacter": "\\E089", + "fontColor": "#498ba7" + }, + "_tsconfig": { + "fontCharacter": "\\E089", + "fontColor": "#519aba" }, "_twig_light": { - "fontCharacter": "\\E082", + "fontCharacter": "\\E08A", "fontColor": "#7fae42" }, "_twig": { - "fontCharacter": "\\E082", + "fontCharacter": "\\E08A", "fontColor": "#8dc149" }, "_typescript_light": { - "fontCharacter": "\\E083", + "fontCharacter": "\\E08B", "fontColor": "#498ba7" }, "_typescript": { - "fontCharacter": "\\E083", + "fontCharacter": "\\E08B", "fontColor": "#519aba" }, "_typescript_1_light": { - "fontCharacter": "\\E083", + "fontCharacter": "\\E08B", "fontColor": "#b7b73b" }, "_typescript_1": { - "fontCharacter": "\\E083", + "fontCharacter": "\\E08B", "fontColor": "#cbcb41" }, "_vala_light": { - "fontCharacter": "\\E084", + "fontCharacter": "\\E08C", "fontColor": "#627379" }, "_vala": { - "fontCharacter": "\\E084", + "fontCharacter": "\\E08C", "fontColor": "#6d8086" }, "_video_light": { - "fontCharacter": "\\E085", + "fontCharacter": "\\E08D", "fontColor": "#dd4b78" }, "_video": { - "fontCharacter": "\\E085", + "fontCharacter": "\\E08D", "fontColor": "#f55385" }, "_vue_light": { - "fontCharacter": "\\E086", + "fontCharacter": "\\E08E", "fontColor": "#7fae42" }, "_vue": { - "fontCharacter": "\\E086", + "fontCharacter": "\\E08E", "fontColor": "#8dc149" }, "_wasm_light": { - "fontCharacter": "\\E087", + "fontCharacter": "\\E08F", "fontColor": "#9068b0" }, "_wasm": { - "fontCharacter": "\\E087", + "fontCharacter": "\\E08F", "fontColor": "#a074c4" }, "_wat_light": { - "fontCharacter": "\\E088", + "fontCharacter": "\\E090", "fontColor": "#9068b0" }, "_wat": { - "fontCharacter": "\\E088", + "fontCharacter": "\\E090", "fontColor": "#a074c4" }, "_webpack_light": { - "fontCharacter": "\\E089", + "fontCharacter": "\\E091", "fontColor": "#498ba7" }, "_webpack": { - "fontCharacter": "\\E089", + "fontCharacter": "\\E091", "fontColor": "#519aba" }, "_wgt_light": { - "fontCharacter": "\\E08A", + "fontCharacter": "\\E092", "fontColor": "#498ba7" }, "_wgt": { - "fontCharacter": "\\E08A", + "fontCharacter": "\\E092", "fontColor": "#519aba" }, "_windows_light": { - "fontCharacter": "\\E08B", + "fontCharacter": "\\E093", "fontColor": "#498ba7" }, "_windows": { - "fontCharacter": "\\E08B", + "fontCharacter": "\\E093", "fontColor": "#519aba" }, "_word_light": { - "fontCharacter": "\\E08C", + "fontCharacter": "\\E094", "fontColor": "#498ba7" }, "_word": { - "fontCharacter": "\\E08C", + "fontCharacter": "\\E094", "fontColor": "#519aba" }, "_xls_light": { - "fontCharacter": "\\E08D", + "fontCharacter": "\\E095", "fontColor": "#7fae42" }, "_xls": { - "fontCharacter": "\\E08D", + "fontCharacter": "\\E095", "fontColor": "#8dc149" }, "_xml_light": { - "fontCharacter": "\\E08E", + "fontCharacter": "\\E096", "fontColor": "#cc6d2e" }, "_xml": { - "fontCharacter": "\\E08E", + "fontCharacter": "\\E096", "fontColor": "#e37933" }, "_yarn_light": { - "fontCharacter": "\\E08F", + "fontCharacter": "\\E097", "fontColor": "#498ba7" }, "_yarn": { - "fontCharacter": "\\E08F", + "fontCharacter": "\\E097", "fontColor": "#519aba" }, "_yml_light": { - "fontCharacter": "\\E090", + "fontCharacter": "\\E098", "fontColor": "#9068b0" }, "_yml": { - "fontCharacter": "\\E090", + "fontCharacter": "\\E098", "fontColor": "#a074c4" }, "_zip_light": { - "fontCharacter": "\\E091", + "fontCharacter": "\\E099", "fontColor": "#b8383d" }, "_zip": { - "fontCharacter": "\\E091", + "fontCharacter": "\\E099", "fontColor": "#cc3e44" }, "_zip_1_light": { - "fontCharacter": "\\E091", + "fontCharacter": "\\E099", "fontColor": "#627379" }, "_zip_1": { - "fontCharacter": "\\E091", + "fontCharacter": "\\E099", "fontColor": "#6d8086" } }, @@ -1249,6 +1361,10 @@ "asm": "_asm", "s": "_asm", "h": "_c_1", + "aspx": "_html", + "ascx": "_html_1", + "asax": "_html_2", + "master": "_html_2", "hh": "_cpp_1", "hpp": "_cpp_1", "hxx": "_cpp_1", @@ -1286,6 +1402,8 @@ "article": "_go", "gradle": "_gradle", "gsp": "_grails", + "gql": "_graphql", + "graphql": "_graphql", "haml": "_haml", "hs": "_haskell", "lhs": "_haskell", @@ -1297,6 +1415,7 @@ "classpath": "_java", "js.map": "_javascript", "spec.js": "_javascript_1", + "test.js": "_javascript_1", "es": "_javascript", "es5": "_javascript", "es7": "_javascript", @@ -1305,6 +1424,7 @@ "jl": "_julia", "kt": "_kotlin", "kts": "_kotlin", + "dart": "_dart", "liquid": "_liquid", "ls": "_livescript", "argdown": "_argdown", @@ -1326,10 +1446,18 @@ "cmxa": "_ocaml", "odata": "_odata", "php.inc": "_php", + "pddl": "_pddl", + "plan": "_plan", + "happenings": "_happenings", "pug": "_pug", "pp": "_puppet", "epp": "_puppet", + "spec.jsx": "_react_1", + "test.jsx": "_react_1", "cjsx": "_react", + "spec.tsx": "_react_2", + "test.tsx": "_react_2", + "re": "_reasonml", "r": "_R", "erb": "_html_erb", "erb.html": "_html_erb", @@ -1352,6 +1480,7 @@ "toml": "_config", "twig": "_twig", "spec.ts": "_typescript_1", + "test.ts": "_typescript_1", "vala": "_vala", "vapi": "_vala", "vue": "_vue", @@ -1452,6 +1581,7 @@ "gulpfile": "_gulp", "ionic.config.json": "_ionic", "ionic.project": "_ionic", + "platformio.ini": "_platformio", "rollup.config.js": "_rollup", "sass-lint.yml": "_sass", "stylelint.config.js": "_stylelint", @@ -1459,6 +1589,9 @@ "yarn.lock": "_yarn", "webpack.config.js": "_webpack", "webpack.config.build.js": "_webpack", + "webpack.common.js": "_webpack", + "webpack.dev.js": "_webpack", + "webpack.prod.js": "_webpack", "license": "_license", "licence": "_license", "copying": "_license", @@ -1475,6 +1608,7 @@ "bat": "_windows", "clojure": "_clojure", "coffeescript": "_coffee", + "jsonc": "_tsconfig", "c": "_c", "cpp": "_cpp", "csharp": "_c-sharp", @@ -1484,7 +1618,7 @@ "go": "_go2", "groovy": "_grails", "handlebars": "_mustache", - "html": "_html", + "html": "_html_3", "properties": "_java", "java": "_java", "javascriptreact": "_react", @@ -1495,12 +1629,14 @@ "makefile": "_makefile", "markdown": "_markdown", "objective-c": "_c_2", + "objective-cpp": "_cpp_2", "perl": "_perl", "php": "_php", "powershell": "_powershell", "jade": "_jade", "python": "_python", "r": "_R", + "razor": "_html", "ruby": "_ruby", "rust": "_rust", "scss": "_sass", @@ -1539,6 +1675,10 @@ "asm": "_asm_light", "s": "_asm_light", "h": "_c_1_light", + "aspx": "_html_light", + "ascx": "_html_1_light", + "asax": "_html_2_light", + "master": "_html_2_light", "hh": "_cpp_1_light", "hpp": "_cpp_1_light", "hxx": "_cpp_1_light", @@ -1576,6 +1716,8 @@ "article": "_go_light", "gradle": "_gradle_light", "gsp": "_grails_light", + "gql": "_graphql_light", + "graphql": "_graphql_light", "haml": "_haml_light", "hs": "_haskell_light", "lhs": "_haskell_light", @@ -1587,6 +1729,7 @@ "classpath": "_java_light", "js.map": "_javascript_light", "spec.js": "_javascript_1_light", + "test.js": "_javascript_1_light", "es": "_javascript_light", "es5": "_javascript_light", "es7": "_javascript_light", @@ -1595,6 +1738,7 @@ "jl": "_julia_light", "kt": "_kotlin_light", "kts": "_kotlin_light", + "dart": "_dart_light", "liquid": "_liquid_light", "ls": "_livescript_light", "argdown": "_argdown_light", @@ -1616,10 +1760,18 @@ "cmxa": "_ocaml_light", "odata": "_odata_light", "php.inc": "_php_light", + "pddl": "_pddl_light", + "plan": "_plan_light", + "happenings": "_happenings_light", "pug": "_pug_light", "pp": "_puppet_light", "epp": "_puppet_light", + "spec.jsx": "_react_1_light", + "test.jsx": "_react_1_light", "cjsx": "_react_light", + "spec.tsx": "_react_2_light", + "test.tsx": "_react_2_light", + "re": "_reasonml_light", "r": "_R_light", "erb": "_html_erb_light", "erb.html": "_html_erb_light", @@ -1642,6 +1794,7 @@ "toml": "_config_light", "twig": "_twig_light", "spec.ts": "_typescript_1_light", + "test.ts": "_typescript_1_light", "vala": "_vala_light", "vapi": "_vala_light", "vue": "_vue_light", @@ -1718,6 +1871,7 @@ "bat": "_windows_light", "clojure": "_clojure_light", "coffeescript": "_coffee_light", + "jsonc": "_tsconfig_light", "c": "_c_light", "cpp": "_cpp_light", "csharp": "_c-sharp_light", @@ -1727,7 +1881,7 @@ "go": "_go2_light", "groovy": "_grails_light", "handlebars": "_mustache_light", - "html": "_html_light", + "html": "_html_3_light", "properties": "_java_light", "java": "_java_light", "javascriptreact": "_react_light", @@ -1738,12 +1892,14 @@ "makefile": "_makefile_light", "markdown": "_markdown_light", "objective-c": "_c_2_light", + "objective-cpp": "_cpp_2_light", "perl": "_perl_light", "php": "_php_light", "powershell": "_powershell_light", "jade": "_jade_light", "python": "_python_light", "r": "_R_light", + "razor": "_html_light", "ruby": "_ruby_light", "rust": "_rust_light", "scss": "_sass_light", @@ -1801,6 +1957,7 @@ "gulpfile": "_gulp_light", "ionic.config.json": "_ionic_light", "ionic.project": "_ionic_light", + "platformio.ini": "_platformio_light", "rollup.config.js": "_rollup_light", "sass-lint.yml": "_sass_light", "stylelint.config.js": "_stylelint_light", @@ -1808,6 +1965,9 @@ "yarn.lock": "_yarn_light", "webpack.config.js": "_webpack_light", "webpack.config.build.js": "_webpack_light", + "webpack.common.js": "_webpack_light", + "webpack.dev.js": "_webpack_light", + "webpack.prod.js": "_webpack_light", "license": "_license_light", "licence": "_license_light", "copying": "_license_light", @@ -1820,5 +1980,5 @@ "npm-debug.log": "_npm_ignored_light" } }, - "version": "https://github.com/jesseweed/seti-ui/commit/89175d7f9e0c70cd325b80a18a3c77fc8eb7c798" + "version": "https://github.com/jesseweed/seti-ui/commit/904c16acced1134a81b31d71d60293288c31334b" } \ No newline at end of file From 6da8b1c158ef50dbf3af0b379544384a9d21bfc7 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Thu, 18 Jul 2019 10:17:41 -0700 Subject: [PATCH 368/710] Fix #77277, make info colors in error peek view match --- src/vs/platform/theme/common/colorRegistry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 11cb7598f9c..1a5e6e79217 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -271,8 +271,8 @@ export const editorErrorBorder = registerColor('editorError.border', { dark: nul export const editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#CCA700', light: '#E9A700', hc: null }, nls.localize('editorWarning.foreground', 'Foreground color of warning squigglies in the editor.')); export const editorWarningBorder = registerColor('editorWarning.border', { dark: null, light: null, hc: Color.fromHex('#FFCC00').transparent(0.8) }, nls.localize('warningBorder', 'Border color of warning boxes in the editor.')); -export const editorInfoForeground = registerColor('editorInfo.foreground', { dark: '#008000', light: '#008000', hc: null }, nls.localize('editorInfo.foreground', 'Foreground color of info squigglies in the editor.')); -export const editorInfoBorder = registerColor('editorInfo.border', { dark: null, light: null, hc: Color.fromHex('#71B771').transparent(0.8) }, nls.localize('infoBorder', 'Border color of info boxes in the editor.')); +export const editorInfoForeground = registerColor('editorInfo.foreground', { dark: '#75BEFF', light: '#75BEFF', hc: null }, nls.localize('editorInfo.foreground', 'Foreground color of info squigglies in the editor.')); +export const editorInfoBorder = registerColor('editorInfo.border', { dark: null, light: null, hc: Color.fromHex('#75BEFF').transparent(0.8) }, nls.localize('infoBorder', 'Border color of info boxes in the editor.')); export const editorHintForeground = registerColor('editorHint.foreground', { dark: Color.fromHex('#eeeeee').transparent(0.7), light: '#6c6c6c', hc: null }, nls.localize('editorHint.foreground', 'Foreground color of hint squigglies in the editor.')); export const editorHintBorder = registerColor('editorHint.border', { dark: null, light: null, hc: Color.fromHex('#eeeeee').transparent(0.8) }, nls.localize('hintBorder', 'Border color of hint boxes in the editor.')); From 0cfa49c43017fb4b197199cbf918a0ec4d71abe7 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Thu, 18 Jul 2019 10:28:50 -0700 Subject: [PATCH 369/710] Fix #77368, provide better contrast between cursor and bracket match --- src/vs/editor/common/view/editorColorRegistry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 2ee2b7c8831..23d5e072b9d 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -5,7 +5,7 @@ import * as nls from 'vs/nls'; import { Color, RGBA } from 'vs/base/common/color'; -import { activeContrastBorder, editorBackground, editorForeground, registerColor, editorWarningForeground, editorInfoForeground, editorWarningBorder, editorInfoBorder } from 'vs/platform/theme/common/colorRegistry'; +import { activeContrastBorder, editorBackground, editorForeground, registerColor, editorWarningForeground, editorInfoForeground, editorWarningBorder, editorInfoBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; /** @@ -31,7 +31,7 @@ export const editorRuler = registerColor('editorRuler.foreground', { dark: '#5A5 export const editorCodeLensForeground = registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, nls.localize('editorCodeLensForeground', 'Foreground color of editor code lenses')); export const editorBracketMatchBackground = registerColor('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hc: '#0064001a' }, nls.localize('editorBracketMatchBackground', 'Background color behind matching brackets')); -export const editorBracketMatchBorder = registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: '#fff' }, nls.localize('editorBracketMatchBorder', 'Color for matching brackets boxes')); +export const editorBracketMatchBorder = registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: contrastBorder }, nls.localize('editorBracketMatchBorder', 'Color for matching brackets boxes')); export const editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hc: '#7f7f7f4d' }, nls.localize('editorOverviewRulerBorder', 'Color of the overview ruler border.')); From cd14ea9592119de0ee95886872ac12cdd2ed6723 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Thu, 18 Jul 2019 10:51:25 -0700 Subject: [PATCH 370/710] Properly dispose of comment thread when removing empty widget, fixes #77588 --- src/vs/editor/common/modes.ts | 2 +- .../contrib/comments/browser/commentThreadWidget.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/common/modes.ts b/src/vs/editor/common/modes.ts index f9caed90bae..d6438d398c3 100644 --- a/src/vs/editor/common/modes.ts +++ b/src/vs/editor/common/modes.ts @@ -1285,7 +1285,7 @@ export interface CommentThread { commentThreadHandle: number; controllerHandle: number; extensionId?: string; - threadId: string | null; + threadId: string; resource: string | null; range: IRange; label: string; diff --git a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts index 67f7d8f2042..fcd4e69ba33 100644 --- a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts +++ b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts @@ -247,9 +247,14 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget this._actionbarWidget.push([...groups, this._collapseAction], { label: false, icon: true }); } + private deleteCommentThread(): void { + this.dispose(); + this.commentService.disposeCommentThread(this.owner, this._commentThread.threadId); + } + public collapse(): Promise { if (this._commentThread.comments && this._commentThread.comments.length === 0) { - this.dispose(); + this.deleteCommentThread(); return Promise.resolve(); } @@ -268,7 +273,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget if (this._isExpanded) { this.hide(); if (!this._commentThread.comments || !this._commentThread.comments.length) { - this.dispose(); + this.deleteCommentThread(); } } else { this.show({ lineNumber: lineNumber, column: 1 }, 2); From a6c461b564ad5857a8bd1486d336a3678039030a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 Jul 2019 20:08:00 +0200 Subject: [PATCH 371/710] missing yarn.lock --- build/yarn.lock | 328 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 328 insertions(+) diff --git a/build/yarn.lock b/build/yarn.lock index 3bba51751e1..02f533c9ce5 100644 --- a/build/yarn.lock +++ b/build/yarn.lock @@ -2,6 +2,14 @@ # yarn lockfile v1 +"@dsherret/to-absolute-glob@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@dsherret/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1f6475dc8bd974cea07a2daf3864b317b1dd332c" + integrity sha1-H2R13IvZdM6gei2vOGSzF7HdMyw= + dependencies: + is-absolute "^1.0.0" + is-negated-glob "^1.0.0" + "@gulp-sourcemaps/map-sources@1.X": version "1.0.0" resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda" @@ -10,6 +18,27 @@ normalize-path "^2.0.1" through2 "^2.0.3" +"@nodelib/fs.scandir@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.1.tgz#7fa8fed654939e1a39753d286b48b4836d00e0eb" + integrity sha512-NT/skIZjgotDSiXs0WqYhgcuBKhUMgfekCmCGtkUAiLqZdOnrdjmZr9wRl3ll64J9NF79uZ4fk16Dx0yMc/Xbg== + dependencies: + "@nodelib/fs.stat" "2.0.1" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.1", "@nodelib/fs.stat@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.1.tgz#814f71b1167390cfcb6a6b3d9cdeb0951a192c14" + integrity sha512-+RqhBlLn6YRBGOIoVYthsG0J9dfpO79eJyN7BYBkZJtfqrBwf2KK+rD/M/yjZR6WBmIhAgOV7S60eCgaSWtbFw== + +"@nodelib/fs.walk@^1.2.1": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.2.tgz#6a6450c5e17012abd81450eb74949a4d970d2807" + integrity sha512-J/DR3+W12uCzAJkw7niXDcqcKBg6+5G5Q/ZpThpGNzAUz70eOR6RV4XnnSN01qHZiVl0eavoxJsBypQoKsV2QQ== + dependencies: + "@nodelib/fs.scandir" "2.1.1" + fastq "^1.6.0" + "@types/ansi-colors@^3.2.0": version "3.2.0" resolved "https://registry.yarnpkg.com/@types/ansi-colors/-/ansi-colors-3.2.0.tgz#3e4fe85d9131ce1c6994f3040bd0b25306c16a6e" @@ -344,16 +373,36 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +array-back@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" + integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== + array-differ@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" integrity sha1-7/UuN1gknTO+QCuLuOVkuytdQDE= +array-differ@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" + integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + array-uniq@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= +arrify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" + integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== + asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" @@ -481,6 +530,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + browserify-mime@~1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/browserify-mime/-/browserify-mime-1.2.9.tgz#aeb1af28de6c0d7a6a2ce40adb68ff18422af31f" @@ -548,6 +604,11 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= +code-block-writer@9.4.1: + version "9.4.1" + resolved "https://registry.yarnpkg.com/code-block-writer/-/code-block-writer-9.4.1.tgz#1448fca79dfc7a3649000f4c85be6bc770604c4c" + integrity sha512-LHAB+DL4YZDcwK8y/kAxZ0Lf/ncwLh/Ux4cTVWbPwIdrf1gPxXiPcwpz8r8/KqXu1aD+Raz46EOxDjFlbyO6bA== + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -584,6 +645,16 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" +command-line-args@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.1.1.tgz#88e793e5bb3ceb30754a86863f0401ac92fd369a" + integrity sha512-hL/eG8lrll1Qy1ezvkant+trihbGnaKaeEjj6Scyr3DN+RC7iQ5Rz84IeLERfAWDGo0HBSNAakczwgCilDXnWg== + dependencies: + array-back "^3.0.1" + find-replace "^3.0.0" + lodash.camelcase "^4.3.0" + typical "^4.0.0" + commander@^2.12.1, commander@^2.8.1: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" @@ -710,6 +781,13 @@ diff@^3.2.0: resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + documentdb@1.13.0: version "1.13.0" resolved "https://registry.yarnpkg.com/documentdb/-/documentdb-1.13.0.tgz#bba6f03150b2f42498cec4261bc439d834a33f8b" @@ -829,11 +907,30 @@ fast-deep-equal@^1.0.0: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= +fast-glob@^3.0.3: + version "3.0.4" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.0.4.tgz#d484a41005cb6faeb399b951fd1bd70ddaebb602" + integrity sha512-wkIbV6qg37xTJwqSsdnIphL1e+LaGz4AIQqr00mIubMaEhv1/HEmJ0uuCGZRNRUkZZmOB5mJKO0ZUTVq+SxMQg== + dependencies: + "@nodelib/fs.stat" "^2.0.1" + "@nodelib/fs.walk" "^1.2.1" + glob-parent "^5.0.0" + is-glob "^4.0.1" + merge2 "^1.2.3" + micromatch "^4.0.2" + fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= +fastq@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.6.0.tgz#4ec8a38f4ac25f21492673adb7eae9cfef47d1c2" + integrity sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA== + dependencies: + reusify "^1.0.0" + fd-slicer@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" @@ -841,6 +938,20 @@ fd-slicer@~1.1.0: dependencies: pend "~1.2.0" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-replace@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" + integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== + dependencies: + array-back "^3.0.1" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -864,6 +975,15 @@ form-data@~2.3.1: combined-stream "1.0.6" mime-types "^2.1.12" +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -886,6 +1006,13 @@ github-releases@^0.4.1: prettyjson "1.2.1" request "2.81.0" +glob-parent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954" + integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg== + dependencies: + is-glob "^4.0.1" + glob@^7.0.6, glob@^7.1.1: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" @@ -898,6 +1025,32 @@ glob@^7.0.6, glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globby@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22" + integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + glogg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.1.tgz#dcf758e44789cc3f3d32c1f3562a3676e6a34810" @@ -910,6 +1063,11 @@ graceful-fs@4.X: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" integrity sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" + integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== + gulp-bom@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gulp-bom/-/gulp-bom-1.0.0.tgz#38a183a07187bd57a7922d37977441f379df2abf" @@ -1086,6 +1244,11 @@ iconv-lite@0.4.23: dependencies: safer-buffer ">= 2.1.2 < 3" +ignore@^5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.2.tgz#e28e584d43ad7e92f96995019cc43b9e1ac49558" + integrity sha512-vdqWBp7MyzdmHkkRWV5nY+PfGRbYbahfuvsBCh277tq+w9zyNi7h5CYJCK0kmzti9kU+O/cB7sE8HvKv6aXAKQ== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1099,16 +1262,65 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= +is-absolute@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" + integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== + dependencies: + is-relative "^1.0.0" + is-windows "^1.0.1" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-glob@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-negated-glob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2" + integrity sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI= + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-relative@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" + integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== + dependencies: + is-unc-path "^1.0.0" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-unc-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" + integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== + dependencies: + unc-path-regex "^0.1.2" + is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= +is-windows@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -1171,6 +1383,13 @@ json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -1248,6 +1467,11 @@ lodash._root@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" integrity sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI= +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= + lodash.escape@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" @@ -1331,6 +1555,19 @@ mdurl@^1.0.1: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= +merge2@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" + integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA== + +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + mime-db@~1.30.0: version "1.30.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" @@ -1382,6 +1619,17 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= +multimatch@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3" + integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ== + dependencies: + "@types/minimatch" "^3.0.3" + array-differ "^3.0.0" + array-union "^2.1.0" + arrify "^2.0.1" + minimatch "^3.0.4" + multipipe@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" @@ -1480,6 +1728,11 @@ path-parse@^1.0.5: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" @@ -1495,6 +1748,11 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +picomatch@^2.0.5: + version "2.0.7" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6" + integrity sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA== + prettyjson@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prettyjson/-/prettyjson-1.2.1.tgz#fcffab41d19cab4dfae5e575e64246619b12d289" @@ -1667,6 +1925,16 @@ resolve@^1.3.2: dependencies: path-parse "^1.0.5" +reusify@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +run-parallel@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" + integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== + safe-buffer@^5.0.1, safe-buffer@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -1702,6 +1970,11 @@ semver@^5.1.0, semver@^5.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" @@ -1825,6 +2098,13 @@ tmp@0.0.29: dependencies: os-tmpdir "~1.0.1" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + tough-cookie@~2.3.0: version "2.3.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" @@ -1839,6 +2119,20 @@ tough-cookie@~2.3.3: dependencies: punycode "^1.4.1" +ts-morph@^3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-3.1.3.tgz#bbfa1d14481ee23bdd1c030340ccf4a243cfc844" + integrity sha512-CwjgyJTtd3f8vBi7Vr0IOgdOY6Wi/Tq0MhieXOE2B5ns5WWRD7BwMNHtv+ZufKI/S2U/lMrh+Q3bOauE4tsv2g== + dependencies: + "@dsherret/to-absolute-glob" "^2.0.2" + code-block-writer "9.4.1" + fs-extra "^8.1.0" + glob-parent "^5.0.0" + globby "^10.0.1" + is-negated-glob "^1.0.0" + multimatch "^4.0.0" + typescript "^3.0.1" + tslib@^1.8.0, tslib@^1.8.1: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" @@ -1899,11 +2193,26 @@ typescript@3.5.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c" integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA== +typescript@^3.0.1: + version "3.5.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977" + integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g== + +typical@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" + integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== + uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376" integrity sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg== +unc-path-regex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= + underscore@1.8.3, underscore@~1.8.3: version "1.8.3" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" @@ -1914,6 +2223,11 @@ underscore@^1.8.3: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" @@ -1994,6 +2308,20 @@ vsce@1.48.0: yauzl "^2.3.1" yazl "^2.2.2" +vscode-ripgrep@^1.4.0: + version "1.5.4" + resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.4.tgz#dae1c3eef350513299341cdf96e622c00b548eff" + integrity sha512-Bs8SvFAkR0QHf09J46VgNo19yRikOtj/f0zHzK3AM3ICjCGNN/BNoG9of6zGVHUTO+6Mk1RbKglyOHLKr8D1lg== + +vscode-telemetry-extractor@1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/vscode-telemetry-extractor/-/vscode-telemetry-extractor-1.4.3.tgz#e4af380beb4e2a63d6e4fa819b25ba7ef6dc4a10" + integrity sha512-OFklPErZnUBjrKte3hg+irQXue5rzgz4qnvE8kdaOnW1E/wynHUEXW9t5vF5q0hu2lodpGMkybwLkSjONZVzvg== + dependencies: + command-line-args "^5.1.1" + ts-morph "^3.1.2" + vscode-ripgrep "^1.4.0" + vso-node-api@6.1.2-preview: version "6.1.2-preview" resolved "https://registry.yarnpkg.com/vso-node-api/-/vso-node-api-6.1.2-preview.tgz#aab3546df2451ecd894e071bb99b5df19c5fa78f" From a407a73fd319c6777a8200040b4cb1d6bcbcfb52 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 18 Jul 2019 11:25:12 -0700 Subject: [PATCH 372/710] Bump vscode-ripgrep in remote/ too --- remote/package.json | 2 +- remote/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/remote/package.json b/remote/package.json index 57b51c1b82d..a4113e1e74c 100644 --- a/remote/package.json +++ b/remote/package.json @@ -18,7 +18,7 @@ "spdlog": "^0.9.0", "vscode-chokidar": "2.1.7", "vscode-proxy-agent": "0.4.0", - "vscode-ripgrep": "^1.3.1", + "vscode-ripgrep": "^1.5.4", "vscode-textmate": "^4.2.2", "xterm": "3.15.0-beta71", "xterm-addon-search": "0.2.0-beta2", diff --git a/remote/yarn.lock b/remote/yarn.lock index 78b7393ad6d..9aa7137893e 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -1123,10 +1123,10 @@ vscode-proxy-agent@0.4.0: https-proxy-agent "2.2.1" socks-proxy-agent "4.0.1" -vscode-ripgrep@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.3.1.tgz#51fb93debcd0c18a8b90dbc37f84f94333d0c486" - integrity sha512-4WLB/n4ZeWNi5AEzPTkfYrqbKtXlv0SlgmxbRVdulwZzGx/lfWeWPu9Shy32orM27IofQAQDuirbRBOYNJVzBA== +vscode-ripgrep@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.4.tgz#dae1c3eef350513299341cdf96e622c00b548eff" + integrity sha512-Bs8SvFAkR0QHf09J46VgNo19yRikOtj/f0zHzK3AM3ICjCGNN/BNoG9of6zGVHUTO+6Mk1RbKglyOHLKr8D1lg== vscode-textmate@^4.2.2: version "4.2.2" From d5dc23c7b900103b3a6123a6d228bd9f696c2fed Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Thu, 18 Jul 2019 11:40:24 -0700 Subject: [PATCH 373/710] Fix rendering of comment actions that have no icon, fixes #77116 --- .../contrib/comments/browser/media/review.css | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/contrib/comments/browser/media/review.css b/src/vs/workbench/contrib/comments/browser/media/review.css index 82ad6c76234..f7cb3fd20d1 100644 --- a/src/vs/workbench/contrib/comments/browser/media/review.css +++ b/src/vs/workbench/contrib/comments/browser/media/review.css @@ -29,10 +29,6 @@ height: 21px; } -.monaco-editor .review-widget .body .review-comment .comment-actions .action-item { - width: 22px; -} - .monaco-editor .review-widget .body .review-comment .comment-title { display: flex; width: 100%; @@ -148,10 +144,6 @@ margin-right: 4px; } -.monaco-editor .review-widget .body .review-comment .review-comment-contents .comment-reactions .action-item a.action-label { - display: inline-block; -} - .monaco-editor .review-widget .head .review-actions > .monaco-action-bar .icon.expand-review-action { background-image: url("./close-light.svg"); background-size: 16px; @@ -220,7 +212,6 @@ display: block; height: 16px; line-height: 16px; - min-width: 28px; background-size: 16px; background-position: center center; background-repeat: no-repeat; @@ -433,7 +424,8 @@ height: 100%; } -.monaco-editor .review-widget .head .review-actions > .monaco-action-bar .action-item { +.monaco-editor .review-widget .action-item { + min-width: 16px; margin-left: 4px; } From 4b46756a3fb76214b96ca753b76da6c6d9e52e95 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Thu, 18 Jul 2019 11:48:48 -0700 Subject: [PATCH 374/710] Remove unused comment icons --- .../comments/browser/media/delete-dark.svg | 3 --- .../comments/browser/media/delete-hc.svg | 3 --- .../comments/browser/media/delete-light.svg | 3 --- .../comments/browser/media/edit-dark.svg | 4 --- .../comments/browser/media/edit-hc.svg | 4 --- .../comments/browser/media/edit-light.svg | 4 --- .../contrib/comments/browser/media/review.css | 26 ------------------- 7 files changed, 47 deletions(-) delete mode 100644 src/vs/workbench/contrib/comments/browser/media/delete-dark.svg delete mode 100644 src/vs/workbench/contrib/comments/browser/media/delete-hc.svg delete mode 100644 src/vs/workbench/contrib/comments/browser/media/delete-light.svg delete mode 100644 src/vs/workbench/contrib/comments/browser/media/edit-dark.svg delete mode 100644 src/vs/workbench/contrib/comments/browser/media/edit-hc.svg delete mode 100644 src/vs/workbench/contrib/comments/browser/media/edit-light.svg diff --git a/src/vs/workbench/contrib/comments/browser/media/delete-dark.svg b/src/vs/workbench/contrib/comments/browser/media/delete-dark.svg deleted file mode 100644 index 75644595d19..00000000000 --- a/src/vs/workbench/contrib/comments/browser/media/delete-dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/vs/workbench/contrib/comments/browser/media/delete-hc.svg b/src/vs/workbench/contrib/comments/browser/media/delete-hc.svg deleted file mode 100644 index 75644595d19..00000000000 --- a/src/vs/workbench/contrib/comments/browser/media/delete-hc.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/vs/workbench/contrib/comments/browser/media/delete-light.svg b/src/vs/workbench/contrib/comments/browser/media/delete-light.svg deleted file mode 100644 index cf5f28ca35c..00000000000 --- a/src/vs/workbench/contrib/comments/browser/media/delete-light.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/vs/workbench/contrib/comments/browser/media/edit-dark.svg b/src/vs/workbench/contrib/comments/browser/media/edit-dark.svg deleted file mode 100644 index a72757482be..00000000000 --- a/src/vs/workbench/contrib/comments/browser/media/edit-dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/vs/workbench/contrib/comments/browser/media/edit-hc.svg b/src/vs/workbench/contrib/comments/browser/media/edit-hc.svg deleted file mode 100644 index b507253e449..00000000000 --- a/src/vs/workbench/contrib/comments/browser/media/edit-hc.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/vs/workbench/contrib/comments/browser/media/edit-light.svg b/src/vs/workbench/contrib/comments/browser/media/edit-light.svg deleted file mode 100644 index ae71150c0c8..00000000000 --- a/src/vs/workbench/contrib/comments/browser/media/edit-light.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/vs/workbench/contrib/comments/browser/media/review.css b/src/vs/workbench/contrib/comments/browser/media/review.css index f7cb3fd20d1..dd292251cd6 100644 --- a/src/vs/workbench/contrib/comments/browser/media/review.css +++ b/src/vs/workbench/contrib/comments/browser/media/review.css @@ -157,32 +157,6 @@ background-image: url("./close-hc.svg"); } -.monaco-editor .review-widget .body .review-comment .comment-title .icon.edit { - background-image: url("./edit-light.svg"); - background-size: 16px; -} - -.monaco-editor.vs-dark .review-widget .body .review-comment .comment-title .icon.edit { - background-image: url("./edit-dark.svg"); -} - -.monaco-editor.hc-black .review-widget .body .review-comment .comment-title .icon.edit { - background-image: url("./edit-hc.svg"); -} - -.monaco-editor .review-widget .body .review-comment .comment-title .icon.delete { - background-image: url("./delete-light.svg"); - background-size: 16px; -} - -.monaco-editor.vs-dark .review-widget .body .review-comment .comment-title .icon.delete { - background-image: url("./delete-dark.svg"); -} - -.monaco-editor.hc-black .review-widget .body .review-comment .comment-title .icon.delete { - background-image: url("./delete-hc.svg"); -} - .monaco-editor .review-widget .body .review-comment .review-comment-contents .comment-reactions .action-item a.action-label.toolbar-toggle-pickReactions { display: none; background-image: url("./reaction-light.svg"); From 78de125b5f04f7761eb3675cb0319404bd7c89d7 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 18 Jul 2019 22:33:37 +0200 Subject: [PATCH 375/710] Introduce new enablement states --- .../api/browser/mainThreadExtensionService.ts | 2 +- .../extensions/browser/extensionsActions.ts | 32 +- .../browser/extensionsWorkbenchService.ts | 16 +- .../extensions/common/extensionsUtils.ts | 2 +- .../runtimeExtensionsEditor.ts | 4 +- .../extensionsActions.test.ts | 54 +-- .../electron-browser/extensionsViews.test.ts | 4 +- .../extensionsWorkbenchService.test.ts | 244 ++++++------- .../welcome/page/browser/welcomePage.ts | 6 +- .../common/extensionEnablementService.ts | 44 ++- .../common/extensionManagement.ts | 10 +- .../extensionEnablementService.test.ts | 325 +++++++++++------- .../common/inactiveExtensionUrlHandler.ts | 2 +- 13 files changed, 424 insertions(+), 321 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadExtensionService.ts b/src/vs/workbench/api/browser/mainThreadExtensionService.ts index e4453a9d4fe..41ab45643b9 100644 --- a/src/vs/workbench/api/browser/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/browser/mainThreadExtensionService.ts @@ -102,7 +102,7 @@ export class MainThreadExtensionService implements MainThreadExtensionServiceSha message: localize('disabledDep', "Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is disabled. Would you like to enable the extension and reload the window?", extName, missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name), actions: { primary: [new Action('enable', localize('enable dep', "Enable and Reload"), '', true, - () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === EnablementState.Disabled ? EnablementState.Enabled : EnablementState.WorkspaceEnabled) + () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === EnablementState.DisabledGlobally ? EnablementState.EnabledGlobally : EnablementState.EnabledWorkspace) .then(() => this._windowService.reloadWindow(), e => this._notificationService.error(e)))] } }); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 069634a1c0e..0670f0faa51 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -895,13 +895,13 @@ export class EnableForWorkspaceAction extends ExtensionAction { this.enabled = false; if (this.extension && this.extension.local) { this.enabled = this.extension.state === ExtensionState.Installed - && (this.extension.enablementState === EnablementState.Disabled || this.extension.enablementState === EnablementState.WorkspaceDisabled) + && !this.extensionEnablementService.isEnabled(this.extension.local) && this.extensionEnablementService.canChangeEnablement(this.extension.local); } } run(): Promise { - return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.WorkspaceEnabled); + return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.EnabledWorkspace); } } @@ -922,13 +922,13 @@ export class EnableGloballyAction extends ExtensionAction { this.enabled = false; if (this.extension && this.extension.local) { this.enabled = this.extension.state === ExtensionState.Installed - && this.extension.enablementState === EnablementState.Disabled + && this.extension.enablementState === EnablementState.DisabledGlobally && this.extensionEnablementService.canChangeEnablement(this.extension.local); } } run(): Promise { - return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.Enabled); + return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.EnabledGlobally); } } @@ -950,13 +950,13 @@ export class DisableForWorkspaceAction extends ExtensionAction { this.enabled = false; if (this.extension && this.extension.local && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier) && this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY)) { this.enabled = this.extension.state === ExtensionState.Installed - && (this.extension.enablementState === EnablementState.Enabled || this.extension.enablementState === EnablementState.WorkspaceEnabled) + && (this.extension.enablementState === EnablementState.EnabledGlobally || this.extension.enablementState === EnablementState.EnabledWorkspace) && this.extensionEnablementService.canChangeEnablement(this.extension.local); } } run(): Promise { - return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.WorkspaceDisabled); + return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.DisabledWorkspace); } } @@ -977,13 +977,13 @@ export class DisableGloballyAction extends ExtensionAction { this.enabled = false; if (this.extension && this.extension.local && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier))) { this.enabled = this.extension.state === ExtensionState.Installed - && (this.extension.enablementState === EnablementState.Enabled || this.extension.enablementState === EnablementState.WorkspaceEnabled) + && (this.extension.enablementState === EnablementState.EnabledGlobally || this.extension.enablementState === EnablementState.EnabledWorkspace) && this.extensionEnablementService.canChangeEnablement(this.extension.local); } } run(): Promise { - return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.Disabled); + return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.DisabledGlobally); } } @@ -2528,8 +2528,8 @@ export class StatusLabelAction extends Action implements IExtensionContainer { } if (currentEnablementState !== null) { - const currentlyEnabled = currentEnablementState === EnablementState.Enabled || currentEnablementState === EnablementState.WorkspaceEnabled; - const enabled = this.enablementState === EnablementState.Enabled || this.enablementState === EnablementState.WorkspaceEnabled; + const currentlyEnabled = currentEnablementState === EnablementState.EnabledGlobally || currentEnablementState === EnablementState.EnabledWorkspace; + const enabled = this.enablementState === EnablementState.EnabledGlobally || this.enablementState === EnablementState.EnabledWorkspace; if (!currentlyEnabled && enabled) { return canAddExtension() ? localize('enabled', "Enabled") : null; } @@ -2727,7 +2727,7 @@ export class DisableAllAction extends Action { } run(): Promise { - return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local.filter(e => e.type === ExtensionType.User), EnablementState.Disabled); + return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local.filter(e => e.type === ExtensionType.User), EnablementState.DisabledGlobally); } } @@ -2754,7 +2754,7 @@ export class DisableAllWorkpsaceAction extends Action { } run(): Promise { - return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local.filter(e => e.type === ExtensionType.User), EnablementState.WorkspaceDisabled); + return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local.filter(e => e.type === ExtensionType.User), EnablementState.DisabledWorkspace); } } @@ -2775,11 +2775,11 @@ export class EnableAllAction extends Action { } private update(): void { - this.enabled = this.extensionsWorkbenchService.local.some(e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && (e.enablementState === EnablementState.Disabled || e.enablementState === EnablementState.WorkspaceDisabled)); + this.enabled = this.extensionsWorkbenchService.local.some(e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && !this.extensionEnablementService.isEnabled(e.local)); } run(): Promise { - return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local, EnablementState.Enabled); + return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local, EnablementState.EnabledGlobally); } } @@ -2802,11 +2802,11 @@ export class EnableAllWorkpsaceAction extends Action { } private update(): void { - this.enabled = this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY && this.extensionsWorkbenchService.local.some(e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && (e.enablementState === EnablementState.Disabled || e.enablementState === EnablementState.WorkspaceDisabled)); + this.enabled = this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY && this.extensionsWorkbenchService.local.some(e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && !this.extensionEnablementService.isEnabled(e.local)); } run(): Promise { - return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local, EnablementState.WorkspaceEnabled); + return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local, EnablementState.EnabledWorkspace); } } diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index fbefd13d378..b0c5726c6b9 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -44,7 +44,7 @@ interface IExtensionStateProvider { class Extension implements IExtension { - public enablementState: EnablementState = EnablementState.Enabled; + public enablementState: EnablementState = EnablementState.EnabledGlobally; constructor( private stateProvider: IExtensionStateProvider, @@ -887,16 +887,16 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension private checkAndEnableDisabledDependencies(extensionIdentifier: IExtensionIdentifier): Promise { const extension = this.local.filter(e => (e.local || e.gallery) && areSameExtensions(extensionIdentifier, e.identifier))[0]; if (extension) { - const disabledDepencies = this.getExtensionsRecursively([extension], this.local, EnablementState.Enabled, { dependencies: true, pack: false }); + const disabledDepencies = this.getExtensionsRecursively([extension], this.local, EnablementState.EnabledGlobally, { dependencies: true, pack: false }); if (disabledDepencies.length) { - return this.setEnablement(disabledDepencies, EnablementState.Enabled); + return this.setEnablement(disabledDepencies, EnablementState.EnabledGlobally); } } return Promise.resolve(); } private promptAndSetEnablement(extensions: IExtension[], enablementState: EnablementState): Promise { - const enable = enablementState === EnablementState.Enabled || enablementState === EnablementState.WorkspaceEnabled; + const enable = enablementState === EnablementState.EnabledGlobally || enablementState === EnablementState.EnabledWorkspace; if (enable) { const allDependenciesAndPackedExtensions = this.getExtensionsRecursively(extensions, this.local, enablementState, { dependencies: true, pack: true }); return this.checkAndSetEnablement(extensions, allDependenciesAndPackedExtensions, enablementState); @@ -911,7 +911,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension private checkAndSetEnablement(extensions: IExtension[], otherExtensions: IExtension[], enablementState: EnablementState): Promise { const allExtensions = [...extensions, ...otherExtensions]; - const enable = enablementState === EnablementState.Enabled || enablementState === EnablementState.WorkspaceEnabled; + const enable = enablementState === EnablementState.EnabledGlobally || enablementState === EnablementState.EnabledWorkspace; if (!enable) { for (const extension of extensions) { let dependents = this.getDependentsAfterDisablement(extension, allExtensions, this.local); @@ -936,7 +936,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension if (i.enablementState === enablementState) { return false; } - const enable = enablementState === EnablementState.Enabled || enablementState === EnablementState.WorkspaceEnabled; + const enable = enablementState === EnablementState.EnabledGlobally || enablementState === EnablementState.EnabledWorkspace; return (enable || i.type === ExtensionType.User) // Include all Extensions for enablement and only user extensions for disablement && (options.dependencies || options.pack) && extensions.some(extension => @@ -960,7 +960,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension if (i === extension) { return false; } - if (i.enablementState === EnablementState.WorkspaceDisabled || i.enablementState === EnablementState.Disabled) { + if (!(i.enablementState === EnablementState.EnabledWorkspace || i.enablementState === EnablementState.EnabledGlobally)) { return false; } if (extensionsToDisable.indexOf(i) !== -1) { @@ -1010,7 +1010,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension ] } */ - this.telemetryService.publicLog(enablementState === EnablementState.Enabled || enablementState === EnablementState.WorkspaceEnabled ? 'extension:enable' : 'extension:disable', extensions[i].telemetryData); + this.telemetryService.publicLog(enablementState === EnablementState.EnabledGlobally || enablementState === EnablementState.EnabledWorkspace ? 'extension:enable' : 'extension:disable', extensions[i].telemetryData); } } return changed; diff --git a/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts b/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts index 282978991f9..ea48be50fa0 100644 --- a/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts +++ b/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts @@ -71,7 +71,7 @@ export class KeymapExtensions extends Disposable implements IWorkbenchContributi */ this.telemetryService.publicLog('disableOtherKeymaps', telemetryData); if (confirmed) { - this.extensionEnablementService.setEnablement(oldKeymaps.map(keymap => keymap.local), EnablementState.Disabled); + this.extensionEnablementService.setEnablement(oldKeymaps.map(keymap => keymap.local), EnablementState.DisabledGlobally); } }; diff --git a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts index 92c40276e84..1366ea7ebd8 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts @@ -420,8 +420,8 @@ export class RuntimeExtensionsEditor extends BaseEditor { actions.push(new Separator()); if (e.element.marketplaceInfo) { - actions.push(new Action('runtimeExtensionsEditor.action.disableWorkspace', nls.localize('disable workspace', "Disable (Workspace)"), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element!.marketplaceInfo, EnablementState.WorkspaceDisabled))); - actions.push(new Action('runtimeExtensionsEditor.action.disable', nls.localize('disable', "Disable"), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element!.marketplaceInfo, EnablementState.Disabled))); + actions.push(new Action('runtimeExtensionsEditor.action.disableWorkspace', nls.localize('disable workspace', "Disable (Workspace)"), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element!.marketplaceInfo, EnablementState.DisabledWorkspace))); + actions.push(new Action('runtimeExtensionsEditor.action.disable', nls.localize('disable', "Disable"), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element!.marketplaceInfo, EnablementState.DisabledGlobally))); actions.push(new Separator()); } const state = this._extensionHostProfileService.state; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index ab4af28558b..36d5027e8f4 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -602,7 +602,7 @@ suite('ExtensionsActions Test', () => { test('Test EnableForWorkspaceAction when the extension is disabled globally', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -617,7 +617,7 @@ suite('ExtensionsActions Test', () => { test('Test EnableForWorkspaceAction when extension is disabled for workspace', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.WorkspaceDisabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledWorkspace) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -632,8 +632,8 @@ suite('ExtensionsActions Test', () => { test('Test EnableForWorkspaceAction when the extension is disabled globally and workspace', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.WorkspaceDisabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledWorkspace)) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -666,7 +666,7 @@ suite('ExtensionsActions Test', () => { test('Test EnableGloballyAction when the extension is disabled for workspace', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.WorkspaceDisabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledWorkspace) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -681,7 +681,7 @@ suite('ExtensionsActions Test', () => { test('Test EnableGloballyAction when the extension is disabled globally', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -696,8 +696,8 @@ suite('ExtensionsActions Test', () => { test('Test EnableGloballyAction when the extension is disabled in both', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.WorkspaceDisabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledWorkspace)) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -730,7 +730,7 @@ suite('ExtensionsActions Test', () => { test('Test EnableDropDownAction when extension is installed and disabled globally', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -745,7 +745,7 @@ suite('ExtensionsActions Test', () => { test('Test EnableDropDownAction when extension is installed and disabled for workspace', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.WorkspaceDisabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledWorkspace) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -806,7 +806,7 @@ suite('ExtensionsActions Test', () => { test('Test DisableForWorkspaceAction when the extension is disabled globally', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -821,7 +821,7 @@ suite('ExtensionsActions Test', () => { test('Test DisableForWorkspaceAction when the extension is disabled workspace', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -854,7 +854,7 @@ suite('ExtensionsActions Test', () => { test('Test DisableGloballyAction when the extension is disabled globally', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -869,7 +869,7 @@ suite('ExtensionsActions Test', () => { test('Test DisableGloballyAction when the extension is disabled for workspace', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.WorkspaceDisabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledWorkspace) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -914,7 +914,7 @@ suite('ExtensionsActions Test', () => { test('Test DisableDropDownAction when extension is installed and disabled globally', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -929,7 +929,7 @@ suite('ExtensionsActions Test', () => { test('Test DisableDropDownAction when extension is installed and disabled for workspace', () => { const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.WorkspaceDisabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledWorkspace) .then(() => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); @@ -1198,7 +1198,7 @@ suite('ExtensionsActions Test', () => { test('Test ReloadAction when extension is updated when not running', () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]); const local = aLocalExtension('a', { version: '1.0.1' }); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) .then(() => { const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); @@ -1226,7 +1226,7 @@ suite('ExtensionsActions Test', () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); return workbenchService.queryLocal().then(extensions => { testObject.extension = extensions[0]; - return workbenchService.setEnablement(extensions[0], EnablementState.Disabled) + return workbenchService.setEnablement(extensions[0], EnablementState.DisabledGlobally) .then(() => testObject.update()) .then(() => { assert.ok(testObject.enabled); @@ -1245,8 +1245,8 @@ suite('ExtensionsActions Test', () => { return workbenchService.queryLocal(). then(extensions => { testObject.extension = extensions[0]; - return workbenchService.setEnablement(extensions[0], EnablementState.Disabled) - .then(() => workbenchService.setEnablement(extensions[0], EnablementState.Enabled)) + return workbenchService.setEnablement(extensions[0], EnablementState.DisabledGlobally) + .then(() => workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally)) .then(() => assert.ok(!testObject.enabled)); }); }); @@ -1254,7 +1254,7 @@ suite('ExtensionsActions Test', () => { test('Test ReloadAction when extension is enabled when not running', () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]); const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) .then(() => { const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); @@ -1263,7 +1263,7 @@ suite('ExtensionsActions Test', () => { return workbenchService.queryLocal() .then(extensions => { testObject.extension = extensions[0]; - return workbenchService.setEnablement(extensions[0], EnablementState.Enabled) + return workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally) .then(() => testObject.update()) .then(() => { assert.ok(testObject.enabled); @@ -1276,7 +1276,7 @@ suite('ExtensionsActions Test', () => { test('Test ReloadAction when extension enablement is toggled when not running', () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]); const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) .then(() => { const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); @@ -1285,8 +1285,8 @@ suite('ExtensionsActions Test', () => { return workbenchService.queryLocal() .then(extensions => { testObject.extension = extensions[0]; - return workbenchService.setEnablement(extensions[0], EnablementState.Enabled) - .then(() => workbenchService.setEnablement(extensions[0], EnablementState.Disabled)) + return workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally) + .then(() => workbenchService.setEnablement(extensions[0], EnablementState.DisabledGlobally)) .then(() => assert.ok(!testObject.enabled)); }); }); @@ -1295,7 +1295,7 @@ suite('ExtensionsActions Test', () => { test('Test ReloadAction when extension is updated when not running and enabled', () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]); const local = aLocalExtension('a', { version: '1.0.1' }); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) .then(() => { const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); @@ -1308,7 +1308,7 @@ suite('ExtensionsActions Test', () => { const gallery = aGalleryExtension('a', { identifier: local.identifier, version: '1.0.2' }); installEvent.fire({ identifier: gallery.identifier, gallery }); didInstallEvent.fire({ identifier: gallery.identifier, gallery, operation: InstallOperation.Install, local: aLocalExtension('a', gallery, gallery) }); - return workbenchService.setEnablement(extensions[0], EnablementState.Enabled) + return workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally) .then(() => testObject.update()) .then(() => { assert.ok(testObject.enabled); diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts index 00b4e80ab1f..90db9e85e98 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts @@ -145,8 +145,8 @@ suite('ExtensionsListView Tests', () => { ]); } }); - await (instantiationService.get(IExtensionEnablementService)).setEnablement([localDisabledTheme], EnablementState.Disabled); - await (instantiationService.get(IExtensionEnablementService)).setEnablement([localDisabledLanguage], EnablementState.Disabled); + await (instantiationService.get(IExtensionEnablementService)).setEnablement([localDisabledTheme], EnablementState.DisabledGlobally); + await (instantiationService.get(IExtensionEnablementService)).setEnablement([localDisabledLanguage], EnablementState.DisabledGlobally); instantiationService.set(IExtensionsWorkbenchService, instantiationService.createInstance(ExtensionsWorkbenchService)); testableView = instantiationService.createInstance(ExtensionsListView, {}); diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts index ff52c3d1cda..69b101504fa 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts @@ -482,86 +482,86 @@ suite('ExtensionsWorkbenchServiceTest', () => { }); test('test uninstalled extensions are always enabled', async () => { - return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.WorkspaceDisabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.DisabledWorkspace)) .then(async () => { testObject = await aWorkbenchService(); instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a'))); return testObject.queryGallery(CancellationToken.None).then(pagedResponse => { const actual = pagedResponse.firstPage[0]; - assert.equal(actual.enablementState, EnablementState.Enabled); + assert.equal(actual.enablementState, EnablementState.EnabledGlobally); }); }); }); test('test enablement state installed enabled extension', async () => { - return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.WorkspaceDisabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.DisabledWorkspace)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [aLocalExtension('a')]); testObject = await aWorkbenchService(); const actual = testObject.local[0]; - assert.equal(actual.enablementState, EnablementState.Enabled); + assert.equal(actual.enablementState, EnablementState.EnabledGlobally); }); }); test('test workspace disabled extension', async () => { const extensionA = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('d')], EnablementState.Disabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.WorkspaceDisabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('e')], EnablementState.WorkspaceDisabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('d')], EnablementState.DisabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.DisabledWorkspace)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('e')], EnablementState.DisabledWorkspace)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA]); testObject = await aWorkbenchService(); const actual = testObject.local[0]; - assert.equal(actual.enablementState, EnablementState.WorkspaceDisabled); + assert.equal(actual.enablementState, EnablementState.DisabledWorkspace); }); }); test('test globally disabled extension', async () => { const localExtension = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([localExtension], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('d')], EnablementState.Disabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.WorkspaceDisabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([localExtension], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('d')], EnablementState.DisabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.DisabledWorkspace)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [localExtension]); testObject = await aWorkbenchService(); const actual = testObject.local[0]; - assert.equal(actual.enablementState, EnablementState.Disabled); + assert.equal(actual.enablementState, EnablementState.DisabledGlobally); }); }); test('test enablement state is updated for user extensions', async () => { - return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.WorkspaceDisabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.DisabledWorkspace)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [aLocalExtension('a')]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.WorkspaceDisabled) + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledWorkspace) .then(() => { const actual = testObject.local[0]; - assert.equal(actual.enablementState, EnablementState.WorkspaceDisabled); + assert.equal(actual.enablementState, EnablementState.DisabledWorkspace); }); }); }); test('test enable extension globally when extension is disabled for workspace', async () => { const localExtension = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([localExtension], EnablementState.WorkspaceDisabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([localExtension], EnablementState.DisabledWorkspace) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [localExtension]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Enabled) + return testObject.setEnablement(testObject.local[0], EnablementState.EnabledGlobally) .then(() => { const actual = testObject.local[0]; - assert.equal(actual.enablementState, EnablementState.Enabled); + assert.equal(actual.enablementState, EnablementState.EnabledGlobally); }); }); }); @@ -570,10 +570,10 @@ suite('ExtensionsWorkbenchServiceTest', () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [aLocalExtension('a')]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Disabled) + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledGlobally) .then(() => { const actual = testObject.local[0]; - assert.equal(actual.enablementState, EnablementState.Disabled); + assert.equal(actual.enablementState, EnablementState.DisabledGlobally); }); }); @@ -581,25 +581,25 @@ suite('ExtensionsWorkbenchServiceTest', () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [aLocalExtension('a', {}, { type: ExtensionType.System })]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Disabled) + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledGlobally) .then(() => { const actual = testObject.local[0]; - assert.equal(actual.enablementState, EnablementState.Disabled); + assert.equal(actual.enablementState, EnablementState.DisabledGlobally); }); }); test('test enablement state is updated on change from outside', async () => { const localExtension = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.WorkspaceDisabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.DisabledWorkspace)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [localExtension]); testObject = await aWorkbenchService(); - return instantiationService.get(IExtensionEnablementService).setEnablement([localExtension], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([localExtension], EnablementState.DisabledGlobally) .then(() => { const actual = testObject.local[0]; - assert.equal(actual.enablementState, EnablementState.Disabled); + assert.equal(actual.enablementState, EnablementState.DisabledGlobally); }); }); }); @@ -609,17 +609,17 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c'); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Enabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Enabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Enabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.EnabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.EnabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.EnabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Disabled) + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledGlobally) .then(() => { - assert.equal(testObject.local[0].enablementState, EnablementState.Disabled); - assert.equal(testObject.local[1].enablementState, EnablementState.Enabled); + assert.equal(testObject.local[0].enablementState, EnablementState.DisabledGlobally); + assert.equal(testObject.local[1].enablementState, EnablementState.EnabledGlobally); }); }); }); @@ -629,17 +629,17 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c'); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Enabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Enabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Enabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.EnabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.EnabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.EnabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Disabled) + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledGlobally) .then(() => { - assert.equal(testObject.local[0].enablementState, EnablementState.Disabled); - assert.equal(testObject.local[1].enablementState, EnablementState.Disabled); + assert.equal(testObject.local[0].enablementState, EnablementState.DisabledGlobally); + assert.equal(testObject.local[1].enablementState, EnablementState.DisabledGlobally); }); }); }); @@ -649,17 +649,17 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c'); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Enabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Enabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Enabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.EnabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.EnabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.EnabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Disabled) + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledGlobally) .then(() => { - assert.equal(testObject.local[0].enablementState, EnablementState.Disabled); - assert.equal(testObject.local[1].enablementState, EnablementState.Disabled); + assert.equal(testObject.local[0].enablementState, EnablementState.DisabledGlobally); + assert.equal(testObject.local[1].enablementState, EnablementState.DisabledGlobally); }); }); }); @@ -669,13 +669,13 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c'); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Enabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Enabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Enabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.EnabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.EnabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.EnabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[1], EnablementState.Disabled).then(() => assert.fail('Should fail'), error => assert.ok(true)); + return testObject.setEnablement(testObject.local[1], EnablementState.DisabledGlobally).then(() => assert.fail('Should fail'), error => assert.ok(true)); }); }); @@ -684,15 +684,15 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c'); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Enabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Enabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Enabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.EnabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.EnabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.EnabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[1], EnablementState.Disabled) + return testObject.setEnablement(testObject.local[1], EnablementState.DisabledGlobally) .then(() => { - assert.equal(testObject.local[1].enablementState, EnablementState.Disabled); + assert.equal(testObject.local[1].enablementState, EnablementState.DisabledGlobally); }); }); }); @@ -702,19 +702,19 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c'); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Enabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Enabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Enabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.EnabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.EnabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.EnabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); const target = sinon.spy(); testObject = await aWorkbenchService(); - return testObject.setEnablement([testObject.local[1], testObject.local[0]], EnablementState.Disabled) + return testObject.setEnablement([testObject.local[1], testObject.local[0]], EnablementState.DisabledGlobally) .then(() => { assert.ok(!target.called); - assert.equal(testObject.local[0].enablementState, EnablementState.Disabled); - assert.equal(testObject.local[1].enablementState, EnablementState.Disabled); + assert.equal(testObject.local[0].enablementState, EnablementState.DisabledGlobally); + assert.equal(testObject.local[1].enablementState, EnablementState.DisabledGlobally); }); }); }); @@ -724,19 +724,19 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c'); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Disabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Disabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.DisabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.DisabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); const target = sinon.spy(); testObject = await aWorkbenchService(); - return testObject.setEnablement([testObject.local[1], testObject.local[0]], EnablementState.Enabled) + return testObject.setEnablement([testObject.local[1], testObject.local[0]], EnablementState.EnabledGlobally) .then(() => { assert.ok(!target.called); - assert.equal(testObject.local[0].enablementState, EnablementState.Enabled); - assert.equal(testObject.local[1].enablementState, EnablementState.Enabled); + assert.equal(testObject.local[0].enablementState, EnablementState.EnabledGlobally); + assert.equal(testObject.local[1].enablementState, EnablementState.EnabledGlobally); }); }); }); @@ -746,16 +746,16 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c', { extensionDependencies: ['pub.b'] }); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Enabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Enabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Enabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.EnabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.EnabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.EnabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Disabled) + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledGlobally) .then(() => { - assert.equal(testObject.local[0].enablementState, EnablementState.Disabled); + assert.equal(testObject.local[0].enablementState, EnablementState.DisabledGlobally); }); }); }); @@ -765,16 +765,16 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c', { extensionDependencies: ['pub.b'] }); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Enabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Enabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Disabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.EnabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.EnabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.DisabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Disabled) + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledGlobally) .then(() => { - assert.equal(testObject.local[0].enablementState, EnablementState.Disabled); + assert.equal(testObject.local[0].enablementState, EnablementState.DisabledGlobally); }); }); }); @@ -784,14 +784,14 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b', { extensionDependencies: ['pub.a'] }); const extensionC = aLocalExtension('c'); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Enabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Enabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Enabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.EnabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.EnabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.EnabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Disabled) + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledGlobally) .then(() => assert.fail('An extension with dependent should not be disabled'), () => null); }); }); @@ -801,16 +801,16 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c', { extensionDependencies: ['pub.b'] }); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Enabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Disabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Enabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.EnabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.DisabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.EnabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Disabled) - .then(() => assert.equal(testObject.local[0].enablementState, EnablementState.Disabled)); + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledGlobally) + .then(() => assert.equal(testObject.local[0].enablementState, EnablementState.DisabledGlobally)); }); }); @@ -819,13 +819,13 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b', { extensionDependencies: ['pub.c'] }); const extensionC = aLocalExtension('c', { extensionDependencies: ['pub.a'] }); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Enabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Enabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Enabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.EnabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.EnabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.EnabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Disabled) + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledGlobally) .then(() => assert.fail('An extension with dependent should not be disabled'), () => null); }); }); @@ -835,17 +835,17 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c'); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Disabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Disabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.DisabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.DisabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Enabled) + return testObject.setEnablement(testObject.local[0], EnablementState.EnabledGlobally) .then(() => { - assert.equal(testObject.local[0].enablementState, EnablementState.Enabled); - assert.equal(testObject.local[1].enablementState, EnablementState.Enabled); + assert.equal(testObject.local[0].enablementState, EnablementState.EnabledGlobally); + assert.equal(testObject.local[1].enablementState, EnablementState.EnabledGlobally); }); }); }); @@ -855,18 +855,18 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c'); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Enabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Disabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.EnabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.DisabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); const target = sinon.spy(); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Enabled) + return testObject.setEnablement(testObject.local[0], EnablementState.EnabledGlobally) .then(() => { assert.ok(!target.called); - assert.equal(testObject.local[0].enablementState, EnablementState.Enabled); + assert.equal(testObject.local[0].enablementState, EnablementState.EnabledGlobally); }); }); }); @@ -876,19 +876,19 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b'); const extensionC = aLocalExtension('c'); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Disabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Disabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.DisabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.DisabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); const target = sinon.spy(); testObject = await aWorkbenchService(); - return testObject.setEnablement([testObject.local[1], testObject.local[0]], EnablementState.Enabled) + return testObject.setEnablement([testObject.local[1], testObject.local[0]], EnablementState.EnabledGlobally) .then(() => { assert.ok(!target.called); - assert.equal(testObject.local[0].enablementState, EnablementState.Enabled); - assert.equal(testObject.local[1].enablementState, EnablementState.Enabled); + assert.equal(testObject.local[0].enablementState, EnablementState.EnabledGlobally); + assert.equal(testObject.local[1].enablementState, EnablementState.EnabledGlobally); }); }); }); @@ -898,48 +898,48 @@ suite('ExtensionsWorkbenchServiceTest', () => { const extensionB = aLocalExtension('b', { extensionDependencies: ['pub.c'] }); const extensionC = aLocalExtension('c', { extensionDependencies: ['pub.a'] }); - return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.Disabled)) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.Disabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([extensionA], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionB], EnablementState.DisabledGlobally)) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([extensionC], EnablementState.DisabledGlobally)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [extensionA, extensionB, extensionC]); testObject = await aWorkbenchService(); - return testObject.setEnablement(testObject.local[0], EnablementState.Enabled) + return testObject.setEnablement(testObject.local[0], EnablementState.EnabledGlobally) .then(() => { - assert.equal(testObject.local[0].enablementState, EnablementState.Enabled); - assert.equal(testObject.local[1].enablementState, EnablementState.Enabled); - assert.equal(testObject.local[2].enablementState, EnablementState.Enabled); + assert.equal(testObject.local[0].enablementState, EnablementState.EnabledGlobally); + assert.equal(testObject.local[1].enablementState, EnablementState.EnabledGlobally); + assert.equal(testObject.local[2].enablementState, EnablementState.EnabledGlobally); }); }); }); test('test change event is fired when disablement flags are changed', async () => { - return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.WorkspaceDisabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.DisabledWorkspace)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [aLocalExtension('a')]); testObject = await aWorkbenchService(); const target = sinon.spy(); testObject.onChange(target); - return testObject.setEnablement(testObject.local[0], EnablementState.Disabled) + return testObject.setEnablement(testObject.local[0], EnablementState.DisabledGlobally) .then(() => assert.ok(target.calledOnce)); }); }); test('test change event is fired when disablement flags are changed from outside', async () => { const localExtension = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.Disabled) - .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.WorkspaceDisabled)) + return instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('c')], EnablementState.DisabledGlobally) + .then(() => instantiationService.get(IExtensionEnablementService).setEnablement([aLocalExtension('b')], EnablementState.DisabledWorkspace)) .then(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [localExtension]); testObject = await aWorkbenchService(); const target = sinon.spy(); testObject.onChange(target); - return instantiationService.get(IExtensionEnablementService).setEnablement([localExtension], EnablementState.Disabled) + return instantiationService.get(IExtensionEnablementService).setEnablement([localExtension], EnablementState.DisabledGlobally) .then(() => assert.ok(target.calledOnce)); }); }); diff --git a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts index 8317f147dfa..ab0d4193c40 100644 --- a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts +++ b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts @@ -458,7 +458,7 @@ class WelcomePage extends Disposable { .then(installed => { const local = installed.filter(i => areSameExtensions(extension.identifier, i.identifier))[0]; // TODO: Do this as part of the install to avoid multiple events. - return this.extensionEnablementService.setEnablement([local], EnablementState.Disabled).then(() => local); + return this.extensionEnablementService.setEnablement([local], EnablementState.DisabledGlobally).then(() => local); }); }); @@ -473,12 +473,12 @@ class WelcomePage extends Disposable { this.notificationService.info(strings.installing.replace('{0}', extensionSuggestion.name)); }, 300); const extensionsToDisable = extensions.filter(extension => isKeymapExtension(this.tipsService, extension) && extension.globallyEnabled).map(extension => extension.local); - extensionsToDisable.length ? this.extensionEnablementService.setEnablement(extensionsToDisable, EnablementState.Disabled) : Promise.resolve() + extensionsToDisable.length ? this.extensionEnablementService.setEnablement(extensionsToDisable, EnablementState.DisabledGlobally) : Promise.resolve() .then(() => { return foundAndInstalled.then(foundExtension => { messageDelay.cancel(); if (foundExtension) { - return this.extensionEnablementService.setEnablement([foundExtension], EnablementState.Enabled) + return this.extensionEnablementService.setEnablement([foundExtension], EnablementState.EnabledGlobally) .then(() => { /* __GDPR__FRAGMENT__ "WelcomePageInstalled-2" : { diff --git a/src/vs/workbench/services/extensionManagement/common/extensionEnablementService.ts b/src/vs/workbench/services/extensionManagement/common/extensionEnablementService.ts index d4243701c05..3ceb5b20856 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionEnablementService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionEnablementService.ts @@ -56,30 +56,34 @@ export class ExtensionEnablementService extends Disposable implements IExtension } getEnablementState(extension: IExtension): EnablementState { - if (this._isSystemDisabled(extension)) { - return EnablementState.Disabled; + if (this._isDisabledInEnv(extension)) { + return EnablementState.DisabledByEnvironemt; + } + if (this._isDisabledByExtensionKind(extension)) { + return EnablementState.DisabledByExtensionKind; } const identifier = extension.identifier; if (this.hasWorkspace) { if (this._getEnabledExtensions(StorageScope.WORKSPACE).filter(e => areSameExtensions(e, identifier))[0]) { - return EnablementState.WorkspaceEnabled; + return EnablementState.EnabledWorkspace; } if (this._getDisabledExtensions(StorageScope.WORKSPACE).filter(e => areSameExtensions(e, identifier))[0]) { - return EnablementState.WorkspaceDisabled; + return EnablementState.DisabledWorkspace; } } if (this._getDisabledExtensions(StorageScope.GLOBAL).filter(e => areSameExtensions(e, identifier))[0]) { - return EnablementState.Disabled; + return EnablementState.DisabledGlobally; } - return EnablementState.Enabled; + return EnablementState.EnabledGlobally; } canChangeEnablement(extension: IExtension): boolean { if (extension.manifest && extension.manifest.contributes && extension.manifest.contributes.localizations && extension.manifest.contributes.localizations.length) { return false; } - if (this._isSystemDisabled(extension)) { + const enablementState = this.getEnablementState(extension); + if (enablementState === EnablementState.DisabledByEnvironemt || enablementState === EnablementState.DisabledByExtensionKind) { return false; } return true; @@ -87,7 +91,7 @@ export class ExtensionEnablementService extends Disposable implements IExtension async setEnablement(extensions: IExtension[], newState: EnablementState): Promise { - const workspace = newState === EnablementState.WorkspaceDisabled || newState === EnablementState.WorkspaceEnabled; + const workspace = newState === EnablementState.DisabledWorkspace || newState === EnablementState.EnabledWorkspace; if (workspace && !this.hasWorkspace) { return Promise.reject(new Error(localize('noWorkspace', "No workspace."))); } @@ -109,16 +113,16 @@ export class ExtensionEnablementService extends Disposable implements IExtension } switch (newState) { - case EnablementState.Enabled: + case EnablementState.EnabledGlobally: this._enableExtension(extension.identifier); break; - case EnablementState.Disabled: + case EnablementState.DisabledGlobally: this._disableExtension(extension.identifier); break; - case EnablementState.WorkspaceEnabled: + case EnablementState.EnabledWorkspace: this._enableExtensionInWorkspace(extension.identifier); break; - case EnablementState.WorkspaceDisabled: + case EnablementState.DisabledWorkspace: this._disableExtensionInWorkspace(extension.identifier); break; } @@ -128,10 +132,10 @@ export class ExtensionEnablementService extends Disposable implements IExtension isEnabled(extension: IExtension): boolean { const enablementState = this.getEnablementState(extension); - return enablementState === EnablementState.WorkspaceEnabled || enablementState === EnablementState.Enabled; + return enablementState === EnablementState.EnabledWorkspace || enablementState === EnablementState.EnabledGlobally; } - private _isSystemDisabled(extension: IExtension): boolean { + private _isDisabledInEnv(extension: IExtension): boolean { if (this.allUserExtensionsDisabled) { return extension.type === ExtensionType.User; } @@ -139,6 +143,10 @@ export class ExtensionEnablementService extends Disposable implements IExtension if (Array.isArray(disabledExtensions)) { return disabledExtensions.some(id => areSameExtensions({ id }, extension.identifier)); } + return false; + } + + private _isDisabledByExtensionKind(extension: IExtension): boolean { if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { const server = isUIExtension(extension.manifest, this.productService, this.configurationService) ? this.extensionManagementServerService.localExtensionManagementServer : this.extensionManagementServerService.remoteExtensionManagementServer; return this.extensionManagementServerService.getExtensionManagementServer(extension.location) !== server; @@ -149,17 +157,17 @@ export class ExtensionEnablementService extends Disposable implements IExtension private _getEnablementState(identifier: IExtensionIdentifier): EnablementState { if (this.hasWorkspace) { if (this._getEnabledExtensions(StorageScope.WORKSPACE).filter(e => areSameExtensions(e, identifier))[0]) { - return EnablementState.WorkspaceEnabled; + return EnablementState.EnabledWorkspace; } if (this._getDisabledExtensions(StorageScope.WORKSPACE).filter(e => areSameExtensions(e, identifier))[0]) { - return EnablementState.WorkspaceDisabled; + return EnablementState.DisabledWorkspace; } } if (this._getDisabledExtensions(StorageScope.GLOBAL).filter(e => areSameExtensions(e, identifier))[0]) { - return EnablementState.Disabled; + return EnablementState.DisabledGlobally; } - return EnablementState.Enabled; + return EnablementState.EnabledGlobally; } private _enableExtension(identifier: IExtensionIdentifier): void { diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts index 5bab26ebce4..bd16a2ca85b 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts @@ -26,10 +26,12 @@ export interface IExtensionManagementServerService { } export const enum EnablementState { - Disabled, - WorkspaceDisabled, - Enabled, - WorkspaceEnabled + DisabledByExtensionKind, + DisabledByEnvironemt, + DisabledGlobally, + DisabledWorkspace, + EnabledGlobally, + EnabledWorkspace } export const IExtensionEnablementService = createDecorator('extensionEnablementService'); diff --git a/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts b/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts index 29f0ad1ef3f..5852ce2d53c 100644 --- a/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts +++ b/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts @@ -17,6 +17,11 @@ import { isUndefinedOrNull } from 'vs/base/common/types'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ProductService } from 'vs/platform/product/node/productService'; +import { URI } from 'vs/base/common/uri'; +import { Schemas } from 'vs/base/common/network'; +import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; +import { assign } from 'vs/base/common/objects'; +import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; function storageService(instantiationService: TestInstantiationService): IStorageService { let service = instantiationService.get(IStorageService); @@ -56,7 +61,7 @@ export class TestExtensionEnablementService extends ExtensionEnablementService { if (workspaceEnabledExtensions.length) { extensions = extensions.filter(r => !workspaceEnabledExtensions.some(e => areSameExtensions(e, r))); } - extensions.forEach(d => this.setEnablement([aLocalExtension(d.id)], EnablementState.Enabled)); + extensions.forEach(d => this.setEnablement([aLocalExtension(d.id)], EnablementState.EnabledGlobally)); } } @@ -70,6 +75,7 @@ suite('ExtensionEnablementService Test', () => { setup(() => { instantiationService = new TestInstantiationService(); + instantiationService.stub(IConfigurationService, new TestConfigurationService()); instantiationService.stub(IExtensionManagementService, { onDidUninstallExtension: didUninstallEvent.event, onDidInstallExtension: didInstallEvent.event, getInstalled: () => Promise.resolve([] as ILocalExtension[]) } as IExtensionManagementService); instantiationService.stub(IExtensionManagementServerService, { localExtensionManagementServer: { @@ -85,20 +91,20 @@ suite('ExtensionEnablementService Test', () => { test('test disable an extension globally', async () => { const extension = aLocalExtension('pub.a'); - await testObject.setEnablement([extension], EnablementState.Disabled); + await testObject.setEnablement([extension], EnablementState.DisabledGlobally); assert.ok(!testObject.isEnabled(extension)); - assert.equal(testObject.getEnablementState(extension), EnablementState.Disabled); + assert.equal(testObject.getEnablementState(extension), EnablementState.DisabledGlobally); }); test('test disable an extension globally should return truthy promise', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) .then(value => assert.ok(value)); }); test('test disable an extension globally triggers the change event', () => { const target = sinon.spy(); testObject.onEnablementChanged(target); - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) .then(() => { assert.ok(target.calledOnce); assert.deepEqual((target.args[0][0][0]).identifier, { id: 'pub.a' }); @@ -106,116 +112,116 @@ suite('ExtensionEnablementService Test', () => { }); test('test disable an extension globally again should return a falsy promise', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled)) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally)) .then(value => assert.ok(!value[0])); }); test('test state of globally disabled extension', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) - .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.Disabled)); + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) + .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.DisabledGlobally)); }); test('test state of globally enabled extension', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Enabled)) - .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.Enabled)); + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledGlobally)) + .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.EnabledGlobally)); }); test('test disable an extension for workspace', async () => { const extension = aLocalExtension('pub.a'); - await testObject.setEnablement([extension], EnablementState.WorkspaceDisabled); + await testObject.setEnablement([extension], EnablementState.DisabledWorkspace); assert.ok(!testObject.isEnabled(extension)); - assert.equal(testObject.getEnablementState(extension), EnablementState.WorkspaceDisabled); + assert.equal(testObject.getEnablementState(extension), EnablementState.DisabledWorkspace); }); test('test disable an extension for workspace returns a truthy promise', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) .then(value => assert.ok(value)); }); test('test disable an extension for workspace again should return a falsy promise', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled)) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace)) .then(value => assert.ok(!value[0])); }); test('test state of workspace disabled extension', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) - .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.WorkspaceDisabled)); + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) + .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.DisabledWorkspace)); }); test('test state of workspace and globally disabled extension', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled)) - .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.WorkspaceDisabled)); + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace)) + .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.DisabledWorkspace)); }); test('test state of workspace enabled extension', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceEnabled)) - .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.WorkspaceEnabled)); + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledWorkspace)) + .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.EnabledWorkspace)); }); test('test state of globally disabled and workspace enabled extension', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled)) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceEnabled)) - .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.WorkspaceEnabled)); + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace)) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledWorkspace)) + .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.EnabledWorkspace)); }); test('test state of an extension when disabled for workspace from workspace enabled', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceEnabled)) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled)) - .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.WorkspaceDisabled)); + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledWorkspace)) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace)) + .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.DisabledWorkspace)); }); test('test state of an extension when disabled globally from workspace enabled', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceEnabled)) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled)) - .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.Disabled)); + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledWorkspace)) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally)) + .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.DisabledGlobally)); }); test('test state of an extension when disabled globally from workspace disabled', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled)) - .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.Disabled)); + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally)) + .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.DisabledGlobally)); }); test('test state of an extension when enabled globally from workspace enabled', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceEnabled)) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Enabled)) - .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.Enabled)); + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledWorkspace)) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledGlobally)) + .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.EnabledGlobally)); }); test('test state of an extension when enabled globally from workspace disabled', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Enabled)) - .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.Enabled)); + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledGlobally)) + .then(() => assert.equal(testObject.getEnablementState(aLocalExtension('pub.a')), EnablementState.EnabledGlobally)); }); test('test disable an extension for workspace and then globally', async () => { const extension = aLocalExtension('pub.a'); - await testObject.setEnablement([extension], EnablementState.WorkspaceDisabled); - await testObject.setEnablement([extension], EnablementState.Disabled); + await testObject.setEnablement([extension], EnablementState.DisabledWorkspace); + await testObject.setEnablement([extension], EnablementState.DisabledGlobally); assert.ok(!testObject.isEnabled(extension)); - assert.equal(testObject.getEnablementState(extension), EnablementState.Disabled); + assert.equal(testObject.getEnablementState(extension), EnablementState.DisabledGlobally); }); test('test disable an extension for workspace and then globally return a truthy promise', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled)) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally)) .then(value => assert.ok(value)); }); test('test disable an extension for workspace and then globally trigger the change event', () => { const target = sinon.spy(); - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) .then(() => testObject.onEnablementChanged(target)) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled)) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally)) .then(() => { assert.ok(target.calledOnce); assert.deepEqual((target.args[0][0][0]).identifier, { id: 'pub.a' }); @@ -224,23 +230,23 @@ suite('ExtensionEnablementService Test', () => { test('test disable an extension globally and then for workspace', async () => { const extension = aLocalExtension('pub.a'); - await testObject.setEnablement([extension], EnablementState.Disabled); - await testObject.setEnablement([extension], EnablementState.WorkspaceDisabled); + await testObject.setEnablement([extension], EnablementState.DisabledGlobally); + await testObject.setEnablement([extension], EnablementState.DisabledWorkspace); assert.ok(!testObject.isEnabled(extension)); - assert.equal(testObject.getEnablementState(extension), EnablementState.WorkspaceDisabled); + assert.equal(testObject.getEnablementState(extension), EnablementState.DisabledWorkspace); }); test('test disable an extension globally and then for workspace return a truthy promise', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled)) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace)) .then(value => assert.ok(value)); }); test('test disable an extension globally and then for workspace triggers the change event', () => { const target = sinon.spy(); - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) .then(() => testObject.onEnablementChanged(target)) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled)) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace)) .then(() => { assert.ok(target.calledOnce); assert.deepEqual((target.args[0][0][0]).identifier, { id: 'pub.a' }); @@ -249,29 +255,29 @@ suite('ExtensionEnablementService Test', () => { test('test disable an extension for workspace when there is no workspace throws error', () => { instantiationService.stub(IWorkspaceContextService, 'getWorkbenchState', WorkbenchState.EMPTY); - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) .then(() => assert.fail('should throw an error'), error => assert.ok(error)); }); test('test enable an extension globally', async () => { const extension = aLocalExtension('pub.a'); - await testObject.setEnablement([extension], EnablementState.Disabled); - await testObject.setEnablement([extension], EnablementState.Enabled); + await testObject.setEnablement([extension], EnablementState.DisabledGlobally); + await testObject.setEnablement([extension], EnablementState.EnabledGlobally); assert.ok(testObject.isEnabled(extension)); - assert.equal(testObject.getEnablementState(extension), EnablementState.Enabled); + assert.equal(testObject.getEnablementState(extension), EnablementState.EnabledGlobally); }); test('test enable an extension globally return truthy promise', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Enabled)) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledGlobally)) .then(value => assert.ok(value)); }); test('test enable an extension globally triggers change event', () => { const target = sinon.spy(); - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) .then(() => testObject.onEnablementChanged(target)) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Enabled)) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledGlobally)) .then(() => { assert.ok(target.calledOnce); assert.deepEqual((target.args[0][0][0]).identifier, { id: 'pub.a' }); @@ -279,29 +285,29 @@ suite('ExtensionEnablementService Test', () => { }); test('test enable an extension globally when already enabled return falsy promise', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Enabled) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledGlobally) .then(value => assert.ok(!value[0])); }); test('test enable an extension for workspace', async () => { const extension = aLocalExtension('pub.a'); - await testObject.setEnablement([extension], EnablementState.WorkspaceDisabled); - await testObject.setEnablement([extension], EnablementState.WorkspaceEnabled); + await testObject.setEnablement([extension], EnablementState.DisabledWorkspace); + await testObject.setEnablement([extension], EnablementState.EnabledWorkspace); assert.ok(testObject.isEnabled(extension)); - assert.equal(testObject.getEnablementState(extension), EnablementState.WorkspaceEnabled); + assert.equal(testObject.getEnablementState(extension), EnablementState.EnabledWorkspace); }); test('test enable an extension for workspace return truthy promise', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceEnabled)) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) + .then(() => testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledWorkspace)) .then(value => assert.ok(value)); }); test('test enable an extension for workspace triggers change event', () => { const target = sinon.spy(); - return testObject.setEnablement([aLocalExtension('pub.b')], EnablementState.WorkspaceDisabled) + return testObject.setEnablement([aLocalExtension('pub.b')], EnablementState.DisabledWorkspace) .then(() => testObject.onEnablementChanged(target)) - .then(() => testObject.setEnablement([aLocalExtension('pub.b')], EnablementState.WorkspaceEnabled)) + .then(() => testObject.setEnablement([aLocalExtension('pub.b')], EnablementState.EnabledWorkspace)) .then(() => { assert.ok(target.calledOnce); assert.deepEqual((target.args[0][0][0]).identifier, { id: 'pub.b' }); @@ -309,48 +315,48 @@ suite('ExtensionEnablementService Test', () => { }); test('test enable an extension for workspace when already enabled return truthy promise', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceEnabled) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.EnabledWorkspace) .then(value => assert.ok(value)); }); test('test enable an extension for workspace when disabled in workspace and gloablly', async () => { const extension = aLocalExtension('pub.a'); - await testObject.setEnablement([extension], EnablementState.WorkspaceDisabled); - await testObject.setEnablement([extension], EnablementState.Disabled); - await testObject.setEnablement([extension], EnablementState.WorkspaceEnabled); + await testObject.setEnablement([extension], EnablementState.DisabledWorkspace); + await testObject.setEnablement([extension], EnablementState.DisabledGlobally); + await testObject.setEnablement([extension], EnablementState.EnabledWorkspace); assert.ok(testObject.isEnabled(extension)); - assert.equal(testObject.getEnablementState(extension), EnablementState.WorkspaceEnabled); + assert.equal(testObject.getEnablementState(extension), EnablementState.EnabledWorkspace); }); test('test enable an extension globally when disabled in workspace and gloablly', async () => { const extension = aLocalExtension('pub.a'); - await testObject.setEnablement([extension], EnablementState.WorkspaceEnabled); - await testObject.setEnablement([extension], EnablementState.WorkspaceDisabled); - await testObject.setEnablement([extension], EnablementState.Disabled); - await testObject.setEnablement([extension], EnablementState.Enabled); + await testObject.setEnablement([extension], EnablementState.EnabledWorkspace); + await testObject.setEnablement([extension], EnablementState.DisabledWorkspace); + await testObject.setEnablement([extension], EnablementState.DisabledGlobally); + await testObject.setEnablement([extension], EnablementState.EnabledGlobally); assert.ok(testObject.isEnabled(extension)); - assert.equal(testObject.getEnablementState(extension), EnablementState.Enabled); + assert.equal(testObject.getEnablementState(extension), EnablementState.EnabledGlobally); }); test('test installing an extension re-eanbles it when disabled globally', async () => { const local = aLocalExtension('pub.a'); - await testObject.setEnablement([local], EnablementState.Disabled); + await testObject.setEnablement([local], EnablementState.DisabledGlobally); didInstallEvent.fire({ local, identifier: local.identifier, operation: InstallOperation.Install }); assert.ok(testObject.isEnabled(local)); - assert.equal(testObject.getEnablementState(local), EnablementState.Enabled); + assert.equal(testObject.getEnablementState(local), EnablementState.EnabledGlobally); }); test('test updating an extension does not re-eanbles it when disabled globally', async () => { const local = aLocalExtension('pub.a'); - await testObject.setEnablement([local], EnablementState.Disabled); + await testObject.setEnablement([local], EnablementState.DisabledGlobally); didInstallEvent.fire({ local, identifier: local.identifier, operation: InstallOperation.Update }); assert.ok(!testObject.isEnabled(local)); - assert.equal(testObject.getEnablementState(local), EnablementState.Disabled); + assert.equal(testObject.getEnablementState(local), EnablementState.DisabledGlobally); }); test('test installing an extension fires enablement change event when disabled globally', async () => { const local = aLocalExtension('pub.a'); - await testObject.setEnablement([local], EnablementState.Disabled); + await testObject.setEnablement([local], EnablementState.DisabledGlobally); return new Promise((c, e) => { testObject.onEnablementChanged(([e]) => { if (e.identifier.id === local.identifier.id) { @@ -364,7 +370,7 @@ suite('ExtensionEnablementService Test', () => { test('test updating an extension does not fires enablement change event when disabled globally', async () => { const target = sinon.spy(); const local = aLocalExtension('pub.a'); - await testObject.setEnablement([local], EnablementState.Disabled); + await testObject.setEnablement([local], EnablementState.DisabledGlobally); testObject.onEnablementChanged(target); didInstallEvent.fire({ local, identifier: local.identifier, operation: InstallOperation.Update }); assert.ok(!target.called); @@ -372,23 +378,23 @@ suite('ExtensionEnablementService Test', () => { test('test installing an extension re-eanbles it when workspace disabled', async () => { const local = aLocalExtension('pub.a'); - await testObject.setEnablement([local], EnablementState.WorkspaceDisabled); + await testObject.setEnablement([local], EnablementState.DisabledWorkspace); didInstallEvent.fire({ local, identifier: local.identifier, operation: InstallOperation.Install }); assert.ok(testObject.isEnabled(local)); - assert.equal(testObject.getEnablementState(local), EnablementState.Enabled); + assert.equal(testObject.getEnablementState(local), EnablementState.EnabledGlobally); }); test('test updating an extension does not re-eanbles it when workspace disabled', async () => { const local = aLocalExtension('pub.a'); - await testObject.setEnablement([local], EnablementState.WorkspaceDisabled); + await testObject.setEnablement([local], EnablementState.DisabledWorkspace); didInstallEvent.fire({ local, identifier: local.identifier, operation: InstallOperation.Update }); assert.ok(!testObject.isEnabled(local)); - assert.equal(testObject.getEnablementState(local), EnablementState.WorkspaceDisabled); + assert.equal(testObject.getEnablementState(local), EnablementState.DisabledWorkspace); }); test('test installing an extension fires enablement change event when workspace disabled', async () => { const local = aLocalExtension('pub.a'); - await testObject.setEnablement([local], EnablementState.WorkspaceDisabled); + await testObject.setEnablement([local], EnablementState.DisabledWorkspace); return new Promise((c, e) => { testObject.onEnablementChanged(([e]) => { if (e.identifier.id === local.identifier.id) { @@ -402,7 +408,7 @@ suite('ExtensionEnablementService Test', () => { test('test updating an extension does not fires enablement change event when workspace disabled', async () => { const target = sinon.spy(); const local = aLocalExtension('pub.a'); - await testObject.setEnablement([local], EnablementState.WorkspaceDisabled); + await testObject.setEnablement([local], EnablementState.DisabledWorkspace); testObject.onEnablementChanged(target); didInstallEvent.fire({ local, identifier: local.identifier, operation: InstallOperation.Update }); assert.ok(!target.called); @@ -418,26 +424,26 @@ suite('ExtensionEnablementService Test', () => { test('test remove an extension from disablement list when uninstalled', async () => { const extension = aLocalExtension('pub.a'); - await testObject.setEnablement([extension], EnablementState.WorkspaceDisabled); - await testObject.setEnablement([extension], EnablementState.Disabled); + await testObject.setEnablement([extension], EnablementState.DisabledWorkspace); + await testObject.setEnablement([extension], EnablementState.DisabledGlobally); didUninstallEvent.fire({ identifier: { id: 'pub.a' } }); assert.ok(testObject.isEnabled(extension)); - assert.equal(testObject.getEnablementState(extension), EnablementState.Enabled); + assert.equal(testObject.getEnablementState(extension), EnablementState.EnabledGlobally); }); test('test isEnabled return false extension is disabled globally', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.Disabled) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledGlobally) .then(() => assert.ok(!testObject.isEnabled(aLocalExtension('pub.a')))); }); test('test isEnabled return false extension is disabled in workspace', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) .then(() => assert.ok(!testObject.isEnabled(aLocalExtension('pub.a')))); }); test('test isEnabled return true extension is not disabled', () => { - return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.WorkspaceDisabled) - .then(() => testObject.setEnablement([aLocalExtension('pub.c')], EnablementState.Disabled)) + return testObject.setEnablement([aLocalExtension('pub.a')], EnablementState.DisabledWorkspace) + .then(() => testObject.setEnablement([aLocalExtension('pub.c')], EnablementState.DisabledGlobally)) .then(() => assert.ok(testObject.isEnabled(aLocalExtension('pub.b')))); }); @@ -477,22 +483,109 @@ suite('ExtensionEnablementService Test', () => { instantiationService.stub(IExtensionManagementService, { onDidUninstallExtension: didUninstallEvent.event, onDidInstallExtension: didInstallEvent.event, getInstalled: () => Promise.resolve([extension, aLocalExtension('pub.b')]) } as IExtensionManagementService); testObject = new TestExtensionEnablementService(instantiationService); assert.ok(!testObject.isEnabled(extension)); - assert.deepEqual(testObject.getEnablementState(extension), EnablementState.Disabled); + assert.deepEqual(testObject.getEnablementState(extension), EnablementState.DisabledByEnvironemt); + }); + + test('test local workspace extension is disabled by kind', async () => { + instantiationService.stub(IExtensionManagementServerService, aMultiExtensionManagementServerService(instantiationService)); + const localWorkspaceExtension = aLocalExtension2('pub.a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + testObject = new TestExtensionEnablementService(instantiationService); + assert.ok(!testObject.isEnabled(localWorkspaceExtension)); + assert.deepEqual(testObject.getEnablementState(localWorkspaceExtension), EnablementState.DisabledByExtensionKind); + }); + + test('test local ui extension is not disabled by kind', async () => { + instantiationService.stub(IExtensionManagementServerService, aMultiExtensionManagementServerService(instantiationService)); + const localWorkspaceExtension = aLocalExtension2('pub.a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }); + testObject = new TestExtensionEnablementService(instantiationService); + assert.ok(testObject.isEnabled(localWorkspaceExtension)); + assert.deepEqual(testObject.getEnablementState(localWorkspaceExtension), EnablementState.EnabledGlobally); + }); + + test('test canChangeEnablement return false when the local workspace extension is disabled by kind', () => { + instantiationService.stub(IExtensionManagementServerService, aMultiExtensionManagementServerService(instantiationService)); + const localWorkspaceExtension = aLocalExtension2('pub.a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + testObject = new TestExtensionEnablementService(instantiationService); + assert.equal(testObject.canChangeEnablement(localWorkspaceExtension), false); + }); + + test('test canChangeEnablement return true for local ui extension', () => { + instantiationService.stub(IExtensionManagementServerService, aMultiExtensionManagementServerService(instantiationService)); + const localWorkspaceExtension = aLocalExtension2('pub.a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }); + testObject = new TestExtensionEnablementService(instantiationService); + assert.equal(testObject.canChangeEnablement(localWorkspaceExtension), true); + }); + + test('test remote ui extension is disabled by kind', async () => { + instantiationService.stub(IExtensionManagementServerService, aMultiExtensionManagementServerService(instantiationService)); + const localWorkspaceExtension = aLocalExtension2('pub.a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + testObject = new TestExtensionEnablementService(instantiationService); + assert.ok(!testObject.isEnabled(localWorkspaceExtension)); + assert.deepEqual(testObject.getEnablementState(localWorkspaceExtension), EnablementState.DisabledByExtensionKind); + }); + + test('test remote workspace extension is not disabled by kind', async () => { + instantiationService.stub(IExtensionManagementServerService, aMultiExtensionManagementServerService(instantiationService)); + const localWorkspaceExtension = aLocalExtension2('pub.a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + testObject = new TestExtensionEnablementService(instantiationService); + assert.ok(testObject.isEnabled(localWorkspaceExtension)); + assert.deepEqual(testObject.getEnablementState(localWorkspaceExtension), EnablementState.EnabledGlobally); + }); + + test('test canChangeEnablement return false when the remote ui extension is disabled by kind', () => { + instantiationService.stub(IExtensionManagementServerService, aMultiExtensionManagementServerService(instantiationService)); + const localWorkspaceExtension = aLocalExtension2('pub.a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + testObject = new TestExtensionEnablementService(instantiationService); + assert.equal(testObject.canChangeEnablement(localWorkspaceExtension), false); + }); + + test('test canChangeEnablement return true for remote workspace extension', () => { + instantiationService.stub(IExtensionManagementServerService, aMultiExtensionManagementServerService(instantiationService)); + const localWorkspaceExtension = aLocalExtension2('pub.a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + testObject = new TestExtensionEnablementService(instantiationService); + assert.equal(testObject.canChangeEnablement(localWorkspaceExtension), true); }); }); +function aMultiExtensionManagementServerService(instantiationService: TestInstantiationService): IExtensionManagementServerService { + const localExtensionManagementServer = { + authority: 'vscode-local', + label: 'local', + extensionManagementService: instantiationService.get(IExtensionManagementService) + }; + const remoteExtensionManagementServer = { + authority: 'vscode-remote', + label: 'remote', + extensionManagementService: instantiationService.get(IExtensionManagementService) + }; + return { + _serviceBrand: {}, + localExtensionManagementServer, + remoteExtensionManagementServer, + getExtensionManagementServer: (location: URI) => { + if (location.scheme === Schemas.file) { + return localExtensionManagementServer; + } + if (location.scheme === REMOTE_HOST_SCHEME) { + return remoteExtensionManagementServer; + } + return null; + } + }; +} + function aLocalExtension(id: string, contributes?: IExtensionContributions, type?: ExtensionType): ILocalExtension { + return aLocalExtension2(id, contributes ? { contributes } : {}, isUndefinedOrNull(type) ? {} : { type }); +} + +function aLocalExtension2(id: string, manifest: any = {}, properties: any = {}): ILocalExtension { const [publisher, name] = id.split('.'); - type = isUndefinedOrNull(type) ? ExtensionType.User : type; - return Object.create({ + properties = assign({ identifier: { id }, galleryIdentifier: { id, uuid: undefined }, - manifest: { - name, - publisher, - contributes - }, - type - }); + type: ExtensionType.User + }, properties); + manifest = assign({ name, publisher }, manifest); + return Object.create({ manifest, ...properties }); } diff --git a/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts b/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts index 28503d4e7dc..b850b474c62 100644 --- a/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts +++ b/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts @@ -191,7 +191,7 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { return; } - await this.extensionEnablementService.setEnablement([extension], EnablementState.Enabled); + await this.extensionEnablementService.setEnablement([extension], EnablementState.EnabledGlobally); await this.reloadAndHandle(uri); } } From f1bad3701296d08d0ae04df0e45320e8a94bd1ac Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 18 Jul 2019 15:34:05 -0700 Subject: [PATCH 376/710] Remove Comment Id --- src/vs/editor/common/modes.ts | 3 +- src/vs/vscode.proposed.d.ts | 48 ---------------- .../api/browser/mainThreadComments.ts | 4 -- .../workbench/api/common/extHost.protocol.ts | 1 - .../workbench/api/common/extHostComments.ts | 55 ++----------------- .../contrib/comments/browser/commentNode.ts | 12 ++-- .../comments/browser/commentService.ts | 17 ------ .../comments/browser/commentThreadWidget.ts | 16 +++--- .../browser/commentsEditorContribution.ts | 8 +-- .../contrib/comments/browser/commentsPanel.ts | 4 +- .../comments/browser/commentsTreeViewer.ts | 2 +- 11 files changed, 27 insertions(+), 143 deletions(-) diff --git a/src/vs/editor/common/modes.ts b/src/vs/editor/common/modes.ts index d6438d398c3..fa05b9b968c 100644 --- a/src/vs/editor/common/modes.ts +++ b/src/vs/editor/common/modes.ts @@ -1333,8 +1333,7 @@ export enum CommentMode { * @internal */ export interface Comment { - readonly commentId: string; - readonly uniqueIdInThread?: number; + readonly uniqueIdInThread: number; readonly body: IMarkdownString; readonly userName: string; readonly userIconPath?: string; diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 46b57f913c2..2acdd9eb0c9 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -713,54 +713,6 @@ declare module 'vscode' { //#endregion - /** - * Comment Reactions - * Stay in proposed. - */ - interface CommentReaction { - readonly hasReacted?: boolean; - } - - /** - * Stay in proposed - */ - export interface CommentReactionProvider { - availableReactions: CommentReaction[]; - toggleReaction?(document: TextDocument, comment: Comment, reaction: CommentReaction): Promise; - } - - - export interface CommentController { - /** - * Optional reaction provider - * Stay in proposed. - */ - reactionProvider?: CommentReactionProvider; - } - - - /** - * A comment is displayed within the editor or the Comments Panel, depending on how it is provided. - */ - export interface Comment { - /** - * The id of the comment - */ - commentId: string; - } - - /** - * A comment controller is able to provide [comments](#CommentThread) support to the editor and - * provide users various ways to interact with comments. - */ - export interface CommentController { - /** - * Optional reaction provider - */ - reactionProvider?: CommentReactionProvider; - } - - //#endregion //#region Terminal diff --git a/src/vs/workbench/api/browser/mainThreadComments.ts b/src/vs/workbench/api/browser/mainThreadComments.ts index 77c2e1052a7..2580f438473 100644 --- a/src/vs/workbench/api/browser/mainThreadComments.ts +++ b/src/vs/workbench/api/browser/mainThreadComments.ts @@ -308,10 +308,6 @@ export class MainThreadCommentController { return commentingRanges || []; } - getReactionGroup(): modes.CommentReaction[] | undefined { - return this._features.reactionGroup; - } - async toggleReaction(uri: URI, thread: modes.CommentThread, comment: modes.Comment, reaction: modes.CommentReaction, token: CancellationToken): Promise { return this._proxy.$toggleReaction(this._handle, thread.commentThreadHandle, uri, comment, reaction); } diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index d64f50a9460..d1f9840554d 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -1284,7 +1284,6 @@ export interface ExtHostCommentsShape { $updateCommentThreadTemplate(commentControllerHandle: number, threadHandle: number, range: IRange): Promise; $deleteCommentThread(commentControllerHandle: number, commentThreadHandle: number): void; $provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise; - $provideReactionGroup(commentControllerHandle: number): Promise; $toggleReaction(commentControllerHandle: number, threadHandle: number, uri: UriComponents, comment: modes.Comment, reaction: modes.CommentReaction): Promise; } diff --git a/src/vs/workbench/api/common/extHostComments.ts b/src/vs/workbench/api/common/extHostComments.ts index 10166047fb2..bc39e462d0a 100644 --- a/src/vs/workbench/api/common/extHostComments.ts +++ b/src/vs/workbench/api/common/extHostComments.ts @@ -187,47 +187,28 @@ export class ExtHostComments implements ExtHostCommentsShape, IDisposable { }).then(ranges => ranges ? ranges.map(x => extHostTypeConverter.Range.from(x)) : undefined); } - $provideReactionGroup(commentControllerHandle: number): Promise { - const commentController = this._commentControllers.get(commentControllerHandle); - - if (!commentController || !commentController.reactionProvider) { - return Promise.resolve(undefined); - } - - return asPromise(() => { - return commentController!.reactionProvider!.availableReactions; - }).then(reactions => reactions.map(reaction => convertToReaction(commentController.reactionProvider, reaction))); - } - $toggleReaction(commentControllerHandle: number, threadHandle: number, uri: UriComponents, comment: modes.Comment, reaction: modes.CommentReaction): Promise { - const document = this._documents.getDocument(URI.revive(uri)); const commentController = this._commentControllers.get(commentControllerHandle); - if (!commentController || !((commentController.reactionProvider && commentController.reactionProvider.toggleReaction) || commentController.reactionHandler)) { + if (!commentController || commentController.reactionHandler) { return Promise.resolve(undefined); } return asPromise(() => { const commentThread = commentController.getCommentThread(threadHandle); if (commentThread) { - const vscodeComment = commentThread.getComment(comment.commentId); + const vscodeComment = commentThread.getCommentByUniqueId(comment.uniqueIdInThread); if (commentController !== undefined && vscodeComment) { if (commentController.reactionHandler) { return commentController.reactionHandler(vscodeComment, convertFromReaction(reaction)); } - - if (commentController.reactionProvider && commentController.reactionProvider.toggleReaction) { - return commentController.reactionProvider.toggleReaction(document, vscodeComment, convertFromReaction(reaction)); - } } - } return Promise.resolve(undefined); }); } - dispose() { } @@ -391,16 +372,6 @@ export class ExtHostCommentThread implements vscode.CommentThread { ); } - getComment(commentId: string): vscode.Comment | undefined { - const comments = this._comments.filter(comment => comment.commentId === commentId); - - if (comments && comments.length) { - return comments[0]; - } - - return undefined; - } - getCommentByUniqueId(uniqueId: number): vscode.Comment | undefined { for (let key of this._commentsMap) { let comment = key[0]; @@ -442,19 +413,6 @@ class ExtHostCommentController implements vscode.CommentController { private _threads: Map = new Map(); commentingRangeProvider?: vscode.CommentingRangeProvider; - private _commentReactionProvider?: vscode.CommentReactionProvider; - - get reactionProvider(): vscode.CommentReactionProvider | undefined { - return this._commentReactionProvider; - } - - set reactionProvider(provider: vscode.CommentReactionProvider | undefined) { - this._commentReactionProvider = provider; - if (provider) { - this._proxy.$updateCommentControllerFeatures(this.handle, { reactionGroup: provider.availableReactions.map(reaction => convertToReaction(provider, reaction)) }); - } - } - private _reactionHandler?: ReactionHandler; get reactionHandler(): ReactionHandler | undefined { @@ -537,7 +495,6 @@ function convertToModeComment(thread: ExtHostCommentThread, commentController: E const iconPath = vscodeComment.author && vscodeComment.author.iconPath ? vscodeComment.author.iconPath.toString() : undefined; return { - commentId: vscodeComment.commentId, mode: vscodeComment.mode, contextValue: vscodeComment.contextValue, uniqueIdInThread: commentUniqueId, @@ -545,17 +502,16 @@ function convertToModeComment(thread: ExtHostCommentThread, commentController: E userName: vscodeComment.author.name, userIconPath: iconPath, label: vscodeComment.label, - commentReactions: vscodeComment.reactions ? vscodeComment.reactions.map(reaction => convertToReaction(commentController.reactionProvider, reaction)) : undefined + commentReactions: vscodeComment.reactions ? vscodeComment.reactions.map(reaction => convertToReaction(reaction)) : undefined }; } -function convertToReaction(provider: vscode.CommentReactionProvider | undefined, reaction: vscode.CommentReaction): modes.CommentReaction { +function convertToReaction(reaction: vscode.CommentReaction): modes.CommentReaction { return { label: reaction.label, iconPath: reaction.iconPath ? extHostTypeConverter.pathOrURIToURI(reaction.iconPath) : undefined, count: reaction.count, - hasReacted: reaction.hasReacted, - canEdit: provider !== undefined ? !!provider.toggleReaction : false + hasReacted: reaction.authorHasReacted, }; } @@ -564,7 +520,6 @@ function convertFromReaction(reaction: modes.CommentReaction): vscode.CommentRea label: reaction.label || '', count: reaction.count || 0, iconPath: reaction.iconPath ? URI.revive(reaction.iconPath) : '', - hasReacted: reaction.hasReacted, authorHasReacted: reaction.hasReacted || false }; } diff --git a/src/vs/workbench/contrib/comments/browser/commentNode.ts b/src/vs/workbench/contrib/comments/browser/commentNode.ts index 0b6b347c978..edf37f0728a 100644 --- a/src/vs/workbench/contrib/comments/browser/commentNode.ts +++ b/src/vs/workbench/contrib/comments/browser/commentNode.ts @@ -318,18 +318,18 @@ export class CommentNode extends Disposable { let toggleReactionAction = this.createReactionPicker2(this.comment.commentReactions || []); this._reactionsActionBar.push(toggleReactionAction, { label: false, icon: true }); } else { - let reactionGroup = this.commentService.getReactionGroup(this.owner); - if (reactionGroup && reactionGroup.length) { - let toggleReactionAction = this.createReactionPicker2(reactionGroup || []); - this._reactionsActionBar.push(toggleReactionAction, { label: false, icon: true }); - } + // let reactionGroup = this.commentService.getReactionGroup(this.owner); + // if (reactionGroup && reactionGroup.length) { + // let toggleReactionAction = this.createReactionPicker2(reactionGroup || []); + // this._reactionsActionBar.push(toggleReactionAction, { label: false, icon: true }); + // } } } private createCommentEditor(): void { const container = dom.append(this._commentEditContainer, dom.$('.edit-textarea')); this._commentEditor = this.instantiationService.createInstance(SimpleCommentEditor, container, SimpleCommentEditor.getEditorOptions(), this.parentEditor, this.parentThread); - const resource = URI.parse(`comment:commentinput-${this.comment.commentId}-${Date.now()}.md`); + const resource = URI.parse(`comment:commentinput-${this.comment.uniqueIdInThread}-${Date.now()}.md`); this._commentEditorModel = this.modelService.createModel('', this.modeService.createByFilepathOrFirstLine(resource), resource, false); this._commentEditor.setModel(this._commentEditorModel); diff --git a/src/vs/workbench/contrib/comments/browser/commentService.ts b/src/vs/workbench/contrib/comments/browser/commentService.ts index d3db753315b..e676d7caf1a 100644 --- a/src/vs/workbench/contrib/comments/browser/commentService.ts +++ b/src/vs/workbench/contrib/comments/browser/commentService.ts @@ -54,7 +54,6 @@ export interface ICommentService { disposeCommentThread(ownerId: string, threadId: string): void; getComments(resource: URI): Promise<(ICommentInfo | null)[]>; getCommentingRanges(resource: URI): Promise; - getReactionGroup(owner: string): CommentReaction[] | undefined; hasReactionHandler(owner: string): boolean; toggleReaction(owner: string, resource: URI, thread: CommentThread, comment: Comment, reaction: CommentReaction): Promise; setActiveCommentThread(commentThread: CommentThread | null): void; @@ -183,22 +182,6 @@ export class CommentService extends Disposable implements ICommentService { } } - getReactionGroup(owner: string): CommentReaction[] | undefined { - const commentProvider = this._commentControls.get(owner); - - if (commentProvider) { - return commentProvider.getReactionGroup(); - } - - const commentController = this._commentControls.get(owner); - - if (commentController) { - return commentController.getReactionGroup(); - } - - return undefined; - } - hasReactionHandler(owner: string): boolean { const commentProvider = this._commentControls.get(owner); diff --git a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts index fcd4e69ba33..26c32a87835 100644 --- a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts +++ b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts @@ -161,14 +161,14 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget // we don't do anything here as we always do the reveal ourselves. } - public reveal(commentId?: string) { + public reveal(commentUniqueId?: number) { if (!this._isExpanded) { this.show({ lineNumber: this._commentThread.range.startLineNumber, column: 1 }, 2); } - if (commentId) { + if (commentUniqueId !== undefined) { let height = this.editor.getLayoutInfo().height; - let matchedNode = this._commentElements.filter(commentNode => commentNode.comment.commentId === commentId); + let matchedNode = this._commentElements.filter(commentNode => commentNode.comment.uniqueIdInThread === commentUniqueId); if (matchedNode && matchedNode.length) { const commentThreadCoords = dom.getDomNodePagePosition(this._commentElements[0].domNode); const commentCoords = dom.getDomNodePagePosition(matchedNode[0].domNode); @@ -289,7 +289,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget let commentElementsToDelIndex: number[] = []; for (let i = 0; i < oldCommentsLen; i++) { let comment = this._commentElements[i].comment; - let newComment = commentThread.comments ? commentThread.comments.filter(c => c.commentId === comment.commentId) : []; + let newComment = commentThread.comments ? commentThread.comments.filter(c => c.uniqueIdInThread === comment.uniqueIdInThread) : []; if (newComment.length) { this._commentElements[i].update(newComment[0]); @@ -309,7 +309,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget let newCommentNodeList: CommentNode[] = []; for (let i = newCommentsLen - 1; i >= 0; i--) { let currentComment = commentThread.comments![i]; - let oldCommentNode = this._commentElements.filter(commentNode => commentNode.comment.commentId === currentComment.commentId); + let oldCommentNode = this._commentElements.filter(commentNode => commentNode.comment.uniqueIdInThread === currentComment.uniqueIdInThread); if (oldCommentNode.length) { oldCommentNode[0].update(currentComment); lastCommentElement = oldCommentNode[0].domNode; @@ -606,13 +606,13 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget this._disposables.add(newCommentNode); this._disposables.add(newCommentNode.onDidDelete(deletedNode => { - const deletedNodeId = deletedNode.comment.commentId; - const deletedElementIndex = arrays.firstIndex(this._commentElements, commentNode => commentNode.comment.commentId === deletedNodeId); + const deletedNodeId = deletedNode.comment.uniqueIdInThread; + const deletedElementIndex = arrays.firstIndex(this._commentElements, commentNode => commentNode.comment.uniqueIdInThread === deletedNodeId); if (deletedElementIndex > -1) { this._commentElements.splice(deletedElementIndex, 1); } - const deletedCommentIndex = arrays.firstIndex(this._commentThread.comments!, comment => comment.commentId === deletedNodeId); + const deletedCommentIndex = arrays.firstIndex(this._commentThread.comments!, comment => comment.uniqueIdInThread === deletedNodeId); if (deletedCommentIndex > -1) { this._commentThread.comments!.splice(deletedCommentIndex, 1); } diff --git a/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts b/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts index 35d61c27f4b..89dd182ebe2 100644 --- a/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts @@ -247,18 +247,18 @@ export class ReviewController implements IEditorContribution { return editor.getContribution(ID); } - public revealCommentThread(threadId: string, commentId: string, fetchOnceIfNotExist: boolean): void { + public revealCommentThread(threadId: string, commentUniqueId: number, fetchOnceIfNotExist: boolean): void { const commentThreadWidget = this._commentWidgets.filter(widget => widget.commentThread.threadId === threadId); if (commentThreadWidget.length === 1) { - commentThreadWidget[0].reveal(commentId); + commentThreadWidget[0].reveal(commentUniqueId); } else if (fetchOnceIfNotExist) { if (this._computePromise) { this._computePromise.then(_ => { - this.revealCommentThread(threadId, commentId, false); + this.revealCommentThread(threadId, commentUniqueId, false); }); } else { this.beginCompute().then(_ => { - this.revealCommentThread(threadId, commentId, false); + this.revealCommentThread(threadId, commentUniqueId, false); }); } } diff --git a/src/vs/workbench/contrib/comments/browser/commentsPanel.ts b/src/vs/workbench/contrib/comments/browser/commentsPanel.ts index dd9a18a0ff7..27440e3e996 100644 --- a/src/vs/workbench/contrib/comments/browser/commentsPanel.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsPanel.ts @@ -175,7 +175,7 @@ export class CommentsPanel extends Panel { let currentActiveResource = activeEditor ? activeEditor.getResource() : undefined; if (currentActiveResource && currentActiveResource.toString() === element.resource.toString()) { const threadToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].threadId : element.threadId; - const commentToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].comment.commentId : element.comment.commentId; + const commentToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].comment.uniqueIdInThread : element.comment.uniqueIdInThread; const control = this.editorService.activeTextEditorWidget; if (threadToReveal && isCodeEditor(control)) { const controller = ReviewController.get(control); @@ -200,7 +200,7 @@ export class CommentsPanel extends Panel { const control = editor.getControl(); if (threadToReveal && isCodeEditor(control)) { const controller = ReviewController.get(control); - controller.revealCommentThread(threadToReveal, commentToReveal.commentId, true); + controller.revealCommentThread(threadToReveal, commentToReveal.uniqueIdInThread, true); } } }); diff --git a/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts b/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts index fb60a911d6d..91370417b61 100644 --- a/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts @@ -23,7 +23,7 @@ export class CommentsDataSource implements IDataSource { return element.id; } if (element instanceof CommentNode) { - return `${element.resource.toString()}-${element.comment.commentId}`; + return `${element.resource.toString()}-${element.comment.uniqueIdInThread}`; } return ''; } From 97ce6669fa995bafb202a55af856b38fad79f272 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 18 Jul 2019 15:38:44 -0700 Subject: [PATCH 377/710] toggle reaction should work. --- src/vs/workbench/api/common/extHostComments.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/common/extHostComments.ts b/src/vs/workbench/api/common/extHostComments.ts index bc39e462d0a..b71643ba369 100644 --- a/src/vs/workbench/api/common/extHostComments.ts +++ b/src/vs/workbench/api/common/extHostComments.ts @@ -190,7 +190,7 @@ export class ExtHostComments implements ExtHostCommentsShape, IDisposable { $toggleReaction(commentControllerHandle: number, threadHandle: number, uri: UriComponents, comment: modes.Comment, reaction: modes.CommentReaction): Promise { const commentController = this._commentControllers.get(commentControllerHandle); - if (!commentController || commentController.reactionHandler) { + if (!commentController || !commentController.reactionHandler) { return Promise.resolve(undefined); } From aba87f135229c17c4624341b7a2499dcedafcb87 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 18 Jul 2019 16:38:14 -0700 Subject: [PATCH 378/710] Fix #75647 --- src/vs/workbench/contrib/comments/browser/commentNode.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentNode.ts b/src/vs/workbench/contrib/comments/browser/commentNode.ts index edf37f0728a..d3ac220871e 100644 --- a/src/vs/workbench/contrib/comments/browser/commentNode.ts +++ b/src/vs/workbench/contrib/comments/browser/commentNode.ts @@ -166,7 +166,7 @@ export class CommentNode extends Disposable { secondaryActions.push(...secondary); } - if (actions.length) { + if (actions.length || secondaryActions.length) { this.toolbar = new ToolBar(this._actionsToolbarContainer, this.contextMenuService, { actionViewItemProvider: action => { if (action.id === ToggleReactionsAction.ID) { From fb46db1e4edb4247199f2f0e8159a1b76cb39f77 Mon Sep 17 00:00:00 2001 From: kieferrm Date: Fri, 19 Jul 2019 00:57:34 +0000 Subject: [PATCH 379/710] fix GDPR annotation --- rudi/declarations-resolved.json | 2754 +++++++++++++++++ .../diagnostics/node/diagnosticsService.ts | 10 +- 2 files changed, 2761 insertions(+), 3 deletions(-) create mode 100644 rudi/declarations-resolved.json diff --git a/rudi/declarations-resolved.json b/rudi/declarations-resolved.json new file mode 100644 index 00000000000..48266798069 --- /dev/null +++ b/rudi/declarations-resolved.json @@ -0,0 +1,2754 @@ +{ + "events": { + "monacoworkbench/packagemetrics": { + "commit": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "size": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "count": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + } + }, + "editorActionInvoked": { + "name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "target": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "snippet": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "suggestWidget": { + "wasautomaticallytriggered": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "suggestioncount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "snippetcount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "textcount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "target": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "snippet": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "suggestWidget:toggleDetailsFocus": { + "target": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "snippet": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "suggestWidget:collapseDetails": { + "target": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "snippet": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "suggestWidget:expandDetails": { + "target": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "snippet": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "update:win32SetupTarget": { + "target": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "update:winSetupTarget": { + "target": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "update:notAvailable": { + "explicit": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + } + }, + "extensionActivationTimes": { + "outcome": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "id": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + }, + "name": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + }, + "extensionversion": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + }, + "publisherdisplayname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "activationevents": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "isbuiltin": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "reason": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "startup": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "codeloadingtime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "activatecalltime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "activateresolvedtime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + } + }, + "webviews:createWebviewPanel": { + "extensionid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "machineIdFallback": { + "usingfallbackguid": { + "classification": "SystemMetaData", + "purpose": "BusinessInsight", + "isMeasurement": true + } + }, + "machineIdDisambiguation": { + "correctedmachineid": { + "classification": "EndUserPseudonymizedInformation", + "purpose": "FeatureInsight" + } + }, + "galleryService:downloadVSIX": { + "duration": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "galleryid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publishername": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherdisplayname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "dependencies": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "index": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "searchtext": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "querysource": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "extensionGallery:install": { + "success": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "duration": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "errorcode": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + }, + "recommendationreason": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "galleryid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publishername": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherdisplayname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "dependencies": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "index": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "searchtext": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "querysource": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "extensionGallery:uninstall": { + "success": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "duration": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "errorcode": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + }, + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "galleryid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publishername": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherdisplayname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "dependencies": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "index": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "searchtext": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "querysource": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "extensionGallery:update": { + "success": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "duration": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "errorcode": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + }, + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "galleryid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publishername": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherdisplayname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "dependencies": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "index": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "searchtext": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "querysource": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "startupTimeVaried": { + "version": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "ellapsed": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "islatestversion": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "didusecacheddata": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "windowkind": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "windowcount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "viewletid": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "panelid": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "editorids": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "timers.ellapsedappready": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsedwindowload": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsedwindowloadtorequire": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsedextensions": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsedextensionsready": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsedrequire": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsedworkspacestorageinit": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsedworkspaceserviceinit": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsedviewletrestore": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsedpanelrestore": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsededitorrestore": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsedworkbench": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsedtimerstotimerscomputed": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "timers.ellapsednlsgeneration": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "platform": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "release": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "arch": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "totalmem": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "freemem": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "cpus.count": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "cpus.speed": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "cpus.model": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "initialstartup": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "hasaccessibilitysupport": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "isvmlikelyhood": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "emptyworkbench": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "loadavg": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "meminfo.workingsetsize": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "meminfo.privatebytes": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "meminfo.sharedbytes": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + } + }, + "startupRawTimers": { + "entries": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + } + }, + "replaceAll.started": { + "duration": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + } + }, + "searchResultsFirstRender": { + "duration": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + } + }, + "searchResultsFinished": { + "duration": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + } + }, + "searchResultsShown": { + "count": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "filecount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "duration": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "type": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "scheme": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "options.pattern": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "options.isregexp": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "options.iswordmatch": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "options.wordseparators": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "options.ismultiline": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "options.iscasesensitive": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "options.issmartcase": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "workspce.tags": { + "workbench.filestoopenorcreate": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workbench.filestodiff": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "workspace.roots": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.empty": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.grunt": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.gulp": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.jake": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.tsconfig": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.jsconfig": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.config.xml": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.vsc.extension": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.asp": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.sln": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.unity": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.express": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.sails": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.koa": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.hapi": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.socket.io": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.restify": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.rnpm-plugin-windows": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.react": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.@angular/core": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.vue": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.aws-sdk": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.aws-amplify-sdk": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.azure": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.azure-storage": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.@google-cloud/common": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.firebase": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.npm.heroku-cli": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.bower": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.yeoman.code.ext": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.cordova.high": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.cordova.low": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.xamarin.android": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.xamarin.ios": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.android.cpp": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.reactnative": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.ionic": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": "true" + }, + "workspace.nativescript": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": "true" + }, + "workspace.java.pom": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.requirements": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.requirements.star": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.pipfile": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.conda": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.any-azure": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-storage-common": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-storage-blob": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-storage-file": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-storage-queue": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-mgmt": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-shell": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.pulumi-azure": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-cosmos": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-devtools": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-elasticluster": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-eventgrid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-functions": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-graphrbac": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-keyvault": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-loganalytics": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-monitor": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-servicebus": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-servicefabric": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-storage": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-translator": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-iothub-device-client": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-ml": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.azure-cognitiveservices": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.adal": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.pydocumentdb": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.botbuilder-core": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.botbuilder-schema": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "workspace.py.botframework-connector": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "workspace.remotes": { + "domains": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "workspace.hashedRemotes": { + "remotes": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "workspace.azure": { + "node": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "java": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "resolveProxy.stats": { + "type": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + } + }, + "keyboardLayout": { + "currentkeyboardlayout.name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "currentkeyboardlayout.id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "currentkeyboardlayout.text": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "currentkeyboardlayout.model": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "currentkeyboardlayout.layout": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "currentkeyboardlayout.variant": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "currentkeyboardlayout.options": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "currentkeyboardlayout.rules": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "currentkeyboardlayout.lang": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "currentkeyboardlayout.localizedname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "disableOtherKeymaps": { + "oldkeymaps": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "confirmed": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "newkeymap.id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "newkeymap.uuid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "extensionGallery:install:recommendations": { + "recommendationreason": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "galleryid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publishername": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherdisplayname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "dependencies": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "index": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "searchtext": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "querysource": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "extensionsRecommendations:ignoreRecommendation": { + "recommendationreason": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "extensionid": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + } + }, + "extensionWorkspaceRecommendations:popup": { + "userreaction": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "extensionRecommendations:popup": { + "userreaction": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "extensionid": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + } + }, + "fileExtensionSuggestion:popup": { + "userreaction": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "fileextension": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + } + }, + "dynamicWorkspaceRecommendations": { + "count": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "cache": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "exthostunresponsive": { + "id": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "duration": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "isMeasurement": true + }, + "data": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + } + }, + "extensionGallery:openExtension": { + "recommendationreason": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "galleryid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publishername": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherdisplayname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "dependencies": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "index": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "searchtext": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "querysource": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "extensionEditor:navbarChange": { + "navitem": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "galleryid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publishername": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherdisplayname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "dependencies": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "index": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "searchtext": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "querysource": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "extensionAllRecommendations:open": { + "count": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "recommendations": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "extensionRecommendations:open": { + "count": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "recommendations": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "extensionWorkspaceRecommendations:open": { + "count": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "extension:enable": { + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "galleryid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publishername": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherdisplayname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "dependencies": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "index": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "searchtext": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "querysource": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "extension:disable": { + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "galleryid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publishername": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "publisherdisplayname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "dependencies": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "index": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "searchtext": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "querysource": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "debug/addLaunchConfiguration": {}, + "debugSessionStart": { + "type": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "breakpointcount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "exceptionbreakpoints": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "watchexpressionscount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "extensionname": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + }, + "isbuiltin": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "launchjsonexists": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "debugSessionStop": { + "type": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "success": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "sessionlengthinseconds": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "breakpointcount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "watchexpressionscount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "debugMisconfiguration": { + "type": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "error": { + "classification": "CallstackOrException", + "purpose": "FeatureInsight" + } + }, + "debugAddBreakpoint": { + "context": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "hascondition": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "hashitcondition": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "haslogmessage": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "debugProtocolErrorResponse": { + "error": { + "classification": "CallstackOrException", + "purpose": "FeatureInsight" + } + }, + "taskService": { + "trigger": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "runner": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "taskkind": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "command": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "success": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "exitcode": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "taskService.customize": { + "properties": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "problems.filter": { + "errors": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "warnings": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "infos": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "problems.selectDiagnostic": { + "source": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + }, + "code": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + } + }, + "problems.selectRelatedInformation": { + "source": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + }, + "code": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + } + }, + "problems.expandRelatedInformation": { + "source": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + }, + "code": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + } + }, + "experimentalPrompts": { + "experimentid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "commandtext": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "cancelled": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "keybindings.filter": { + "filter": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "emptyfilters": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "defaultSettings.filter": { + "filter": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "durations.nlpresult": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "counts.nlpresult": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "durations.filterresult": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "counts.filterresult": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "requestcount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "defaultSettings.searchError": { + "message": { + "classification": "CallstackOrException", + "purpose": "FeatureInsight" + }, + "filter": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "defaultSettingsActions.copySetting": { + "userconfigurationkeys": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "query": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "nlpindex": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "groupid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "displayidx": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "editableside": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "settingsEditor.settingModified": { + "key": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "query": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "groupid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "nlpindex": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "displayindex": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "showconfiguredonly": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "isreset": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "target": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "settingsEditor.filter": { + "query": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + }, + "durations.nlpresult": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "counts.nlpresult": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "counts.filterresult": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "requestcount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + } + }, + "settingsEditor.searchError": { + "message": { + "classification": "CallstackOrException", + "purpose": "FeatureInsight" + }, + "filter": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "breadcrumbs/select": { + "type": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "breadcrumbs/open": { + "type": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "editorOpened": { + "typeid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "target": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "resource.mimetype": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "resource.scheme": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "resource.ext": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "resource.path": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "editorClosed": { + "typeid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "target": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "resource.mimetype": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "resource.scheme": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "resource.ext": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "resource.path": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "views.toggleVisibility": { + "viewid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "visible": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "activityBarAction": { + "viewletid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "action": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "languagePackSuggestion:popup": { + "userreaction": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "language": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "installExtension": { + "from": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "extensionid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "installedExtension": { + "from": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "extensionid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "outcome": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "error": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + } + }, + "detailsExtension": { + "from": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "extensionid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "installKeymap": { + "from": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "extensionid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "installedKeymap": { + "from": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "extensionid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "outcome": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "error": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + } + }, + "detailsKeymap": { + "from": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "extensionid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "workbenchActionExecuted": { + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "from": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "walkThroughSnippetInteraction": { + "from": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "type": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "snippet": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + } + }, + "experiments:optout": { + "optout": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + } + }, + "experiments": { + "experiments": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "taskService.template": { + "templateid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "autodetect": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + } + }, + "workspaceLoad": { + "useragent": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "emptyworkbench": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "windowsize.innerheight": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "windowsize.innerwidth": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "windowsize.outerheight": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "windowsize.outerwidth": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "workbench.filestoopenorcreate": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "workbench.filestodiff": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "customkeybindingscount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "theme": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "language": { + "classification": "SystemMetaData", + "purpose": "BusinessInsight" + }, + "pinnedviewlets": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "restoredviewlet": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "restorededitors": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "startupkind": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + } + }, + "openKeybindings": { + "textual": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + } + }, + "extensionsMessage": { + "type": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "extensionid": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "extensionpointid": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "message": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + } + }, + "resolveProxy": { + "count": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "duration": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "errorcount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "cachecount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "cachesize": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "cacherolls": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "envcount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "settingscount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "localhostcount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "envnoproxycount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "results": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + } + }, + "output.channel.creation.error": {}, + "customKeybindingsChanged": { + "keycount": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + } + }, + "settingsRead": { + "settingstype": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "fileGet": { + "mimetype": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "ext": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "path": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "reason": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "whitelistedjson": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "settingsWritten": { + "settingstype": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "filePUT": { + "mimetype": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "ext": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "path": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "reason": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "whitelistedjson": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "cachedSearchComplete": { + "reason": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "resultcount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "workspacefoldercount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "type": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "endtoendtime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "sortingtime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "cachewasresolved": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "cachelookuptime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "cachefiltertime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "cacheentrycount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "scheme": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + } + }, + "searchComplete": { + "reason": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "resultcount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "workspacefoldercount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "type": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "endtoendtime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "sortingtime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "filewalktime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "directorieswalked": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "fileswalked": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "cmdtime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "cmdresultcount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "scheme": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + } + }, + "textSearchComplete": { + "reason": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "workspacefoldercount": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "endtoendtime": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "scheme": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "error": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "usepcre2": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + } + }, + "activatePlugin": { + "id": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + }, + "name": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + }, + "isbuiltin": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "publisherdisplayname": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "themeid": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + }, + "extensionversion": { + "classification": "PublicNonPersonalData", + "purpose": "FeatureInsight" + }, + "activationevents": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "reason": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "issueReporterSearchError": { + "message": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + } + }, + "issueReporterSubmit": { + "issuetype": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "numsimilarissuesdisplayed": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + } + }, + "issueReporterViewSimilarIssue": {}, + "issueReporterGetElementError": { + "message": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + } + }, + "shimming.open": { + "extension": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "shimming.open.call.noForward": { + "extension": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "galleryService:query": { + "type": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "text": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + } + }, + "galleryService:requestError": { + "url": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "cdn": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "message": { + "classification": "CallstackOrException", + "purpose": "FeatureInsight" + } + }, + "galleryService:cdnFallback": { + "url": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "message": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "updateConfiguration": { + "configurationsource": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "configurationkeys": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "updateConfigurationValues": { + "configurationsource": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "configurationvalues": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + } + }, + "updateKeybindings": { + "bindings": { + "classification": "CustomerContent", + "purpose": "FeatureInsight" + } + }, + "optInStatus": { + "optin": { + "classification": "SystemMetaData", + "purpose": "BusinessInsight", + "ismeasurement": true + } + }, + "UnhandledError": { + "callstack": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + }, + "msg": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + }, + "file": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + }, + "line": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "column": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + }, + "uncaught_error_name": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + }, + "uncaught_error_msg": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth" + }, + "count": { + "classification": "CallstackOrException", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + } + }, + "workspace.stats": { + "filetypes.name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "filetypes.count": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "configtypes.name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "configtypes.count": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "launchconfigs.name": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + }, + "launchconfigs.count": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "ismeasurement": true + } + }, + "update:downloaded": { + "version": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + }, + "windowerror": { + "type": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth", + "ismeasurement": true + } + }, + "commandExecuted": { + "id": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "from": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + } + } + }, + "commonProperties": { + "pluginhosttelemetry": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "common.firstsessiondate": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "common.lastsessiondate": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "common.isnewsession": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "common.instanceid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "common.remoteauthority": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "common.machineid": { + "classification": "EndUserPseudonymizedInformation", + "purpose": "FeatureInsight" + }, + "sessionid": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "commithash": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "version": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "common.platform": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "common.product": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "common.useragent": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "timestamp": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "common.timesincesessionstart": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "common.sequence": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight", + "isMeasurement": true + }, + "common.platformversion": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "common.nodeplatform": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "common.nodearch": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "common.snap": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "common.source": { + "classification": "SystemMetaData", + "purpose": "FeatureInsight" + }, + "common.version.shell": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + }, + "common.version.renderer": { + "classification": "SystemMetaData", + "purpose": "PerformanceAndHealth" + } + } +} \ No newline at end of file diff --git a/src/vs/platform/diagnostics/node/diagnosticsService.ts b/src/vs/platform/diagnostics/node/diagnosticsService.ts index f1e6a82fb1a..9e74621348c 100644 --- a/src/vs/platform/diagnostics/node/diagnosticsService.ts +++ b/src/vs/platform/diagnostics/node/diagnosticsService.ts @@ -520,10 +520,14 @@ export class DiagnosticsService implements IDiagnosticsService { if (folderUri.scheme === 'file') { const folder = folderUri.fsPath; collectWorkspaceStats(folder, ['node_modules', '.git']).then(stats => { + type WorkspaceStatItemClassification = { + name: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + count: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + }; type WorkspaceStatsClassification = { - fileTypes: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - configTypes: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - launchConfigs: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + fileTypes: WorkspaceStatItemClassification; + configTypes: WorkspaceStatItemClassification; + launchConfigs: WorkspaceStatItemClassification; }; type WorkspaceStatsEvent = { fileTypes: WorkspaceStatItem[]; From ba22178f752f1b22d7df3294c682a9527017cd0c Mon Sep 17 00:00:00 2001 From: kieferrm Date: Fri, 19 Jul 2019 00:58:28 +0000 Subject: [PATCH 380/710] delete bogus directory --- rudi/declarations-resolved.json | 2754 ------------------------------- 1 file changed, 2754 deletions(-) delete mode 100644 rudi/declarations-resolved.json diff --git a/rudi/declarations-resolved.json b/rudi/declarations-resolved.json deleted file mode 100644 index 48266798069..00000000000 --- a/rudi/declarations-resolved.json +++ /dev/null @@ -1,2754 +0,0 @@ -{ - "events": { - "monacoworkbench/packagemetrics": { - "commit": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "size": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "count": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - } - }, - "editorActionInvoked": { - "name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "target": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "snippet": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "suggestWidget": { - "wasautomaticallytriggered": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "suggestioncount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "snippetcount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "textcount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "target": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "snippet": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "suggestWidget:toggleDetailsFocus": { - "target": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "snippet": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "suggestWidget:collapseDetails": { - "target": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "snippet": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "suggestWidget:expandDetails": { - "target": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "snippet": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "update:win32SetupTarget": { - "target": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "update:winSetupTarget": { - "target": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "update:notAvailable": { - "explicit": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - } - }, - "extensionActivationTimes": { - "outcome": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "id": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - }, - "name": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - }, - "extensionversion": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - }, - "publisherdisplayname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "activationevents": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "isbuiltin": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "reason": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "startup": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "codeloadingtime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "activatecalltime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "activateresolvedtime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - } - }, - "webviews:createWebviewPanel": { - "extensionid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "machineIdFallback": { - "usingfallbackguid": { - "classification": "SystemMetaData", - "purpose": "BusinessInsight", - "isMeasurement": true - } - }, - "machineIdDisambiguation": { - "correctedmachineid": { - "classification": "EndUserPseudonymizedInformation", - "purpose": "FeatureInsight" - } - }, - "galleryService:downloadVSIX": { - "duration": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "galleryid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publishername": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherdisplayname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "dependencies": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "index": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "searchtext": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "querysource": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "extensionGallery:install": { - "success": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "duration": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "errorcode": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - }, - "recommendationreason": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "galleryid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publishername": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherdisplayname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "dependencies": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "index": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "searchtext": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "querysource": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "extensionGallery:uninstall": { - "success": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "duration": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "errorcode": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - }, - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "galleryid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publishername": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherdisplayname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "dependencies": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "index": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "searchtext": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "querysource": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "extensionGallery:update": { - "success": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "duration": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "errorcode": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - }, - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "galleryid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publishername": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherdisplayname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "dependencies": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "index": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "searchtext": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "querysource": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "startupTimeVaried": { - "version": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "ellapsed": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "islatestversion": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "didusecacheddata": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "windowkind": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "windowcount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "viewletid": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "panelid": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "editorids": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "timers.ellapsedappready": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsedwindowload": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsedwindowloadtorequire": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsedextensions": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsedextensionsready": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsedrequire": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsedworkspacestorageinit": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsedworkspaceserviceinit": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsedviewletrestore": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsedpanelrestore": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsededitorrestore": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsedworkbench": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsedtimerstotimerscomputed": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "timers.ellapsednlsgeneration": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "platform": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "release": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "arch": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "totalmem": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "freemem": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "cpus.count": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "cpus.speed": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "cpus.model": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "initialstartup": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "hasaccessibilitysupport": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "isvmlikelyhood": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "emptyworkbench": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "loadavg": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "meminfo.workingsetsize": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "meminfo.privatebytes": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "meminfo.sharedbytes": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - } - }, - "startupRawTimers": { - "entries": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - } - }, - "replaceAll.started": { - "duration": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - } - }, - "searchResultsFirstRender": { - "duration": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - } - }, - "searchResultsFinished": { - "duration": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - } - }, - "searchResultsShown": { - "count": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "filecount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "duration": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "type": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "scheme": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "options.pattern": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "options.isregexp": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "options.iswordmatch": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "options.wordseparators": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "options.ismultiline": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "options.iscasesensitive": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "options.issmartcase": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "workspce.tags": { - "workbench.filestoopenorcreate": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workbench.filestodiff": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "workspace.roots": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.empty": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.grunt": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.gulp": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.jake": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.tsconfig": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.jsconfig": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.config.xml": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.vsc.extension": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.asp": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.sln": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.unity": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.express": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.sails": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.koa": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.hapi": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.socket.io": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.restify": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.rnpm-plugin-windows": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.react": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.@angular/core": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.vue": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.aws-sdk": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.aws-amplify-sdk": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.azure": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.azure-storage": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.@google-cloud/common": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.firebase": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.npm.heroku-cli": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.bower": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.yeoman.code.ext": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.cordova.high": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.cordova.low": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.xamarin.android": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.xamarin.ios": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.android.cpp": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.reactnative": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.ionic": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": "true" - }, - "workspace.nativescript": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": "true" - }, - "workspace.java.pom": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.requirements": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.requirements.star": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.pipfile": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.conda": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.any-azure": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-storage-common": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-storage-blob": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-storage-file": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-storage-queue": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-mgmt": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-shell": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.pulumi-azure": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-cosmos": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-devtools": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-elasticluster": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-eventgrid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-functions": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-graphrbac": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-keyvault": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-loganalytics": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-monitor": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-servicebus": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-servicefabric": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-storage": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-translator": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-iothub-device-client": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-ml": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.azure-cognitiveservices": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.adal": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.pydocumentdb": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.botbuilder-core": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.botbuilder-schema": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "workspace.py.botframework-connector": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "workspace.remotes": { - "domains": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "workspace.hashedRemotes": { - "remotes": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "workspace.azure": { - "node": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "java": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "resolveProxy.stats": { - "type": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - } - }, - "keyboardLayout": { - "currentkeyboardlayout.name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "currentkeyboardlayout.id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "currentkeyboardlayout.text": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "currentkeyboardlayout.model": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "currentkeyboardlayout.layout": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "currentkeyboardlayout.variant": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "currentkeyboardlayout.options": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "currentkeyboardlayout.rules": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "currentkeyboardlayout.lang": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "currentkeyboardlayout.localizedname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "disableOtherKeymaps": { - "oldkeymaps": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "confirmed": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "newkeymap.id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "newkeymap.uuid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "extensionGallery:install:recommendations": { - "recommendationreason": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "galleryid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publishername": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherdisplayname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "dependencies": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "index": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "searchtext": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "querysource": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "extensionsRecommendations:ignoreRecommendation": { - "recommendationreason": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "extensionid": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - } - }, - "extensionWorkspaceRecommendations:popup": { - "userreaction": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "extensionRecommendations:popup": { - "userreaction": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "extensionid": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - } - }, - "fileExtensionSuggestion:popup": { - "userreaction": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "fileextension": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - } - }, - "dynamicWorkspaceRecommendations": { - "count": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "cache": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "exthostunresponsive": { - "id": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "duration": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "isMeasurement": true - }, - "data": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - } - }, - "extensionGallery:openExtension": { - "recommendationreason": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "galleryid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publishername": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherdisplayname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "dependencies": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "index": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "searchtext": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "querysource": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "extensionEditor:navbarChange": { - "navitem": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "galleryid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publishername": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherdisplayname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "dependencies": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "index": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "searchtext": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "querysource": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "extensionAllRecommendations:open": { - "count": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "recommendations": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "extensionRecommendations:open": { - "count": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "recommendations": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "extensionWorkspaceRecommendations:open": { - "count": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "extension:enable": { - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "galleryid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publishername": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherdisplayname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "dependencies": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "index": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "searchtext": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "querysource": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "extension:disable": { - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "galleryid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publishername": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "publisherdisplayname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "dependencies": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "index": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "searchtext": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "querysource": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "debug/addLaunchConfiguration": {}, - "debugSessionStart": { - "type": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "breakpointcount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "exceptionbreakpoints": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "watchexpressionscount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "extensionname": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - }, - "isbuiltin": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "launchjsonexists": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "debugSessionStop": { - "type": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "success": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "sessionlengthinseconds": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "breakpointcount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "watchexpressionscount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "debugMisconfiguration": { - "type": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "error": { - "classification": "CallstackOrException", - "purpose": "FeatureInsight" - } - }, - "debugAddBreakpoint": { - "context": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "hascondition": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "hashitcondition": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "haslogmessage": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "debugProtocolErrorResponse": { - "error": { - "classification": "CallstackOrException", - "purpose": "FeatureInsight" - } - }, - "taskService": { - "trigger": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "runner": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "taskkind": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "command": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "success": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "exitcode": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "taskService.customize": { - "properties": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "problems.filter": { - "errors": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "warnings": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "infos": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "problems.selectDiagnostic": { - "source": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - }, - "code": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - } - }, - "problems.selectRelatedInformation": { - "source": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - }, - "code": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - } - }, - "problems.expandRelatedInformation": { - "source": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - }, - "code": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - } - }, - "experimentalPrompts": { - "experimentid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "commandtext": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "cancelled": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "keybindings.filter": { - "filter": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "emptyfilters": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "defaultSettings.filter": { - "filter": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "durations.nlpresult": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "counts.nlpresult": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "durations.filterresult": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "counts.filterresult": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "requestcount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "defaultSettings.searchError": { - "message": { - "classification": "CallstackOrException", - "purpose": "FeatureInsight" - }, - "filter": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "defaultSettingsActions.copySetting": { - "userconfigurationkeys": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "query": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "nlpindex": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "groupid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "displayidx": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "editableside": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "settingsEditor.settingModified": { - "key": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "query": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "groupid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "nlpindex": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "displayindex": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "showconfiguredonly": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "isreset": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "target": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "settingsEditor.filter": { - "query": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - }, - "durations.nlpresult": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "counts.nlpresult": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "counts.filterresult": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "requestcount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - } - }, - "settingsEditor.searchError": { - "message": { - "classification": "CallstackOrException", - "purpose": "FeatureInsight" - }, - "filter": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "breadcrumbs/select": { - "type": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "breadcrumbs/open": { - "type": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "editorOpened": { - "typeid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "target": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "resource.mimetype": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "resource.scheme": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "resource.ext": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "resource.path": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "editorClosed": { - "typeid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "target": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "resource.mimetype": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "resource.scheme": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "resource.ext": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "resource.path": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "views.toggleVisibility": { - "viewid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "visible": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "activityBarAction": { - "viewletid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "action": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "languagePackSuggestion:popup": { - "userreaction": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "language": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "installExtension": { - "from": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "extensionid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "installedExtension": { - "from": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "extensionid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "outcome": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "error": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - } - }, - "detailsExtension": { - "from": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "extensionid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "installKeymap": { - "from": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "extensionid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "installedKeymap": { - "from": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "extensionid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "outcome": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "error": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - } - }, - "detailsKeymap": { - "from": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "extensionid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "workbenchActionExecuted": { - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "from": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "walkThroughSnippetInteraction": { - "from": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "type": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "snippet": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - } - }, - "experiments:optout": { - "optout": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - } - }, - "experiments": { - "experiments": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "taskService.template": { - "templateid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "autodetect": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - } - }, - "workspaceLoad": { - "useragent": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "emptyworkbench": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "windowsize.innerheight": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "windowsize.innerwidth": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "windowsize.outerheight": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "windowsize.outerwidth": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "workbench.filestoopenorcreate": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "workbench.filestodiff": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "customkeybindingscount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "theme": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "language": { - "classification": "SystemMetaData", - "purpose": "BusinessInsight" - }, - "pinnedviewlets": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "restoredviewlet": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "restorededitors": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "startupkind": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - } - }, - "openKeybindings": { - "textual": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - } - }, - "extensionsMessage": { - "type": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "extensionid": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "extensionpointid": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "message": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - } - }, - "resolveProxy": { - "count": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "duration": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "errorcount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "cachecount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "cachesize": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "cacherolls": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "envcount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "settingscount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "localhostcount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "envnoproxycount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "results": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - } - }, - "output.channel.creation.error": {}, - "customKeybindingsChanged": { - "keycount": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - } - }, - "settingsRead": { - "settingstype": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "fileGet": { - "mimetype": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "ext": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "path": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "reason": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "whitelistedjson": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "settingsWritten": { - "settingstype": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "filePUT": { - "mimetype": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "ext": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "path": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "reason": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "whitelistedjson": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "cachedSearchComplete": { - "reason": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "resultcount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "workspacefoldercount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "type": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "endtoendtime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "sortingtime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "cachewasresolved": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "cachelookuptime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "cachefiltertime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "cacheentrycount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "scheme": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - } - }, - "searchComplete": { - "reason": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "resultcount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "workspacefoldercount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "type": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "endtoendtime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "sortingtime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "filewalktime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "directorieswalked": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "fileswalked": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "cmdtime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "cmdresultcount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "scheme": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - } - }, - "textSearchComplete": { - "reason": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "workspacefoldercount": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "endtoendtime": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "scheme": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "error": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "usepcre2": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - } - }, - "activatePlugin": { - "id": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - }, - "name": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - }, - "isbuiltin": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "publisherdisplayname": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "themeid": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - }, - "extensionversion": { - "classification": "PublicNonPersonalData", - "purpose": "FeatureInsight" - }, - "activationevents": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "reason": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "issueReporterSearchError": { - "message": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - } - }, - "issueReporterSubmit": { - "issuetype": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "numsimilarissuesdisplayed": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - } - }, - "issueReporterViewSimilarIssue": {}, - "issueReporterGetElementError": { - "message": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - } - }, - "shimming.open": { - "extension": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "shimming.open.call.noForward": { - "extension": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "galleryService:query": { - "type": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "text": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - } - }, - "galleryService:requestError": { - "url": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "cdn": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "message": { - "classification": "CallstackOrException", - "purpose": "FeatureInsight" - } - }, - "galleryService:cdnFallback": { - "url": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "message": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "updateConfiguration": { - "configurationsource": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "configurationkeys": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "updateConfigurationValues": { - "configurationsource": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "configurationvalues": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - } - }, - "updateKeybindings": { - "bindings": { - "classification": "CustomerContent", - "purpose": "FeatureInsight" - } - }, - "optInStatus": { - "optin": { - "classification": "SystemMetaData", - "purpose": "BusinessInsight", - "ismeasurement": true - } - }, - "UnhandledError": { - "callstack": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - }, - "msg": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - }, - "file": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - }, - "line": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "column": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - }, - "uncaught_error_name": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - }, - "uncaught_error_msg": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth" - }, - "count": { - "classification": "CallstackOrException", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - } - }, - "workspace.stats": { - "filetypes.name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "filetypes.count": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "configtypes.name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "configtypes.count": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "launchconfigs.name": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - }, - "launchconfigs.count": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "ismeasurement": true - } - }, - "update:downloaded": { - "version": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - }, - "windowerror": { - "type": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth", - "ismeasurement": true - } - }, - "commandExecuted": { - "id": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "from": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - } - } - }, - "commonProperties": { - "pluginhosttelemetry": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "common.firstsessiondate": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "common.lastsessiondate": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "common.isnewsession": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "common.instanceid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "common.remoteauthority": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "common.machineid": { - "classification": "EndUserPseudonymizedInformation", - "purpose": "FeatureInsight" - }, - "sessionid": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "commithash": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "version": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "common.platform": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "common.product": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "common.useragent": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "timestamp": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "common.timesincesessionstart": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "common.sequence": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight", - "isMeasurement": true - }, - "common.platformversion": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "common.nodeplatform": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "common.nodearch": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "common.snap": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "common.source": { - "classification": "SystemMetaData", - "purpose": "FeatureInsight" - }, - "common.version.shell": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - }, - "common.version.renderer": { - "classification": "SystemMetaData", - "purpose": "PerformanceAndHealth" - } - } -} \ No newline at end of file From 8802050f6d06d6ba9ee0af392060c1235c29e9de Mon Sep 17 00:00:00 2001 From: chrisdias Date: Thu, 18 Jul 2019 18:34:06 -0700 Subject: [PATCH 381/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e5b3a5e80fe..3e9df748b00 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "02f64b63759f873b1fe125ef9e4f3d20e73d30e5", + "distro": "0890008b4907e5a7490a4ccc45cc880ce5b37e49", "author": { "name": "Microsoft Corporation" }, From 662279722217358fa56de864ca22e2c875b7251c Mon Sep 17 00:00:00 2001 From: Daniel Schildt Date: Fri, 19 Jul 2019 06:21:42 +0300 Subject: [PATCH 382/710] fix: spelling mistake correction - Correct spelling mistake in `commonEditorConfig.ts` file - Change word from `mulitiplier` to `multiplier` Note: - Potentially affects "Get Started - User and Workspace Settings" https://code.visualstudio.com/docs/getstarted/settings page's listing of the default editor config parameters, as those still include the (probably) generated mispelling. --- src/vs/editor/common/config/commonEditorConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 5866654f0ca..f7b61db2b35 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -460,7 +460,7 @@ const editorConfiguration: IConfigurationNode = { 'editor.fastScrollSensitivity': { 'type': 'number', 'default': EDITOR_DEFAULTS.viewInfo.scrollbar.fastScrollSensitivity, - 'markdownDescription': nls.localize('fastScrollSensitivity', "Scrolling speed mulitiplier when pressing `Alt`.") + 'markdownDescription': nls.localize('fastScrollSensitivity', "Scrolling speed multiplier when pressing `Alt`.") }, 'editor.multiCursorModifier': { 'type': 'string', From 38e5a64bc35850a55cb34063bb8700d95b777f50 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 19 Jul 2019 09:33:52 +0200 Subject: [PATCH 383/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e9df748b00..8d546203d04 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "0890008b4907e5a7490a4ccc45cc880ce5b37e49", + "distro": "53215ea1e983c935e01e95875b9ee9ef65777c7d", "author": { "name": "Microsoft Corporation" }, From 628bdedf671d3230fc76982fae845875a6f6c0da Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 19 Jul 2019 09:35:20 +0200 Subject: [PATCH 384/710] add tests --- .../extensions/browser/extensionsActions.ts | 138 ++++++------------ .../extensionsActions.test.ts | 62 +++++++- 2 files changed, 104 insertions(+), 96 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 0670f0faa51..b9c9c18e8bd 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -16,7 +16,7 @@ import { dispose, Disposable } from 'vs/base/common/lifecycle'; import { IExtension, ExtensionState, IExtensionsWorkbenchService, VIEWLET_ID, IExtensionsViewlet, AutoUpdateConfigurationKey, IExtensionContainer, EXTENSIONS_CONFIG } from 'vs/workbench/contrib/extensions/common/extensions'; import { ExtensionsConfigurationInitialContent } from 'vs/workbench/contrib/extensions/common/extensionsFileTemplate'; import { ExtensionsLabel, IGalleryExtension, IExtensionGalleryService, INSTALL_ERROR_MALICIOUS, INSTALL_ERROR_INCOMPATIBLE, IGalleryExtensionVersion, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionTipsService, IExtensionRecommendation, IExtensionsConfigContent } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionTipsService, IExtensionRecommendation, IExtensionsConfigContent, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionType, ExtensionIdentifier, IExtensionDescription, IExtensionManifest, isLanguagePackExtension } from 'vs/platform/extensions/common/extensions'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; @@ -270,60 +270,55 @@ export class InstallAction extends ExtensionAction { } } -export class RemoteInstallAction extends ExtensionAction { +export class InstallInOtherServerAction extends ExtensionAction { - private static INSTALL_LABEL = localize('install', "Install"); - private static INSTALLING_LABEL = localize('installing', "Installing"); + protected static INSTALL_LABEL = localize('install', "Install"); + protected static INSTALLING_LABEL = localize('installing', "Installing"); private static readonly Class = 'extension-action prominent install'; private static readonly InstallingClass = 'extension-action install installing'; updateWhenCounterExtensionChanges: boolean = true; - private installing: boolean = false; + protected installing: boolean = false; constructor( + id: string, + private readonly server: IExtensionManagementServer | null, @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, - @ILabelService private readonly labelService: ILabelService, - @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, - @IConfigurationService private readonly configurationService: IConfigurationService, - @IProductService private readonly productService: IProductService, ) { - super(`extensions.remoteinstall`, RemoteInstallAction.INSTALL_LABEL, RemoteInstallAction.Class, false); - this._register(this.labelService.onDidChangeFormatters(() => this.updateLabel(), this)); + super(id, InstallInOtherServerAction.INSTALL_LABEL, InstallInOtherServerAction.Class, false); this.updateLabel(); this.update(); } private updateLabel(): void { - if (this.installing) { - this.label = RemoteInstallAction.INSTALLING_LABEL; - this.tooltip = this.label; - return; - } - const remoteServer = this.extensionManagementServerService.remoteExtensionManagementServer; - if (remoteServer) { - this.label = `${RemoteInstallAction.INSTALL_LABEL} on ${remoteServer.label}`; - this.tooltip = this.label; - return; - } + this.label = this.getLabel(); + this.tooltip = this.label; + } + + protected getLabel(): string { + return this.installing ? InstallInOtherServerAction.INSTALLING_LABEL : + this.server ? `${InstallInOtherServerAction.INSTALL_LABEL} on ${this.server.label}` + : InstallInOtherServerAction.INSTALL_LABEL; + } update(): void { this.enabled = false; - this.class = RemoteInstallAction.Class; + this.class = InstallInOtherServerAction.Class; if (this.installing) { this.enabled = true; - this.class = RemoteInstallAction.InstallingClass; + this.class = InstallInOtherServerAction.InstallingClass; this.updateLabel(); return; } - if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer - // Installed User Extension - && this.extension && this.extension.local && this.extension.type === ExtensionType.User && this.extension.state === ExtensionState.Installed - // Local Workspace Extension - && this.extension.server === this.extensionManagementServerService.localExtensionManagementServer && (isLanguagePackExtension(this.extension.local.manifest) || !isUIExtension(this.extension.local.manifest, this.productService, this.configurationService)) - // Extension does not exist in remote - && !this.extensionsWorkbenchService.installed.some(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server === this.extensionManagementServerService.remoteExtensionManagementServer) + + if ( + this.extension && this.extension.local && this.server + // disabled by extension kind or it is a language pack extension + && (this.extension.enablementState === EnablementState.DisabledByExtensionKind || isLanguagePackExtension(this.extension.local.manifest)) + // Not installed in other server and can install in other server + && !this.extensionsWorkbenchService.installed.some(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server === this.server) && this.extensionsWorkbenchService.canInstall(this.extension) ) { this.enabled = true; @@ -333,13 +328,13 @@ export class RemoteInstallAction extends ExtensionAction { } async run(): Promise { - if (this.extensionManagementServerService.remoteExtensionManagementServer && !this.installing) { + if (this.server && !this.installing) { this.installing = true; this.update(); this.extensionsWorkbenchService.open(this.extension); alert(localize('installExtensionStart', "Installing extension {0} started. An editor is now open with more details on this extension", this.extension.displayName)); if (this.extension.gallery) { - await this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.installFromGallery(this.extension.gallery); + await this.server.extensionManagementService.installFromGallery(this.extension.gallery); this.installing = false; this.update(); } @@ -347,77 +342,30 @@ export class RemoteInstallAction extends ExtensionAction { } } -export class LocalInstallAction extends ExtensionAction { - - private static INSTALL_LABEL = localize('install locally', "Install Locally"); - private static INSTALLING_LABEL = localize('installing', "Installing"); - - private static readonly Class = 'extension-action prominent install'; - private static readonly InstallingClass = 'extension-action install installing'; - - updateWhenCounterExtensionChanges: boolean = true; - private installing: boolean = false; +export class RemoteInstallAction extends InstallInOtherServerAction { constructor( - @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, - @ILabelService private readonly labelService: ILabelService, - @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, - @IConfigurationService private readonly configurationService: IConfigurationService, - @IProductService private readonly productService: IProductService, + @IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService ) { - super(`extensions.localinstall`, LocalInstallAction.INSTALL_LABEL, LocalInstallAction.Class, false); - this._register(this.labelService.onDidChangeFormatters(() => this.updateLabel(), this)); - this.updateLabel(); - this.update(); + super(`extensions.remoteinstall`, extensionManagementServerService.remoteExtensionManagementServer, extensionsWorkbenchService); } - private updateLabel(): void { - if (this.installing) { - this.label = LocalInstallAction.INSTALLING_LABEL; - this.tooltip = this.label; - return; - } - this.label = `${LocalInstallAction.INSTALL_LABEL}`; - this.tooltip = this.label; +} + +export class LocalInstallAction extends InstallInOtherServerAction { + + constructor( + @IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService + ) { + super(`extensions.localinstall`, extensionManagementServerService.localExtensionManagementServer, extensionsWorkbenchService); } - update(): void { - this.enabled = false; - this.class = LocalInstallAction.Class; - if (this.installing) { - this.enabled = true; - this.class = LocalInstallAction.InstallingClass; - this.updateLabel(); - return; - } - if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer - // Installed User Extension - && this.extension && this.extension.local && this.extension.type === ExtensionType.User && this.extension.state === ExtensionState.Installed - // Remote UI or Language pack Extension - && this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer && (isLanguagePackExtension(this.extension.local.manifest) || isUIExtension(this.extension.local.manifest, this.productService, this.configurationService)) - // Extension does not exist in local - && !this.extensionsWorkbenchService.installed.some(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server === this.extensionManagementServerService.localExtensionManagementServer) - && this.extensionsWorkbenchService.canInstall(this.extension) - ) { - this.enabled = true; - this.updateLabel(); - return; - } + protected getLabel(): string { + return this.installing ? InstallInOtherServerAction.INSTALLING_LABEL : localize('install locally', "Install Locally"); } - async run(): Promise { - if (this.extensionManagementServerService.localExtensionManagementServer && !this.installing) { - this.installing = true; - this.update(); - this.extensionsWorkbenchService.open(this.extension); - alert(localize('installExtensionStart', "Installing extension {0} started. An editor is now open with more details on this extension", this.extension.displayName)); - if (this.extension.gallery) { - await this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.installFromGallery(this.extension.gallery); - this.installing = false; - this.update(); - } - } - } } export class UninstallAction extends ExtensionAction { diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index 36d5027e8f4..b60cebb0eed 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -21,7 +21,7 @@ import { TestExtensionEnablementService } from 'vs/workbench/services/extensionM import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService'; import { IURLService } from 'vs/platform/url/common/url'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; -import { Emitter } from 'vs/base/common/event'; +import { Emitter, Event } from 'vs/base/common/event'; import { IPager } from 'vs/base/common/paging'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; @@ -42,6 +42,8 @@ import { CancellationToken } from 'vs/base/common/cancellation'; import { ILabelService } from 'vs/platform/label/common/label'; import { ExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService'; import { IProductService } from 'vs/platform/product/common/product'; +import { Schemas } from 'vs/base/common/network'; +import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; suite('ExtensionsActions Test', () => { @@ -1351,6 +1353,27 @@ suite('ExtensionsActions Test', () => { assert.ok(!testObject.enabled); }); + test('Test remote install action is enabled for local workspace extension', async () => { + // multi server setup + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, instantiationService.get(IExtensionManagementService)); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [localWorkspaceExtension]); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install on remote', testObject.label); + assert.equal('extension-action prominent install', testObject.class); + }); test(`RecommendToFolderAction`, () => { // TODO: Implement test @@ -1380,4 +1403,41 @@ suite('ExtensionsActions Test', () => { return { firstPage: objects, total: objects.length, pageSize: objects.length, getPage: () => null! }; } + function aMultiExtensionManagementServerService(instantiationService: TestInstantiationService, localExtensionManagementService?: IExtensionManagementService, remoteExtensionManagementService?: IExtensionManagementService): IExtensionManagementServerService { + const localExtensionManagementServer: IExtensionManagementServer = { + authority: 'vscode-local', + label: 'local', + extensionManagementService: localExtensionManagementService || createExtensionManagementService() + }; + const remoteExtensionManagementServer: IExtensionManagementServer = { + authority: 'vscode-remote', + label: 'remote', + extensionManagementService: remoteExtensionManagementService || createExtensionManagementService() + }; + return { + _serviceBrand: {}, + localExtensionManagementServer, + remoteExtensionManagementServer, + getExtensionManagementServer: (location: URI) => { + if (location.scheme === Schemas.file) { + return localExtensionManagementServer; + } + if (location.scheme === REMOTE_HOST_SCHEME) { + return remoteExtensionManagementServer; + } + return null; + } + }; + } + + function createExtensionManagementService(): IExtensionManagementService { + return { + onInstallExtension: Event.None, + onDidInstallExtension: Event.None, + onUninstallExtension: Event.None, + onDidUninstallExtension: Event.None, + getInstalled: () => Promise.resolve([]) + }; + } + }); From 13d8325aaa02fa80ff0bf8a3c94ea5490830b5d7 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 19 Jul 2019 10:33:50 +0200 Subject: [PATCH 385/710] [json] update server readme --- .../json-language-features/server/README.md | 49 +++++++++++++------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/extensions/json-language-features/server/README.md b/extensions/json-language-features/server/README.md index 9b02dc24ef6..5ca997d9e12 100644 --- a/extensions/json-language-features/server/README.md +++ b/extensions/json-language-features/server/README.md @@ -21,6 +21,8 @@ The server implements the following capabilities of the language server protocol - [Document Symbols](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentSymbol) for quick navigation to properties in the document. - [Document Colors](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentColor) for showing color decorators on values representing colors and [Color Presentation](https://microsoft.github.io/language-server-protocol/specification#textDocument_colorPresentation) for color presentation information to support color pickers. The location of colors is defined by the document's [JSON schema](http://json-schema.org/). All values marked with `"format": "color-hex"` (VSCode specific, non-standard JSON Schema extension) are considered color values. The supported color formats are `#rgb[a]` and `#rrggbb[aa]`. - [Code Formatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_rangeFormatting) supporting ranges and formatting the whole document. +- [Folding Ranges](https://microsoft.github.io/language-server-protocol/specification#textDocument_foldingRange) for all folding ranges in the document. +- Semantic Selection for semantic selection for one or multiple cursor positions. - [Diagnostics (Validation)](https://microsoft.github.io/language-server-protocol/specification#textDocument_publishDiagnostics) are pushed for all open documents - syntax errors - structural validation based on the document's [JSON schema](http://json-schema.org/). @@ -90,10 +92,39 @@ To find the schema for a given JSON document, the server uses the following mech - The settings define a schema association based on the documents URL. Settings can either associate a schema URL to a file or path pattern, and they can directly provide a schema. - Additionally, schema associations can also be provided by a custom 'schemaAssociations' configuration call. -Schemas are identified by URLs. To load the content of a schema, the JSON language server tries to load from that URL or path. The following URL schemas are supported: +Schemas are identified by URLs. To load the content of a schema, the JSON language server either tries to load from that URI or path itself, or delegates to the client. + +The `initializationOptions.handledSchemaProtocols` initialization option defines which URLs are handled by the server. Requests for all other URIs are send to the client. + +`handledSchemaProtocols` is part of the initialization options and can't be changed while the server is running. + +```ts +let clientOptions: LanguageClientOptions = { + initializationOptions: { + handledSchemaProtocols: ['file'] // language server should only try to load file URLs + } + ... +} +``` + +If `handledSchemaProtocols` is not set, the JSON language server will load the following URLs itself: + - `http`, `https`: Loaded using NodeJS's HTTP support. Proxies can be configured through the settings. - `file`: Loaded using NodeJS's `fs` support. -- `vscode`: Loaded by an LSP call to the client. + +#### Schema content request + +Requests for schemas with URLs not handled by the server are forwarded to the client through an LSP request. This request is a JSON language server specific, non-standardized, extension to the LSP. + +Request: +- method: 'vscode/content' +- params: `string` - The schema URL to request. +- response: `string` - The content of the schema with the given URL + +#### Schema content change notification + +When the client is aware that a schema content has changed, it will notify the server through a notification. This notification is a JSON language server specific, non-standardized, extension to the LSP. +The server will, as a response, clear the schema content from the cache and reload the schema content when required again. #### Schema associations notification @@ -111,20 +142,6 @@ interface ISchemaAssociations { - keys: a file names or file path (separated by `/`). `*` can be used as a wildcard. - values: An array of schema URLs -#### Schema content request - -The schema content for schema URLs that start with `vscode://` will be requested from the client through an LSP request. This request is a JSON language server specific, non-standardized, extension to the LSP. - -Request: -- method: 'vscode/content' -- params: `string` - The schema URL to request. The server will only ask for URLs that start with `vscode://` -- response: `string` - The content of the schema with the given URL - -#### Schema content change notification - -When the client is aware that a schema content has changed, it will notify the server through a notification. This notification is a JSON language server specific, non-standardized, extension to the LSP. -The server will, as a response, clear the schema content from the cache and reload the schema content when required again. - Notification: - method: 'json/schemaContent' - params: `string` the URL of the schema that has changed. From caad996fbaddb7705f40d71690671c83c8fc4f31 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 19 Jul 2019 10:34:31 +0200 Subject: [PATCH 386/710] JSON Language Server 1.2.0 --- extensions/json-language-features/server/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/json-language-features/server/package.json b/extensions/json-language-features/server/package.json index 68b639c2aae..c07dca1e441 100644 --- a/extensions/json-language-features/server/package.json +++ b/extensions/json-language-features/server/package.json @@ -1,7 +1,7 @@ { "name": "vscode-json-languageserver", "description": "JSON language server", - "version": "1.0.1", + "version": "1.2.0", "author": "Microsoft Corporation", "license": "MIT", "engines": { From eeaffa91a3ba140ca7d6622abc901aa70d131150 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Fri, 19 Jul 2019 11:29:39 +0200 Subject: [PATCH 387/710] add new variable ${relativeFileDirname}; fixes #77616 --- .../configuration-editing/src/extension.ts | 19 ++++++++++++++----- .../common/variableResolver.ts | 7 +++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/extensions/configuration-editing/src/extension.ts b/extensions/configuration-editing/src/extension.ts index 913c5288809..aff533d86d9 100644 --- a/extensions/configuration-editing/src/extension.ts +++ b/extensions/configuration-editing/src/extension.ts @@ -63,11 +63,20 @@ function registerVariableCompletions(pattern: string): vscode.Disposable { const indexOf$ = document.lineAt(position.line).text.indexOf('$'); const startPosition = indexOf$ >= 0 ? new vscode.Position(position.line, indexOf$) : position; - return [{ label: 'workspaceFolder', detail: localize('workspaceFolder', "The path of the folder opened in VS Code") }, { label: 'workspaceFolderBasename', detail: localize('workspaceFolderBasename', "The name of the folder opened in VS Code without any slashes (/)") }, - { label: 'relativeFile', detail: localize('relativeFile', "The current opened file relative to ${workspaceFolder}") }, { label: 'file', detail: localize('file', "The current opened file") }, { label: 'cwd', detail: localize('cwd', "The task runner's current working directory on startup") }, - { label: 'lineNumber', detail: localize('lineNumber', "The current selected line number in the active file") }, { label: 'selectedText', detail: localize('selectedText', "The current selected text in the active file") }, - { label: 'fileDirname', detail: localize('fileDirname', "The current opened file's dirname") }, { label: 'fileExtname', detail: localize('fileExtname', "The current opened file's extension") }, { label: 'fileBasename', detail: localize('fileBasename', "The current opened file's basename") }, - { label: 'fileBasenameNoExtension', detail: localize('fileBasenameNoExtension', "The current opened file's basename with no file extension") }].map(variable => ({ + return [ + { label: 'workspaceFolder', detail: localize('workspaceFolder', "The path of the folder opened in VS Code") }, + { label: 'workspaceFolderBasename', detail: localize('workspaceFolderBasename', "The name of the folder opened in VS Code without any slashes (/)") }, + { label: 'relativeFile', detail: localize('relativeFile', "The current opened file relative to ${workspaceFolder}") }, + { label: 'relativeFileDirname', detail: localize('relativeFileDirname', "The current opened file's dirname relative to ${workspaceFolder}") }, + { label: 'file', detail: localize('file', "The current opened file") }, + { label: 'cwd', detail: localize('cwd', "The task runner's current working directory on startup") }, + { label: 'lineNumber', detail: localize('lineNumber', "The current selected line number in the active file") }, + { label: 'selectedText', detail: localize('selectedText', "The current selected text in the active file") }, + { label: 'fileDirname', detail: localize('fileDirname', "The current opened file's dirname") }, + { label: 'fileExtname', detail: localize('fileExtname', "The current opened file's extension") }, + { label: 'fileBasename', detail: localize('fileBasename', "The current opened file's basename") }, + { label: 'fileBasenameNoExtension', detail: localize('fileBasenameNoExtension', "The current opened file's basename with no file extension") } + ].map(variable => ({ label: '${' + variable.label + '}', range: new vscode.Range(startPosition, position), detail: variable.detail diff --git a/src/vs/workbench/services/configurationResolver/common/variableResolver.ts b/src/vs/workbench/services/configurationResolver/common/variableResolver.ts index 43d8013dc31..a07fb3a264d 100644 --- a/src/vs/workbench/services/configurationResolver/common/variableResolver.ts +++ b/src/vs/workbench/services/configurationResolver/common/variableResolver.ts @@ -237,6 +237,13 @@ export class AbstractVariableResolverService implements IConfigurationResolverSe } return getFilePath(); + case 'relativeFileDirname': + let dirname = paths.dirname(getFilePath()); + if (folderUri) { + return paths.normalize(paths.relative(getFolderUri().fsPath, dirname)); + } + return dirname; + case 'fileDirname': return paths.dirname(getFilePath()); From e4d9905d35b93dcdc5f216125da2cbf1aae483ec Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 19 Jul 2019 12:26:11 +0200 Subject: [PATCH 388/710] add tests for remote and local install action --- .../extensionsActions.test.ts | 407 +++++++++++++++++- 1 file changed, 398 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index b60cebb0eed..fccc14da4cc 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -44,6 +44,7 @@ import { ExtensionManagementServerService } from 'vs/workbench/services/extensio import { IProductService } from 'vs/platform/product/common/product'; import { Schemas } from 'vs/base/common/network'; import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; +import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; suite('ExtensionsActions Test', () => { @@ -55,7 +56,7 @@ suite('ExtensionsActions Test', () => { didUninstallEvent: Emitter; - suiteSetup(() => { + setup(async () => { installEvent = new Emitter(); didInstallEvent = new Emitter(); uninstallEvent = new Emitter(); @@ -93,9 +94,7 @@ suite('ExtensionsActions Test', () => { instantiationService.set(IExtensionTipsService, instantiationService.createInstance(ExtensionTipsService)); instantiationService.stub(IURLService, URLService); - }); - setup(async () => { instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', []); instantiationService.stubPromise(IExtensionManagementService, 'getExtensionsReport', []); instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage()); @@ -1355,15 +1354,14 @@ suite('ExtensionsActions Test', () => { test('Test remote install action is enabled for local workspace extension', async () => { // multi server setup - const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, instantiationService.get(IExtensionManagementService)); + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceExtension])); instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); - const workbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); instantiationService.set(IExtensionsWorkbenchService, workbenchService); - const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); - instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [localWorkspaceExtension]); const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); instantiationService.createInstance(ExtensionContainers, [testObject]); @@ -1375,6 +1373,378 @@ suite('ExtensionsActions Test', () => { assert.equal('extension-action prominent install', testObject.class); }); + test('Test remote install action is enabled for disabled local workspace extension', async () => { + // multi server setup + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + await instantiationService.get(IExtensionEnablementService).setEnablement([localWorkspaceExtension], EnablementState.DisabledGlobally); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install on remote', testObject.label); + assert.equal('extension-action prominent install', testObject.class); + }); + + test('Test remote install action is disabled when extension is not set', async () => { + // multi server setup + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceExtension])); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + assert.ok(!testObject.enabled); + }); + + test('Test remote install action is disabled for extension which is not installed', async () => { + // multi server setup + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a'))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const pager = await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = pager.firstPage[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test remote install action is disabled for local workspace extension which is disabled in env', async () => { + // multi server setup + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceExtension])); + instantiationService.stub(IWorkbenchEnvironmentService, { disableExtensions: true } as IWorkbenchEnvironmentService); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test remote install action is disabled when remote server is not available', async () => { + // single server setup + const workbenchService = instantiationService.get(IExtensionsWorkbenchService); + const extensionManagementServerService = instantiationService.get(IExtensionManagementServerService); + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [localWorkspaceExtension]); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test remote install action is disabled for local workspace extension if it is installed in remote', async () => { + // multi server setup + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + const remoteWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceExtension]), createExtensionManagementService([remoteWorkspaceExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test remote install action is disabled for local workspace extension if it cannot be installed', async () => { + // multi server setup + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test remote install action is disabled for local ui extension if it is not installed in remote', async () => { + // multi server setup + const localUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localUIExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test remote install action is disabled for local ui extension if it is also installed in remote', async () => { + // multi server setup + const localUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }); + const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localUIExtension]), createExtensionManagementService([remoteUIExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test local install action is enabled for remote ui extension', async () => { + // multi server setup + const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService(), createExtensionManagementService([remoteUIExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install Locally', testObject.label); + assert.equal('extension-action prominent install', testObject.class); + }); + + test('Test local install action is enabled for disabled remote ui extension', async () => { + // multi server setup + const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService(), createExtensionManagementService([remoteUIExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + await instantiationService.get(IExtensionEnablementService).setEnablement([remoteUIExtension], EnablementState.DisabledGlobally); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install Locally', testObject.label); + assert.equal('extension-action prominent install', testObject.class); + }); + + test('Test local install action is disabled when extension is not set', async () => { + // multi server setup + const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService(), createExtensionManagementService([remoteUIExtension])); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + assert.ok(!testObject.enabled); + }); + + test('Test local install action is disabled for extension which is not installed', async () => { + // multi server setup + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a'))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const pager = await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = pager.firstPage[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test local install action is disabled for remote ui extension which is disabled in env', async () => { + // multi server setup + const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + instantiationService.stub(IWorkbenchEnvironmentService, { disableExtensions: true } as IWorkbenchEnvironmentService); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService(), createExtensionManagementService([remoteUIExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test local install action is disabled when local server is not available', async () => { + // single server setup + const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aSingleRemoteExtensionManagementServerService(instantiationService, createExtensionManagementService([remoteUIExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test local install action is disabled for remote ui extension if it is installed in local', async () => { + // multi server setup + const localUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }); + const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localUIExtension]), createExtensionManagementService([remoteUIExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test local install action is disabled for remote UI extension if it cannot be installed', async () => { + // multi server setup + const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService(), createExtensionManagementService([remoteUIExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test local install action is disabled for remote workspace extension if it is not installed in local', async () => { + // multi server setup + const remoteWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService(), createExtensionManagementService([remoteWorkspaceExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteWorkspaceExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test local install action is disabled for remote workspace extension if it is also installed in local', async () => { + // multi server setup + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspae' }, { location: URI.file(`pub.a`) }); + const remoteWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceExtension]), createExtensionManagementService([remoteWorkspaceExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + test(`RecommendToFolderAction`, () => { // TODO: Implement test }); @@ -1403,6 +1773,25 @@ suite('ExtensionsActions Test', () => { return { firstPage: objects, total: objects.length, pageSize: objects.length, getPage: () => null! }; } + function aSingleRemoteExtensionManagementServerService(instantiationService: TestInstantiationService, remoteExtensionManagementService?: IExtensionManagementService): IExtensionManagementServerService { + const remoteExtensionManagementServer: IExtensionManagementServer = { + authority: 'vscode-remote', + label: 'remote', + extensionManagementService: remoteExtensionManagementService || createExtensionManagementService() + }; + return { + _serviceBrand: {}, + localExtensionManagementServer: null, + remoteExtensionManagementServer, + getExtensionManagementServer: (location: URI) => { + if (location.scheme === REMOTE_HOST_SCHEME) { + return remoteExtensionManagementServer; + } + return null; + } + }; + } + function aMultiExtensionManagementServerService(instantiationService: TestInstantiationService, localExtensionManagementService?: IExtensionManagementService, remoteExtensionManagementService?: IExtensionManagementService): IExtensionManagementServerService { const localExtensionManagementServer: IExtensionManagementServer = { authority: 'vscode-local', @@ -1430,13 +1819,13 @@ suite('ExtensionsActions Test', () => { }; } - function createExtensionManagementService(): IExtensionManagementService { + function createExtensionManagementService(installed: ILocalExtension[] = []): IExtensionManagementService { return { onInstallExtension: Event.None, onDidInstallExtension: Event.None, onUninstallExtension: Event.None, onDidUninstallExtension: Event.None, - getInstalled: () => Promise.resolve([]) + getInstalled: () => Promise.resolve(installed) }; } From ac3680d6498e4fa5d8f6792fe029983a30c6632a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 19 Jul 2019 13:23:30 +0200 Subject: [PATCH 389/710] more tests --- .../extensionsActions.test.ts | 145 +++++++++++++++++- 1 file changed, 144 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index fccc14da4cc..93388fdad2b 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -1373,6 +1373,77 @@ suite('ExtensionsActions Test', () => { assert.equal('extension-action prominent install', testObject.class); }); + test('Test remote install action when installing local workspace extension', async (done) => { + // multi server setup + const remoteExtensionManagementService: IExtensionManagementService = createExtensionManagementService(); + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceExtension]), remoteExtensionManagementService); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.stub(IExtensionsWorkbenchService, workbenchService, 'open', undefined); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install on remote', testObject.label); + assert.equal('extension-action prominent install', testObject.class); + + remoteExtensionManagementService.installFromGallery = () => new Promise(c => c(aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }))); + const disposable = testObject.onDidChange(() => { + if (testObject.label === 'Installing' && testObject.enabled) { + disposable.dispose(); + done(); + } + }); + testObject.run(); + }); + + test('Test remote install action when installing local workspace extension is finished', async (done) => { + // multi server setup + const remoteExtensionManagementService: IExtensionManagementService = createExtensionManagementService(); + const onDidInstallEvent = new Emitter(); + remoteExtensionManagementService.onDidInstallExtension = onDidInstallEvent.event; + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceExtension]), remoteExtensionManagementService); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.stub(IExtensionsWorkbenchService, workbenchService, 'open', undefined); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install on remote', testObject.label); + assert.equal('extension-action prominent install', testObject.class); + + const installedExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + remoteExtensionManagementService.installFromGallery = () => new Promise(c => c(installedExtension)); + await testObject.run(); + assert.ok(testObject.enabled); + assert.equal('Install on remote', testObject.label); + + const disposable = testObject.onDidChange(() => { + if (testObject.label === 'Install on remote' && !testObject.enabled) { + disposable.dispose(); + done(); + } + }); + onDidInstallEvent.fire({ identifier: installedExtension.identifier, local: installedExtension, operation: InstallOperation.Install }); + }); + test('Test remote install action is enabled for disabled local workspace extension', async () => { // multi server setup const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); @@ -1568,6 +1639,77 @@ suite('ExtensionsActions Test', () => { assert.equal('extension-action prominent install', testObject.class); }); + test('Test local install action when installing remote ui extension', async (done) => { + // multi server setup + const localExtensionManagementService: IExtensionManagementService = createExtensionManagementService(); + const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, localExtensionManagementService, createExtensionManagementService([remoteUIExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.stub(IExtensionsWorkbenchService, workbenchService, 'open', undefined); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install Locally', testObject.label); + assert.equal('extension-action prominent install', testObject.class); + + localExtensionManagementService.installFromGallery = () => new Promise(c => c(aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }))); + const disposable = testObject.onDidChange(() => { + if (testObject.label === 'Installing' && testObject.enabled) { + disposable.dispose(); + done(); + } + }); + testObject.run(); + }); + + test('Test local install action when installing remote ui extension is finished', async (done) => { + // multi server setup + const localExtensionManagementService: IExtensionManagementService = createExtensionManagementService(); + const onDidInstallEvent = new Emitter(); + localExtensionManagementService.onDidInstallExtension = onDidInstallEvent.event; + const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, localExtensionManagementService, createExtensionManagementService([remoteUIExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.stub(IExtensionsWorkbenchService, workbenchService, 'open', undefined); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install Locally', testObject.label); + assert.equal('extension-action prominent install', testObject.class); + + const installedExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }); + localExtensionManagementService.installFromGallery = () => new Promise(c => c(installedExtension)); + await testObject.run(); + assert.ok(testObject.enabled); + assert.equal('Install Locally', testObject.label); + + const disposable = testObject.onDidChange(() => { + if (testObject.label === 'Install Locally' && !testObject.enabled) { + disposable.dispose(); + done(); + } + }); + onDidInstallEvent.fire({ identifier: installedExtension.identifier, local: installedExtension, operation: InstallOperation.Install }); + }); + test('Test local install action is enabled for disabled remote ui extension', async () => { // multi server setup const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); @@ -1825,7 +1967,8 @@ suite('ExtensionsActions Test', () => { onDidInstallExtension: Event.None, onUninstallExtension: Event.None, onDidUninstallExtension: Event.None, - getInstalled: () => Promise.resolve(installed) + getInstalled: () => Promise.resolve(installed), + installFromGallery: (extension: IGalleryExtension) => Promise.reject(new Error('not supported')) }; } From 961d04f3c241400d09b5222a881307bc9ae47525 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 19 Jul 2019 16:20:14 +0200 Subject: [PATCH 390/710] Check for installed status Add tests for language pack extensions --- .../extensions/browser/extensionsActions.ts | 2 +- .../extensionsActions.test.ts | 142 ++++++++++++++++++ 2 files changed, 143 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index b9c9c18e8bd..999c4539c03 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -314,7 +314,7 @@ export class InstallInOtherServerAction extends ExtensionAction { } if ( - this.extension && this.extension.local && this.server + this.extension && this.extension.local && this.server && this.extension.state === ExtensionState.Installed // disabled by extension kind or it is a language pack extension && (this.extension.enablementState === EnablementState.DisabledByExtensionKind || isLanguagePackExtension(this.extension.local.manifest)) // Not installed in other server and can install in other server diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index 93388fdad2b..5c4b51aa788 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -1539,6 +1539,31 @@ suite('ExtensionsActions Test', () => { assert.ok(!testObject.enabled); }); + test('Test remote install action is disabled for local workspace extension if it is uninstalled locally', async () => { + // multi server setup + const extensionManagementService = instantiationService.get(IExtensionManagementService); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, extensionManagementService); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); + instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [localWorkspaceExtension]); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install on remote', testObject.label); + + uninstallEvent.fire(localWorkspaceExtension.identifier); + assert.ok(!testObject.enabled); + }); + test('Test remote install action is disabled for local workspace extension if it is installed in remote', async () => { // multi server setup const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); @@ -1618,6 +1643,52 @@ suite('ExtensionsActions Test', () => { assert.ok(!testObject.enabled); }); + test('Test remote install action is enabled for locally installed language pack extension', async () => { + // multi server setup + const languagePackExtension = aLocalExtension('a', { contributes: { localizations: [{ languageId: 'de', translations: [] }] } }, { location: URI.file(`pub.a`) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([languagePackExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: languagePackExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install on remote', testObject.label); + assert.equal('extension-action prominent install', testObject.class); + }); + + test('Test remote install action is disabled if local language pack extension is uninstalled', async () => { + // multi server setup + const extensionManagementService = instantiationService.get(IExtensionManagementService); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, extensionManagementService); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const languagePackExtension = aLocalExtension('a', { contributes: { localizations: [{ languageId: 'de', translations: [] }] } }, { location: URI.file(`pub.a`) }); + instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [languagePackExtension]); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: languagePackExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install on remote', testObject.label); + + uninstallEvent.fire(languagePackExtension.identifier); + assert.ok(!testObject.enabled); + }); + test('Test local install action is enabled for remote ui extension', async () => { // multi server setup const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); @@ -1829,6 +1900,31 @@ suite('ExtensionsActions Test', () => { assert.ok(!testObject.enabled); }); + test('Test local install action is disabled for remoteUI extension if it is uninstalled locally', async () => { + // multi server setup + const extensionManagementService = instantiationService.get(IExtensionManagementService); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService(), extensionManagementService); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [remoteUIExtension]); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUIExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install Locally', testObject.label); + + uninstallEvent.fire(remoteUIExtension.identifier); + assert.ok(!testObject.enabled); + }); + test('Test local install action is disabled for remote UI extension if it cannot be installed', async () => { // multi server setup const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); @@ -1887,6 +1983,52 @@ suite('ExtensionsActions Test', () => { assert.ok(!testObject.enabled); }); + test('Test local install action is enabled for remotely installed language pack extension', async () => { + // multi server setup + const languagePackExtension = aLocalExtension('a', { contributes: { localizations: [{ languageId: 'de', translations: [] }] } }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService(), createExtensionManagementService([languagePackExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: languagePackExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install Locally', testObject.label); + assert.equal('extension-action prominent install', testObject.class); + }); + + test('Test local install action is disabled if remote language pack extension is uninstalled', async () => { + // multi server setup + const extensionManagementService = instantiationService.get(IExtensionManagementService); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService(), extensionManagementService); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const languagePackExtension = aLocalExtension('a', { contributes: { localizations: [{ languageId: 'de', translations: [] }] } }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); + instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [languagePackExtension]); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: languagePackExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = extensions[0]; + assert.ok(testObject.enabled); + assert.equal('Install Locally', testObject.label); + + uninstallEvent.fire(languagePackExtension.identifier); + assert.ok(!testObject.enabled); + }); + test(`RecommendToFolderAction`, () => { // TODO: Implement test }); From a0d681dab8e8d1956ee8746bccf2ba27f73ab8b9 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 19 Jul 2019 16:58:11 +0200 Subject: [PATCH 391/710] clean up install action --- .../extensions/browser/extensionsActions.ts | 25 +++++++++++-------- .../browser/extensionsWorkbenchService.ts | 4 +-- .../contrib/extensions/common/extensions.ts | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 999c4539c03..f68a840c9ad 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -172,19 +172,22 @@ export class InstallAction extends ExtensionAction { } update(): void { - if (!this.extension || this.extension.type === ExtensionType.System || this.extension.state === ExtensionState.Installed) { - this.enabled = false; - this.class = InstallAction.Class; - this.label = InstallAction.INSTALL_LABEL; - return; - } this.enabled = false; - if (this.extensionsWorkbenchService.canInstall(this.extension)) { - const local = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, this.extension.identifier))[0]; - this.enabled = !local || (!!local.local && isLanguagePackExtension(local.local.manifest)); + this.class = InstallAction.Class; + this.label = InstallAction.INSTALL_LABEL; + if (this.extension && this.extension.type === ExtensionType.User) { + if (this.extension.state === ExtensionState.Uninstalled && this.extensionsWorkbenchService.canInstall(this.extension)) { + this.enabled = true; + this.updateLabel(); + return; + } + if (this.extension.state === ExtensionState.Installing) { + this.enabled = false; + this.updateLabel(); + this.class = this.extension.state === ExtensionState.Installing ? InstallAction.InstallingClass : InstallAction.Class; + return; + } } - this.class = this.extension.state === ExtensionState.Installing ? InstallAction.InstallingClass : InstallAction.Class; - this.updateLabel(); } private updateLabel(): void { diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index b0c5726c6b9..c0e396c38b4 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -58,8 +58,8 @@ class Extension implements IExtension { @IProductService private readonly productService: IProductService ) { } - get type(): ExtensionType | undefined { - return this.local ? this.local.type : undefined; + get type(): ExtensionType { + return this.local ? this.local.type : ExtensionType.User; } get name(): string { diff --git a/src/vs/workbench/contrib/extensions/common/extensions.ts b/src/vs/workbench/contrib/extensions/common/extensions.ts index 5e6d7cf3993..33e46eecf82 100644 --- a/src/vs/workbench/contrib/extensions/common/extensions.ts +++ b/src/vs/workbench/contrib/extensions/common/extensions.ts @@ -34,7 +34,7 @@ export const enum ExtensionState { } export interface IExtension { - readonly type?: ExtensionType; + readonly type: ExtensionType; readonly state: ExtensionState; readonly name: string; readonly displayName: string; From a93ef520f82b8ba164ec317e2b534a119dd67ce8 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 19 Jul 2019 17:12:40 +0200 Subject: [PATCH 392/710] fix tests --- .../electron-browser/extensionsWorkbenchService.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts index 69b101504fa..04ed61d0d8a 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts @@ -112,7 +112,7 @@ suite('ExtensionsWorkbenchServiceTest', () => { test('test gallery extension', async () => { const expected = aGalleryExtension('expectedName', { displayName: 'expectedDisplayName', - version: '1.5', + version: '1.5.0', publisherId: 'expectedPublisherId', publisher: 'expectedPublisher', publisherDisplayName: 'expectedPublisherDisplayName', @@ -140,14 +140,14 @@ suite('ExtensionsWorkbenchServiceTest', () => { assert.equal(1, pagedResponse.firstPage.length); const actual = pagedResponse.firstPage[0]; - assert.equal(null, actual.type); + assert.equal(ExtensionType.User, actual.type); assert.equal('expectedName', actual.name); assert.equal('expectedDisplayName', actual.displayName); assert.equal('expectedpublisher.expectedname', actual.identifier.id); assert.equal('expectedPublisher', actual.publisher); assert.equal('expectedPublisherDisplayName', actual.publisherDisplayName); - assert.equal('1.5', actual.version); - assert.equal('1.5', actual.latestVersion); + assert.equal('1.5.0', actual.version); + assert.equal('1.5.0', actual.latestVersion); assert.equal('expectedDescription', actual.description); assert.equal('uri:icon', actual.iconUrl); assert.equal('fallback:icon', actual.iconUrlFallback); From f0e66ee83bdd0de83bcb601702ba26a1b6d28dff Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 19 Jul 2019 09:32:33 -0700 Subject: [PATCH 393/710] Bump vscode-ripgrep --- package.json | 4 ++-- remote/package.json | 2 +- remote/yarn.lock | 8 ++++---- yarn.lock | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 8d546203d04..6c72aa10cfc 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "v8-inspect-profiler": "^0.0.20", "vscode-chokidar": "2.1.7", "vscode-proxy-agent": "0.4.0", - "vscode-ripgrep": "^1.5.4", + "vscode-ripgrep": "^1.5.5", "vscode-sqlite3": "4.0.8", "vscode-textmate": "^4.2.2", "xterm": "3.15.0-beta71", @@ -158,4 +158,4 @@ "windows-mutex": "0.3.0", "windows-process-tree": "0.2.4" } -} \ No newline at end of file +} diff --git a/remote/package.json b/remote/package.json index a4113e1e74c..081eb5c6076 100644 --- a/remote/package.json +++ b/remote/package.json @@ -18,7 +18,7 @@ "spdlog": "^0.9.0", "vscode-chokidar": "2.1.7", "vscode-proxy-agent": "0.4.0", - "vscode-ripgrep": "^1.5.4", + "vscode-ripgrep": "^1.5.5", "vscode-textmate": "^4.2.2", "xterm": "3.15.0-beta71", "xterm-addon-search": "0.2.0-beta2", diff --git a/remote/yarn.lock b/remote/yarn.lock index 9aa7137893e..3ed8f02de3c 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -1123,10 +1123,10 @@ vscode-proxy-agent@0.4.0: https-proxy-agent "2.2.1" socks-proxy-agent "4.0.1" -vscode-ripgrep@^1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.4.tgz#dae1c3eef350513299341cdf96e622c00b548eff" - integrity sha512-Bs8SvFAkR0QHf09J46VgNo19yRikOtj/f0zHzK3AM3ICjCGNN/BNoG9of6zGVHUTO+6Mk1RbKglyOHLKr8D1lg== +vscode-ripgrep@^1.5.5: + version "1.5.5" + resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.5.tgz#24c0e9cb356cf889c98e15ecb58f9cf654a1d961" + integrity sha512-OrPrAmcun4+uZAuNcQvE6CCPskh+5AsjANod/Q3zRcJcGNxgoOSGlQN9RPtatkUNmkN8Nn8mZBnS1jMylu/dKg== vscode-textmate@^4.2.2: version "4.2.2" diff --git a/yarn.lock b/yarn.lock index 7876a802c5c..3fa82a92145 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9561,10 +9561,10 @@ vscode-proxy-agent@0.4.0: https-proxy-agent "2.2.1" socks-proxy-agent "4.0.1" -vscode-ripgrep@^1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.4.tgz#dae1c3eef350513299341cdf96e622c00b548eff" - integrity sha512-Bs8SvFAkR0QHf09J46VgNo19yRikOtj/f0zHzK3AM3ICjCGNN/BNoG9of6zGVHUTO+6Mk1RbKglyOHLKr8D1lg== +vscode-ripgrep@^1.5.5: + version "1.5.5" + resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.5.tgz#24c0e9cb356cf889c98e15ecb58f9cf654a1d961" + integrity sha512-OrPrAmcun4+uZAuNcQvE6CCPskh+5AsjANod/Q3zRcJcGNxgoOSGlQN9RPtatkUNmkN8Nn8mZBnS1jMylu/dKg== vscode-sqlite3@4.0.8: version "4.0.8" From 04ce5599675e3bb367d93e4e68827961439fe58c Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Fri, 19 Jul 2019 10:14:23 -0700 Subject: [PATCH 394/710] Support file scheme for save and open dialog --- .../workbench/services/dialogs/browser/fileDialogService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/dialogs/browser/fileDialogService.ts b/src/vs/workbench/services/dialogs/browser/fileDialogService.ts index 8c04023b954..f7d1e60691e 100644 --- a/src/vs/workbench/services/dialogs/browser/fileDialogService.ts +++ b/src/vs/workbench/services/dialogs/browser/fileDialogService.ts @@ -221,7 +221,7 @@ export class FileDialogService implements IFileDialogService { const schema = this.getFileSystemSchema(options); if (this.shouldUseSimplified(schema)) { if (!options.availableFileSystems) { - options.availableFileSystems = [schema]; // by default only allow saving in the own file system + options.availableFileSystems = this.ensureFileSchema(schema); // always allow file as well } return this.saveRemoteResource(options); @@ -239,7 +239,7 @@ export class FileDialogService implements IFileDialogService { const schema = this.getFileSystemSchema(options); if (this.shouldUseSimplified(schema)) { if (!options.availableFileSystems) { - options.availableFileSystems = [schema]; // by default only allow loading in the own file system + options.availableFileSystems = this.ensureFileSchema(schema); // always allow file as well } const uri = await this.pickRemoteResource(options); From d826dfd943dee16d2dab7a1b0b6c6d07ec40f1ae Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Fri, 19 Jul 2019 11:19:00 -0700 Subject: [PATCH 395/710] Allow remote error messages to work --- src/vs/workbench/api/browser/mainThreadTerminalService.ts | 7 +++++++ src/vs/workbench/api/common/extHost.protocol.ts | 3 ++- src/vs/workbench/api/node/extHostTerminalService.ts | 1 + .../workbench/contrib/terminal/browser/terminalInstance.ts | 1 + src/vs/workbench/contrib/terminal/common/terminal.ts | 2 +- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadTerminalService.ts b/src/vs/workbench/api/browser/mainThreadTerminalService.ts index ab865cc5224..d1cdcc4c131 100644 --- a/src/vs/workbench/api/browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/browser/mainThreadTerminalService.ts @@ -323,6 +323,13 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape this._getTerminalProcess(terminalId).then(e => e.emitCwd(cwd)); } + public $sendResolvedLaunchConfig(terminalId: number, shellLaunchConfig: IShellLaunchConfig): void { + const instance = this._terminalService.getInstanceFromId(terminalId); + if (instance) { + instance.shellLaunchConfig = shellLaunchConfig; + } + } + private async _onRequestLatency(terminalId: number): Promise { const COUNT = 2; let sum = 0; diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index d1f9840554d..cde31c599a3 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -42,7 +42,7 @@ import { IRevealOptions, ITreeItem } from 'vs/workbench/common/views'; import * as callHierarchy from 'vs/workbench/contrib/callHierarchy/common/callHierarchy'; import { IAdapterDescriptor, IConfig, ITerminalSettings } from 'vs/workbench/contrib/debug/common/debug'; import { ITextQueryBuilderOptions } from 'vs/workbench/contrib/search/common/queryBuilder'; -import { ITerminalDimensions } from 'vs/workbench/contrib/terminal/common/terminal'; +import { ITerminalDimensions, IShellLaunchConfig } from 'vs/workbench/contrib/terminal/common/terminal'; import { ExtensionActivationError } from 'vs/workbench/services/extensions/common/extensions'; import { createExtHostContextProxyIdentifier as createExtId, createMainContextProxyIdentifier as createMainId, IRPCProtocol } from 'vs/workbench/services/extensions/common/proxyIdentifier'; import * as search from 'vs/workbench/services/search/common/search'; @@ -404,6 +404,7 @@ export interface MainThreadTerminalServiceShape extends IDisposable { $sendOverrideDimensions(terminalId: number, dimensions: ITerminalDimensions | undefined): void; $sendProcessInitialCwd(terminalId: number, cwd: string): void; $sendProcessCwd(terminalId: number, initialCwd: string): void; + $sendResolvedLaunchConfig(terminalId: number, shellLaunchConfig: IShellLaunchConfig): void; // Renderer $terminalRendererSetName(terminalId: number, name: string): void; diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 37044a2f362..55942c11733 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -617,6 +617,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { // TODO: Support conpty on remote, it doesn't seem to work for some reason? // TODO: When conpty is enabled, only enable it when accessibilityMode is off const enableConpty = false; //terminalConfig.get('windowsEnableConpty') as boolean; + this._proxy.$sendResolvedLaunchConfig(id, shellLaunchConfig); this._setupExtHostProcessListeners(id, new TerminalProcess(shellLaunchConfig, initialCwd, cols, rows, env, enableConpty, this._logService)); } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index 1dc49e0e242..1e385d4c223 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -223,6 +223,7 @@ export class TerminalInstance implements ITerminalInstance { public get hadFocusOnExit(): boolean { return this._hadFocusOnExit; } public get isTitleSetByProcess(): boolean { return !!this._messageTitleDisposable; } public get shellLaunchConfig(): IShellLaunchConfig { return this._shellLaunchConfig; } + public set shellLaunchConfig(shellLaunchConfig: IShellLaunchConfig) { this._shellLaunchConfig = shellLaunchConfig; } public get commandTracker(): TerminalCommandTracker { return this._commandTracker; } private readonly _onExit = new Emitter(); diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index c126bf70978..02825b35a22 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -468,7 +468,7 @@ export interface ITerminalInstance { /** * The shell launch config used to launch the shell. */ - readonly shellLaunchConfig: IShellLaunchConfig; + shellLaunchConfig: IShellLaunchConfig; /** * Whether to disable layout for the terminal. This is useful when the size of the terminal is From c3e13bca4fd87f88a77c7aff414cdf804cb99cff Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Fri, 19 Jul 2019 11:27:54 -0700 Subject: [PATCH 396/710] thread id in commentNode ID --- src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts b/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts index 91370417b61..65f2ce20738 100644 --- a/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts @@ -23,7 +23,7 @@ export class CommentsDataSource implements IDataSource { return element.id; } if (element instanceof CommentNode) { - return `${element.resource.toString()}-${element.comment.uniqueIdInThread}`; + return `${element.resource.toString()}-${element.threadId}-${element.comment.uniqueIdInThread}`; } return ''; } From e4ea68f5b66c97d79ad2a7f433a3183ab26e0bdb Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Fri, 19 Jul 2019 11:34:38 -0700 Subject: [PATCH 397/710] Update icons for npm script explorer --- extensions/npm/resources/dark/continue.svg | 4 +++- extensions/npm/resources/dark/debug.svg | 10 ++++------ extensions/npm/resources/dark/prepostscript.svg | 4 +++- extensions/npm/resources/dark/refresh.svg | 5 ++++- extensions/npm/resources/dark/script.svg | 4 +++- extensions/npm/resources/light/continue.svg | 4 +++- extensions/npm/resources/light/debug.svg | 10 ++++------ extensions/npm/resources/light/prepostscript.svg | 4 +++- extensions/npm/resources/light/refresh.svg | 5 ++++- extensions/npm/resources/light/script.svg | 4 +++- 10 files changed, 34 insertions(+), 20 deletions(-) diff --git a/extensions/npm/resources/dark/continue.svg b/extensions/npm/resources/dark/continue.svg index e6eb6041129..8b0a58eca9b 100644 --- a/extensions/npm/resources/dark/continue.svg +++ b/extensions/npm/resources/dark/continue.svg @@ -1 +1,3 @@ -continue \ No newline at end of file + + + diff --git a/extensions/npm/resources/dark/debug.svg b/extensions/npm/resources/dark/debug.svg index e211df43ef6..e4c1b7a927b 100644 --- a/extensions/npm/resources/dark/debug.svg +++ b/extensions/npm/resources/dark/debug.svg @@ -1,7 +1,5 @@ - - - - - - + + + + diff --git a/extensions/npm/resources/dark/prepostscript.svg b/extensions/npm/resources/dark/prepostscript.svg index cc9bcee715a..7137a9d7bb5 100644 --- a/extensions/npm/resources/dark/prepostscript.svg +++ b/extensions/npm/resources/dark/prepostscript.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/extensions/npm/resources/dark/refresh.svg b/extensions/npm/resources/dark/refresh.svg index d79fdaa4e8e..ec0c43f0bc3 100644 --- a/extensions/npm/resources/dark/refresh.svg +++ b/extensions/npm/resources/dark/refresh.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + diff --git a/extensions/npm/resources/dark/script.svg b/extensions/npm/resources/dark/script.svg index f90781897a7..7137a9d7bb5 100644 --- a/extensions/npm/resources/dark/script.svg +++ b/extensions/npm/resources/dark/script.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/extensions/npm/resources/light/continue.svg b/extensions/npm/resources/light/continue.svg index a4dd1cd3ca8..2563bfa114b 100644 --- a/extensions/npm/resources/light/continue.svg +++ b/extensions/npm/resources/light/continue.svg @@ -1 +1,3 @@ -continue \ No newline at end of file + + + diff --git a/extensions/npm/resources/light/debug.svg b/extensions/npm/resources/light/debug.svg index b8efb1c8f77..81a5ffb6b11 100644 --- a/extensions/npm/resources/light/debug.svg +++ b/extensions/npm/resources/light/debug.svg @@ -1,7 +1,5 @@ - - - - - - + + + + diff --git a/extensions/npm/resources/light/prepostscript.svg b/extensions/npm/resources/light/prepostscript.svg index e59d80cd323..60f77501db7 100644 --- a/extensions/npm/resources/light/prepostscript.svg +++ b/extensions/npm/resources/light/prepostscript.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/extensions/npm/resources/light/refresh.svg b/extensions/npm/resources/light/refresh.svg index e0345748192..a5b88123a0e 100644 --- a/extensions/npm/resources/light/refresh.svg +++ b/extensions/npm/resources/light/refresh.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + diff --git a/extensions/npm/resources/light/script.svg b/extensions/npm/resources/light/script.svg index fb1c74cf773..60f77501db7 100644 --- a/extensions/npm/resources/light/script.svg +++ b/extensions/npm/resources/light/script.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + From 496158d60fdd3d0b1bda3d8525b4535180ee4052 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Fri, 19 Jul 2019 11:43:09 -0700 Subject: [PATCH 398/710] comment node should also be prefixed with ownerid. --- .../comments/browser/commentsTreeViewer.ts | 4 +-- .../contrib/comments/common/commentModel.ts | 28 +++++++++++-------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts b/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts index 65f2ce20738..86ade2f8f53 100644 --- a/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts @@ -20,10 +20,10 @@ export class CommentsDataSource implements IDataSource { return 'root'; } if (element instanceof ResourceWithCommentThreads) { - return element.id; + return `${element.owner}-${element.id}`; } if (element instanceof CommentNode) { - return `${element.resource.toString()}-${element.threadId}-${element.comment.uniqueIdInThread}`; + return `${element.owner}-${element.resource.toString()}-${element.threadId}-${element.comment.uniqueIdInThread}`; } return ''; } diff --git a/src/vs/workbench/contrib/comments/common/commentModel.ts b/src/vs/workbench/contrib/comments/common/commentModel.ts index d2a03f5ccd5..b4e40ddca1b 100644 --- a/src/vs/workbench/contrib/comments/common/commentModel.ts +++ b/src/vs/workbench/contrib/comments/common/commentModel.ts @@ -15,13 +15,15 @@ export interface ICommentThreadChangedEvent extends CommentThreadChangedEvent { } export class CommentNode { + owner: string; threadId: string; range: IRange; comment: Comment; replies: CommentNode[] = []; resource: URI; - constructor(threadId: string, resource: URI, comment: Comment, range: IRange) { + constructor(owner: string, threadId: string, resource: URI, comment: Comment, range: IRange) { + this.owner = owner; this.threadId = threadId; this.comment = comment; this.resource = resource; @@ -35,18 +37,20 @@ export class CommentNode { export class ResourceWithCommentThreads { id: string; + owner: string; commentThreads: CommentNode[]; // The top level comments on the file. Replys are nested under each node. resource: URI; - constructor(resource: URI, commentThreads: CommentThread[]) { + constructor(owner: string, resource: URI, commentThreads: CommentThread[]) { + this.owner = owner; this.id = resource.toString(); this.resource = resource; - this.commentThreads = commentThreads.filter(thread => thread.comments && thread.comments.length).map(thread => ResourceWithCommentThreads.createCommentNode(resource, thread)); + this.commentThreads = commentThreads.filter(thread => thread.comments && thread.comments.length).map(thread => ResourceWithCommentThreads.createCommentNode(owner, resource, thread)); } - public static createCommentNode(resource: URI, commentThread: CommentThread): CommentNode { + public static createCommentNode(owner: string, resource: URI, commentThread: CommentThread): CommentNode { const { threadId, comments, range } = commentThread; - const commentNodes: CommentNode[] = comments!.map(comment => new CommentNode(threadId!, resource, comment, range)); + const commentNodes: CommentNode[] = comments!.map(comment => new CommentNode(owner, threadId!, resource, comment, range)); if (commentNodes.length > 1) { commentNodes[0].replies = commentNodes.slice(1, commentNodes.length); } @@ -65,7 +69,7 @@ export class CommentsModel { } public setCommentThreads(owner: string, commentThreads: CommentThread[]): void { - this.commentThreadsMap.set(owner, this.groupByResource(commentThreads)); + this.commentThreadsMap.set(owner, this.groupByResource(owner, commentThreads)); this.resourceCommentThreads = flatten(values(this.commentThreadsMap)); } @@ -97,9 +101,9 @@ export class CommentsModel { // Find comment node on resource that is that thread and replace it const index = firstIndex(matchingResourceData.commentThreads, (commentThread) => commentThread.threadId === thread.threadId); if (index >= 0) { - matchingResourceData.commentThreads[index] = ResourceWithCommentThreads.createCommentNode(URI.parse(matchingResourceData.id), thread); + matchingResourceData.commentThreads[index] = ResourceWithCommentThreads.createCommentNode(owner, URI.parse(matchingResourceData.id), thread); } else if (thread.comments && thread.comments.length) { - matchingResourceData.commentThreads.push(ResourceWithCommentThreads.createCommentNode(URI.parse(matchingResourceData.id), thread)); + matchingResourceData.commentThreads.push(ResourceWithCommentThreads.createCommentNode(owner, URI.parse(matchingResourceData.id), thread)); } }); @@ -108,10 +112,10 @@ export class CommentsModel { if (existingResource.length) { const resource = existingResource[0]; if (thread.comments && thread.comments.length) { - resource.commentThreads.push(ResourceWithCommentThreads.createCommentNode(resource.resource, thread)); + resource.commentThreads.push(ResourceWithCommentThreads.createCommentNode(owner, resource.resource, thread)); } } else { - threadsForOwner.push(new ResourceWithCommentThreads(URI.parse(thread.resource!), [thread])); + threadsForOwner.push(new ResourceWithCommentThreads(owner, URI.parse(thread.resource!), [thread])); } }); @@ -133,11 +137,11 @@ export class CommentsModel { } } - private groupByResource(commentThreads: CommentThread[]): ResourceWithCommentThreads[] { + private groupByResource(owner: string, commentThreads: CommentThread[]): ResourceWithCommentThreads[] { const resourceCommentThreads: ResourceWithCommentThreads[] = []; const commentThreadsByResource = new Map(); for (const group of groupBy(commentThreads, CommentsModel._compareURIs)) { - commentThreadsByResource.set(group[0].resource!, new ResourceWithCommentThreads(URI.parse(group[0].resource!), group)); + commentThreadsByResource.set(group[0].resource!, new ResourceWithCommentThreads(owner, URI.parse(group[0].resource!), group)); } commentThreadsByResource.forEach((v, i, m) => { From ccc4fbf13ad1084356c72b5414308e2ad6ba21a9 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 19 Jul 2019 12:04:20 -0700 Subject: [PATCH 399/710] Fix search validation not applied immediately when toggling regex mode Fix #77435 --- src/vs/workbench/contrib/search/browser/searchView.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/contrib/search/browser/searchView.ts b/src/vs/workbench/contrib/search/browser/searchView.ts index 16ebfb4ed95..51979d3ff21 100644 --- a/src/vs/workbench/contrib/search/browser/searchView.ts +++ b/src/vs/workbench/contrib/search/browser/searchView.ts @@ -1151,6 +1151,10 @@ export class SearchView extends ViewletPanel { } onQueryChanged(preserveFocus?: boolean): void { + if (!this.searchWidget.searchInput.inputBox.isInputValid()) { + return; + } + const isRegex = this.searchWidget.searchInput.getRegex(); const isWholeWords = this.searchWidget.searchInput.getWholeWords(); const isCaseSensitive = this.searchWidget.searchInput.getCaseSensitive(); From f7a5ac218caad12d95f1b2d08a4d96498b758650 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Fri, 19 Jul 2019 12:19:13 -0700 Subject: [PATCH 400/710] set US keyboard layout sync in tests. --- .../keybinding/test/browserKeyboardMapper.test.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts index acf45e1358d..8765bff54c7 100644 --- a/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts @@ -17,15 +17,18 @@ class TestKeyboardMapperFactory extends BrowserKeyboardMapperFactoryBase { constructor(notificationService: INotificationService, storageService: IStorageService, commandService: ICommandService) { super(notificationService, storageService, commandService); - let keymapInfos: IKeymapInfo[] = KeyboardLayoutContribution.INSTANCE.layoutInfos; + const keymapInfos: IKeymapInfo[] = KeyboardLayoutContribution.INSTANCE.layoutInfos; this._keymapInfos.push(...keymapInfos.map(info => (new KeymapInfo(info.layout, info.secondaryLayouts, info.mapping, info.isUserKeyboardLayout)))); this._mru = this._keymapInfos; this._initialized = true; this.onKeyboardLayoutChanged(); + const usLayout = this.getUSStandardLayout(); + if (usLayout) { + this.setActiveKeyMapping(usLayout.mapping); + } } } - suite('keyboard layout loader', () => { let instantiationService: TestInstantiationService = new TestInstantiationService(); let notitifcationService = instantiationService.stub(INotificationService, {}); @@ -33,12 +36,12 @@ suite('keyboard layout loader', () => { let commandService = instantiationService.stub(ICommandService, {}); let instance = new TestKeyboardMapperFactory(notitifcationService, storageService, commandService); - test.skip('load default US keyboard layout', () => { + test('load default US keyboard layout', () => { assert.notEqual(instance.activeKeyboardLayout, null); assert.equal(instance.activeKeyboardLayout!.isUSStandard, true); }); - test.skip('isKeyMappingActive', () => { + test('isKeyMappingActive', () => { assert.equal(instance.isKeyMappingActive({ KeyA: { value: 'a', From ce28d57e21572bb2fa7ad72c7db7a0ace67c1171 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 19 Jul 2019 12:23:50 -0700 Subject: [PATCH 401/710] Use async --- .../api/node/extHostTerminalService.ts | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 9ec81e1aa58..35884b08ba4 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -91,7 +91,7 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi this._idPromise.then(c => { this._proxy.$registerOnDataListener(this._id); }); - return this._onData && this._onData.event; + return this._onData.event; } constructor( @@ -110,7 +110,7 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi }); } - public create( + public async create( shellPath?: string, shellArgs?: string[] | string, cwd?: string | URI, @@ -118,18 +118,16 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi waitOnExit?: boolean, strictEnv?: boolean, hideFromUser?: boolean - ): void { - this._proxy.$createTerminal({ name: this._name, shellPath, shellArgs, cwd, env, waitOnExit, strictEnv, hideFromUser }).then(terminal => { - this._name = terminal.name; - this._runQueuedRequests(terminal.id); - }); + ): Promise { + const terminal = await this._proxy.$createTerminal({ name: this._name, shellPath, shellArgs, cwd, env, waitOnExit, strictEnv, hideFromUser }); + this._name = terminal.name; + this._runQueuedRequests(terminal.id); } - public createVirtualProcess(): Promise { - return this._proxy.$createTerminal({ name: this._name, isVirtualProcess: true }).then(terminal => { - this._name = terminal.name; - this._runQueuedRequests(terminal.id); - }); + public async createVirtualProcess(): Promise { + const terminal = await this._proxy.$createTerminal({ name: this._name, isVirtualProcess: true }); + this._name = terminal.name; + this._runQueuedRequests(terminal.id); } public get name(): string { From 25733b47ae413164eb65fcb7df1d1a2ae5639925 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 19 Jul 2019 12:32:37 -0700 Subject: [PATCH 402/710] Upgrade vscode-ripgrep in build/ as well --- build/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/yarn.lock b/build/yarn.lock index 02f533c9ce5..ec9ae0cc087 100644 --- a/build/yarn.lock +++ b/build/yarn.lock @@ -2309,9 +2309,9 @@ vsce@1.48.0: yazl "^2.2.2" vscode-ripgrep@^1.4.0: - version "1.5.4" - resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.4.tgz#dae1c3eef350513299341cdf96e622c00b548eff" - integrity sha512-Bs8SvFAkR0QHf09J46VgNo19yRikOtj/f0zHzK3AM3ICjCGNN/BNoG9of6zGVHUTO+6Mk1RbKglyOHLKr8D1lg== + version "1.5.5" + resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.5.tgz#24c0e9cb356cf889c98e15ecb58f9cf654a1d961" + integrity sha512-OrPrAmcun4+uZAuNcQvE6CCPskh+5AsjANod/Q3zRcJcGNxgoOSGlQN9RPtatkUNmkN8Nn8mZBnS1jMylu/dKg== vscode-telemetry-extractor@1.4.3: version "1.4.3" From 7ee0e1818a58fd31c91a0f49675606d9ee0e7027 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Mon, 15 Jul 2019 14:59:35 -0700 Subject: [PATCH 403/710] Give remote resolvers a way to set environment variables in the remote EH Fix #77234, for microsoft/vscode-remote-release#16 --- .../browser/remoteAuthorityResolverService.ts | 12 ++++++++---- .../remote/common/remoteAgentConnection.ts | 1 + .../remote/common/remoteAuthorityResolver.ts | 13 +++++++++++-- .../remoteAuthorityResolverService.ts | 16 ++++++++-------- src/vs/vscode.proposed.d.ts | 11 ++++++++++- .../workbench/api/common/extHost.protocol.ts | 4 ++-- .../api/node/extHostExtensionService.ts | 18 +++++++++++++++--- .../common/extensionHostProcessManager.ts | 12 +++++++----- .../common/remoteExtensionHostClient.ts | 7 ++++--- .../electron-browser/extensionService.ts | 10 +++++----- .../common/abstractRemoteAgentService.ts | 4 ++-- .../services/remote/node/tunnelService.ts | 4 ++-- 12 files changed, 75 insertions(+), 37 deletions(-) diff --git a/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts b/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts index 37d42a5c391..5db4ac5683e 100644 --- a/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts +++ b/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ResolvedAuthority, IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver'; +import { ResolvedAuthority, IRemoteAuthorityResolverService, ResolverResult } from 'vs/platform/remote/common/remoteAuthorityResolver'; export class RemoteAuthorityResolverService implements IRemoteAuthorityResolverService { @@ -12,12 +12,16 @@ export class RemoteAuthorityResolverService implements IRemoteAuthorityResolverS constructor() { } - resolveAuthority(authority: string): Promise { + resolveAuthority(authority: string): Promise { if (authority.indexOf(':') >= 0) { const pieces = authority.split(':'); - return Promise.resolve({ authority, host: pieces[0], port: parseInt(pieces[1], 10) }); + return Promise.resolve({ + authority: { authority, host: pieces[0], port: parseInt(pieces[1], 10) } + }); } - return Promise.resolve({ authority, host: authority, port: 80 }); + return Promise.resolve({ + authority: { authority, host: authority, port: 80 } + }); } clearResolvedAuthority(authority: string): void { diff --git a/src/vs/platform/remote/common/remoteAgentConnection.ts b/src/vs/platform/remote/common/remoteAgentConnection.ts index 7c64d37917b..64ef9b758c2 100644 --- a/src/vs/platform/remote/common/remoteAgentConnection.ts +++ b/src/vs/platform/remote/common/remoteAgentConnection.ts @@ -163,6 +163,7 @@ export interface IRemoteExtensionHostStartParams { debugId?: string; break?: boolean; port?: number | null; + env?: { [key: string]: string | null }; } interface IExtensionHostConnectionResult { diff --git a/src/vs/platform/remote/common/remoteAuthorityResolver.ts b/src/vs/platform/remote/common/remoteAuthorityResolver.ts index fac355a4917..898b8d8aba9 100644 --- a/src/vs/platform/remote/common/remoteAuthorityResolver.ts +++ b/src/vs/platform/remote/common/remoteAuthorityResolver.ts @@ -13,6 +13,15 @@ export interface ResolvedAuthority { readonly port: number; } +export interface ResolvedOptions { + readonly remoteEnv?: { [key: string]: string | null }; +} + +export interface ResolverResult { + authority: ResolvedAuthority; + options?: ResolvedOptions; +} + export enum RemoteAuthorityResolverErrorCode { Unknown = 'Unknown', NotAvailable = 'NotAvailable', @@ -61,9 +70,9 @@ export interface IRemoteAuthorityResolverService { _serviceBrand: any; - resolveAuthority(authority: string): Promise; + resolveAuthority(authority: string): Promise; clearResolvedAuthority(authority: string): void; - setResolvedAuthority(resolvedAuthority: ResolvedAuthority): void; + setResolvedAuthority(resolvedAuthority: ResolvedAuthority, resolvedOptions?: ResolvedOptions): void; setResolvedAuthorityError(authority: string, err: any): void; } diff --git a/src/vs/platform/remote/electron-browser/remoteAuthorityResolverService.ts b/src/vs/platform/remote/electron-browser/remoteAuthorityResolverService.ts index 0a97af69780..3cd1da3e018 100644 --- a/src/vs/platform/remote/electron-browser/remoteAuthorityResolverService.ts +++ b/src/vs/platform/remote/electron-browser/remoteAuthorityResolverService.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ResolvedAuthority, IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver'; +import { ResolvedAuthority, IRemoteAuthorityResolverService, ResolverResult, ResolvedOptions } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { ipcRenderer as ipc } from 'electron'; import * as errors from 'vs/base/common/errors'; class PendingResolveAuthorityRequest { constructor( - public readonly resolve: (value: ResolvedAuthority) => void, + public readonly resolve: (value: ResolverResult) => void, public readonly reject: (err: any) => void, - public readonly promise: Promise, + public readonly promise: Promise, ) { } } @@ -26,11 +26,11 @@ export class RemoteAuthorityResolverService implements IRemoteAuthorityResolverS this._resolveAuthorityRequests = Object.create(null); } - resolveAuthority(authority: string): Promise { + resolveAuthority(authority: string): Promise { if (!this._resolveAuthorityRequests[authority]) { - let resolve: (value: ResolvedAuthority) => void; + let resolve: (value: ResolverResult) => void; let reject: (err: any) => void; - let promise = new Promise((_resolve, _reject) => { + let promise = new Promise((_resolve, _reject) => { resolve = _resolve; reject = _reject; }); @@ -46,11 +46,11 @@ export class RemoteAuthorityResolverService implements IRemoteAuthorityResolverS } } - setResolvedAuthority(resolvedAuthority: ResolvedAuthority) { + setResolvedAuthority(resolvedAuthority: ResolvedAuthority, options?: ResolvedOptions) { if (this._resolveAuthorityRequests[resolvedAuthority.authority]) { let request = this._resolveAuthorityRequests[resolvedAuthority.authority]; ipc.send('vscode:remoteAuthorityResolved', resolvedAuthority); - request.resolve(resolvedAuthority); + request.resolve({ authority: resolvedAuthority, options }); } } diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 2acdd9eb0c9..86733058b0e 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -94,6 +94,15 @@ declare module 'vscode' { constructor(host: string, port: number); } + export interface ResolvedOptions { + remoteEnv?: { [key: string]: string | null }; + } + + export interface ResolverResult { + authority: ResolvedAuthority; + options?: ResolvedOptions; + } + export class RemoteAuthorityResolverError extends Error { static NotAvailable(message?: string, handled?: boolean): RemoteAuthorityResolverError; static TemporarilyNotAvailable(message?: string): RemoteAuthorityResolverError; @@ -102,7 +111,7 @@ declare module 'vscode' { } export interface RemoteAuthorityResolver { - resolve(authority: string, context: RemoteAuthorityResolverContext): ResolvedAuthority | Thenable; + resolve(authority: string, context: RemoteAuthorityResolverContext): ResolverResult | Thenable; } export interface ResourceLabelFormatter { diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index d1f9840554d..cc7202da85b 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -31,7 +31,7 @@ import { LogLevel } from 'vs/platform/log/common/log'; import { IMarkerData } from 'vs/platform/markers/common/markers'; import { IProgressOptions, IProgressStep } from 'vs/platform/progress/common/progress'; import * as quickInput from 'vs/platform/quickinput/common/quickInput'; -import { RemoteAuthorityResolverErrorCode, ResolvedAuthority } from 'vs/platform/remote/common/remoteAuthorityResolver'; +import { RemoteAuthorityResolverErrorCode, ResolverResult } from 'vs/platform/remote/common/remoteAuthorityResolver'; import * as statusbar from 'vs/platform/statusbar/common/statusbar'; import { ClassifiedEvent, GDPRClassification, StrictPropertyCheck } from 'vs/platform/telemetry/common/gdprTypings'; import { ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry'; @@ -855,7 +855,7 @@ export interface IResolveAuthorityErrorResult { export interface IResolveAuthorityOKResult { type: 'ok'; - value: ResolvedAuthority; + value: ResolverResult; } export type IResolveAuthorityResult = IResolveAuthorityErrorResult | IResolveAuthorityOKResult; diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index af2ba60a797..868b40e6867 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -662,12 +662,24 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { try { const result = await resolver.resolve(remoteAuthority, { resolveAttempt }); + + // Support the old resolver interface, TODO remove after awhile + const authority = typeof (result).host === 'string' ? + { + authority: remoteAuthority, + host: (result).host, + port: (result).port + } : + { + authority: remoteAuthority, + host: result.authority.host, + port: result.authority.port + }; return { type: 'ok', value: { - authority: remoteAuthority, - host: result.host, - port: result.port, + authority, + options: result.options } }; } catch (err) { diff --git a/src/vs/workbench/services/extensions/common/extensionHostProcessManager.ts b/src/vs/workbench/services/extensions/common/extensionHostProcessManager.ts index c3f651cd23f..21cddb13749 100644 --- a/src/vs/workbench/services/extensions/common/extensionHostProcessManager.ts +++ b/src/vs/workbench/services/extensions/common/extensionHostProcessManager.ts @@ -14,7 +14,7 @@ import { ExtHostCustomersRegistry } from 'vs/workbench/api/common/extHostCustome import { ExtHostContext, ExtHostExtensionServiceShape, IExtHostContext, MainContext } from 'vs/workbench/api/common/extHost.protocol'; import { ProxyIdentifier } from 'vs/workbench/services/extensions/common/proxyIdentifier'; import { IRPCProtocolLogger, RPCProtocol, RequestInitiator, ResponsiveState } from 'vs/workbench/services/extensions/common/rpcProtocol'; -import { ResolvedAuthority, RemoteAuthorityResolverError } from 'vs/platform/remote/common/remoteAuthorityResolver'; +import { RemoteAuthorityResolverError, ResolverResult } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import * as nls from 'vs/nls'; import { Action } from 'vs/base/common/actions'; @@ -247,15 +247,17 @@ export class ExtensionHostProcessManager extends Disposable { return this._extensionHostProcessWorker && Boolean(this._extensionHostProcessWorker.getInspectPort()); } - public async resolveAuthority(remoteAuthority: string): Promise { + public async resolveAuthority(remoteAuthority: string): Promise { const authorityPlusIndex = remoteAuthority.indexOf('+'); if (authorityPlusIndex === -1) { // This authority does not need to be resolved, simply parse the port number const pieces = remoteAuthority.split(':'); return Promise.resolve({ - authority: remoteAuthority, - host: pieces[0], - port: parseInt(pieces[1], 10) + authority: { + authority: remoteAuthority, + host: pieces[0], + port: parseInt(pieces[1], 10) + } }); } const proxy = await this._getExtensionHostProcessProxy(); diff --git a/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts b/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts index c9b9ef57c67..376e0951184 100644 --- a/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts +++ b/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts @@ -76,19 +76,20 @@ export class RemoteExtensionHostClient extends Disposable implements IExtensionH webSocketFactory: this._webSocketFactory, addressProvider: { getAddress: async () => { - const { host, port } = await this.remoteAuthorityResolverService.resolveAuthority(this._initDataProvider.remoteAuthority); - return { host, port }; + const { authority } = await this.remoteAuthorityResolverService.resolveAuthority(this._initDataProvider.remoteAuthority); + return { host: authority.host, port: authority.port }; } }, signService: this._signService }; - return this.remoteAuthorityResolverService.resolveAuthority(this._initDataProvider.remoteAuthority).then((resolvedAuthority) => { + return this.remoteAuthorityResolverService.resolveAuthority(this._initDataProvider.remoteAuthority).then((resolverResult) => { const startParams: IRemoteExtensionHostStartParams = { language: platform.language, debugId: this._environmentService.debugExtensionHost.debugId, break: this._environmentService.debugExtensionHost.break, port: this._environmentService.debugExtensionHost.port, + env: resolverResult.options && resolverResult.options.remoteEnv }; const extDevLocs = this._environmentService.extensionDevelopmentLocationURI; diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index 4c580ce9e6d..53d85cbeaa8 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -19,7 +19,7 @@ import { IExtensionEnablementService } from 'vs/workbench/services/extensionMana import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IInitDataProvider, RemoteExtensionHostClient } from 'vs/workbench/services/extensions/common/remoteExtensionHostClient'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; -import { IRemoteAuthorityResolverService, ResolvedAuthority, RemoteAuthorityResolverError } from 'vs/platform/remote/common/remoteAuthorityResolver'; +import { IRemoteAuthorityResolverService, RemoteAuthorityResolverError, ResolverResult } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { isUIExtension } from 'vs/workbench/services/extensions/common/extensionsUtil'; import { IRemoteAgentEnvironment } from 'vs/platform/remote/common/remoteAgentEnvironment'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -419,8 +419,8 @@ export class ExtensionService extends AbstractExtensionService implements IExten const extensionHost = this._extensionHostProcessManagers[0]; this._remoteAuthorityResolverService.clearResolvedAuthority(remoteAuthority); try { - const resolvedAuthority = await extensionHost.resolveAuthority(remoteAuthority); - this._remoteAuthorityResolverService.setResolvedAuthority(resolvedAuthority); + const result = await extensionHost.resolveAuthority(remoteAuthority); + this._remoteAuthorityResolverService.setResolvedAuthority(result.authority, result.options); } catch (err) { this._remoteAuthorityResolverService.setResolvedAuthorityError(remoteAuthority, err); } @@ -441,7 +441,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten localExtensions = localExtensions.filter(extension => this._isEnabled(extension)); if (remoteAuthority) { - let resolvedAuthority: ResolvedAuthority; + let resolvedAuthority: ResolverResult; try { resolvedAuthority = await extensionHost.resolveAuthority(remoteAuthority); @@ -463,7 +463,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten } // set the resolved authority - this._remoteAuthorityResolverService.setResolvedAuthority(resolvedAuthority); + this._remoteAuthorityResolverService.setResolvedAuthority(resolvedAuthority.authority, resolvedAuthority.options); // monitor for breakage const connection = this._remoteAgentService.getConnection(); diff --git a/src/vs/workbench/services/remote/common/abstractRemoteAgentService.ts b/src/vs/workbench/services/remote/common/abstractRemoteAgentService.ts index c5ece27cfb2..00114a437a5 100644 --- a/src/vs/workbench/services/remote/common/abstractRemoteAgentService.ts +++ b/src/vs/workbench/services/remote/common/abstractRemoteAgentService.ts @@ -121,8 +121,8 @@ export class RemoteAgentConnection extends Disposable implements IRemoteAgentCon } else { this._onReconnecting.fire(undefined); } - const { host, port } = await this._remoteAuthorityResolverService.resolveAuthority(this.remoteAuthority); - return { host, port }; + const { authority } = await this._remoteAuthorityResolverService.resolveAuthority(this.remoteAuthority); + return { host: authority.host, port: authority.port }; } }, signService: this._signService diff --git a/src/vs/workbench/services/remote/node/tunnelService.ts b/src/vs/workbench/services/remote/node/tunnelService.ts index b8e30ea867b..f34e983c0b5 100644 --- a/src/vs/workbench/services/remote/node/tunnelService.ts +++ b/src/vs/workbench/services/remote/node/tunnelService.ts @@ -105,8 +105,8 @@ export class TunnelService implements ITunnelService { webSocketFactory: nodeWebSocketFactory, addressProvider: { getAddress: async () => { - const { host, port } = await this.remoteAuthorityResolverService.resolveAuthority(remoteAuthority); - return { host, port }; + const { authority } = await this.remoteAuthorityResolverService.resolveAuthority(remoteAuthority); + return { host: authority.host, port: authority.port }; } }, signService: this.signService From 04c4de6a380e3e37fb976b53753f58e68fcd986c Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 19 Jul 2019 14:47:55 -0700 Subject: [PATCH 404/710] Change remoteEnv extension API to be backwards compatible --- .../remote/common/remoteAuthorityResolver.ts | 2 +- src/vs/vscode.proposed.d.ts | 7 ++---- .../api/node/extHostExtensionService.ts | 25 +++++++++---------- .../common/remoteExtensionHostClient.ts | 2 +- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/vs/platform/remote/common/remoteAuthorityResolver.ts b/src/vs/platform/remote/common/remoteAuthorityResolver.ts index 898b8d8aba9..e9ba56563b3 100644 --- a/src/vs/platform/remote/common/remoteAuthorityResolver.ts +++ b/src/vs/platform/remote/common/remoteAuthorityResolver.ts @@ -14,7 +14,7 @@ export interface ResolvedAuthority { } export interface ResolvedOptions { - readonly remoteEnv?: { [key: string]: string | null }; + readonly extensionHostEnv?: { [key: string]: string | null }; } export interface ResolverResult { diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 86733058b0e..5bca4d0d507 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -95,13 +95,10 @@ declare module 'vscode' { } export interface ResolvedOptions { - remoteEnv?: { [key: string]: string | null }; + extensionHostEnv?: { [key: string]: string | null }; } - export interface ResolverResult { - authority: ResolvedAuthority; - options?: ResolvedOptions; - } + export type ResolverResult = ResolvedAuthority & ResolvedOptions; export class RemoteAuthorityResolverError extends Error { static NotAvailable(message?: string, handled?: boolean): RemoteAuthorityResolverError; diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 868b40e6867..781cb8998ab 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -33,6 +33,7 @@ import { ExtensionMemento } from 'vs/workbench/api/common/extHostMemento'; import { ExtensionStoragePaths } from 'vs/workbench/api/node/extHostStoragePaths'; import { RemoteAuthorityResolverError, ExtensionExecutionContext } from 'vs/workbench/api/common/extHostTypes'; import { IURITransformer } from 'vs/base/common/uriIpc'; +import { ResolvedAuthority, ResolvedOptions } from 'vs/platform/remote/common/remoteAuthorityResolver'; interface ITestRunner { /** Old test runner API, as exported from `vscode/lib/testrunner` */ @@ -663,23 +664,21 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { try { const result = await resolver.resolve(remoteAuthority, { resolveAttempt }); - // Support the old resolver interface, TODO remove after awhile - const authority = typeof (result).host === 'string' ? - { - authority: remoteAuthority, - host: (result).host, - port: (result).port - } : - { - authority: remoteAuthority, - host: result.authority.host, - port: result.authority.port - }; + // Split merged API result into separate authority/options + const authority: ResolvedAuthority = { + authority: remoteAuthority, + host: result.host, + port: result.port + }; + const options: ResolvedOptions = { + extensionHostEnv: result.extensionHostEnv + }; + return { type: 'ok', value: { authority, - options: result.options + options } }; } catch (err) { diff --git a/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts b/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts index 376e0951184..0860739eb21 100644 --- a/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts +++ b/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts @@ -89,7 +89,7 @@ export class RemoteExtensionHostClient extends Disposable implements IExtensionH debugId: this._environmentService.debugExtensionHost.debugId, break: this._environmentService.debugExtensionHost.break, port: this._environmentService.debugExtensionHost.port, - env: resolverResult.options && resolverResult.options.remoteEnv + env: resolverResult.options && resolverResult.options.extensionHostEnv }; const extDevLocs = this._environmentService.extensionDevelopmentLocationURI; From 5bb6e68fab152737ffe8ad9fd136c2d4b1aa9b90 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Fri, 19 Jul 2019 15:41:34 -0700 Subject: [PATCH 405/710] Move WorkspaceStats.TAGS to a service, fixes #76002 --- .../electron-browser/experimentService.ts | 13 +- .../stats/electron-browser/workspaceStats.ts | 454 +---------------- .../electron-browser/workspaceStatsService.ts | 477 ++++++++++++++++++ src/vs/workbench/workbench.main.ts | 2 + 4 files changed, 499 insertions(+), 447 deletions(-) create mode 100644 src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts diff --git a/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts b/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts index 643b404f191..235f92672bc 100644 --- a/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts +++ b/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts @@ -15,12 +15,12 @@ import { match } from 'vs/base/common/glob'; import { IRequestService, asJson } from 'vs/platform/request/common/request'; import { Emitter, Event } from 'vs/base/common/event'; import { ITextFileService, StateChange } from 'vs/workbench/services/textfile/common/textfiles'; -import { WorkspaceStats } from 'vs/workbench/contrib/stats/electron-browser/workspaceStats'; import { CancellationToken } from 'vs/base/common/cancellation'; import { distinct } from 'vs/base/common/arrays'; import { ExtensionType } from 'vs/platform/extensions/common/extensions'; import { ExperimentState, IExperimentAction, IExperimentService, IExperiment, ExperimentActionType, IExperimentActionPromptProperties } from 'vs/workbench/contrib/experiments/common/experimentService'; import { IProductService } from 'vs/platform/product/common/product'; +import { IWorkspaceStatsService } from 'vs/workbench/contrib/stats/electron-browser/workspaceStatsService'; interface IExperimentStorageState { enabled: boolean; @@ -74,7 +74,8 @@ export class ExperimentService extends Disposable implements IExperimentService @ILifecycleService private readonly lifecycleService: ILifecycleService, @IRequestService private readonly requestService: IRequestService, @IConfigurationService private readonly configurationService: IConfigurationService, - @IProductService private readonly productService: IProductService + @IProductService private readonly productService: IProductService, + @IWorkspaceStatsService private readonly workspaceStatsService: IWorkspaceStatsService ) { super(); @@ -355,7 +356,7 @@ export class ExperimentService extends Disposable implements IExperimentService onSaveHandler.dispose(); return; } - e.forEach(event => { + e.forEach(async event => { if (event.kind !== StateChange.SAVED || latestExperimentState.state !== ExperimentState.Evaluating || date === latestExperimentState.lastEditedDate @@ -370,10 +371,12 @@ export class ExperimentService extends Disposable implements IExperimentService filePathCheck = match(fileEdits.filePathPattern, event.resource.fsPath); } if (Array.isArray(fileEdits.workspaceIncludes) && fileEdits.workspaceIncludes.length) { - workspaceCheck = !!WorkspaceStats.TAGS && fileEdits.workspaceIncludes.some(x => !!WorkspaceStats.TAGS[x]); + const tags = await this.workspaceStatsService.getTags(); + workspaceCheck = !!tags && fileEdits.workspaceIncludes.some(x => !!tags[x]); } if (workspaceCheck && Array.isArray(fileEdits.workspaceExcludes) && fileEdits.workspaceExcludes.length) { - workspaceCheck = !!WorkspaceStats.TAGS && !fileEdits.workspaceExcludes.some(x => !!WorkspaceStats.TAGS[x]); + const tags = await this.workspaceStatsService.getTags(); + workspaceCheck = !!tags && !fileEdits.workspaceExcludes.some(x => !!tags[x]); } if (filePathCheck && workspaceCheck) { latestExperimentState.editCount = (latestExperimentState.editCount || 0) + 1; diff --git a/src/vs/workbench/contrib/stats/electron-browser/workspaceStats.ts b/src/vs/workbench/contrib/stats/electron-browser/workspaceStats.ts index 8504522b3ef..f26596780b9 100644 --- a/src/vs/workbench/contrib/stats/electron-browser/workspaceStats.ts +++ b/src/vs/workbench/contrib/stats/electron-browser/workspaceStats.ts @@ -3,25 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { localize } from 'vs/nls'; import * as crypto from 'crypto'; import { onUnexpectedError } from 'vs/base/common/errors'; import { URI } from 'vs/base/common/uri'; -import { IFileService, IFileStat, IResolveFileResult } from 'vs/platform/files/common/files'; +import { IFileService, IFileStat } from 'vs/platform/files/common/files'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; -import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; -import { IWindowConfiguration, IWindowService } from 'vs/platform/windows/common/windows'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWindowService } from 'vs/platform/windows/common/windows'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { endsWith } from 'vs/base/common/strings'; -import { Schemas } from 'vs/base/common/network'; -import { INotificationService, Severity, IPromptChoice } from 'vs/platform/notification/common/notification'; -import { hasWorkspaceFileExtension } from 'vs/platform/workspaces/common/workspaces'; -import { IQuickInputService, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput'; -import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { joinPath } from 'vs/base/common/resources'; -import { ITextFileService, ITextFileContent } from 'vs/workbench/services/textfile/common/textfiles'; +import { ITextFileService, } from 'vs/workbench/services/textfile/common/textfiles'; import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService'; +import { IWorkspaceStatsService, Tags } from 'vs/workbench/contrib/stats/electron-browser/workspaceStatsService'; const SshProtocolMatcher = /^([^@:]+@)?([^:]+):/; const SshUrlMatcher = /^([^@:]+@)?([^:]+):(.+)$/; @@ -43,60 +36,6 @@ const SecondLevelDomainWhitelist = [ 'rhcloud.com', 'google.com' ]; -const ModulesToLookFor = [ - // Packages that suggest a node server - 'express', - 'sails', - 'koa', - 'hapi', - 'socket.io', - 'restify', - // JS frameworks - 'react', - 'react-native', - 'rnpm-plugin-windows', - '@angular/core', - '@ionic', - 'vue', - 'tns-core-modules', - // Other interesting packages - 'aws-sdk', - 'aws-amplify', - 'azure', - 'azure-storage', - 'firebase', - '@google-cloud/common', - 'heroku-cli' -]; -const PyModulesToLookFor = [ - 'azure', - 'azure-storage-common', - 'azure-storage-blob', - 'azure-storage-file', - 'azure-storage-queue', - 'azure-shell', - 'azure-cosmos', - 'azure-devtools', - 'azure-elasticluster', - 'azure-eventgrid', - 'azure-functions', - 'azure-graphrbac', - 'azure-keyvault', - 'azure-loganalytics', - 'azure-monitor', - 'azure-servicebus', - 'azure-servicefabric', - 'azure-storage', - 'azure-translator', - 'azure-iothub-device-client', - 'adal', - 'pydocumentdb', - 'botbuilder-core', - 'botbuilder-schema', - 'botframework-connector' -]; - -type Tags = { [index: string]: boolean | number | string | undefined }; function stripLowLevelDomains(domain: string): string | null { const match = domain.match(SecondLevelDomainMatcher); @@ -212,21 +151,14 @@ export function getHashedRemotesFromUri(workspaceUri: URI, fileService: IFileSer export class WorkspaceStats implements IWorkbenchContribution { - static TAGS: Tags; - - private static DISABLE_WORKSPACE_PROMPT_KEY = 'workspaces.dontPromptToOpen'; - constructor( @IFileService private readonly fileService: IFileService, @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, @ITelemetryService private readonly telemetryService: ITelemetryService, - @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, @IWindowService private readonly windowService: IWindowService, - @INotificationService private readonly notificationService: INotificationService, - @IQuickInputService private readonly quickInputService: IQuickInputService, - @IStorageService private readonly storageService: IStorageService, @ITextFileService private readonly textFileService: ITextFileService, - @ISharedProcessService private readonly sharedProcessService: ISharedProcessService + @ISharedProcessService private readonly sharedProcessService: ISharedProcessService, + @IWorkspaceStatsService private readonly workspaceStatsService: IWorkspaceStatsService ) { this.report(); } @@ -234,7 +166,7 @@ export class WorkspaceStats implements IWorkbenchContribution { private report(): void { // Workspace Stats - this.resolveWorkspaceTags(this.environmentService.configuration, rootFiles => this.handleWorkspaceFiles(rootFiles)) + this.workspaceStatsService.getTags() .then(tags => this.reportWorkspaceTags(tags), error => onUnexpectedError(error)); // Cloud Stats @@ -246,372 +178,7 @@ export class WorkspaceStats implements IWorkbenchContribution { diagnosticsChannel.call('reportWorkspaceStats', this.contextService.getWorkspace()); } - private static searchArray(arr: string[], regEx: RegExp): boolean | undefined { - return arr.some(v => v.search(regEx) > -1) || undefined; - } - /* __GDPR__FRAGMENT__ - "WorkspaceTags" : { - "workbench.filesToOpenOrCreate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workbench.filesToDiff" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "workspace.roots" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.empty" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.grunt" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.gulp" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.jake" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.tsconfig" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.jsconfig" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.config.xml" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.vsc.extension" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.asp" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.sln" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.unity" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.express" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.sails" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.koa" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.hapi" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.socket.io" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.restify" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.rnpm-plugin-windows" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.react" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.@angular/core" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.vue" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.aws-sdk" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.aws-amplify-sdk" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.azure" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.azure-storage" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.@google-cloud/common" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.firebase" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.npm.heroku-cli" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.bower" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.yeoman.code.ext" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.cordova.high" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.cordova.low" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.xamarin.android" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.xamarin.ios" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.android.cpp" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.reactNative" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.ionic" : { "classification" : "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": "true" }, - "workspace.nativeScript" : { "classification" : "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": "true" }, - "workspace.java.pom" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.requirements" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.requirements.star" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.Pipfile" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.conda" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.any-azure" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-storage-common" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-storage-blob" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-storage-file" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-storage-queue" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-mgmt" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-shell" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.pulumi-azure" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-cosmos" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-devtools" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-elasticluster" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-eventgrid" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-functions" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-graphrbac" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-keyvault" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-loganalytics" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-monitor" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-servicebus" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-servicefabric" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-storage" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-translator" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-iothub-device-client" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-ml" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.azure-cognitiveservices" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.adal" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.pydocumentdb" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.botbuilder-core" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.botbuilder-schema" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.botframework-connector" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - - } - */ - private resolveWorkspaceTags(configuration: IWindowConfiguration, participant?: (rootFiles: string[]) => void): Promise { - const tags: Tags = Object.create(null); - - const state = this.contextService.getWorkbenchState(); - const workspace = this.contextService.getWorkspace(); - - function createHash(uri: URI): string { - return crypto.createHash('sha1').update(uri.scheme === Schemas.file ? uri.fsPath : uri.toString()).digest('hex'); - } - - let workspaceId: string | undefined; - switch (state) { - case WorkbenchState.EMPTY: - workspaceId = undefined; - break; - case WorkbenchState.FOLDER: - workspaceId = createHash(workspace.folders[0].uri); - break; - case WorkbenchState.WORKSPACE: - if (workspace.configuration) { - workspaceId = createHash(workspace.configuration); - } - } - - tags['workspace.id'] = workspaceId; - - const { filesToOpenOrCreate, filesToDiff } = configuration; - tags['workbench.filesToOpenOrCreate'] = filesToOpenOrCreate && filesToOpenOrCreate.length || 0; - tags['workbench.filesToDiff'] = filesToDiff && filesToDiff.length || 0; - - const isEmpty = state === WorkbenchState.EMPTY; - tags['workspace.roots'] = isEmpty ? 0 : workspace.folders.length; - tags['workspace.empty'] = isEmpty; - - const folders = !isEmpty ? workspace.folders.map(folder => folder.uri) : this.environmentService.appQuality !== 'stable' && this.findFolders(configuration); - if (!folders || !folders.length || !this.fileService) { - return Promise.resolve(tags); - } - - return this.fileService.resolveAll(folders.map(resource => ({ resource }))).then((files: IResolveFileResult[]) => { - const names = ([]).concat(...files.map(result => result.success ? (result.stat!.children || []) : [])).map(c => c.name); - const nameSet = names.reduce((s, n) => s.add(n.toLowerCase()), new Set()); - - if (participant) { - participant(names); - } - - tags['workspace.grunt'] = nameSet.has('gruntfile.js'); - tags['workspace.gulp'] = nameSet.has('gulpfile.js'); - tags['workspace.jake'] = nameSet.has('jakefile.js'); - - tags['workspace.tsconfig'] = nameSet.has('tsconfig.json'); - tags['workspace.jsconfig'] = nameSet.has('jsconfig.json'); - tags['workspace.config.xml'] = nameSet.has('config.xml'); - tags['workspace.vsc.extension'] = nameSet.has('vsc-extension-quickstart.md'); - - tags['workspace.ASP5'] = nameSet.has('project.json') && WorkspaceStats.searchArray(names, /^.+\.cs$/i); - tags['workspace.sln'] = WorkspaceStats.searchArray(names, /^.+\.sln$|^.+\.csproj$/i); - tags['workspace.unity'] = nameSet.has('assets') && nameSet.has('library') && nameSet.has('projectsettings'); - tags['workspace.npm'] = nameSet.has('package.json') || nameSet.has('node_modules'); - tags['workspace.bower'] = nameSet.has('bower.json') || nameSet.has('bower_components'); - - tags['workspace.java.pom'] = nameSet.has('pom.xml'); - - tags['workspace.yeoman.code.ext'] = nameSet.has('vsc-extension-quickstart.md'); - - tags['workspace.py.requirements'] = nameSet.has('requirements.txt'); - tags['workspace.py.requirements.star'] = WorkspaceStats.searchArray(names, /^(.*)requirements(.*)\.txt$/i); - tags['workspace.py.Pipfile'] = nameSet.has('pipfile'); - tags['workspace.py.conda'] = WorkspaceStats.searchArray(names, /^environment(\.yml$|\.yaml$)/i); - - const mainActivity = nameSet.has('mainactivity.cs') || nameSet.has('mainactivity.fs'); - const appDelegate = nameSet.has('appdelegate.cs') || nameSet.has('appdelegate.fs'); - const androidManifest = nameSet.has('androidmanifest.xml'); - - const platforms = nameSet.has('platforms'); - const plugins = nameSet.has('plugins'); - const www = nameSet.has('www'); - const properties = nameSet.has('properties'); - const resources = nameSet.has('resources'); - const jni = nameSet.has('jni'); - - if (tags['workspace.config.xml'] && - !tags['workspace.language.cs'] && !tags['workspace.language.vb'] && !tags['workspace.language.aspx']) { - if (platforms && plugins && www) { - tags['workspace.cordova.high'] = true; - } else { - tags['workspace.cordova.low'] = true; - } - } - - if (tags['workspace.config.xml'] && - !tags['workspace.language.cs'] && !tags['workspace.language.vb'] && !tags['workspace.language.aspx']) { - - if (nameSet.has('ionic.config.json')) { - tags['workspace.ionic'] = true; - } - } - - if (mainActivity && properties && resources) { - tags['workspace.xamarin.android'] = true; - } - - if (appDelegate && resources) { - tags['workspace.xamarin.ios'] = true; - } - - if (androidManifest && jni) { - tags['workspace.android.cpp'] = true; - } - - function getFilePromises(filename: string, fileService: IFileService, textFileService: ITextFileService, contentHandler: (content: ITextFileContent) => void): Promise[] { - return !nameSet.has(filename) ? [] : (folders as URI[]).map(workspaceUri => { - const uri = workspaceUri.with({ path: `${workspaceUri.path !== '/' ? workspaceUri.path : ''}/${filename}` }); - return fileService.exists(uri).then(exists => { - if (!exists) { - return undefined; - } - - return textFileService.read(uri, { acceptTextOnly: true }).then(contentHandler); - }, err => { - // Ignore missing file - }); - }); - } - - function addPythonTags(packageName: string): void { - if (PyModulesToLookFor.indexOf(packageName) > -1) { - tags['workspace.py.' + packageName] = true; - } - // cognitive services has a lot of tiny packages. e.g. 'azure-cognitiveservices-search-autosuggest' - if (packageName.indexOf('azure-cognitiveservices') > -1) { - tags['workspace.py.azure-cognitiveservices'] = true; - } - if (packageName.indexOf('azure-mgmt') > -1) { - tags['workspace.py.azure-mgmt'] = true; - } - if (packageName.indexOf('azure-ml') > -1) { - tags['workspace.py.azure-ml'] = true; - } - if (!tags['workspace.py.any-azure']) { - tags['workspace.py.any-azure'] = /azure/i.test(packageName); - } - } - - const requirementsTxtPromises = getFilePromises('requirements.txt', this.fileService, this.textFileService, content => { - const dependencies: string[] = content.value.split(/\r\n|\r|\n/); - for (let dependency of dependencies) { - // Dependencies in requirements.txt can have 3 formats: `foo==3.1, foo>=3.1, foo` - const format1 = dependency.split('=='); - const format2 = dependency.split('>='); - const packageName = (format1.length === 2 ? format1[0] : format2[0]).trim(); - addPythonTags(packageName); - } - }); - - const pipfilePromises = getFilePromises('pipfile', this.fileService, this.textFileService, content => { - let dependencies: string[] = content.value.split(/\r\n|\r|\n/); - - // We're only interested in the '[packages]' section of the Pipfile - dependencies = dependencies.slice(dependencies.indexOf('[packages]') + 1); - - for (let dependency of dependencies) { - if (dependency.trim().indexOf('[') > -1) { - break; - } - // All dependencies in Pipfiles follow the format: ` = ` - if (dependency.indexOf('=') === -1) { - continue; - } - const packageName = dependency.split('=')[0].trim(); - addPythonTags(packageName); - } - - }); - - const packageJsonPromises = getFilePromises('package.json', this.fileService, this.textFileService, content => { - try { - const packageJsonContents = JSON.parse(content.value); - let dependencies = packageJsonContents['dependencies']; - let devDependencies = packageJsonContents['devDependencies']; - for (let module of ModulesToLookFor) { - if ('react-native' === module) { - if ((dependencies && dependencies[module]) || (devDependencies && devDependencies[module])) { - tags['workspace.reactNative'] = true; - } - } else if ('tns-core-modules' === module) { - if ((dependencies && dependencies[module]) || (devDependencies && devDependencies[module])) { - tags['workspace.nativescript'] = true; - } - } else { - if ((dependencies && dependencies[module]) || (devDependencies && devDependencies[module])) { - tags['workspace.npm.' + module] = true; - } - } - } - - } - catch (e) { - // Ignore errors when resolving file or parsing file contents - } - }); - return Promise.all([...packageJsonPromises, ...requirementsTxtPromises, ...pipfilePromises]).then(() => tags); - }); - } - - private handleWorkspaceFiles(rootFiles: string[]): void { - const state = this.contextService.getWorkbenchState(); - const workspace = this.contextService.getWorkspace(); - - // Handle top-level workspace files for local single folder workspace - if (state === WorkbenchState.FOLDER) { - const workspaceFiles = rootFiles.filter(hasWorkspaceFileExtension); - if (workspaceFiles.length > 0) { - this.doHandleWorkspaceFiles(workspace.folders[0].uri, workspaceFiles); - } - } - } - - private doHandleWorkspaceFiles(folder: URI, workspaces: string[]): void { - if (this.storageService.getBoolean(WorkspaceStats.DISABLE_WORKSPACE_PROMPT_KEY, StorageScope.WORKSPACE)) { - return; // prompt disabled by user - } - - const doNotShowAgain: IPromptChoice = { - label: localize('never again', "Don't Show Again"), - isSecondary: true, - run: () => this.storageService.store(WorkspaceStats.DISABLE_WORKSPACE_PROMPT_KEY, true, StorageScope.WORKSPACE) - }; - - // Prompt to open one workspace - if (workspaces.length === 1) { - const workspaceFile = workspaces[0]; - - this.notificationService.prompt(Severity.Info, localize('workspaceFound', "This folder contains a workspace file '{0}'. Do you want to open it? [Learn more]({1}) about workspace files.", workspaceFile, 'https://go.microsoft.com/fwlink/?linkid=2025315'), [{ - label: localize('openWorkspace', "Open Workspace"), - run: () => this.windowService.openWindow([{ workspaceUri: joinPath(folder, workspaceFile) }]) - }, doNotShowAgain]); - } - - // Prompt to select a workspace from many - else if (workspaces.length > 1) { - this.notificationService.prompt(Severity.Info, localize('workspacesFound', "This folder contains multiple workspace files. Do you want to open one? [Learn more]({0}) about workspace files.", 'https://go.microsoft.com/fwlink/?linkid=2025315'), [{ - label: localize('selectWorkspace', "Select Workspace"), - run: () => { - this.quickInputService.pick( - workspaces.map(workspace => ({ label: workspace } as IQuickPickItem)), - { placeHolder: localize('selectToOpen', "Select a workspace to open") }).then(pick => { - if (pick) { - this.windowService.openWindow([{ workspaceUri: joinPath(folder, pick.label) }]); - } - }); - } - }, doNotShowAgain]); - } - } - - private findFolders(configuration: IWindowConfiguration): URI[] | undefined { - const folder = this.findFolder(configuration); - return folder && [folder]; - } - - private findFolder({ filesToOpenOrCreate, filesToDiff }: IWindowConfiguration): URI | undefined { - if (filesToOpenOrCreate && filesToOpenOrCreate.length) { - return this.parentURI(filesToOpenOrCreate[0].fileUri); - } else if (filesToDiff && filesToDiff.length) { - return this.parentURI(filesToDiff[0].fileUri); - } - return undefined; - } - - private parentURI(uri: URI | undefined): URI | undefined { - if (!uri) { - return undefined; - } - const path = uri.path; - const i = path.lastIndexOf('/'); - return i !== -1 ? uri.with({ path: path.substr(0, i) }) : undefined; - } private reportWorkspaceTags(tags: Tags): void { /* __GDPR__ @@ -622,7 +189,6 @@ export class WorkspaceStats implements IWorkbenchContribution { } */ this.telemetryService.publicLog('workspce.tags', tags); - WorkspaceStats.TAGS = tags; } private reportRemoteDomains(workspaceUris: URI[]): void { @@ -689,6 +255,10 @@ export class WorkspaceStats implements IWorkbenchContribution { }); } + private static searchArray(arr: string[], regEx: RegExp): boolean | undefined { + return arr.some(v => v.search(regEx) > -1) || undefined; + } + /* __GDPR__FRAGMENT__ "AzureTags" : { "java" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } diff --git a/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts b/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts new file mode 100644 index 00000000000..5041cb4be1e --- /dev/null +++ b/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts @@ -0,0 +1,477 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as crypto from 'crypto'; +import { IFileService, IResolveFileResult, IFileStat } from 'vs/platform/files/common/files'; +import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; +import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; +import { IWindowService, IWindowConfiguration } from 'vs/platform/windows/common/windows'; +import { INotificationService, IPromptChoice } from 'vs/platform/notification/common/notification'; +import { IQuickInputService, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { ITextFileService, ITextFileContent } from 'vs/workbench/services/textfile/common/textfiles'; +import { URI } from 'vs/base/common/uri'; +import { Schemas } from 'vs/base/common/network'; +import { hasWorkspaceFileExtension } from 'vs/platform/workspaces/common/workspaces'; +import { localize } from 'vs/nls'; +import Severity from 'vs/base/common/severity'; +import { joinPath } from 'vs/base/common/resources'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; + +export type Tags = { [index: string]: boolean | number | string | undefined }; + +const DISABLE_WORKSPACE_PROMPT_KEY = 'workspaces.dontPromptToOpen'; + +const ModulesToLookFor = [ + // Packages that suggest a node server + 'express', + 'sails', + 'koa', + 'hapi', + 'socket.io', + 'restify', + // JS frameworks + 'react', + 'react-native', + 'rnpm-plugin-windows', + '@angular/core', + '@ionic', + 'vue', + 'tns-core-modules', + // Other interesting packages + 'aws-sdk', + 'aws-amplify', + 'azure', + 'azure-storage', + 'firebase', + '@google-cloud/common', + 'heroku-cli' +]; +const PyModulesToLookFor = [ + 'azure', + 'azure-storage-common', + 'azure-storage-blob', + 'azure-storage-file', + 'azure-storage-queue', + 'azure-shell', + 'azure-cosmos', + 'azure-devtools', + 'azure-elasticluster', + 'azure-eventgrid', + 'azure-functions', + 'azure-graphrbac', + 'azure-keyvault', + 'azure-loganalytics', + 'azure-monitor', + 'azure-servicebus', + 'azure-servicefabric', + 'azure-storage', + 'azure-translator', + 'azure-iothub-device-client', + 'adal', + 'pydocumentdb', + 'botbuilder-core', + 'botbuilder-schema', + 'botframework-connector' +]; + +export const IWorkspaceStatsService = createDecorator('workspaceStatsService'); + +export interface IWorkspaceStatsService { + _serviceBrand: any; + getTags(): Promise; +} + + +export class WorkspaceStatsService implements IWorkspaceStatsService { + _serviceBrand: any; + private _tags: Tags; + + constructor( + @IFileService private readonly fileService: IFileService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, + @IWindowService private readonly windowService: IWindowService, + @INotificationService private readonly notificationService: INotificationService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IStorageService private readonly storageService: IStorageService, + @ITextFileService private readonly textFileService: ITextFileService + ) { } + + public async getTags(): Promise { + if (!this._tags) { + this._tags = await this.resolveWorkspaceTags(this.environmentService.configuration, rootFiles => this.handleWorkspaceFiles(rootFiles)); + } + + return this._tags; + } + + /* __GDPR__FRAGMENT__ + "WorkspaceTags" : { + "workbench.filesToOpenOrCreate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workbench.filesToDiff" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "workspace.roots" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.empty" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.grunt" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.gulp" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.jake" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.tsconfig" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.jsconfig" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.config.xml" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.vsc.extension" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.asp" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.sln" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.unity" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.express" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.sails" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.koa" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.hapi" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.socket.io" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.restify" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.rnpm-plugin-windows" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.react" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@angular/core" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.vue" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.aws-sdk" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.aws-amplify-sdk" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.azure" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.azure-storage" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@google-cloud/common" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.firebase" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.heroku-cli" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.bower" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.yeoman.code.ext" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.cordova.high" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.cordova.low" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.xamarin.android" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.xamarin.ios" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.android.cpp" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.reactNative" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.ionic" : { "classification" : "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": "true" }, + "workspace.nativeScript" : { "classification" : "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": "true" }, + "workspace.java.pom" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.requirements" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.requirements.star" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.Pipfile" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.conda" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.any-azure" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-storage-common" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-storage-blob" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-storage-file" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-storage-queue" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-mgmt" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-shell" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.pulumi-azure" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-cosmos" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-devtools" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-elasticluster" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-eventgrid" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-functions" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-graphrbac" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-keyvault" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-loganalytics" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-monitor" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-servicebus" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-servicefabric" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-storage" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-translator" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-iothub-device-client" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-ml" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.azure-cognitiveservices" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.adal" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.pydocumentdb" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.botbuilder-core" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.botbuilder-schema" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.py.botframework-connector" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } + + } + */ + private resolveWorkspaceTags(configuration: IWindowConfiguration, participant?: (rootFiles: string[]) => void): Promise { + const tags: Tags = Object.create(null); + + const state = this.contextService.getWorkbenchState(); + const workspace = this.contextService.getWorkspace(); + + function createHash(uri: URI): string { + return crypto.createHash('sha1').update(uri.scheme === Schemas.file ? uri.fsPath : uri.toString()).digest('hex'); + } + + let workspaceId: string | undefined; + switch (state) { + case WorkbenchState.EMPTY: + workspaceId = undefined; + break; + case WorkbenchState.FOLDER: + workspaceId = createHash(workspace.folders[0].uri); + break; + case WorkbenchState.WORKSPACE: + if (workspace.configuration) { + workspaceId = createHash(workspace.configuration); + } + } + + tags['workspace.id'] = workspaceId; + + const { filesToOpenOrCreate, filesToDiff } = configuration; + tags['workbench.filesToOpenOrCreate'] = filesToOpenOrCreate && filesToOpenOrCreate.length || 0; + tags['workbench.filesToDiff'] = filesToDiff && filesToDiff.length || 0; + + const isEmpty = state === WorkbenchState.EMPTY; + tags['workspace.roots'] = isEmpty ? 0 : workspace.folders.length; + tags['workspace.empty'] = isEmpty; + + const folders = !isEmpty ? workspace.folders.map(folder => folder.uri) : this.environmentService.appQuality !== 'stable' && this.findFolders(configuration); + if (!folders || !folders.length || !this.fileService) { + return Promise.resolve(tags); + } + + return this.fileService.resolveAll(folders.map(resource => ({ resource }))).then((files: IResolveFileResult[]) => { + const names = ([]).concat(...files.map(result => result.success ? (result.stat!.children || []) : [])).map(c => c.name); + const nameSet = names.reduce((s, n) => s.add(n.toLowerCase()), new Set()); + + if (participant) { + participant(names); + } + + tags['workspace.grunt'] = nameSet.has('gruntfile.js'); + tags['workspace.gulp'] = nameSet.has('gulpfile.js'); + tags['workspace.jake'] = nameSet.has('jakefile.js'); + + tags['workspace.tsconfig'] = nameSet.has('tsconfig.json'); + tags['workspace.jsconfig'] = nameSet.has('jsconfig.json'); + tags['workspace.config.xml'] = nameSet.has('config.xml'); + tags['workspace.vsc.extension'] = nameSet.has('vsc-extension-quickstart.md'); + + tags['workspace.ASP5'] = nameSet.has('project.json') && this.searchArray(names, /^.+\.cs$/i); + tags['workspace.sln'] = this.searchArray(names, /^.+\.sln$|^.+\.csproj$/i); + tags['workspace.unity'] = nameSet.has('assets') && nameSet.has('library') && nameSet.has('projectsettings'); + tags['workspace.npm'] = nameSet.has('package.json') || nameSet.has('node_modules'); + tags['workspace.bower'] = nameSet.has('bower.json') || nameSet.has('bower_components'); + + tags['workspace.java.pom'] = nameSet.has('pom.xml'); + + tags['workspace.yeoman.code.ext'] = nameSet.has('vsc-extension-quickstart.md'); + + tags['workspace.py.requirements'] = nameSet.has('requirements.txt'); + tags['workspace.py.requirements.star'] = this.searchArray(names, /^(.*)requirements(.*)\.txt$/i); + tags['workspace.py.Pipfile'] = nameSet.has('pipfile'); + tags['workspace.py.conda'] = this.searchArray(names, /^environment(\.yml$|\.yaml$)/i); + + const mainActivity = nameSet.has('mainactivity.cs') || nameSet.has('mainactivity.fs'); + const appDelegate = nameSet.has('appdelegate.cs') || nameSet.has('appdelegate.fs'); + const androidManifest = nameSet.has('androidmanifest.xml'); + + const platforms = nameSet.has('platforms'); + const plugins = nameSet.has('plugins'); + const www = nameSet.has('www'); + const properties = nameSet.has('properties'); + const resources = nameSet.has('resources'); + const jni = nameSet.has('jni'); + + if (tags['workspace.config.xml'] && + !tags['workspace.language.cs'] && !tags['workspace.language.vb'] && !tags['workspace.language.aspx']) { + if (platforms && plugins && www) { + tags['workspace.cordova.high'] = true; + } else { + tags['workspace.cordova.low'] = true; + } + } + + if (tags['workspace.config.xml'] && + !tags['workspace.language.cs'] && !tags['workspace.language.vb'] && !tags['workspace.language.aspx']) { + + if (nameSet.has('ionic.config.json')) { + tags['workspace.ionic'] = true; + } + } + + if (mainActivity && properties && resources) { + tags['workspace.xamarin.android'] = true; + } + + if (appDelegate && resources) { + tags['workspace.xamarin.ios'] = true; + } + + if (androidManifest && jni) { + tags['workspace.android.cpp'] = true; + } + + function getFilePromises(filename: string, fileService: IFileService, textFileService: ITextFileService, contentHandler: (content: ITextFileContent) => void): Promise[] { + return !nameSet.has(filename) ? [] : (folders as URI[]).map(workspaceUri => { + const uri = workspaceUri.with({ path: `${workspaceUri.path !== '/' ? workspaceUri.path : ''}/${filename}` }); + return fileService.exists(uri).then(exists => { + if (!exists) { + return undefined; + } + + return textFileService.read(uri, { acceptTextOnly: true }).then(contentHandler); + }, err => { + // Ignore missing file + }); + }); + } + + function addPythonTags(packageName: string): void { + if (PyModulesToLookFor.indexOf(packageName) > -1) { + tags['workspace.py.' + packageName] = true; + } + // cognitive services has a lot of tiny packages. e.g. 'azure-cognitiveservices-search-autosuggest' + if (packageName.indexOf('azure-cognitiveservices') > -1) { + tags['workspace.py.azure-cognitiveservices'] = true; + } + if (packageName.indexOf('azure-mgmt') > -1) { + tags['workspace.py.azure-mgmt'] = true; + } + if (packageName.indexOf('azure-ml') > -1) { + tags['workspace.py.azure-ml'] = true; + } + if (!tags['workspace.py.any-azure']) { + tags['workspace.py.any-azure'] = /azure/i.test(packageName); + } + } + + const requirementsTxtPromises = getFilePromises('requirements.txt', this.fileService, this.textFileService, content => { + const dependencies: string[] = content.value.split(/\r\n|\r|\n/); + for (let dependency of dependencies) { + // Dependencies in requirements.txt can have 3 formats: `foo==3.1, foo>=3.1, foo` + const format1 = dependency.split('=='); + const format2 = dependency.split('>='); + const packageName = (format1.length === 2 ? format1[0] : format2[0]).trim(); + addPythonTags(packageName); + } + }); + + const pipfilePromises = getFilePromises('pipfile', this.fileService, this.textFileService, content => { + let dependencies: string[] = content.value.split(/\r\n|\r|\n/); + + // We're only interested in the '[packages]' section of the Pipfile + dependencies = dependencies.slice(dependencies.indexOf('[packages]') + 1); + + for (let dependency of dependencies) { + if (dependency.trim().indexOf('[') > -1) { + break; + } + // All dependencies in Pipfiles follow the format: ` = ` + if (dependency.indexOf('=') === -1) { + continue; + } + const packageName = dependency.split('=')[0].trim(); + addPythonTags(packageName); + } + + }); + + const packageJsonPromises = getFilePromises('package.json', this.fileService, this.textFileService, content => { + try { + const packageJsonContents = JSON.parse(content.value); + let dependencies = packageJsonContents['dependencies']; + let devDependencies = packageJsonContents['devDependencies']; + for (let module of ModulesToLookFor) { + if ('react-native' === module) { + if ((dependencies && dependencies[module]) || (devDependencies && devDependencies[module])) { + tags['workspace.reactNative'] = true; + } + } else if ('tns-core-modules' === module) { + if ((dependencies && dependencies[module]) || (devDependencies && devDependencies[module])) { + tags['workspace.nativescript'] = true; + } + } else { + if ((dependencies && dependencies[module]) || (devDependencies && devDependencies[module])) { + tags['workspace.npm.' + module] = true; + } + } + } + + } + catch (e) { + // Ignore errors when resolving file or parsing file contents + } + }); + return Promise.all([...packageJsonPromises, ...requirementsTxtPromises, ...pipfilePromises]).then(() => tags); + }); + } + + private handleWorkspaceFiles(rootFiles: string[]): void { + const state = this.contextService.getWorkbenchState(); + const workspace = this.contextService.getWorkspace(); + + // Handle top-level workspace files for local single folder workspace + if (state === WorkbenchState.FOLDER) { + const workspaceFiles = rootFiles.filter(hasWorkspaceFileExtension); + if (workspaceFiles.length > 0) { + this.doHandleWorkspaceFiles(workspace.folders[0].uri, workspaceFiles); + } + } + } + + private doHandleWorkspaceFiles(folder: URI, workspaces: string[]): void { + if (this.storageService.getBoolean(DISABLE_WORKSPACE_PROMPT_KEY, StorageScope.WORKSPACE)) { + return; // prompt disabled by user + } + + const doNotShowAgain: IPromptChoice = { + label: localize('never again', "Don't Show Again"), + isSecondary: true, + run: () => this.storageService.store(DISABLE_WORKSPACE_PROMPT_KEY, true, StorageScope.WORKSPACE) + }; + + // Prompt to open one workspace + if (workspaces.length === 1) { + const workspaceFile = workspaces[0]; + + this.notificationService.prompt(Severity.Info, localize('workspaceFound', "This folder contains a workspace file '{0}'. Do you want to open it? [Learn more]({1}) about workspace files.", workspaceFile, 'https://go.microsoft.com/fwlink/?linkid=2025315'), [{ + label: localize('openWorkspace', "Open Workspace"), + run: () => this.windowService.openWindow([{ workspaceUri: joinPath(folder, workspaceFile) }]) + }, doNotShowAgain]); + } + + // Prompt to select a workspace from many + else if (workspaces.length > 1) { + this.notificationService.prompt(Severity.Info, localize('workspacesFound', "This folder contains multiple workspace files. Do you want to open one? [Learn more]({0}) about workspace files.", 'https://go.microsoft.com/fwlink/?linkid=2025315'), [{ + label: localize('selectWorkspace', "Select Workspace"), + run: () => { + this.quickInputService.pick( + workspaces.map(workspace => ({ label: workspace } as IQuickPickItem)), + { placeHolder: localize('selectToOpen', "Select a workspace to open") }).then(pick => { + if (pick) { + this.windowService.openWindow([{ workspaceUri: joinPath(folder, pick.label) }]); + } + }); + } + }, doNotShowAgain]); + } + } + + private findFolders(configuration: IWindowConfiguration): URI[] | undefined { + const folder = this.findFolder(configuration); + return folder && [folder]; + } + + private findFolder({ filesToOpenOrCreate, filesToDiff }: IWindowConfiguration): URI | undefined { + if (filesToOpenOrCreate && filesToOpenOrCreate.length) { + return this.parentURI(filesToOpenOrCreate[0].fileUri); + } else if (filesToDiff && filesToDiff.length) { + return this.parentURI(filesToDiff[0].fileUri); + } + return undefined; + } + + private parentURI(uri: URI | undefined): URI | undefined { + if (!uri) { + return undefined; + } + const path = uri.path; + const i = path.lastIndexOf('/'); + return i !== -1 ? uri.with({ path: path.substr(0, i) }) : undefined; + } + + private searchArray(arr: string[], regEx: RegExp): boolean | undefined { + return arr.some(v => v.search(regEx) > -1) || undefined; + } +} \ No newline at end of file diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index 633fac6915a..b263f5cf2fb 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -167,6 +167,7 @@ registerSingleton(IMenubarService, MenubarService); registerSingleton(IURLService, RelayURLService); registerSingleton(ITunnelService, TunnelService, true); registerSingleton(ICredentialsService, KeytarCredentialsService, true); +registerSingleton(IWorkspaceStatsService, WorkspaceStatsService, true); //#endregion @@ -344,5 +345,6 @@ import 'vs/workbench/contrib/experiments/electron-browser/experiments.contributi // Issues import 'vs/workbench/contrib/issue/electron-browser/issue.contribution'; +import { IWorkspaceStatsService, WorkspaceStatsService } from 'vs/workbench/contrib/stats/electron-browser/workspaceStatsService'; //#endregion From b893fd1e26eb1a565ef7a04f06a57491fb9f7746 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 Jul 2019 16:21:18 -0700 Subject: [PATCH 406/710] Add UnownedDisposable to make it clearer that webviewEditorInput takes ownership of the webview passed to it --- src/vs/base/common/lifecycle.ts | 37 +++++++++++++++++++ .../webview/browser/webviewEditorInput.ts | 12 ++++-- .../webview/browser/webviewEditorService.ts | 6 +-- 3 files changed, 49 insertions(+), 6 deletions(-) diff --git a/src/vs/base/common/lifecycle.ts b/src/vs/base/common/lifecycle.ts index 79f206f23be..6be438cee41 100644 --- a/src/vs/base/common/lifecycle.ts +++ b/src/vs/base/common/lifecycle.ts @@ -207,6 +207,43 @@ export class MutableDisposable implements IDisposable { } } +/** + * Wrapper class that stores a disposable that is not currently "owned" by anyone. + * + * Example use cases: + * + * - Express that a function/method will take ownership of a disposable parameter. + * - Express that a function returns a disposable that the caller must explicitly take ownership of. + */ +export class UnownedDisposable extends Disposable { + private _hasBeenAcquired = false; + private _value?: T; + + public constructor(value: T) { + super(); + this._value = value; + } + + public acquire(): T { + if (this._hasBeenAcquired) { + throw new Error('This disposable has already been acquired'); + } + this._hasBeenAcquired = true; + const value = this._value!; + this._value = undefined; + return value; + } + + public dispose() { + super.dispose(); + if (!this._hasBeenAcquired) { + this._hasBeenAcquired = true; + this._value!.dispose(); + this._value = undefined; + } + } +} + export interface IReference extends IDisposable { readonly object: T; } diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts index 591784f328b..c91e93d915f 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts @@ -9,6 +9,7 @@ import { IEditorModel } from 'vs/platform/editor/common/editor'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { EditorInput, EditorModel, GroupIdentifier, IEditorInput } from 'vs/workbench/common/editor'; import { WebviewEditorOverlay } from 'vs/workbench/contrib/webview/common/webview'; +import { UnownedDisposable as Unowned } from 'vs/base/common/lifecycle'; class WebviewIconsManager { private readonly _icons = new Map(); @@ -58,6 +59,7 @@ export class WebviewEditorInput extends EditorInput { private _name: string; private _iconPath?: { light: URI, dark: URI }; private _group?: GroupIdentifier; + private readonly _webview: WebviewEditorOverlay; constructor( public readonly id: string, @@ -67,14 +69,14 @@ export class WebviewEditorInput extends EditorInput { readonly location: URI; readonly id: ExtensionIdentifier; }, - public readonly webview: WebviewEditorOverlay, + webview: Unowned, ) { super(); this._name = name; this.extension = extension; - this._register(webview); // The input owns this webview + this._webview = this._register(webview.acquire()); // The input owns this webview } public getTypeId(): string { @@ -105,6 +107,10 @@ export class WebviewEditorInput extends EditorInput { this._onDidChangeLabel.fire(); } + public get webview() { + return this._webview; + } + public get iconPath() { return this._iconPath; } @@ -147,7 +153,7 @@ export class RevivedWebviewEditorInput extends WebviewEditorInput { readonly id: ExtensionIdentifier }, private readonly reviver: (input: WebviewEditorInput) => Promise, - webview: WebviewEditorOverlay, + webview: Unowned, ) { super(id, viewType, name, extension, webview); } diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts index 3173d0afc4a..49d8bcc11cd 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { equals } from 'vs/base/common/arrays'; -import { IDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { IDisposable, toDisposable, UnownedDisposable } from 'vs/base/common/lifecycle'; import { values } from 'vs/base/common/map'; import { URI } from 'vs/base/common/uri'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; @@ -144,7 +144,7 @@ export class WebviewEditorService implements IWebviewEditorService { ): WebviewEditorInput { const webview = this.createWebiew(id, extension, options); - const webviewInput = this._instantiationService.createInstance(WebviewEditorInput, id, viewType, title, extension, webview); + const webviewInput = this._instantiationService.createInstance(WebviewEditorInput, id, viewType, title, extension, new UnownedDisposable(webview)); this._editorService.openEditor(webviewInput, { pinned: true, preserveFocus: showOptions.preserveFocus }, showOptions.group); return webviewInput; } @@ -191,7 +191,7 @@ export class WebviewEditorService implements IWebviewEditorService { const promise = new Promise(r => { resolve = r; }); this._revivalPool.add(webview, resolve!); return promise; - }, webview); + }, new UnownedDisposable(webview)); webviewInput.iconPath = iconPath; From b61980c3dffba8e23e47046166e889d8e1e69a55 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 Jul 2019 16:24:05 -0700 Subject: [PATCH 407/710] Use base class's existing _register method --- .../electron-browser/experimentService.ts | 9 ++------- .../contrib/output/browser/outputActions.ts | 14 ++------------ 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts b/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts index 235f92672bc..79dd609cb60 100644 --- a/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts +++ b/src/vs/workbench/contrib/experiments/electron-browser/experimentService.ts @@ -10,7 +10,7 @@ import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/ import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { language } from 'vs/base/common/platform'; -import { Disposable, IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { Disposable } from 'vs/base/common/lifecycle'; import { match } from 'vs/base/common/glob'; import { IRequestService, asJson } from 'vs/platform/request/common/request'; import { Emitter, Event } from 'vs/base/common/event'; @@ -60,7 +60,6 @@ export class ExperimentService extends Disposable implements IExperimentService private _experiments: IExperiment[] = []; private _loadExperimentsPromise: Promise; private _curatedMapping = Object.create(null); - private _disposables: IDisposable[] = []; private readonly _onExperimentEnabled = this._register(new Emitter()); onExperimentEnabled: Event = this._onExperimentEnabled.event; @@ -392,14 +391,10 @@ export class ExperimentService extends Disposable implements IExperimentService } } }); - this._disposables.push(onSaveHandler); + this._register(onSaveHandler); return ExperimentState.Evaluating; }); } - - dispose() { - this._disposables = dispose(this._disposables); - } } diff --git a/src/vs/workbench/contrib/output/browser/outputActions.ts b/src/vs/workbench/contrib/output/browser/outputActions.ts index 5d296f8a59a..e99147c8079 100644 --- a/src/vs/workbench/contrib/output/browser/outputActions.ts +++ b/src/vs/workbench/contrib/output/browser/outputActions.ts @@ -11,7 +11,6 @@ import { SelectActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { TogglePanelAction } from 'vs/workbench/browser/panel'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; @@ -67,11 +66,9 @@ export class ToggleOrSetOutputScrollLockAction extends Action { public static readonly ID = 'workbench.output.action.toggleOutputScrollLock'; public static readonly LABEL = nls.localize({ key: 'toggleOutputScrollLock', comment: ['Turn on / off automatic output scrolling'] }, "Toggle Output Scroll Lock"); - private toDispose: IDisposable[] = []; - constructor(id: string, label: string, @IOutputService private readonly outputService: IOutputService) { super(id, label, 'output-action output-scroll-unlock'); - this.toDispose.push(this.outputService.onActiveOutputChannel(channel => { + this._register(this.outputService.onActiveOutputChannel(channel => { const activeChannel = this.outputService.getActiveChannel(); if (activeChannel) { this.setClassAndLabel(activeChannel.scrollLock); @@ -104,11 +101,6 @@ export class ToggleOrSetOutputScrollLockAction extends Action { this.label = nls.localize('outputScrollOff', "Turn Auto Scrolling Off"); } } - - public dispose() { - super.dispose(); - this.toDispose = dispose(this.toDispose); - } } export class SwitchOutputAction extends Action { @@ -188,15 +180,13 @@ export class OpenLogOutputFile extends Action { public static readonly ID = 'workbench.output.action.openLogOutputFile'; public static readonly LABEL = nls.localize('openInLogViewer', "Open Log File"); - private disposables: IDisposable[] = []; - constructor( @IOutputService private readonly outputService: IOutputService, @IEditorService private readonly editorService: IEditorService, @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(OpenLogOutputFile.ID, OpenLogOutputFile.LABEL, 'output-action open-log-file'); - this.outputService.onActiveOutputChannel(this.update, this, this.disposables); + this._register(this.outputService.onActiveOutputChannel(this.update, this)); this.update(); } From 1ef4a75ff92082277ff409005cd10838982bbb9a Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 Jul 2019 17:00:18 -0700 Subject: [PATCH 408/710] Replace IDisposable with DisposableStore in a few more simple cases --- src/vs/editor/contrib/find/findModel.ts | 17 ++++++++-------- src/vs/editor/contrib/gotoError/gotoError.ts | 11 +++++----- .../telemetry/common/telemetryService.ts | 6 +++--- src/vs/workbench/api/common/extHostSCM.ts | 4 +--- .../contrib/files/common/explorerService.ts | 20 +++++++++---------- 5 files changed, 27 insertions(+), 31 deletions(-) diff --git a/src/vs/editor/contrib/find/findModel.ts b/src/vs/editor/contrib/find/findModel.ts index 9264aa9b734..31a0d470be3 100644 --- a/src/vs/editor/contrib/find/findModel.ts +++ b/src/vs/editor/contrib/find/findModel.ts @@ -5,7 +5,7 @@ import { RunOnceScheduler, TimeoutTimer } from 'vs/base/common/async'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { dispose, DisposableStore } from 'vs/base/common/lifecycle'; import { IActiveCodeEditor } from 'vs/editor/browser/editorBrowser'; import { ReplaceCommand, ReplaceCommandThatPreservesSelection } from 'vs/editor/common/commands/replaceCommand'; import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; @@ -71,7 +71,7 @@ export class FindModelBoundToEditorModel { private readonly _editor: IActiveCodeEditor; private readonly _state: FindReplaceState; - private _toDispose: IDisposable[]; + private readonly _toDispose = new DisposableStore(); private readonly _decorations: FindDecorations; private _ignoreModelContentChanged: boolean; private readonly _startSearchingTimer: TimeoutTimer; @@ -82,17 +82,16 @@ export class FindModelBoundToEditorModel { constructor(editor: IActiveCodeEditor, state: FindReplaceState) { this._editor = editor; this._state = state; - this._toDispose = []; this._isDisposed = false; this._startSearchingTimer = new TimeoutTimer(); this._decorations = new FindDecorations(editor); - this._toDispose.push(this._decorations); + this._toDispose.add(this._decorations); this._updateDecorationsScheduler = new RunOnceScheduler(() => this.research(false), 100); - this._toDispose.push(this._updateDecorationsScheduler); + this._toDispose.add(this._updateDecorationsScheduler); - this._toDispose.push(this._editor.onDidChangeCursorPosition((e: ICursorPositionChangedEvent) => { + this._toDispose.add(this._editor.onDidChangeCursorPosition((e: ICursorPositionChangedEvent) => { if ( e.reason === CursorChangeReason.Explicit || e.reason === CursorChangeReason.Undo @@ -103,7 +102,7 @@ export class FindModelBoundToEditorModel { })); this._ignoreModelContentChanged = false; - this._toDispose.push(this._editor.onDidChangeModelContent((e) => { + this._toDispose.add(this._editor.onDidChangeModelContent((e) => { if (this._ignoreModelContentChanged) { return; } @@ -115,7 +114,7 @@ export class FindModelBoundToEditorModel { this._updateDecorationsScheduler.schedule(); })); - this._toDispose.push(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))); + this._toDispose.add(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))); this.research(false, this._state.searchScope); } @@ -123,7 +122,7 @@ export class FindModelBoundToEditorModel { public dispose(): void { this._isDisposed = true; dispose(this._startSearchingTimer); - this._toDispose = dispose(this._toDispose); + this._toDispose.dispose(); } private _onStateChanged(e: FindReplaceStateChangedEvent): void { diff --git a/src/vs/editor/contrib/gotoError/gotoError.ts b/src/vs/editor/contrib/gotoError/gotoError.ts index 8f1231cbfb8..c16b9be9a6e 100644 --- a/src/vs/editor/contrib/gotoError/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/gotoError.ts @@ -6,7 +6,7 @@ import * as nls from 'vs/nls'; import { Emitter } from 'vs/base/common/event'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; -import { IDisposable, dispose, DisposableStore } from 'vs/base/common/lifecycle'; +import { DisposableStore } from 'vs/base/common/lifecycle'; import { URI } from 'vs/base/common/uri'; import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IMarker, IMarkerService, MarkerSeverity } from 'vs/platform/markers/common/markers'; @@ -32,7 +32,7 @@ class MarkerModel { private readonly _editor: ICodeEditor; private _markers: IMarker[]; private _nextIdx: number; - private _toUnbind: IDisposable[]; + private readonly _toUnbind = new DisposableStore(); private _ignoreSelectionChange: boolean; private readonly _onCurrentMarkerChanged: Emitter; private readonly _onMarkerSetChanged: Emitter; @@ -41,15 +41,14 @@ class MarkerModel { this._editor = editor; this._markers = []; this._nextIdx = -1; - this._toUnbind = []; this._ignoreSelectionChange = false; this._onCurrentMarkerChanged = new Emitter(); this._onMarkerSetChanged = new Emitter(); this.setMarkers(markers); // listen on editor - this._toUnbind.push(this._editor.onDidDispose(() => this.dispose())); - this._toUnbind.push(this._editor.onDidChangeCursorPosition(() => { + this._toUnbind.add(this._editor.onDidDispose(() => this.dispose())); + this._toUnbind.add(this._editor.onDidChangeCursorPosition(() => { if (this._ignoreSelectionChange) { return; } @@ -190,7 +189,7 @@ class MarkerModel { } public dispose(): void { - this._toUnbind = dispose(this._toUnbind); + this._toUnbind.dispose(); } } diff --git a/src/vs/platform/telemetry/common/telemetryService.ts b/src/vs/platform/telemetry/common/telemetryService.ts index 2e7a4bb00d1..4604c0e189c 100644 --- a/src/vs/platform/telemetry/common/telemetryService.ts +++ b/src/vs/platform/telemetry/common/telemetryService.ts @@ -10,7 +10,7 @@ import { ITelemetryAppender } from 'vs/platform/telemetry/common/telemetryUtils' import { optional } from 'vs/platform/instantiation/common/instantiation'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { DisposableStore } from 'vs/base/common/lifecycle'; import { cloneAndChange, mixin } from 'vs/base/common/objects'; import { Registry } from 'vs/platform/registry/common/platform'; import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings'; @@ -35,7 +35,7 @@ export class TelemetryService implements ITelemetryService { private _userOptIn: boolean; private _enabled: boolean; - private _disposables: IDisposable[] = []; + private readonly _disposables = new DisposableStore(); private _cleanupPatterns: RegExp[] = []; constructor( @@ -113,7 +113,7 @@ export class TelemetryService implements ITelemetryService { } dispose(): void { - this._disposables = dispose(this._disposables); + this._disposables.dispose(); } publicLog(eventName: string, data?: ITelemetryData, anonymizeFilePaths?: boolean): Promise { diff --git a/src/vs/workbench/api/common/extHostSCM.ts b/src/vs/workbench/api/common/extHostSCM.ts index 675201e622f..311981d6f4d 100644 --- a/src/vs/workbench/api/common/extHostSCM.ts +++ b/src/vs/workbench/api/common/extHostSCM.ts @@ -6,7 +6,7 @@ import { URI, UriComponents } from 'vs/base/common/uri'; import { Event, Emitter } from 'vs/base/common/event'; import { debounce } from 'vs/base/common/decorators'; -import { dispose, IDisposable, DisposableStore, MutableDisposable } from 'vs/base/common/lifecycle'; +import { DisposableStore, MutableDisposable } from 'vs/base/common/lifecycle'; import { asPromise } from 'vs/base/common/async'; import { ExtHostCommands } from 'vs/workbench/api/common/extHostCommands'; import { MainContext, MainThreadSCMShape, SCMRawResource, SCMRawResourceSplice, SCMRawResourceSplices, IMainContext, ExtHostSCMShape, CommandDto } from './extHost.protocol'; @@ -263,7 +263,6 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG } readonly handle = ExtHostSourceControlResourceGroup._handlePool++; - private _disposables: IDisposable[] = []; constructor( private _proxy: MainThreadSCMShape, @@ -353,7 +352,6 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG dispose(): void { this._proxy.$unregisterGroup(this._sourceControlHandle, this.handle); - this._disposables = dispose(this._disposables); this._onDidDispose.fire(); } } diff --git a/src/vs/workbench/contrib/files/common/explorerService.ts b/src/vs/workbench/contrib/files/common/explorerService.ts index cb6d96bd1ff..9d0f177a77a 100644 --- a/src/vs/workbench/contrib/files/common/explorerService.ts +++ b/src/vs/workbench/contrib/files/common/explorerService.ts @@ -5,7 +5,7 @@ import { Event, Emitter } from 'vs/base/common/event'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { DisposableStore } from 'vs/base/common/lifecycle'; import { IExplorerService, IEditableData, IFilesConfiguration, SortOrder, SortOrderConfiguration } from 'vs/workbench/contrib/files/common/files'; import { ExplorerItem, ExplorerModel } from 'vs/workbench/contrib/files/common/explorerModel'; import { URI } from 'vs/base/common/uri'; @@ -36,7 +36,7 @@ export class ExplorerService implements IExplorerService { private _onDidChangeEditable = new Emitter(); private _onDidSelectResource = new Emitter<{ resource?: URI, reveal?: boolean }>(); private _onDidCopyItems = new Emitter<{ items: ExplorerItem[], cut: boolean, previouslyCutItems: ExplorerItem[] | undefined }>(); - private disposables: IDisposable[] = []; + private readonly disposables = new DisposableStore(); private editable: { stat: ExplorerItem, data: IEditableData } | undefined; private _sortOrder: SortOrder; private cutItems: ExplorerItem[] | undefined; @@ -88,18 +88,18 @@ export class ExplorerService implements IExplorerService { (root?: URI) => getFileEventsExcludes(this.configurationService, root), (event: IConfigurationChangeEvent) => event.affectsConfiguration(FILES_EXCLUDE_CONFIG) ); - this.disposables.push(fileEventsFilter); + this.disposables.add(fileEventsFilter); return fileEventsFilter; } @memoize get model(): ExplorerModel { const model = new ExplorerModel(this.contextService); - this.disposables.push(model); - this.disposables.push(this.fileService.onAfterOperation(e => this.onFileOperation(e))); - this.disposables.push(this.fileService.onFileChanges(e => this.onFileChanges(e))); - this.disposables.push(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(this.configurationService.getValue()))); - this.disposables.push(this.fileService.onDidChangeFileSystemProviderRegistrations(e => { + this.disposables.add(model); + this.disposables.add(this.fileService.onAfterOperation(e => this.onFileOperation(e))); + this.disposables.add(this.fileService.onFileChanges(e => this.onFileChanges(e))); + this.disposables.add(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(this.configurationService.getValue()))); + this.disposables.add(this.fileService.onDidChangeFileSystemProviderRegistrations(e => { if (e.added && this.fileSystemProviderSchemes.has(e.scheme)) { // A file system provider got re-registered, we should update all file stats since they might change (got read-only) this.model.roots.forEach(r => r.forgetChildren()); @@ -108,7 +108,7 @@ export class ExplorerService implements IExplorerService { this.fileSystemProviderSchemes.add(e.scheme); } })); - this.disposables.push(model.onDidChangeRoots(() => this._onDidChangeRoots.fire())); + this.disposables.add(model.onDidChangeRoots(() => this._onDidChangeRoots.fire())); return model; } @@ -380,6 +380,6 @@ export class ExplorerService implements IExplorerService { } dispose(): void { - dispose(this.disposables); + this.disposables.dispose(); } } From 2b36a5edaf13f513e1694e7b37c70ddfac240b98 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Fri, 19 Jul 2019 18:01:50 -0700 Subject: [PATCH 409/710] Use TestStorageService and NofitifcationService in test. --- .../services/keybinding/test/browserKeyboardMapper.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts index 8765bff54c7..70c6b1dd926 100644 --- a/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/browserKeyboardMapper.test.ts @@ -12,6 +12,8 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/ import { INotificationService } from 'vs/platform/notification/common/notification'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IStorageService } from 'vs/platform/storage/common/storage'; +import { TestStorageService } from 'vs/workbench/test/workbenchTestServices'; +import { TestNotificationService } from 'vs/platform/notification/test/common/testNotificationService'; class TestKeyboardMapperFactory extends BrowserKeyboardMapperFactoryBase { constructor(notificationService: INotificationService, storageService: IStorageService, commandService: ICommandService) { @@ -31,8 +33,9 @@ class TestKeyboardMapperFactory extends BrowserKeyboardMapperFactoryBase { suite('keyboard layout loader', () => { let instantiationService: TestInstantiationService = new TestInstantiationService(); - let notitifcationService = instantiationService.stub(INotificationService, {}); - let storageService = instantiationService.stub(IStorageService, {}); + let notitifcationService = instantiationService.stub(INotificationService, new TestNotificationService()); + let storageService = instantiationService.stub(IStorageService, new TestStorageService()); + let commandService = instantiationService.stub(ICommandService, {}); let instance = new TestKeyboardMapperFactory(notitifcationService, storageService, commandService); From 40c6246335a42c4a55802e479f716b2ae010c957 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 19 Jul 2019 17:39:51 -0700 Subject: [PATCH 410/710] Update js/ts grammar --- .../syntaxes/JavaScript.tmLanguage.json | 41 +++++++++++++------ .../syntaxes/JavaScriptReact.tmLanguage.json | 41 +++++++++++++------ extensions/typescript-basics/cgmanifest.json | 2 +- .../syntaxes/TypeScript.tmLanguage.json | 37 ++++++++++++----- .../syntaxes/TypeScriptReact.tmLanguage.json | 41 +++++++++++++------ 5 files changed, 115 insertions(+), 47 deletions(-) diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index 71cf0a91c20..a90d452bddf 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/f698a9826cad8235e92b7c298a5f8c9c298d8ada", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/cf7b1ec2c20b5fe28695249596128ff514e1a659", "name": "JavaScript (with React support)", "scopeName": "source.js", "patterns": [ @@ -426,7 +426,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.js", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js entity.name.function.js" @@ -484,7 +484,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.js", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js variable.other.constant.js entity.name.function.js" @@ -868,7 +868,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js" @@ -1108,7 +1108,7 @@ "include": "#comment" }, { - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "meta.definition.property.js entity.name.function.js" @@ -1431,7 +1431,7 @@ }, { "name": "meta.arrow.js", - "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -2604,7 +2604,7 @@ }, { "name": "meta.object.member.js", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.js" @@ -2749,6 +2749,9 @@ } ] }, + { + "include": "#possibly-arrow-return-type" + }, { "include": "#expression" } @@ -2953,7 +2956,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js" @@ -3172,6 +3175,20 @@ "name": "keyword.operator.arithmetic.js", "match": "%|\\*|/|-|\\+" }, + { + "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(/)(?![/*]))", + "end": "(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)", + "endCaptures": { + "1": { + "name": "keyword.operator.arithmetic.js" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, { "match": "(?<=[_$[:alnum:])\\]])\\s*(/)(?![/*])", "captures": { @@ -3541,7 +3558,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.js" @@ -3753,7 +3770,7 @@ ] }, "possibly-arrow-return-type": { - "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", + "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", "beginCaptures": { "1": { "name": "meta.arrow.js meta.return.type.arrow.js keyword.operator.type.annotation.js" @@ -5297,7 +5314,7 @@ ] }, "jsx-tag-without-attributes-in-expression": { - "begin": "(?:*]|&&|\\|\\||\\?|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "begin": "(?:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "patterns": [ { @@ -5357,7 +5374,7 @@ ] }, "jsx-tag-in-expression": { - "begin": "(?x)\n (?:*]|&&|\\|\\||\\?|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "begin": "(?x)\n (?:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "patterns": [ { diff --git a/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json b/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json index 2f830d70beb..067eda2d5e6 100644 --- a/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/f698a9826cad8235e92b7c298a5f8c9c298d8ada", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/cf7b1ec2c20b5fe28695249596128ff514e1a659", "name": "JavaScript (with React support)", "scopeName": "source.js.jsx", "patterns": [ @@ -426,7 +426,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.js.jsx", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js.jsx entity.name.function.js.jsx" @@ -484,7 +484,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.js.jsx", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js.jsx variable.other.constant.js.jsx entity.name.function.js.jsx" @@ -868,7 +868,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js.jsx" @@ -1108,7 +1108,7 @@ "include": "#comment" }, { - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "meta.definition.property.js.jsx entity.name.function.js.jsx" @@ -1431,7 +1431,7 @@ }, { "name": "meta.arrow.js.jsx", - "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.js.jsx" @@ -2604,7 +2604,7 @@ }, { "name": "meta.object.member.js.jsx", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.js.jsx" @@ -2749,6 +2749,9 @@ } ] }, + { + "include": "#possibly-arrow-return-type" + }, { "include": "#expression" } @@ -2953,7 +2956,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js.jsx" @@ -3172,6 +3175,20 @@ "name": "keyword.operator.arithmetic.js.jsx", "match": "%|\\*|/|-|\\+" }, + { + "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(/)(?![/*]))", + "end": "(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)", + "endCaptures": { + "1": { + "name": "keyword.operator.arithmetic.js.jsx" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, { "match": "(?<=[_$[:alnum:])\\]])\\s*(/)(?![/*])", "captures": { @@ -3541,7 +3558,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.js.jsx" @@ -3753,7 +3770,7 @@ ] }, "possibly-arrow-return-type": { - "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", + "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", "beginCaptures": { "1": { "name": "meta.arrow.js.jsx meta.return.type.arrow.js.jsx keyword.operator.type.annotation.js.jsx" @@ -5297,7 +5314,7 @@ ] }, "jsx-tag-without-attributes-in-expression": { - "begin": "(?:*]|&&|\\|\\||\\?|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "begin": "(?:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "patterns": [ { @@ -5357,7 +5374,7 @@ ] }, "jsx-tag-in-expression": { - "begin": "(?x)\n (?:*]|&&|\\|\\||\\?|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "begin": "(?x)\n (?:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "patterns": [ { diff --git a/extensions/typescript-basics/cgmanifest.json b/extensions/typescript-basics/cgmanifest.json index 0f20c256fda..cd8c1071a82 100644 --- a/extensions/typescript-basics/cgmanifest.json +++ b/extensions/typescript-basics/cgmanifest.json @@ -6,7 +6,7 @@ "git": { "name": "TypeScript-TmLanguage", "repositoryUrl": "https://github.com/Microsoft/TypeScript-TmLanguage", - "commitHash": "f698a9826cad8235e92b7c298a5f8c9c298d8ada" + "commitHash": "cf7b1ec2c20b5fe28695249596128ff514e1a659" } }, "license": "MIT", diff --git a/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json b/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json index 0f5c3ba241e..ce5a34d5f9a 100644 --- a/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json +++ b/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/f698a9826cad8235e92b7c298a5f8c9c298d8ada", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/11b1a4f8dc3a3eaa4df71e8cc1ad6f01a688961d", "name": "TypeScript", "scopeName": "source.ts", "patterns": [ @@ -423,7 +423,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.ts", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.ts entity.name.function.ts" @@ -481,7 +481,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.ts", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts" @@ -865,7 +865,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.ts" @@ -1105,7 +1105,7 @@ "include": "#comment" }, { - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "meta.definition.property.ts entity.name.function.ts" @@ -1428,7 +1428,7 @@ }, { "name": "meta.arrow.ts", - "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -2601,7 +2601,7 @@ }, { "name": "meta.object.member.ts", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.ts" @@ -2746,6 +2746,9 @@ } ] }, + { + "include": "#possibly-arrow-return-type" + }, { "include": "#expression" } @@ -2950,7 +2953,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.ts" @@ -3221,6 +3224,20 @@ "name": "keyword.operator.arithmetic.ts", "match": "%|\\*|/|-|\\+" }, + { + "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(/)(?![/*]))", + "end": "(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)", + "endCaptures": { + "1": { + "name": "keyword.operator.arithmetic.ts" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, { "match": "(?<=[_$[:alnum:])\\]])\\s*(/)(?![/*])", "captures": { @@ -3590,7 +3607,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.ts" @@ -3802,7 +3819,7 @@ ] }, "possibly-arrow-return-type": { - "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", + "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", "beginCaptures": { "1": { "name": "meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts" diff --git a/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json b/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json index 59f4e80a93c..68776811480 100644 --- a/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json +++ b/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/f698a9826cad8235e92b7c298a5f8c9c298d8ada", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/cf7b1ec2c20b5fe28695249596128ff514e1a659", "name": "TypeScriptReact", "scopeName": "source.tsx", "patterns": [ @@ -426,7 +426,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.tsx", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.tsx entity.name.function.tsx" @@ -484,7 +484,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.tsx", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx" @@ -868,7 +868,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.tsx" @@ -1108,7 +1108,7 @@ "include": "#comment" }, { - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "meta.definition.property.tsx entity.name.function.tsx" @@ -1431,7 +1431,7 @@ }, { "name": "meta.arrow.tsx", - "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -2604,7 +2604,7 @@ }, { "name": "meta.object.member.tsx", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.tsx" @@ -2749,6 +2749,9 @@ } ] }, + { + "include": "#possibly-arrow-return-type" + }, { "include": "#expression" } @@ -2953,7 +2956,7 @@ } }, { - "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.tsx" @@ -3172,6 +3175,20 @@ "name": "keyword.operator.arithmetic.tsx", "match": "%|\\*|/|-|\\+" }, + { + "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(/)(?![/*]))", + "end": "(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)", + "endCaptures": { + "1": { + "name": "keyword.operator.arithmetic.tsx" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, { "match": "(?<=[_$[:alnum:])\\]])\\s*(/)(?![/*])", "captures": { @@ -3541,7 +3558,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*([\\{\\[]\\s*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.tsx" @@ -3753,7 +3770,7 @@ ] }, "possibly-arrow-return-type": { - "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<[^<>]+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", + "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", "beginCaptures": { "1": { "name": "meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx" @@ -5297,7 +5314,7 @@ ] }, "jsx-tag-without-attributes-in-expression": { - "begin": "(?:*]|&&|\\|\\||\\?|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "begin": "(?:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "patterns": [ { @@ -5357,7 +5374,7 @@ ] }, "jsx-tag-in-expression": { - "begin": "(?x)\n (?:*]|&&|\\|\\||\\?|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "begin": "(?x)\n (?:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", "patterns": [ { From feef95c7072e6126079ad1117832ccade8865f38 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 19 Jul 2019 18:23:19 -0700 Subject: [PATCH 411/710] Make sure we update pending files properly The previous logic failed to add anything to the pending files list For #77665 --- .../src/features/bufferSyncSupport.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/extensions/typescript-language-features/src/features/bufferSyncSupport.ts b/extensions/typescript-language-features/src/features/bufferSyncSupport.ts index 25ffb4c81bd..9d9fcd4a05e 100644 --- a/extensions/typescript-language-features/src/features/bufferSyncSupport.ts +++ b/extensions/typescript-language-features/src/features/bufferSyncSupport.ts @@ -42,7 +42,7 @@ function mode2ScriptKind(mode: string): 'TS' | 'TSX' | 'JS' | 'JSX' | undefined class BufferSynchronizer { private _pending: Proto.UpdateOpenRequestArgs = {}; - private _pendingFiles = new Set(); + private readonly _pendingFiles = new Set(); constructor( private readonly client: ITypeScriptServiceClient @@ -132,11 +132,14 @@ class BufferSynchronizer { } private updatePending(filepath: string, f: (pending: Proto.UpdateOpenRequestArgs) => void): void { - if (this.supportsBatching && this._pendingFiles.has(filepath)) { - this.flush(); - this._pendingFiles.clear(); - f(this._pending); + if (this.supportsBatching) { + if (this._pendingFiles.has(filepath)) { + // we saw this file before, make sure we flush before working with it again + this.flush(); + this._pendingFiles.clear(); + } this._pendingFiles.add(filepath); + f(this._pending); } else { f(this._pending); } From cf69f2f1af2f5a15f73a401220674efc39964035 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 19 Jul 2019 18:35:35 -0700 Subject: [PATCH 412/710] Refactor code to use single state object instead of two --- .../src/features/bufferSyncSupport.ts | 76 +++++++++++-------- 1 file changed, 45 insertions(+), 31 deletions(-) diff --git a/extensions/typescript-language-features/src/features/bufferSyncSupport.ts b/extensions/typescript-language-features/src/features/bufferSyncSupport.ts index 9d9fcd4a05e..f662cb21af6 100644 --- a/extensions/typescript-language-features/src/features/bufferSyncSupport.ts +++ b/extensions/typescript-language-features/src/features/bufferSyncSupport.ts @@ -34,6 +34,27 @@ function mode2ScriptKind(mode: string): 'TS' | 'TSX' | 'JS' | 'JSX' | undefined return undefined; } +class CloseOperation { + readonly type = 'close'; + constructor( + public readonly args: string + ) { } +} + +class OpenOperation { + readonly type = 'open'; + constructor( + public readonly args: Proto.OpenRequestArgs + ) { } +} + +class ChangeOperation { + readonly type = 'change'; + constructor( + public readonly args: Proto.FileCodeEdits + ) { } +} + /** * Manages synchronization of buffers with the TS server. * @@ -41,8 +62,7 @@ function mode2ScriptKind(mode: string): 'TS' | 'TSX' | 'JS' | 'JSX' | undefined */ class BufferSynchronizer { - private _pending: Proto.UpdateOpenRequestArgs = {}; - private readonly _pendingFiles = new Set(); + private readonly _pending = new Map(); constructor( private readonly client: ITypeScriptServiceClient @@ -51,10 +71,7 @@ class BufferSynchronizer { public open(args: Proto.OpenRequestArgs) { if (this.supportsBatching) { this.updatePending(args.file, pending => { - if (!pending.openFiles) { - pending.openFiles = []; - } - pending.openFiles.push(args); + pending.set(args.file, new OpenOperation(args)); }); } else { this.client.executeWithoutWaitingForResponse('open', args); @@ -64,10 +81,7 @@ class BufferSynchronizer { public close(filepath: string) { if (this.supportsBatching) { this.updatePending(filepath, pending => { - if (!pending.closedFiles) { - pending.closedFiles = []; - } - pending.closedFiles.push(filepath); + pending.set(filepath, new CloseOperation(filepath)); }); } else { const args: Proto.FileRequestArgs = { file: filepath }; @@ -82,18 +96,14 @@ class BufferSynchronizer { if (this.supportsBatching) { this.updatePending(filepath, pending => { - if (!pending.changedFiles) { - pending.changedFiles = []; - } - - pending.changedFiles.push({ + pending.set(filepath, new ChangeOperation({ fileName: filepath, textChanges: events.map((change): Proto.CodeEdit => ({ newText: change.text, start: typeConverters.Position.toLocation(change.range.start), end: typeConverters.Position.toLocation(change.range.end), })).reverse(), // Send the edits end-of-document to start-of-document order - }); + })); }); } else { for (const { range, text } of events) { @@ -117,13 +127,23 @@ class BufferSynchronizer { private flush() { if (!this.supportsBatching) { // We've already eagerly synchronized + this._pending.clear(); return; } - if (this._pending.changedFiles || this._pending.closedFiles || this._pending.openFiles) { - this.client.executeWithoutWaitingForResponse('updateOpen', this._pending); - this._pending = {}; - this._pendingFiles.clear(); + if (this._pending.size > 0) { + const closedFiles: string[] = []; + const openFiles: Proto.OpenRequestArgs[] = []; + const changedFiles: Proto.FileCodeEdits[] = []; + for (const change of this._pending.values()) { + switch (change.type) { + case 'change': changedFiles.push(change.args); break; + case 'open': openFiles.push(change.args); break; + case 'close': closedFiles.push(change.args); break; + } + } + this.client.executeWithoutWaitingForResponse('updateOpen', { changedFiles, closedFiles, openFiles }); + this._pending.clear(); } } @@ -131,18 +151,12 @@ class BufferSynchronizer { return this.client.apiVersion.gte(API.v340) && vscode.workspace.getConfiguration('typescript', null).get('useBatchedBufferSync', true); } - private updatePending(filepath: string, f: (pending: Proto.UpdateOpenRequestArgs) => void): void { - if (this.supportsBatching) { - if (this._pendingFiles.has(filepath)) { - // we saw this file before, make sure we flush before working with it again - this.flush(); - this._pendingFiles.clear(); - } - this._pendingFiles.add(filepath); - f(this._pending); - } else { - f(this._pending); + private updatePending(filepath: string, f: (pending: Map) => void): void { + if (this._pending.has(filepath)) { + // we saw this file before, make sure we flush before working with it again + this.flush(); } + f(this._pending); } } From 8295e325aebc06158fd4c3779509284c64daafe6 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sat, 20 Jul 2019 05:03:03 +0200 Subject: [PATCH 413/710] Enable download service for browser --- .../sharedProcess/sharedProcessMain.ts | 5 +- src/vs/platform/download/common/download.ts | 2 +- .../platform/download/common/downloadIpc.ts | 42 ++++++++++ .../{node => common}/downloadService.ts | 30 ++++---- src/vs/platform/download/node/downloadIpc.ts | 76 ------------------- .../node/extensionManagementService.ts | 2 +- .../workbench/browser/web.simpleservices.ts | 19 ----- .../electron-browser/remote.contribution.ts | 8 +- src/vs/workbench/workbench.main.ts | 2 +- src/vs/workbench/workbench.web.main.ts | 6 +- 10 files changed, 69 insertions(+), 123 deletions(-) create mode 100644 src/vs/platform/download/common/downloadIpc.ts rename src/vs/platform/download/{node => common}/downloadService.ts (53%) delete mode 100644 src/vs/platform/download/node/downloadIpc.ts diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts index baeaa641903..8e0f5f39978 100644 --- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts @@ -38,7 +38,7 @@ import { LocalizationsChannel } from 'vs/platform/localizations/node/localizatio import { DialogChannelClient } from 'vs/platform/dialogs/node/dialogIpc'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { combinedDisposable, DisposableStore } from 'vs/base/common/lifecycle'; -import { DownloadService } from 'vs/platform/download/node/downloadService'; +import { DownloadService } from 'vs/platform/download/common/downloadService'; import { IDownloadService } from 'vs/platform/download/common/download'; import { IChannel, IServerChannel, StaticRouter } from 'vs/base/parts/ipc/common/ipc'; import { NodeCachedDataCleaner } from 'vs/code/electron-browser/sharedProcess/contrib/nodeCachedDataCleaner'; @@ -115,7 +115,6 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat services.set(ILogService, logService); services.set(IConfigurationService, configurationService); services.set(IRequestService, new SyncDescriptor(RequestService)); - services.set(IDownloadService, new SyncDescriptor(DownloadService)); services.set(IProductService, new SyncDescriptor(ProductService)); const mainProcessService = new MainProcessService(server, mainRouter); @@ -138,6 +137,8 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat disposables.add(diskFileSystemProvider); fileService.registerProvider(Schemas.file, diskFileSystemProvider); + services.set(IDownloadService, new SyncDescriptor(DownloadService)); + const instantiationService = new InstantiationService(services); let telemetryService: ITelemetryService; diff --git a/src/vs/platform/download/common/download.ts b/src/vs/platform/download/common/download.ts index 83bd30bdaa5..a012358875d 100644 --- a/src/vs/platform/download/common/download.ts +++ b/src/vs/platform/download/common/download.ts @@ -13,6 +13,6 @@ export interface IDownloadService { _serviceBrand: any; - download(uri: URI, to?: string, cancellationToken?: CancellationToken): Promise; + download(uri: URI, to: URI, cancellationToken?: CancellationToken): Promise; } diff --git a/src/vs/platform/download/common/downloadIpc.ts b/src/vs/platform/download/common/downloadIpc.ts new file mode 100644 index 00000000000..d2d00dd8ccc --- /dev/null +++ b/src/vs/platform/download/common/downloadIpc.ts @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { URI } from 'vs/base/common/uri'; +import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc'; +import { Event } from 'vs/base/common/event'; +import { IDownloadService } from 'vs/platform/download/common/download'; +import { IURITransformer } from 'vs/base/common/uriIpc'; + +export class DownloadServiceChannel implements IServerChannel { + + constructor(private readonly service: IDownloadService) { } + + listen(_: unknown, event: string, arg?: any): Event { + throw new Error('Invalid listen'); + } + + call(context: any, command: string, args?: any): Promise { + switch (command) { + case 'download': return this.service.download(URI.revive(args[0]), URI.revive(args[1])); + } + throw new Error('Invalid call'); + } +} + +export class DownloadServiceChannelClient implements IDownloadService { + + _serviceBrand: any; + + constructor(private channel: IChannel, private getUriTransformer: () => IURITransformer | null) { } + + async download(from: URI, to: URI): Promise { + const uriTransfomer = this.getUriTransformer(); + if (uriTransfomer) { + from = uriTransfomer.transformOutgoingURI(from); + to = uriTransfomer.transformOutgoingURI(to); + } + await this.channel.call('download', [from, to]); + } +} \ No newline at end of file diff --git a/src/vs/platform/download/node/downloadService.ts b/src/vs/platform/download/common/downloadService.ts similarity index 53% rename from src/vs/platform/download/node/downloadService.ts rename to src/vs/platform/download/common/downloadService.ts index e464b7ae73d..a2b8365df4c 100644 --- a/src/vs/platform/download/node/downloadService.ts +++ b/src/vs/platform/download/common/downloadService.ts @@ -5,14 +5,10 @@ import { IDownloadService } from 'vs/platform/download/common/download'; import { URI } from 'vs/base/common/uri'; -import { Schemas } from 'vs/base/common/network'; -import { copy } from 'vs/base/node/pfs'; import { IRequestService, asText } from 'vs/platform/request/common/request'; import { CancellationToken } from 'vs/base/common/cancellation'; -import { join } from 'vs/base/common/path'; -import { tmpdir } from 'os'; -import { generateUuid } from 'vs/base/common/uuid'; import { IFileService } from 'vs/platform/files/common/files'; +import { Schemas } from 'vs/base/common/network'; export class DownloadService implements IDownloadService { @@ -23,18 +19,18 @@ export class DownloadService implements IDownloadService { @IFileService private readonly fileService: IFileService ) { } - download(uri: URI, target: string = join(tmpdir(), generateUuid()), cancellationToken: CancellationToken = CancellationToken.None): Promise { - if (uri.scheme === Schemas.file) { - return copy(uri.fsPath, target).then(() => target); + async download(resource: URI, target: URI, cancellationToken: CancellationToken = CancellationToken.None): Promise { + if (resource.scheme === Schemas.file) { + await this.fileService.copy(resource, target); + return; + } + const options = { type: 'GET', url: resource.toString() }; + const context = await this.requestService.request(options, cancellationToken); + if (context.res.statusCode === 200) { + await this.fileService.writeFile(target, context.stream); + } else { + const message = await asText(context); + return Promise.reject(new Error(`Expected 200, got back ${context.res.statusCode} instead.\n\n${message}`)); } - const options = { type: 'GET', url: uri.toString() }; - return this.requestService.request(options, cancellationToken) - .then(context => { - if (context.res.statusCode === 200) { - return this.fileService.writeFile(URI.file(target), context.stream).then(() => target); - } - return asText(context) - .then(message => Promise.reject(new Error(`Expected 200, got back ${context.res.statusCode} instead.\n\n${message}`))); - }); } } diff --git a/src/vs/platform/download/node/downloadIpc.ts b/src/vs/platform/download/node/downloadIpc.ts deleted file mode 100644 index 4bc0593679a..00000000000 --- a/src/vs/platform/download/node/downloadIpc.ts +++ /dev/null @@ -1,76 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { URI } from 'vs/base/common/uri'; -import * as path from 'vs/base/common/path'; -import * as fs from 'fs'; -import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc'; -import { Event, Emitter } from 'vs/base/common/event'; -import { IDownloadService } from 'vs/platform/download/common/download'; -import { mkdirp } from 'vs/base/node/pfs'; -import { IURITransformer } from 'vs/base/common/uriIpc'; -import { tmpdir } from 'os'; -import { generateUuid } from 'vs/base/common/uuid'; - -type UploadResponse = Buffer | string | undefined; - -function upload(uri: URI): Event { - const stream = new Emitter(); - const readstream = fs.createReadStream(uri.fsPath); - readstream.on('data', data => stream.fire(data)); - readstream.on('error', error => stream.fire(error.toString())); - readstream.on('close', () => stream.fire(undefined)); - return stream.event; -} - -export class DownloadServiceChannel implements IServerChannel { - - constructor() { } - - listen(_: unknown, event: string, arg?: any): Event { - switch (event) { - case 'upload': return Event.buffer(upload(URI.revive(arg))); - } - - throw new Error(`Event not found: ${event}`); - } - - call(_: unknown, command: string): Promise { - throw new Error(`Call not found: ${command}`); - } -} - -export class DownloadServiceChannelClient implements IDownloadService { - - _serviceBrand: any; - - constructor(private channel: IChannel, private getUriTransformer: () => IURITransformer) { } - - download(from: URI, to: string = path.join(tmpdir(), generateUuid())): Promise { - from = this.getUriTransformer().transformOutgoingURI(from); - const dirName = path.dirname(to); - let out: fs.WriteStream; - return new Promise((c, e) => { - return mkdirp(dirName) - .then(() => { - out = fs.createWriteStream(to); - out.once('close', () => c(to)); - out.once('error', e); - const uploadStream = this.channel.listen('upload', from); - const disposable = uploadStream(result => { - if (result === undefined) { - disposable.dispose(); - out.end(() => c(to)); - } else if (Buffer.isBuffer(result)) { - out.write(result); - } else if (typeof result === 'string') { - disposable.dispose(); - out.end(() => e(result)); - } - }); - }); - }); - } -} \ No newline at end of file diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index 564b0981fba..70cd46c824a 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -241,7 +241,7 @@ export class ExtensionManagementService extends Disposable implements IExtension throw new Error('Download service is not available'); } const downloadedLocation = path.join(tmpdir(), generateUuid()); - return this.downloadService.download(vsix, downloadedLocation).then(() => URI.file(downloadedLocation)); + return this.downloadService.download(vsix, URI.file(downloadedLocation)).then(() => URI.file(downloadedLocation)); } private installFromZipPath(identifierWithVersion: ExtensionIdentifierWithVersion, zipPath: string, metadata: IGalleryMetadata | null, type: ExtensionType, operation: InstallOperation, token: CancellationToken): Promise { diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index cf48dcdeba7..c8b3f6ef782 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -8,9 +8,6 @@ import * as browser from 'vs/base/browser/browser'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { Event } from 'vs/base/common/event'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -// tslint:disable-next-line: import-patterns no-standalone-editor -import { IDownloadService } from 'vs/platform/download/common/download'; -import { CancellationToken } from 'vs/base/common/cancellation'; import { IGalleryExtension, IExtensionIdentifier, IReportedExtension, IExtensionManagementService, ILocalExtension, IGalleryMetadata } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IExtensionTipsService, ExtensionRecommendationReason, IExtensionRecommendation } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionType, ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; @@ -41,22 +38,6 @@ import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteA import { IExperimentService, IExperiment, ExperimentActionType, ExperimentState } from 'vs/workbench/contrib/experiments/common/experimentService'; import { ExtensionHostDebugChannelClient, ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc'; -//#region Download - -export class SimpleDownloadService implements IDownloadService { - - _serviceBrand: any; - - download(uri: URI, to?: string, cancellationToken?: CancellationToken): Promise { - // @ts-ignore - return Promise.resolve(undefined); - } -} - -registerSingleton(IDownloadService, SimpleDownloadService, true); - -//#endregion - //#region Extension Tips export class SimpleExtensionTipsService implements IExtensionTipsService { diff --git a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts index 8d9b3dda9f4..e61539e255b 100644 --- a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts +++ b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts @@ -24,7 +24,7 @@ import { IQuickInputService, IQuickPickItem, IQuickPickSeparator } from 'vs/plat import { ILogService } from 'vs/platform/log/common/log'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { DialogChannel } from 'vs/platform/dialogs/node/dialogIpc'; -import { DownloadServiceChannel } from 'vs/platform/download/node/downloadIpc'; +import { DownloadServiceChannel } from 'vs/platform/download/common/downloadIpc'; import { LogLevelSetterChannel } from 'vs/platform/log/common/logIpc'; import { ipcRenderer as ipc } from 'electron'; import { IDiagnosticInfoOptions, IRemoteDiagnosticInfo } from 'vs/platform/diagnostics/common/diagnosticsService'; @@ -38,6 +38,7 @@ import { ReloadWindowAction } from 'vs/workbench/browser/actions/windowActions'; import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { RemoteConnectionState } from 'vs/workbench/browser/contextkeys'; +import { IDownloadService } from 'vs/platform/download/common/download'; const WINDOW_ACTIONS_COMMAND_ID = 'remote.showActions'; const CLOSE_REMOTE_COMMAND_ID = 'remote.closeRemote'; @@ -215,12 +216,13 @@ class RemoteChannelsContribution implements IWorkbenchContribution { constructor( @ILogService logService: ILogService, @IRemoteAgentService remoteAgentService: IRemoteAgentService, - @IDialogService dialogService: IDialogService + @IDialogService dialogService: IDialogService, + @IDownloadService downloadService: IDownloadService ) { const connection = remoteAgentService.getConnection(); if (connection) { connection.registerChannel('dialog', new DialogChannel(dialogService)); - connection.registerChannel('download', new DownloadServiceChannel()); + connection.registerChannel('download', new DownloadServiceChannel(downloadService)); connection.registerChannel('loglevel', new LogLevelSetterChannel(logService)); } } diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index b263f5cf2fb..ba1ea7a2075 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -53,7 +53,7 @@ import { IMarkerDecorationsService } from 'vs/editor/common/services/markersDeco import { IMarkerService } from 'vs/platform/markers/common/markers'; import { MarkerService } from 'vs/platform/markers/common/markerService'; import { IDownloadService } from 'vs/platform/download/common/download'; -import { DownloadService } from 'vs/platform/download/node/downloadService'; +import { DownloadService } from 'vs/platform/download/common/downloadService'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { ClipboardService } from 'vs/platform/clipboard/electron-browser/clipboardService'; import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService'; diff --git a/src/vs/workbench/workbench.web.main.ts b/src/vs/workbench/workbench.web.main.ts index d7ed222d705..4d5cf7bfbf9 100644 --- a/src/vs/workbench/workbench.web.main.ts +++ b/src/vs/workbench/workbench.web.main.ts @@ -51,8 +51,8 @@ import { MarkerDecorationsService } from 'vs/editor/common/services/markerDecora import { IMarkerDecorationsService } from 'vs/editor/common/services/markersDecorationService'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { MarkerService } from 'vs/platform/markers/common/markerService'; -// import { IDownloadService } from 'vs/platform/download/common/download'; -// import { DownloadService } from 'vs/platform/download/node/downloadService'; +import { IDownloadService } from 'vs/platform/download/common/download'; +import { DownloadService } from 'vs/platform/download/common/downloadService'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { BrowserClipboardService } from 'vs/platform/clipboard/browser/clipboardService'; import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService'; @@ -145,7 +145,7 @@ registerSingleton(IOpenerService, OpenerService, true); registerSingleton(IEditorWorkerService, EditorWorkerServiceImpl); registerSingleton(IMarkerDecorationsService, MarkerDecorationsService); registerSingleton(IMarkerService, MarkerService, true); -// registerSingleton(IDownloadService, DownloadService, true); +registerSingleton(IDownloadService, DownloadService, true); registerSingleton(IClipboardService, BrowserClipboardService, true); registerSingleton(IContextKeyService, ContextKeyService); registerSingleton(IModelService, ModelServiceImpl, true); From 53fe1660c984f054eba579afaa7e93e4dbd92942 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sat, 20 Jul 2019 05:04:38 +0200 Subject: [PATCH 414/710] Move download command to extension host --- .../api/browser/extensionHost.contribution.ts | 1 + .../api/browser/mainThreadDownloadService.ts | 26 +++++++++++++++++ .../api/browser/mainThreadTreeViews.ts | 2 +- src/vs/workbench/api/common/apiCommands.ts | 8 +----- .../workbench/api/common/extHost.protocol.ts | 9 ++++++ src/vs/workbench/api/node/extHost.api.impl.ts | 2 ++ .../api/node/extHostDownloadService.ts | 28 +++++++++++++++++++ 7 files changed, 68 insertions(+), 8 deletions(-) create mode 100644 src/vs/workbench/api/browser/mainThreadDownloadService.ts create mode 100644 src/vs/workbench/api/node/extHostDownloadService.ts diff --git a/src/vs/workbench/api/browser/extensionHost.contribution.ts b/src/vs/workbench/api/browser/extensionHost.contribution.ts index dca4efc3835..2905c524113 100644 --- a/src/vs/workbench/api/browser/extensionHost.contribution.ts +++ b/src/vs/workbench/api/browser/extensionHost.contribution.ts @@ -48,6 +48,7 @@ import './mainThreadStorage'; import './mainThreadTelemetry'; import './mainThreadTerminalService'; import './mainThreadTreeViews'; +import './mainThreadDownloadService'; import './mainThreadUrls'; import './mainThreadWindow'; import './mainThreadWebview'; diff --git a/src/vs/workbench/api/browser/mainThreadDownloadService.ts b/src/vs/workbench/api/browser/mainThreadDownloadService.ts new file mode 100644 index 00000000000..8b64b910337 --- /dev/null +++ b/src/vs/workbench/api/browser/mainThreadDownloadService.ts @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Disposable } from 'vs/base/common/lifecycle'; +import { MainContext, IExtHostContext, MainThreadDownloadServiceShape } from 'vs/workbench/api/common/extHost.protocol'; +import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers'; +import { IDownloadService } from 'vs/platform/download/common/download'; +import { UriComponents, URI } from 'vs/base/common/uri'; + +@extHostNamedCustomer(MainContext.MainThreadDownloadService) +export class MainThreadDownloadService extends Disposable implements MainThreadDownloadServiceShape { + + constructor( + extHostContext: IExtHostContext, + @IDownloadService private readonly downloadService: IDownloadService + ) { + super(); + } + + $download(uri: UriComponents, to: UriComponents): Promise { + return this.downloadService.download(URI.revive(uri), URI.revive(to)); + } + +} \ No newline at end of file diff --git a/src/vs/workbench/api/browser/mainThreadTreeViews.ts b/src/vs/workbench/api/browser/mainThreadTreeViews.ts index 7a18271ff58..f7024269742 100644 --- a/src/vs/workbench/api/browser/mainThreadTreeViews.ts +++ b/src/vs/workbench/api/browser/mainThreadTreeViews.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Disposable } from 'vs/base/common/lifecycle'; -import { ExtHostContext, MainThreadTreeViewsShape, ExtHostTreeViewsShape, MainContext, IExtHostContext } from '../common/extHost.protocol'; +import { ExtHostContext, MainThreadTreeViewsShape, ExtHostTreeViewsShape, MainContext, IExtHostContext } from 'vs/workbench/api/common/extHost.protocol'; import { ITreeViewDataProvider, ITreeItem, IViewsService, ITreeView, IViewsRegistry, ITreeViewDescriptor, IRevealOptions, Extensions } from 'vs/workbench/common/views'; import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers'; import { distinct } from 'vs/base/common/arrays'; diff --git a/src/vs/workbench/api/common/apiCommands.ts b/src/vs/workbench/api/common/apiCommands.ts index 0c303c05c44..0c5b098cd6a 100644 --- a/src/vs/workbench/api/common/apiCommands.ts +++ b/src/vs/workbench/api/common/apiCommands.ts @@ -12,7 +12,6 @@ import { EditorViewColumn } from 'vs/workbench/api/common/shared/editor'; import { EditorGroupLayout } from 'vs/workbench/services/editor/common/editorGroupsService'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IOpenSettings, IURIToOpen, IWindowService } from 'vs/platform/windows/common/windows'; -import { IDownloadService } from 'vs/platform/download/common/download'; import { IWorkspacesService, hasWorkspaceFileExtension } from 'vs/platform/workspaces/common/workspaces'; import { IRecent } from 'vs/platform/history/common/history'; import { Schemas } from 'vs/base/common/network'; @@ -206,9 +205,4 @@ CommandsRegistry.registerCommand({ } }] } -}); - -CommandsRegistry.registerCommand('_workbench.downloadResource', function (accessor: ServicesAccessor, resource: URI) { - const downloadService = accessor.get(IDownloadService); - return downloadService.download(resource).then(location => URI.file(location)); -}); +}); \ No newline at end of file diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index cc7202da85b..8fb612d3a7c 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -246,6 +246,10 @@ export interface MainThreadTreeViewsShape extends IDisposable { $setMessage(treeViewId: string, message: string | IMarkdownString): void; } +export interface MainThreadDownloadServiceShape extends IDisposable { + $download(uri: UriComponents, to: UriComponents): Promise; +} + export interface MainThreadErrorsShape extends IDisposable { $onUnexpectedError(err: any | SerializedError): void; } @@ -811,6 +815,9 @@ export interface ExtHostTreeViewsShape { $setVisible(treeViewId: string, visible: boolean): void; } +export interface ExtHostDownloadServiceShape { +} + export interface ExtHostWorkspaceShape { $initializeWorkspace(workspace: IWorkspaceData | null): void; $acceptWorkspaceData(workspace: IWorkspaceData | null): void; @@ -1309,6 +1316,7 @@ export const MainContext = { MainThreadEditorInsets: createMainId('MainThreadEditorInsets'), MainThreadErrors: createMainId('MainThreadErrors'), MainThreadTreeViews: createMainId('MainThreadTreeViews'), + MainThreadDownloadService: createMainId('MainThreadDownloadService'), MainThreadKeytar: createMainId('MainThreadKeytar'), MainThreadLanguageFeatures: createMainId('MainThreadLanguageFeatures'), MainThreadLanguages: createMainId('MainThreadLanguages'), @@ -1344,6 +1352,7 @@ export const ExtHostContext = { ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant'), ExtHostEditors: createExtId('ExtHostEditors'), ExtHostTreeViews: createExtId('ExtHostTreeViews'), + ExtHostDownloadService: createExtId('ExtHostDownloadService'), ExtHostFileSystem: createExtId('ExtHostFileSystem'), ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService'), ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures'), diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index e580c222d2c..293bddc5fac 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -49,6 +49,7 @@ import { ExtHostTask } from 'vs/workbench/api/node/extHostTask'; import { ExtHostTerminalService } from 'vs/workbench/api/node/extHostTerminalService'; import { ExtHostEditors } from 'vs/workbench/api/common/extHostTextEditors'; import { ExtHostTreeViews } from 'vs/workbench/api/common/extHostTreeViews'; +import { ExtHostDownloadService } from 'vs/workbench/api/node/extHostDownloadService'; import * as typeConverters from 'vs/workbench/api/common/extHostTypeConverters'; import * as extHostTypes from 'vs/workbench/api/common/extHostTypes'; import { ExtHostUrls } from 'vs/workbench/api/common/extHostUrls'; @@ -114,6 +115,7 @@ export function createApiFactory( const extHostEditors = rpcProtocol.set(ExtHostContext.ExtHostEditors, new ExtHostEditors(rpcProtocol, extHostDocumentsAndEditors)); const extHostCommands = rpcProtocol.set(ExtHostContext.ExtHostCommands, new ExtHostCommands(rpcProtocol, extHostLogService)); const extHostTreeViews = rpcProtocol.set(ExtHostContext.ExtHostTreeViews, new ExtHostTreeViews(rpcProtocol.getProxy(MainContext.MainThreadTreeViews), extHostCommands, extHostLogService)); + rpcProtocol.set(ExtHostContext.ExtHostDownloadService, new ExtHostDownloadService(rpcProtocol.getProxy(MainContext.MainThreadDownloadService), extHostCommands)); rpcProtocol.set(ExtHostContext.ExtHostWorkspace, extHostWorkspace); rpcProtocol.set(ExtHostContext.ExtHostConfiguration, extHostConfiguration); const extHostEditorInsets = rpcProtocol.set(ExtHostContext.ExtHostEditorInsets, new ExtHostEditorInsets(rpcProtocol.getProxy(MainContext.MainThreadEditorInsets), extHostEditors, initData.environment)); diff --git a/src/vs/workbench/api/node/extHostDownloadService.ts b/src/vs/workbench/api/node/extHostDownloadService.ts new file mode 100644 index 00000000000..c86a8ecd8f9 --- /dev/null +++ b/src/vs/workbench/api/node/extHostDownloadService.ts @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { join } from 'vs/base/common/path'; +import { tmpdir } from 'os'; +import { generateUuid } from 'vs/base/common/uuid'; +import { ExtHostCommands } from 'vs/workbench/api/common/extHostCommands'; +import { Disposable } from 'vs/base/common/lifecycle'; +import { MainThreadDownloadServiceShape } from 'vs/workbench/api/common/extHost.protocol'; +import { URI } from 'vs/base/common/uri'; + +export class ExtHostDownloadService extends Disposable { + + constructor( + proxy: MainThreadDownloadServiceShape, + commands: ExtHostCommands + ) { + super(); + commands.registerCommand(false, '_workbench.downloadResource', async (resource: URI): Promise => { + const location = URI.file(join(tmpdir(), generateUuid())); + await proxy.$download(resource, location); + return location; + }); + } + +} \ No newline at end of file From 4fc00c05ffcf6274cdea6eadc5df13ffbceebf69 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sat, 20 Jul 2019 05:15:08 +0200 Subject: [PATCH 415/710] enable install from vsix action in browser. Use filedialogService --- .../contrib/extensions/browser/extensionsActions.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index f68a840c9ad..13a1d23eeaf 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -60,6 +60,7 @@ import { IPreferencesService } from 'vs/workbench/services/preferences/common/pr import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IProductService } from 'vs/platform/product/common/product'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; +import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs'; function toExtensionDescription(local: ILocalExtension): IExtensionDescription { return { @@ -2807,6 +2808,7 @@ export class InstallVSIXAction extends Action { @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, @INotificationService private readonly notificationService: INotificationService, @IWindowService private readonly windowService: IWindowService, + @IFileDialogService private readonly fileDialogService: IFileDialogService, @IExtensionService private readonly extensionService: IExtensionService, @IInstantiationService private readonly instantiationService: IInstantiationService ) { @@ -2814,17 +2816,17 @@ export class InstallVSIXAction extends Action { } run(): Promise { - return Promise.resolve(this.windowService.showOpenDialog({ + return Promise.resolve(this.fileDialogService.showOpenDialog({ title: localize('installFromVSIX', "Install from VSIX"), filters: [{ name: 'VSIX Extensions', extensions: ['vsix'] }], - properties: ['openFile'], - buttonLabel: mnemonicButtonLabel(localize({ key: 'installButton', comment: ['&& denotes a mnemonic'] }, "&&Install")) + canSelectFiles: true, + openLabel: mnemonicButtonLabel(localize({ key: 'installButton', comment: ['&& denotes a mnemonic'] }, "&&Install")) })).then(result => { if (!result) { return Promise.resolve(); } - return Promise.all(result.map(vsix => this.extensionsWorkbenchService.install(URI.file(vsix)))) + return Promise.all(result.map(vsix => this.extensionsWorkbenchService.install(vsix))) .then(extensions => { for (const extension of extensions) { const requireReload = !(extension.local && this.extensionService.canAddExtension(toExtensionDescription(extension.local))); From 49e73983749a2ee308d032714d395bb5bbedf90e Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sun, 21 Jul 2019 15:08:18 +0200 Subject: [PATCH 416/710] extensions actions tests --- .../extensions/browser/extensionsActions.ts | 52 ++++++--------- .../extensionsActions.test.ts | 65 ++++++++++++------- 2 files changed, 62 insertions(+), 55 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 13a1d23eeaf..c17e327fcb4 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -73,7 +73,8 @@ function toExtensionDescription(local: ILocalExtension): IExtensionDescription { }; } -const promptDownloadManually = (extension: IGalleryExtension | undefined, message: string, error: Error, instantiationService: IInstantiationService, notificationService: INotificationService, openerService: IOpenerService, productService: IProductService) => { +const promptDownloadManually = (extension: IGalleryExtension | undefined, message: string, error: Error, + instantiationService: IInstantiationService, notificationService: INotificationService, openerService: IOpenerService, productService: IProductService) => { if (!extension || error.name === INSTALL_ERROR_INCOMPATIBLE || error.name === INSTALL_ERROR_MALICIOUS || !productService.extensionsGallery) { return Promise.reject(error); } else { @@ -1162,9 +1163,7 @@ export class ReloadAction extends ExtensionAction { @IWindowService private readonly windowService: IWindowService, @IExtensionService private readonly extensionService: IExtensionService, @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, - @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, - @IConfigurationService private readonly configurationService: IConfigurationService, - @IProductService private readonly productService: IProductService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService ) { super('extensions.reload', localize('reloadAction', "Reload"), ReloadAction.DisabledClass, false); this._register(this.extensionService.onDidChangeExtensions(this.updateRunningExtensions, this)); @@ -1211,8 +1210,9 @@ export class ReloadAction extends ExtensionAction { } if (this.extension.local) { const isEnabled = this.extensionEnablementService.isEnabled(this.extension.local); + + // Extension is runningÃŽ if (runningExtension) { - // Extension is running if (isEnabled) { if (!this.extensionService.canAddExtension(toExtensionDescription(this.extension.local))) { if (isSameExtensionRunning) { @@ -1235,39 +1235,27 @@ export class ReloadAction extends ExtensionAction { } } return; - } else { - // Extension is not running + } + + // Extension is not running + else { if (isEnabled && !this.extensionService.canAddExtension(toExtensionDescription(this.extension.local))) { this.enabled = true; this.label = localize('reloadRequired', "Reload Required"); this.tooltip = localize('postEnableTooltip', "Please reload Visual Studio Code to enable this extension."); return; } - if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { - const uiExtension = isUIExtension(this.extension.local.manifest, this.productService, this.configurationService); - // Local Workspace Extension - if (!uiExtension && this.extension.server === this.extensionManagementServerService.localExtensionManagementServer) { - const remoteExtension = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server === this.extensionManagementServerService.remoteExtensionManagementServer)[0]; - // Extension exist in remote and enabled - if (remoteExtension && remoteExtension.local && this.extensionEnablementService.isEnabled(remoteExtension.local)) { - this.enabled = true; - this.label = localize('reloadRequired', "Reload Required"); - this.tooltip = localize('postEnableTooltip', "Please reload Visual Studio Code to enable this extension."); - alert(localize('installExtensionComplete', "Installing extension {0} is completed. Please reload Visual Studio Code to enable it.", this.extension.displayName)); - return; - } - } - // Remote UI Extension - if (uiExtension && this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer) { - const localExtension = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server === this.extensionManagementServerService.localExtensionManagementServer)[0]; - // Extension exist in local and enabled - if (localExtension && localExtension.local && this.extensionEnablementService.isEnabled(localExtension.local)) { - this.enabled = true; - this.label = localize('reloadRequired', "Reload Required"); - this.tooltip = localize('postEnableTooltip', "Please reload Visual Studio Code to enable this extension."); - alert(localize('installExtensionComplete', "Installing extension {0} is completed. Please reload Visual Studio Code to enable it.", this.extension.displayName)); - return; - } + + const otherServer = this.extension.server ? this.extension.server === this.extensionManagementServerService.localExtensionManagementServer ? this.extensionManagementServerService.remoteExtensionManagementServer : this.extensionManagementServerService.localExtensionManagementServer : null; + if (otherServer && this.extension.enablementState === EnablementState.DisabledByExtensionKind) { + const extensionInOtherServer = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server === otherServer)[0]; + // Same extension in other server exists and + if (extensionInOtherServer && extensionInOtherServer.local && this.extensionEnablementService.isEnabled(extensionInOtherServer.local)) { + this.enabled = true; + this.label = localize('reloadRequired', "Reload Required"); + this.tooltip = localize('postEnableTooltip', "Please reload Visual Studio Code to enable this extension."); + alert(localize('installExtensionComplete', "Installing extension {0} is completed. Please reload Visual Studio Code to enable it.", this.extension.displayName)); + return; } } } diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index 5c4b51aa788..846f86b54be 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -1063,37 +1063,39 @@ suite('ExtensionsActions Test', () => { assert.ok(!testObject.enabled); }); - test('Test ReloadAction when extension state is installing', () => { + test('Test ReloadAction when extension state is installing', async () => { const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); const workbenchService = instantiationService.get(IExtensionsWorkbenchService); const gallery = aGalleryExtension('a'); instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(gallery)); - return workbenchService.queryGallery(CancellationToken.None) - .then((paged) => { - testObject.extension = paged.firstPage[0]; - installEvent.fire({ identifier: gallery.identifier, gallery }); + const paged = await workbenchService.queryGallery(CancellationToken.None); + testObject.extension = paged.firstPage[0]; + installEvent.fire({ identifier: gallery.identifier, gallery }); - assert.ok(!testObject.enabled); - }); + assert.ok(!testObject.enabled); }); - test('Test ReloadAction when extension state is uninstalling', () => { + test('Test ReloadAction when extension state is uninstalling', async () => { const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); const local = aLocalExtension('a'); instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); - return instantiationService.get(IExtensionsWorkbenchService).queryLocal() - .then(extensions => { - testObject.extension = extensions[0]; - uninstallEvent.fire(local.identifier); - assert.ok(!testObject.enabled); - }); + const extensions = await instantiationService.get(IExtensionsWorkbenchService).queryLocal(); + testObject.extension = extensions[0]; + uninstallEvent.fire(local.identifier); + assert.ok(!testObject.enabled); }); test('Test ReloadAction when extension is newly installed', async () => { - instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]); + const onDidChangeExtensionsEmitter: Emitter = new Emitter(); + const runningExtensions = [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]; + instantiationService.stub(IExtensionService, >{ + getExtensions: () => Promise.resolve(runningExtensions), + onDidChangeExtensions: onDidChangeExtensionsEmitter.event, + canAddExtension: (extension) => true + }); const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); const gallery = aGalleryExtension('a'); @@ -1103,15 +1105,32 @@ suite('ExtensionsActions Test', () => { testObject.extension = paged.firstPage[0]; assert.ok(!testObject.enabled); - return new Promise(c => { - testObject.onDidChange(() => { - if (testObject.enabled && testObject.tooltip === 'Please reload Visual Studio Code to enable this extension.') { - c(); - } - }); - installEvent.fire({ identifier: gallery.identifier, gallery }); - didInstallEvent.fire({ identifier: gallery.identifier, gallery, operation: InstallOperation.Install, local: aLocalExtension('a', gallery, gallery) }); + installEvent.fire({ identifier: gallery.identifier, gallery }); + didInstallEvent.fire({ identifier: gallery.identifier, gallery, operation: InstallOperation.Install, local: aLocalExtension('a', gallery, gallery) }); + assert.ok(testObject.enabled); + assert.equal(testObject.tooltip, 'Please reload Visual Studio Code to enable this extension.'); + }); + + test('Test ReloadAction when extension is newly installed and reload is not required', async () => { + const onDidChangeExtensionsEmitter: Emitter = new Emitter(); + const runningExtensions = [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]; + instantiationService.stub(IExtensionService, >{ + getExtensions: () => Promise.resolve(runningExtensions), + onDidChangeExtensions: onDidChangeExtensionsEmitter.event, + canAddExtension: (extension) => true }); + const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + const gallery = aGalleryExtension('a'); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(gallery)); + + const paged = await instantiationService.get(IExtensionsWorkbenchService).queryGallery(CancellationToken.None); + testObject.extension = paged.firstPage[0]; + assert.ok(!testObject.enabled); + + installEvent.fire({ identifier: gallery.identifier, gallery }); + didInstallEvent.fire({ identifier: gallery.identifier, gallery, operation: InstallOperation.Install, local: aLocalExtension('a', gallery, gallery) }); + assert.ok(!testObject.enabled); }); test('Test ReloadAction when extension is installed and uninstalled', () => { From 81f6b1c9458e5cd58b3c7f2e6dc292e501c9cb58 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sun, 21 Jul 2019 15:22:00 +0200 Subject: [PATCH 417/710] Use global storage for market place user if if machine id resource is not available --- .../common/extensionGalleryService.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts index fa54ffc156d..1eaa274f63f 100644 --- a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts @@ -22,6 +22,7 @@ import { URI } from 'vs/base/common/uri'; import { joinPath } from 'vs/base/common/resources'; import { VSBuffer } from 'vs/base/common/buffer'; import { IProductService } from 'vs/platform/product/common/product'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; interface IRawGalleryExtensionFile { assetType: string; @@ -338,11 +339,12 @@ export class ExtensionGalleryService implements IExtensionGalleryService { @ITelemetryService private readonly telemetryService: ITelemetryService, @IFileService private readonly fileService: IFileService, @IProductService private readonly productService: IProductService, + @IStorageService private readonly storageService: IStorageService, ) { const config = productService.extensionsGallery; this.extensionsGalleryUrl = config && config.serviceUrl; this.extensionsControlUrl = config && config.controlUrl; - this.commonHeadersPromise = resolveMarketplaceHeaders(productService.version, this.environmentService, this.fileService); + this.commonHeadersPromise = resolveMarketplaceHeaders(productService.version, this.environmentService, this.fileService, this.storageService); } private api(path = ''): string { @@ -775,7 +777,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService { } } -export async function resolveMarketplaceHeaders(version: string, environmentService: IEnvironmentService, fileService: IFileService): Promise<{ [key: string]: string; }> { +export async function resolveMarketplaceHeaders(version: string, environmentService: IEnvironmentService, fileService: IFileService, storageService?: IStorageService): Promise<{ [key: string]: string; }> { const headers: IHeaders = { 'X-Market-Client-Id': `VSCode ${version}`, 'User-Agent': `VSCode ${version}` @@ -798,8 +800,20 @@ export async function resolveMarketplaceHeaders(version: string, environmentServ //noop } } + } + + if (storageService) { + uuid = storageService.get('marketplace.userid', StorageScope.GLOBAL) || null; + if (!uuid) { + uuid = generateUuid(); + storageService.store('marketplace.userid', uuid, StorageScope.GLOBAL); + } + } + + if (uuid) { headers['X-Market-User-Id'] = uuid; } + return headers; } \ No newline at end of file From d8e26549fbf2b59e9c8f3a7afcdcd19ae138378d Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sun, 21 Jul 2019 18:09:21 +0200 Subject: [PATCH 418/710] extension actions tests --- .../extensions/browser/extensionsActions.ts | 2 +- .../browser/extensionsWorkbenchService.ts | 4 +- .../extensionsActions.test.ts | 142 +++++++++++++++++- 3 files changed, 145 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index c17e327fcb4..564d0eaf7bc 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -62,7 +62,7 @@ import { IProductService } from 'vs/platform/product/common/product'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs'; -function toExtensionDescription(local: ILocalExtension): IExtensionDescription { +export function toExtensionDescription(local: ILocalExtension): IExtensionDescription { return { identifier: new ExtensionIdentifier(local.identifier.id), isBuiltin: local.type === ExtensionType.System, diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index c0e396c38b4..3b2e95c43d9 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -406,7 +406,9 @@ class Extensions extends Disposable { const installingExtension = gallery ? this.installing.filter(e => areSameExtensions(e.identifier, gallery.identifier))[0] : null; this.installing = installingExtension ? this.installing.filter(e => e !== installingExtension) : this.installing; - let extension: Extension | undefined = installingExtension ? installingExtension : zipPath ? this.instantiationService.createInstance(Extension, this.stateProvider, this.server, local, undefined) : undefined; + let extension: Extension | undefined = installingExtension ? installingExtension + : (zipPath || local) ? this.instantiationService.createInstance(Extension, this.stateProvider, this.server, local, undefined) + : undefined; if (extension) { if (local) { const installed = this.installed.filter(e => areSameExtensions(e.identifier, extension!.identifier))[0]; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index 846f86b54be..f77e97db712 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -1094,7 +1094,7 @@ suite('ExtensionsActions Test', () => { instantiationService.stub(IExtensionService, >{ getExtensions: () => Promise.resolve(runningExtensions), onDidChangeExtensions: onDidChangeExtensionsEmitter.event, - canAddExtension: (extension) => true + canAddExtension: (extension) => false }); const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); @@ -1371,6 +1371,146 @@ suite('ExtensionsActions Test', () => { assert.ok(!testObject.enabled); }); + test('Test ReloadAction when extension is not installed but extension from different server is installed and running', async () => { + // multi server setup + const gallery = aGalleryExtension('a'); + const localExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file('pub.a') }); + const remoteExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file('pub.a').with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localExtension]), createExtensionManagementService([remoteExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + const onDidChangeExtensionsEmitter: Emitter = new Emitter(); + const runningExtensions = [ExtensionsActions.toExtensionDescription(remoteExtension)]; + instantiationService.stub(IExtensionService, >{ + getExtensions: () => Promise.resolve(runningExtensions), + onDidChangeExtensions: onDidChangeExtensionsEmitter.event, + canAddExtension: (extension) => false + }); + const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(gallery)); + + await workbenchService.queryGallery(CancellationToken.None); + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + + test('Test ReloadAction when extension is uninstalled but extension from different server is installed and running', async () => { + // multi server setup + const gallery = aGalleryExtension('a'); + const localExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file('pub.a') }); + const remoteExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file('pub.a').with({ scheme: Schemas.vscodeRemote }) }); + const localExtensionManagementService = createExtensionManagementService([localExtension]); + const uninstallEvent = new Emitter(); + const onDidUninstallEvent = new Emitter<{ identifier: IExtensionIdentifier }>(); + localExtensionManagementService.onUninstallExtension = uninstallEvent.event; + localExtensionManagementService.onDidUninstallExtension = onDidUninstallEvent.event; + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, localExtensionManagementService, createExtensionManagementService([remoteExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + const onDidChangeExtensionsEmitter: Emitter = new Emitter(); + const runningExtensions = [ExtensionsActions.toExtensionDescription(remoteExtension)]; + instantiationService.stub(IExtensionService, >{ + getExtensions: () => Promise.resolve(runningExtensions), + onDidChangeExtensions: onDidChangeExtensionsEmitter.event, + canAddExtension: (extension) => false + }); + const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(gallery)); + + await workbenchService.queryGallery(CancellationToken.None); + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + + uninstallEvent.fire(localExtension.identifier); + didUninstallEvent.fire({ identifier: localExtension.identifier }); + + assert.ok(!testObject.enabled); + }); + + test('Test ReloadAction when workspace extension is disabled on local server and installed in remote server', async () => { + // multi server setup + const gallery = aGalleryExtension('a'); + const remoteExtensionManagementService = createExtensionManagementService([]); + const onDidInstallEvent = new Emitter(); + remoteExtensionManagementService.onDidInstallExtension = onDidInstallEvent.event; + const localExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file('pub.a') }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localExtension]), remoteExtensionManagementService); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + const onDidChangeExtensionsEmitter: Emitter = new Emitter(); + instantiationService.stub(IExtensionService, >{ + getExtensions: () => Promise.resolve([]), + onDidChangeExtensions: onDidChangeExtensionsEmitter.event, + canAddExtension: (extension) => false + }); + const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(gallery)); + + await workbenchService.queryGallery(CancellationToken.None); + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + + const remoteExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file('pub.a').with({ scheme: Schemas.vscodeRemote }) }); + onDidInstallEvent.fire({ identifier: remoteExtension.identifier, local: remoteExtension, operation: InstallOperation.Install }); + + assert.ok(testObject.enabled); + assert.equal(testObject.tooltip, 'Please reload Visual Studio Code to enable this extension.'); + }); + + test('Test ReloadAction when ui extension is disabled on remote server and installed in local server', async () => { + // multi server setup + const gallery = aGalleryExtension('a'); + const localExtensionManagementService = createExtensionManagementService([]); + const onDidInstallEvent = new Emitter(); + localExtensionManagementService.onDidInstallExtension = onDidInstallEvent.event; + const remoteExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file('pub.a').with({ scheme: Schemas.vscodeRemote }) }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, localExtensionManagementService, createExtensionManagementService([remoteExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + const onDidChangeExtensionsEmitter: Emitter = new Emitter(); + instantiationService.stub(IExtensionService, >{ + getExtensions: () => Promise.resolve([]), + onDidChangeExtensions: onDidChangeExtensionsEmitter.event, + canAddExtension: (extension) => false + }); + const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(gallery)); + + await workbenchService.queryGallery(CancellationToken.None); + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + + const localExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file('pub.a') }); + onDidInstallEvent.fire({ identifier: localExtension.identifier, local: localExtension, operation: InstallOperation.Install }); + + assert.ok(testObject.enabled); + assert.equal(testObject.tooltip, 'Please reload Visual Studio Code to enable this extension.'); + }); + test('Test remote install action is enabled for local workspace extension', async () => { // multi server setup const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); From c06ae4f2deea24fdb3711f5c6d6ceb99acc2213a Mon Sep 17 00:00:00 2001 From: George Batalinski Date: Sun, 21 Jul 2019 18:28:22 -0400 Subject: [PATCH 419/710] aria(add-context) add additional text context - We use alert from aria base --- src/vs/editor/contrib/find/findWidget.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index d550316ec30..36090c4533f 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -31,6 +31,7 @@ import { contrastBorder, editorFindMatch, editorFindMatchBorder, editorFindMatch import { ITheme, IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { ContextScopedFindInput, ContextScopedHistoryInputBox } from 'vs/platform/browser/contextScopedHistoryWidget'; import { AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility'; +import { alert as alertFn } from 'vs/base/browser/ui/aria/aria'; export interface IFindController { replace(): void; @@ -372,15 +373,22 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas } else { label = NLS_NO_RESULTS; } - const myAlert = document.createElement('div'); - myAlert.appendChild(document.createTextNode(label)); - this._matchesCount.appendChild(myAlert); + this._matchesCount.appendChild(document.createTextNode(label)); + + alertFn(this._getAriaLabel(label, this._state.currentMatch, this._state.searchString), true); MAX_MATCHES_COUNT_WIDTH = Math.max(MAX_MATCHES_COUNT_WIDTH, this._matchesCount.clientWidth); } // ----- actions + private _getAriaLabel(label: string, currentMatch: Range | null, searchString: string): string { + if (label === NLS_NO_RESULTS) { + return nls.localize('ariaSearchNoResult', "{0} found for {1}", label, searchString); + } + return nls.localize('ariaSearchNoResultWithLineNum', "{0} found for {1} at {2}", label, searchString, (currentMatch ? currentMatch.startLineNumber + ':' + currentMatch.startColumn : '')); + } + /** * If 'selection find' is ON we should not disable the button (its function is to cancel 'selection find'). * If 'selection find' is OFF we enable the button only if there is a selection. @@ -810,7 +818,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._matchesCount = document.createElement('div'); this._matchesCount.className = 'matchesCount'; - this._matchesCount.setAttribute('aria-live', 'assertive'); this._updateMatchesCount(); From 5dd61b3b9c57d11ee67c8ddc6732f7876f5caa3f Mon Sep 17 00:00:00 2001 From: George Batalinski Date: Sun, 21 Jul 2019 18:32:32 -0400 Subject: [PATCH 420/710] clean up --- src/vs/editor/contrib/find/findWidget.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index 36090c4533f..76fe00b38bd 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -817,8 +817,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._matchesCount = document.createElement('div'); this._matchesCount.className = 'matchesCount'; - - this._updateMatchesCount(); // Previous button From 81ed55af79f01e9e64c3438558d2c2233e382a5a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 Jul 2019 08:42:55 +0200 Subject: [PATCH 421/710] update distro --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6c72aa10cfc..48600583dd8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "53215ea1e983c935e01e95875b9ee9ef65777c7d", + "distro": "dbf77e1135be7d403c9d344652fdfdb766e28517", "author": { "name": "Microsoft Corporation" }, @@ -158,4 +158,4 @@ "windows-mutex": "0.3.0", "windows-process-tree": "0.2.4" } -} +} \ No newline at end of file From b102db0d71ec1f6511dc4594aac46295fdc6328e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 16 Jul 2019 10:03:04 +0200 Subject: [PATCH 422/710] :lipstick: gridview tests --- .../test/browser/ui/grid/gridview.test.ts | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/vs/base/test/browser/ui/grid/gridview.test.ts b/src/vs/base/test/browser/ui/grid/gridview.test.ts index 76f4e4ac68c..20b7626b184 100644 --- a/src/vs/base/test/browser/ui/grid/gridview.test.ts +++ b/src/vs/base/test/browser/ui/grid/gridview.test.ts @@ -107,19 +107,19 @@ suite('Gridview', function () { test('simple layout', function () { gridview.layout(800, 600); - const view1 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view1 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view1, 200, [0]); assert.deepEqual(view1.size, [800, 600]); assert.deepEqual(gridview.getViewSize([0]), { width: 800, height: 600 }); - const view2 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view2 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view2, 200, [0]); assert.deepEqual(view1.size, [800, 400]); assert.deepEqual(gridview.getViewSize([1]), { width: 800, height: 400 }); assert.deepEqual(view2.size, [800, 200]); assert.deepEqual(gridview.getViewSize([0]), { width: 800, height: 200 }); - const view3 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view3 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view3, 200, [1, 1]); assert.deepEqual(view1.size, [600, 400]); assert.deepEqual(gridview.getViewSize([1, 0]), { width: 600, height: 400 }); @@ -128,7 +128,7 @@ suite('Gridview', function () { assert.deepEqual(view3.size, [200, 400]); assert.deepEqual(gridview.getViewSize([1, 1]), { width: 200, height: 400 }); - const view4 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view4 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view4, 200, [0, 0]); assert.deepEqual(view1.size, [600, 400]); assert.deepEqual(gridview.getViewSize([1, 0]), { width: 600, height: 400 }); @@ -139,7 +139,7 @@ suite('Gridview', function () { assert.deepEqual(view4.size, [200, 200]); assert.deepEqual(gridview.getViewSize([0, 0]), { width: 200, height: 200 }); - const view5 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view5 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view5, 100, [1, 0, 1]); assert.deepEqual(view1.size, [600, 300]); assert.deepEqual(gridview.getViewSize([1, 0, 0]), { width: 600, height: 300 }); @@ -156,30 +156,30 @@ suite('Gridview', function () { test('simple layout with automatic size distribution', function () { gridview.layout(800, 600); - const view1 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view1 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view1, Sizing.Distribute, [0]); assert.deepEqual(view1.size, [800, 600]); assert.deepEqual(gridview.getViewSize([0]), { width: 800, height: 600 }); - const view2 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view2 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view2, Sizing.Distribute, [0]); assert.deepEqual(view1.size, [800, 300]); assert.deepEqual(view2.size, [800, 300]); - const view3 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view3 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view3, Sizing.Distribute, [1, 1]); assert.deepEqual(view1.size, [400, 300]); assert.deepEqual(view2.size, [800, 300]); assert.deepEqual(view3.size, [400, 300]); - const view4 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view4 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view4, Sizing.Distribute, [0, 0]); assert.deepEqual(view1.size, [400, 300]); assert.deepEqual(view2.size, [400, 300]); assert.deepEqual(view3.size, [400, 300]); assert.deepEqual(view4.size, [400, 300]); - const view5 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view5 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view5, Sizing.Distribute, [1, 0, 1]); assert.deepEqual(view1.size, [400, 150]); assert.deepEqual(view2.size, [400, 300]); @@ -190,13 +190,13 @@ suite('Gridview', function () { test('addviews before layout call 1', function () { - const view1 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view1 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view1, 200, [0]); - const view2 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view2 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view2, 200, [0]); - const view3 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view3 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view3, 200, [1, 1]); gridview.layout(800, 600); @@ -207,14 +207,13 @@ suite('Gridview', function () { }); test('addviews before layout call 2', function () { - - const view1 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view1 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view1, 200, [0]); - const view2 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view2 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view2, 200, [0]); - const view3 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const view3 = new TestView(50, Number.POSITIVE_INFINITY, 50, Number.POSITIVE_INFINITY); gridview.addView(view3, 200, [0, 0]); gridview.layout(800, 600); From 3ac7c39c5d80ec1235a68ad7dba9bcdec0f9e4f9 Mon Sep 17 00:00:00 2001 From: SteVen Batten <6561887+sbatten@users.noreply.github.com> Date: Mon, 22 Jul 2019 01:03:37 -0700 Subject: [PATCH 423/710] attempt at serializing grid (#77733) * attempt at serializing grid * use before shutdown event * init some layout state for grid --- src/vs/workbench/browser/layout.ts | 107 +++++++++++++++++++---------- 1 file changed, 70 insertions(+), 37 deletions(-) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 1b23d3a42e3..861efcc10d6 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -27,14 +27,13 @@ import { IWindowService, MenuBarVisibility, getTitleBarStyle } from 'vs/platform import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; -import { Sizing, Direction, Grid } from 'vs/base/browser/ui/grid/grid'; +import { Sizing, Direction, Grid, SerializableGrid, ISerializableView, ISerializedGrid } from 'vs/base/browser/ui/grid/grid'; import { WorkbenchLegacyLayout } from 'vs/workbench/browser/legacyLayout'; import { IDimension } from 'vs/platform/layout/browser/layoutService'; import { Part } from 'vs/workbench/browser/part'; import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar'; import { IActivityBarService } from 'vs/workbench/services/activityBar/browser/activityBarService'; import { IFileService } from 'vs/platform/files/common/files'; -import { IView } from 'vs/base/browser/ui/grid/gridview'; enum Settings { MENUBAR_VISIBLE = 'window.menuBarVisibility', @@ -57,6 +56,8 @@ enum Storage { ZEN_MODE_ENABLED = 'workbench.zenmode.active', CENTERED_LAYOUT_ENABLED = 'workbench.centerededitorlayout.active', + + GRID_LAYOUT = 'workbench.grid.layout' } export abstract class Layout extends Disposable implements IWorkbenchLayoutService { @@ -89,16 +90,16 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi private parts: Map = new Map(); - private workbenchGrid: Grid | WorkbenchLegacyLayout; + private workbenchGrid: SerializableGrid | WorkbenchLegacyLayout; private disposed: boolean; - private titleBarPartView: IView; - private activityBarPartView: IView; - private sideBarPartView: IView; - private panelPartView: IView; - private editorPartView: IView; - private statusBarPartView: IView; + private titleBarPartView: ISerializableView; + private activityBarPartView: ISerializableView; + private sideBarPartView: ISerializableView; + private panelPartView: ISerializableView; + private editorPartView: ISerializableView; + private statusBarPartView: ISerializableView; private environmentService: IWorkbenchEnvironmentService; private configurationService: IConfigurationService; @@ -144,8 +145,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi hidden: false, sizeBeforeMaximize: 0, position: Position.BOTTOM, - height: 350, - width: 350, panelToRestore: undefined as string | undefined }, @@ -706,7 +705,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi if (this.configurationService.getValue('workbench.useExperimentalGridLayout')) { - // Create view wrappers for all parts + // View references for all parts this.titleBarPartView = titleBar; this.sideBarPartView = sideBar; this.activityBarPartView = activityBar; @@ -714,7 +713,53 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi this.panelPartView = panelPart; this.statusBarPartView = statusBar; - this.workbenchGrid = new Grid(this.editorPartView, { proportionalLayout: false }); + const savedGrid = this.storageService.get(Storage.GRID_LAYOUT, StorageScope.GLOBAL, undefined); + if (savedGrid) { + const parsedGrid: ISerializedGrid = JSON.parse(savedGrid); + this.workbenchGrid = SerializableGrid.deserialize(parsedGrid, { + fromJSON: (serializedPart: { type: Parts } | null) => { + if (serializedPart && serializedPart.type) { + switch (serializedPart.type) { + case Parts.ACTIVITYBAR_PART: + return this.activityBarPartView; + case Parts.TITLEBAR_PART: + return this.titleBarPartView; + case Parts.EDITOR_PART: + return this.editorPartView; + case Parts.PANEL_PART: + return this.panelPartView; + case Parts.SIDEBAR_PART: + return this.sideBarPartView; + case Parts.STATUSBAR_PART: + return this.statusBarPartView; + default: + return this.editorPartView; + } + } else { + return this.editorPartView; + } + } + }, + { proportionalLayout: false }); + + + // Set some layout state + this.state.sideBar.position = Position.LEFT; + for (let view of this.workbenchGrid.getNeighborViews(this.sideBarPartView, Direction.Right)) { + if (view === this.activityBarPartView) { + this.state.sideBar.position = Position.RIGHT; + } + } + + this.state.panel.position = Position.BOTTOM; + for (let view of this.workbenchGrid.getNeighborViews(this.panelPartView, Direction.Left)) { + if (view === this.editorPartView) { + this.state.panel.position = Position.RIGHT; + } + } + } else { + this.workbenchGrid = new SerializableGrid(this.editorPartView, { proportionalLayout: false }); + } this.container.prepend(this.workbenchGrid.element); @@ -725,6 +770,17 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi this._register((this.panelPartView as PanelPart).onDidVisibilityChange((visible) => { this.setPanelHidden(!visible, true); })); + + this._register(this.lifecycleService.onBeforeShutdown(beforeShutdownEvent => { + beforeShutdownEvent.veto(new Promise((resolve) => { + const grid = this.workbenchGrid as SerializableGrid; + const serializedGrid = grid.serialize(); + + this.storageService.store(Storage.GRID_LAYOUT, JSON.stringify(serializedGrid), StorageScope.GLOBAL); + + resolve(); + })); + })); } else { this.workbenchGrid = instantiationService.createInstance( WorkbenchLegacyLayout, @@ -797,7 +853,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi } if (!panelInGrid) { - this.workbenchGrid.addView(this.panelPartView, this.getPanelDimension(this.state.panel.position) !== undefined ? this.getPanelDimension(this.state.panel.position) : Sizing.Split, this.editorPartView, this.state.panel.position === Position.BOTTOM ? Direction.Down : Direction.Right); + this.workbenchGrid.addView(this.panelPartView, Sizing.Split, this.editorPartView, this.state.panel.position === Position.BOTTOM ? Direction.Down : Direction.Right); panelInGrid = true; } @@ -852,10 +908,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi } } - private getPanelDimension(position: Position): number { - return position === Position.BOTTOM ? this.state.panel.height : this.state.panel.width; - } - isEditorLayoutCentered(): boolean { return this.state.editor.centered; } @@ -1148,12 +1200,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi setPanelPosition(position: Position): void { const panelPart = this.getPart(Parts.PANEL_PART); - const wasHidden = this.state.panel.hidden; if (this.state.panel.hidden) { this.setPanelHidden(false, true /* Skip Layout */); - } else { - this.savePanelDimension(); } const newPositionValue = (position === Position.BOTTOM) ? 'bottom' : 'right'; @@ -1179,10 +1228,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi // Layout if (this.workbenchGrid instanceof Grid) { - if (!wasHidden) { - this.savePanelDimension(); - } - this.workbenchGrid.removeView(this.panelPartView); this.layout(); } else { @@ -1192,18 +1237,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi this._onPanelPositionChange.fire(positionToString(this.state.panel.position)); } - private savePanelDimension(): void { - if (!(this.workbenchGrid instanceof Grid)) { - return; - } - - if (this.state.panel.position === Position.BOTTOM) { - this.state.panel.height = this.workbenchGrid.getViewSize(this.panelPartView).height; - } else { - this.state.panel.width = this.workbenchGrid.getViewSize(this.panelPartView).width; - } - } - dispose(): void { super.dispose(); From d782b76a8e94fa709a17d2e53d7dd05bbdc489cc Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 22 Jul 2019 10:07:11 +0200 Subject: [PATCH 424/710] [json] fix compile script --- extensions/json-language-features/server/.npmignore | 5 ++++- extensions/json-language-features/server/package.json | 7 +++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/extensions/json-language-features/server/.npmignore b/extensions/json-language-features/server/.npmignore index a6661ddb7fc..3032fe8b26f 100644 --- a/extensions/json-language-features/server/.npmignore +++ b/extensions/json-language-features/server/.npmignore @@ -4,4 +4,7 @@ out/**/*.js.map src/ test/ tsconfig.json -.gitignore \ No newline at end of file +.gitignore +yarn.lock +extension.webpack.config.js +vscode-json-languageserver-*.tgz \ No newline at end of file diff --git a/extensions/json-language-features/server/package.json b/extensions/json-language-features/server/package.json index c07dca1e441..c9da1a4af53 100644 --- a/extensions/json-language-features/server/package.json +++ b/extensions/json-language-features/server/package.json @@ -24,10 +24,9 @@ "@types/node": "^10.14.8" }, "scripts": { - "prepublishOnly": "npm run clean && npm run test", - "preversion": "npm test", - "compile": "gulp compile-extension:json-language-features-server", - "watch": "gulp watch-extension:json-language-features-server", + "prepublishOnly": "npm run clean && npm run compile", + "compile": "npx gulp compile-extension:json-language-features-server", + "watch": "npx gulp watch-extension:json-language-features-server", "clean": "../../../node_modules/.bin/rimraf out", "install-service-next": "yarn add vscode-json-languageservice@next", "install-service-local": "yarn link vscode-json-languageservice", From 877704976a1e447c3fd22f4e1825827fe492c677 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 22 Jul 2019 10:07:53 +0200 Subject: [PATCH 425/710] JSON Language Server 1.2.1 --- extensions/json-language-features/server/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/json-language-features/server/package.json b/extensions/json-language-features/server/package.json index c9da1a4af53..061cb69249a 100644 --- a/extensions/json-language-features/server/package.json +++ b/extensions/json-language-features/server/package.json @@ -1,7 +1,7 @@ { "name": "vscode-json-languageserver", "description": "JSON language server", - "version": "1.2.0", + "version": "1.2.1", "author": "Microsoft Corporation", "license": "MIT", "engines": { From e636f74ce94ac25ae95f52669214089061d9e8fe Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 Jul 2019 10:28:34 +0200 Subject: [PATCH 426/710] splitview: fix bad snap behavior --- src/vs/base/browser/ui/splitview/splitview.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 78f46feb865..b7a6cc4f018 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -830,18 +830,26 @@ export class SplitView extends Disposable { private findFirstSnapIndex(indexes: number[]): number | undefined { // visible views first for (const index of indexes) { - if (!this.viewItems[index].visible) { + const viewItem = this.viewItems[index]; + + if (!viewItem.visible) { continue; } - if (this.viewItems[index].snap) { + if (viewItem.snap) { return index; } } // then, hidden views for (const index of indexes) { - if (!this.viewItems[index].visible && this.viewItems[index].snap) { + const viewItem = this.viewItems[index]; + + if (viewItem.visible && viewItem.maximumSize - viewItem.minimumSize > 0) { + return undefined; + } + + if (!viewItem.visible && viewItem.snap) { return index; } } From 533b186863a8c2ae14e8b1dffaf681cc8007c72f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 22 Jul 2019 10:35:43 +0200 Subject: [PATCH 427/710] Fixes #51794: Render content widgets even when the anchor position is horizontally scrolled outside the viewport --- .../browser/viewParts/contentWidgets/contentWidgets.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts index ac0621d64fb..c275168cca7 100644 --- a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts +++ b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts @@ -324,11 +324,6 @@ class Widget { const aboveLeft0 = topLeft.left - ctx.scrollLeft; const belowLeft0 = bottomLeft.left - ctx.scrollLeft; - if (aboveLeft0 < 0 || aboveLeft0 > this._contentWidth) { - // Don't render if position is scrolled outside viewport - return null; - } - let aboveTop = topLeft.top - height; let belowTop = bottomLeft.top + this._lineHeight; let aboveLeft = aboveLeft0 + this._contentLeft; From 3bb0132ab39d4e29d29f7670fdb7b715652dbd6b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 Jul 2019 10:57:52 +0200 Subject: [PATCH 428/710] fix resize priorities in grid view --- src/vs/base/browser/ui/grid/gridview.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/vs/base/browser/ui/grid/gridview.ts b/src/vs/base/browser/ui/grid/gridview.ts index bb1d17a1687..8ce22799e56 100644 --- a/src/vs/base/browser/ui/grid/gridview.ts +++ b/src/vs/base/browser/ui/grid/gridview.ts @@ -102,6 +102,22 @@ class BranchNode implements ISplitView, IDisposable { return Math.min(...this.children.map(c => c.maximumOrthogonalSize)); } + get priority(): LayoutPriority { + if (this.children.length === 0) { + return LayoutPriority.Normal; + } + + const priorities = this.children.map(c => typeof c.priority === 'undefined' ? LayoutPriority.Normal : c.priority); + + if (priorities.some(p => p === LayoutPriority.High)) { + return LayoutPriority.High; + } else if (priorities.some(p => p === LayoutPriority.Low)) { + return LayoutPriority.Low; + } + + return LayoutPriority.Normal; + } + get minimumOrthogonalSize(): number { return this.splitview.minimumSize; } From 8827cf5a607b6ab7abf45817604bc21883314db7 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Mon, 22 Jul 2019 11:10:34 +0200 Subject: [PATCH 429/710] don't warn about missing chrome debugger on WSL; fixes microsoft/vscode-chrome-debug#892 --- extensions/debug-server-ready/src/extension.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/debug-server-ready/src/extension.ts b/extensions/debug-server-ready/src/extension.ts index d6e122f9624..64c4ccffea6 100644 --- a/extensions/debug-server-ready/src/extension.ts +++ b/extensions/debug-server-ready/src/extension.ts @@ -137,8 +137,7 @@ class ServerReadyDetector extends vscode.Disposable { break; case 'debugWithChrome': - const chrome = vscode.extensions.getExtension('msjsdiag.debugger-for-chrome'); - if (chrome) { + if (vscode.env.remoteName === 'wsl' || !!vscode.extensions.getExtension('msjsdiag.debugger-for-chrome')) { vscode.debug.startDebugging(session.workspaceFolder, { type: 'chrome', name: 'Chrome Debug', From 460077d280d6b9d747a846c62af1ebc012444ccd Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 22 Jul 2019 11:40:40 +0200 Subject: [PATCH 430/710] Revert 100cc5850adff366dd44d3a71c6ebc6d0cd3c2a0 --- .../contrib/feedback/electron-browser/feedback.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/feedback/electron-browser/feedback.ts b/src/vs/workbench/contrib/feedback/electron-browser/feedback.ts index 864c312dd46..7c2403d200c 100644 --- a/src/vs/workbench/contrib/feedback/electron-browser/feedback.ts +++ b/src/vs/workbench/contrib/feedback/electron-browser/feedback.ts @@ -310,6 +310,12 @@ export class FeedbackDropdown extends Dropdown { }; } + private updateFeedbackDescription() { + if (this.feedbackDescriptionInput && this.feedbackDescriptionInput.textLength > this.maxFeedbackCharacters) { + this.feedbackDescriptionInput.value = this.feedbackDescriptionInput.value.substring(0, this.maxFeedbackCharacters); + } + } + private getCharCountText(charCount: number): string { const remaining = this.maxFeedbackCharacters - charCount; const text = (remaining === 1) @@ -349,11 +355,7 @@ export class FeedbackDropdown extends Dropdown { this.sentiment = smile ? 1 : 0; this.maxFeedbackCharacters = this.feedbackDelegate.getCharacterLimit(this.sentiment); - - if (this.feedbackDescriptionInput && this.feedbackDescriptionInput.value.length > this.maxFeedbackCharacters) { - this.feedbackDescriptionInput.value = this.feedbackDescriptionInput.value.substring(0, this.maxFeedbackCharacters); - } - + this.updateFeedbackDescription(); this.updateCharCountText(); if (this.feedbackDescriptionInput) { this.feedbackDescriptionInput.maxLength = this.maxFeedbackCharacters; From c5ab082ed7de081cdcbb32b8d2be3f2601e3d1e9 Mon Sep 17 00:00:00 2001 From: Neonit Date: Mon, 22 Jul 2019 11:49:04 +0200 Subject: [PATCH 431/710] Adjust Code Tab Size to 4 in Markdown Preview Sets the tab size to 4 in the Markdown preview for code blocks in Markdown documents. I consider a tab size of 4 being standard and the default of 8 being unbearable. The few people, if any, using a different tab size than 4 can use the custom markdown preview style feature, if it is going to be fixed anytime (https://github.com/microsoft/vscode/issues/77290). [`tab-size` is still marked *experimental* in the MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size), but it doesn't hurt, if not supported. However, in the used Chromium version it is supported. --- extensions/markdown-language-features/media/markdown.css | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/markdown-language-features/media/markdown.css b/extensions/markdown-language-features/media/markdown.css index dc12cfca001..273dc40f917 100644 --- a/extensions/markdown-language-features/media/markdown.css +++ b/extensions/markdown-language-features/media/markdown.css @@ -186,6 +186,7 @@ pre.hljs code > div { pre code { color: var(--vscode-editor-foreground); + tab-size: 4; } From fc993456448684039ce9516ea41a8b54a61646a0 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 Jul 2019 12:04:43 +0200 Subject: [PATCH 432/710] Revert "Avoid re-implementing Disposable" This reverts commit 27a628bcac80e07c7e56fda29944fadb98e20ba4. --- .../decorations/browser/decorationsService.ts | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/services/decorations/browser/decorationsService.ts b/src/vs/workbench/services/decorations/browser/decorationsService.ts index 1a4e587636a..b183a2629d8 100644 --- a/src/vs/workbench/services/decorations/browser/decorationsService.ts +++ b/src/vs/workbench/services/decorations/browser/decorationsService.ts @@ -7,7 +7,7 @@ import { URI } from 'vs/base/common/uri'; import { Event, Emitter } from 'vs/base/common/event'; import { IDecorationsService, IDecoration, IResourceDecorationChangeEvent, IDecorationsProvider, IDecorationData } from './decorations'; import { TernarySearchTree } from 'vs/base/common/map'; -import { Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { Disposable, IDisposable, toDisposable, dispose } from 'vs/base/common/lifecycle'; import { isThenable } from 'vs/base/common/async'; import { LinkedList } from 'vs/base/common/linkedList'; import { createStyleSheet, createCSSRule, removeCSSRulesContainingSelector } from 'vs/base/browser/dom'; @@ -334,14 +334,15 @@ class DecorationProviderWrapper { } } -export class FileDecorationsService extends Disposable implements IDecorationsService { +export class FileDecorationsService implements IDecorationsService { _serviceBrand: any; private readonly _data = new LinkedList(); - private readonly _onDidChangeDecorationsDelayed = this._register(new Emitter()); - private readonly _onDidChangeDecorations = this._register(new Emitter()); + private readonly _onDidChangeDecorationsDelayed = new Emitter(); + private readonly _onDidChangeDecorations = new Emitter(); private readonly _decorationStyles: DecorationStyles; + private readonly _disposables: IDisposable[]; readonly onDidChangeDecorations: Event = Event.any( this._onDidChangeDecorations.event, @@ -355,17 +356,27 @@ export class FileDecorationsService extends Disposable implements IDecorationsSe constructor( @IThemeService themeService: IThemeService ) { - super(); - this._decorationStyles = this._register(new DecorationStyles(themeService)); + this._decorationStyles = new DecorationStyles(themeService); // every so many events we check if there are // css styles that we don't need anymore let count = 0; - this._register(this.onDidChangeDecorations(() => { + let reg = this.onDidChangeDecorations(() => { if (++count % 17 === 0) { this._decorationStyles.cleanUp(this._data.iterator()); } - })); + }); + + this._disposables = [ + reg, + this._decorationStyles + ]; + } + + dispose(): void { + dispose(this._disposables); + dispose(this._onDidChangeDecorations); + dispose(this._onDidChangeDecorationsDelayed); } registerDecorationsProvider(provider: IDecorationsProvider): IDisposable { From 5643a68d4611e2ebb5552d0aa41e99acabbfd222 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 22 Jul 2019 12:30:42 +0200 Subject: [PATCH 433/710] Fixes #72880: Allow word wrapping the Default Settings JSON file --- .../contrib/codeEditor/browser/toggleWordWrap.ts | 11 ++++++++++- .../contrib/preferences/browser/preferencesEditor.ts | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts b/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts index d2a7bd7f4c0..2daa66f371c 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts @@ -18,6 +18,7 @@ import { MenuId, MenuRegistry } from 'vs/platform/actions/common/actions'; import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { INotificationService } from 'vs/platform/notification/common/notification'; +import { DefaultSettingsEditorContribution } from 'vs/workbench/contrib/preferences/browser/preferencesEditor'; const transientWordWrapState = 'transientWordWrapState'; const isWordWrapMinifiedKey = 'isWordWrapMinified'; @@ -131,6 +132,10 @@ class ToggleWordWrapAction extends EditorAction { } public run(accessor: ServicesAccessor, editor: ICodeEditor): void { + if (editor.getContribution(DefaultSettingsEditorContribution.ID)) { + // in the settings editor... + return; + } if (!editor.hasModel()) { return; } @@ -201,6 +206,10 @@ class ToggleWordWrapController extends Disposable implements IEditorContribution })); const ensureWordWrapSettings = () => { + if (this.editor.getContribution(DefaultSettingsEditorContribution.ID)) { + // in the settings editor... + return; + } // Ensure correct word wrap settings const newModel = this.editor.getModel(); if (!newModel) { @@ -267,7 +276,7 @@ function canToggleWordWrap(uri: URI): boolean { if (!uri) { return false; } - return (uri.scheme !== 'output' && uri.scheme !== 'vscode'); + return (uri.scheme !== 'output'); } diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts b/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts index 8d87975990c..3c332421281 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts @@ -1154,7 +1154,7 @@ abstract class AbstractSettingsEditorContribution extends Disposable implements abstract getId(): string; } -class DefaultSettingsEditorContribution extends AbstractSettingsEditorContribution implements ISettingsEditorContribution { +export class DefaultSettingsEditorContribution extends AbstractSettingsEditorContribution implements ISettingsEditorContribution { static readonly ID: string = 'editor.contrib.defaultsettings'; From d1d506d46e92dc8772e8cf68915621fdf09e8f16 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 Jul 2019 12:31:41 +0200 Subject: [PATCH 434/710] Fix #77520 --- .../extensions/browser/extensionEditor.ts | 4 +- .../extensions/browser/extensionsActions.ts | 60 ++++++++++++++----- .../extensions/browser/extensionsList.ts | 10 ++-- .../extensions/browser/extensionsWidgets.ts | 24 ++------ 4 files changed, 57 insertions(+), 41 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index 5456cb5f4a7..e2c7032f0f6 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -28,7 +28,7 @@ import { IExtensionsWorkbenchService, IExtensionsViewlet, VIEWLET_ID, IExtension import { RatingsWidget, InstallCountWidget, RemoteBadgeWidget } from 'vs/workbench/contrib/extensions/browser/extensionsWidgets'; import { EditorOptions } from 'vs/workbench/common/editor'; import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; -import { CombinedInstallAction, UpdateAction, ExtensionEditorDropDownAction, ReloadAction, MaliciousStatusLabelAction, IgnoreExtensionRecommendationAction, UndoIgnoreExtensionRecommendationAction, EnableDropDownAction, DisableDropDownAction, StatusLabelAction, SetFileIconThemeAction, SetColorThemeAction, RemoteInstallAction, DisabledLabelAction, SystemDisabledWarningAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; +import { CombinedInstallAction, UpdateAction, ExtensionEditorDropDownAction, ReloadAction, MaliciousStatusLabelAction, IgnoreExtensionRecommendationAction, UndoIgnoreExtensionRecommendationAction, EnableDropDownAction, DisableDropDownAction, StatusLabelAction, SetFileIconThemeAction, SetColorThemeAction, RemoteInstallAction, ExtensionToolTipAction, SystemDisabledWarningAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { IOpenerService } from 'vs/platform/opener/common/opener'; @@ -376,7 +376,7 @@ export class ExtensionEditor extends BaseEditor { this.instantiationService.createInstance(LocalInstallAction), combinedInstallAction, systemDisabledWarningAction, - this.instantiationService.createInstance(DisabledLabelAction, systemDisabledWarningAction), + this.instantiationService.createInstance(ExtensionToolTipAction, systemDisabledWarningAction, reloadAction), this.instantiationService.createInstance(MaliciousStatusLabelAction, true), ]; const extensionContainers: ExtensionContainers = this.instantiationService.createInstance(ExtensionContainers, [...actions, ...widgets]); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 564d0eaf7bc..9ff2539cdb6 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -2512,7 +2512,7 @@ export class MaliciousStatusLabelAction extends ExtensionAction { } } -export class DisabledLabelAction extends ExtensionAction { +export class ExtensionToolTipAction extends ExtensionAction { private static readonly Class = 'disable-status'; @@ -2521,10 +2521,12 @@ export class DisabledLabelAction extends ExtensionAction { constructor( private readonly warningAction: SystemDisabledWarningAction, + private readonly reloadAction: ReloadAction, @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, @IExtensionService private readonly extensionService: IExtensionService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService ) { - super('extensions.disabledLabel', warningAction.tooltip, `${DisabledLabelAction.Class} hide`, false); + super('extensions.tooltip', warningAction.tooltip, `${ExtensionToolTipAction.Class} hide`, false); this._register(warningAction.onDidChange(() => this.update(), this)); this._register(this.extensionService.onDidChangeExtensions(this.updateRunningExtensions, this)); this.updateRunningExtensions(); @@ -2535,25 +2537,51 @@ export class DisabledLabelAction extends ExtensionAction { } update(): void { - this.class = `${DisabledLabelAction.Class} hide`; - this.label = ''; + this.label = this.getTooltip(); + this.class = ExtensionToolTipAction.Class; + if (!this.label) { + this.class = `${ExtensionToolTipAction.Class} hide`; + } + } + + private getTooltip(): string { + if (!this.extension) { + return ''; + } + if (this.reloadAction.enabled) { + return this.reloadAction.tooltip; + } if (this.warningAction.tooltip) { - this.class = DisabledLabelAction.Class; - this.label = this.warningAction.tooltip; - return; + return this.warningAction.tooltip; } - if (this.extension && this.extension.local && isLanguagePackExtension(this.extension.local.manifest)) { - return; - } - if (this.extension && this.extension.local && this._runningExtensions) { + if (this.extension && this.extension.local && this.extension.state === ExtensionState.Installed && this._runningExtensions) { + const isRunning = this._runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier)); const isEnabled = this.extensionEnablementService.isEnabled(this.extension.local); - const isExtensionRunning = this._runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier)); - if (!isExtensionRunning && !isEnabled && this.extensionEnablementService.canChangeEnablement(this.extension.local)) { - this.class = DisabledLabelAction.Class; - this.label = localize('disabled by user', "This extension is disabled by the user."); - return; + + if (isEnabled && isRunning) { + if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { + if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer) { + return localize('extension enabled on remote', "Extension is enabled on '{0}'", this.extension.server.label); + } + } + if (this.extension.enablementState === EnablementState.EnabledGlobally) { + return localize('globally enabled', "This extension is enabled globally."); + } + if (this.extension.enablementState === EnablementState.EnabledWorkspace) { + return localize('workspace enabled', "This extension is enabled for this workspace by the user."); + } + } + + if (!isEnabled && !isRunning) { + if (this.extension.enablementState === EnablementState.DisabledGlobally) { + return localize('globally disabled', "This extension is disabled globally by the user."); + } + if (this.extension.enablementState === EnablementState.DisabledWorkspace) { + return localize('workspace disabled', "This extension is disabled for this workspace by the user."); + } } } + return ''; } run(): Promise { diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsList.ts b/src/vs/workbench/contrib/extensions/browser/extensionsList.ts index cbb9f190f03..3d9bf40bf98 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsList.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsList.ts @@ -13,7 +13,7 @@ import { IPagedRenderer } from 'vs/base/browser/ui/list/listPaging'; import { Event } from 'vs/base/common/event'; import { domEvent } from 'vs/base/browser/event'; import { IExtension, ExtensionContainers, ExtensionState, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions'; -import { InstallAction, UpdateAction, ManageExtensionAction, ReloadAction, MaliciousStatusLabelAction, ExtensionActionViewItem, StatusLabelAction, RemoteInstallAction, SystemDisabledWarningAction, DisabledLabelAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; +import { InstallAction, UpdateAction, ManageExtensionAction, ReloadAction, MaliciousStatusLabelAction, ExtensionActionViewItem, StatusLabelAction, RemoteInstallAction, SystemDisabledWarningAction, ExtensionToolTipAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { Label, RatingsWidget, InstallCountWidget, RecommendationWidget, RemoteBadgeWidget, TooltipWidget } from 'vs/workbench/contrib/extensions/browser/extensionsWidgets'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; @@ -102,8 +102,8 @@ export class Renderer implements IPagedRenderer { systemDisabledWarningAction, this.instantiationService.createInstance(ManageExtensionAction) ]; - const disabledLabelAction = this.instantiationService.createInstance(DisabledLabelAction, systemDisabledWarningAction); - const tooltipWidget = this.instantiationService.createInstance(TooltipWidget, root, disabledLabelAction, recommendationWidget, reloadAction); + const extensionTooltipAction = this.instantiationService.createInstance(ExtensionToolTipAction, systemDisabledWarningAction, reloadAction); + const tooltipWidget = this.instantiationService.createInstance(TooltipWidget, root, extensionTooltipAction, recommendationWidget); const widgets = [ recommendationWidget, iconRemoteBadgeWidget, @@ -113,10 +113,10 @@ export class Renderer implements IPagedRenderer { this.instantiationService.createInstance(InstallCountWidget, installCount, true), this.instantiationService.createInstance(RatingsWidget, ratings, true) ]; - const extensionContainers: ExtensionContainers = this.instantiationService.createInstance(ExtensionContainers, [...actions, ...widgets, disabledLabelAction]); + const extensionContainers: ExtensionContainers = this.instantiationService.createInstance(ExtensionContainers, [...actions, ...widgets, extensionTooltipAction]); actionbar.push(actions, actionOptions); - const disposables = combinedDisposable(...actions, ...widgets, actionbar, extensionContainers, disabledLabelAction); + const disposables = combinedDisposable(...actions, ...widgets, actionbar, extensionContainers, extensionTooltipAction); return { root, element, icon, name, installCount, ratings, author, description, disposables: [disposables], actionbar, diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts index fd3ec77d79d..e27cc72e7d1 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts @@ -5,13 +5,13 @@ import 'vs/css!./media/extensionsWidgets'; import { Disposable, toDisposable, DisposableStore, MutableDisposable } from 'vs/base/common/lifecycle'; -import { IExtension, IExtensionsWorkbenchService, IExtensionContainer, ExtensionState } from '../common/extensions'; +import { IExtension, IExtensionsWorkbenchService, IExtensionContainer } from 'vs/workbench/contrib/extensions/common/extensions'; import { append, $, addClass } from 'vs/base/browser/dom'; import * as platform from 'vs/base/common/platform'; import { localize } from 'vs/nls'; import { IExtensionTipsService, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ILabelService } from 'vs/platform/label/common/label'; -import { extensionButtonProminentBackground, extensionButtonProminentForeground, DisabledLabelAction, ReloadAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; +import { extensionButtonProminentBackground, extensionButtonProminentForeground, ExtensionToolTipAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { EXTENSION_BADGE_REMOTE_BACKGROUND, EXTENSION_BADGE_REMOTE_FOREGROUND } from 'vs/workbench/common/theme'; import { Emitter, Event } from 'vs/base/common/event'; @@ -145,16 +145,13 @@ export class TooltipWidget extends ExtensionWidget { constructor( private readonly parent: HTMLElement, - private readonly disabledLabelAction: DisabledLabelAction, + private readonly tooltipAction: ExtensionToolTipAction, private readonly recommendationWidget: RecommendationWidget, - private readonly reloadAction: ReloadAction, - @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, @ILabelService private readonly labelService: ILabelService ) { super(); this._register(Event.any( - this.disabledLabelAction.onDidChange, - this.reloadAction.onDidChange, + this.tooltipAction.onDidChange, this.recommendationWidget.onDidChangeTooltip, this.labelService.onDidChangeFormatters )(() => this.render())); @@ -173,17 +170,8 @@ export class TooltipWidget extends ExtensionWidget { if (!this.extension) { return ''; } - if (this.reloadAction.enabled) { - return this.reloadAction.tooltip; - } - if (this.disabledLabelAction.label) { - return this.disabledLabelAction.label; - } - if (this.extension.local && this.extension.state === ExtensionState.Installed) { - if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer) { - return localize('extension enabled on remote', "Extension is enabled on '{0}'", this.extension.server.label); - } - return localize('extension enabled locally', "Extension is enabled locally."); + if (this.tooltipAction.tooltip) { + return this.tooltipAction.tooltip; } return this.recommendationWidget.tooltip; } From 89f5c6075fa103457d14cdb0b7c3ee26b2c30afc Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 22 Jul 2019 12:53:29 +0200 Subject: [PATCH 435/710] Fixes #26276: Do not warn overwriting extensions with extensions being developed --- .../extensions/electron-browser/cachedExtensionScanner.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts index 737395b0d42..10fd66cbdc9 100644 --- a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts +++ b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts @@ -101,10 +101,6 @@ export class CachedExtensionScanner { development.forEach(developedExtension => { log.info('', nls.localize('extensionUnderDevelopment', "Loading development extension at {0}", developedExtension.extensionLocation.fsPath)); const extensionKey = ExtensionIdentifier.toKey(developedExtension.identifier); - const extension = result.get(extensionKey); - if (extension) { - log.warn(developedExtension.extensionLocation.fsPath, nls.localize('overwritingExtension', "Overwriting extension {0} with {1}.", extension.extensionLocation.fsPath, developedExtension.extensionLocation.fsPath)); - } result.set(extensionKey, developedExtension); }); let r: IExtensionDescription[] = []; From 3718b5c46d3b3bc229eef642e2a1a74647b02056 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Mon, 22 Jul 2019 13:07:03 +0200 Subject: [PATCH 436/710] make ExtensionHostDebugChannelClient disposable --- src/vs/platform/debug/common/extensionHostDebugIpc.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/debug/common/extensionHostDebugIpc.ts b/src/vs/platform/debug/common/extensionHostDebugIpc.ts index af7f1e526b8..1304d5cd669 100644 --- a/src/vs/platform/debug/common/extensionHostDebugIpc.ts +++ b/src/vs/platform/debug/common/extensionHostDebugIpc.ts @@ -7,6 +7,7 @@ import { IServerChannel, IChannel } from 'vs/base/parts/ipc/common/ipc'; import { IReloadSessionEvent, ICloseSessionEvent, IAttachSessionEvent, ILogToSessionEvent, ITerminateSessionEvent, IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug'; import { Event, Emitter } from 'vs/base/common/event'; import { IRemoteConsoleLog } from 'vs/base/common/console'; +import { Disposable } from 'vs/base/common/lifecycle'; export class ExtensionHostDebugBroadcastChannel implements IServerChannel { @@ -51,11 +52,13 @@ export class ExtensionHostDebugBroadcastChannel implements IServerChan } } -export class ExtensionHostDebugChannelClient implements IExtensionHostDebugService { +export class ExtensionHostDebugChannelClient extends Disposable implements IExtensionHostDebugService { _serviceBrand: any; - constructor(private channel: IChannel) { } + constructor(private channel: IChannel) { + super(); + } reload(sessionId: string): void { this.channel.call('reload', [sessionId]); From 4deeb958f21d592024fd043a3d4cb2bf37b0caa0 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Mon, 22 Jul 2019 13:09:39 +0200 Subject: [PATCH 437/710] support "restart" EH debugging --- .../workbench/browser/web.simpleservices.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index c8b3f6ef782..d450e7da4f3 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -30,7 +30,7 @@ import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/co import { pathsToEditors } from 'vs/workbench/common/editor'; import { IFileService } from 'vs/platform/files/common/files'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { ParsedArgs } from 'vs/platform/environment/common/environment'; +import { ParsedArgs, IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IProcessEnvironment } from 'vs/base/common/platform'; import { toStoreData, restoreRecentlyOpened } from 'vs/platform/history/common/historyStorage'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; @@ -564,7 +564,9 @@ registerSingleton(IWindowService, SimpleWindowService); export class SimpleExtensionHostDebugService extends ExtensionHostDebugChannelClient { constructor( - @IRemoteAgentService remoteAgentService: IRemoteAgentService + @IRemoteAgentService remoteAgentService: IRemoteAgentService, + //@IWindowService windowService: IWindowService, + @IEnvironmentService environmentService: IEnvironmentService ) { const connection = remoteAgentService.getConnection(); @@ -573,6 +575,19 @@ export class SimpleExtensionHostDebugService extends ExtensionHostDebugChannelCl } super(connection.getChannel(ExtensionHostDebugBroadcastChannel.ChannelName)); + + this._register(this.onReload(event => { + if (environmentService.isExtensionDevelopment && environmentService.debugExtensionHost.debugId === event.sessionId) { + //windowService.reloadWindow(); + window.location.reload(); + } + })); + this._register(this.onClose(event => { + if (environmentService.isExtensionDevelopment && environmentService.debugExtensionHost.debugId === event.sessionId) { + //this._windowService.closeWindow(); + window.close(); + } + })); } } registerSingleton(IExtensionHostDebugService, SimpleExtensionHostDebugService); From ce7f99fa960286b42dc6823045f10c044edbb16f Mon Sep 17 00:00:00 2001 From: Angelo Date: Mon, 22 Jul 2019 13:34:55 +0200 Subject: [PATCH 438/710] [XML] Use the same HTML language configuration for XML This PR is a copy/paste of the HTML language configuration to have for instance autoClosingPairs for Comments and adds autoClosingPairs for CDATA. --- .../xml/xml.language-configuration.json | 47 ++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/extensions/xml/xml.language-configuration.json b/extensions/xml/xml.language-configuration.json index faaa59c1cd3..702b6dc6eb7 100644 --- a/extensions/xml/xml.language-configuration.json +++ b/extensions/xml/xml.language-configuration.json @@ -1,31 +1,34 @@ { "comments": { - "lineComment": "", - "blockComment": [""] + "blockComment": [ "" ] }, "brackets": [ - ["<", ">"] + [""], + ["<", ">"], + ["{", "}"], + ["(", ")"] ], "autoClosingPairs": [ - ["<", ">"], - ["'", "'"], - ["\"", "\""] + { "open": "{", "close": "}"}, + { "open": "[", "close": "]"}, + { "open": "(", "close": ")" }, + { "open": "'", "close": "'" }, + { "open": "\"", "close": "\"" }, + { "open": "", "notIn": [ "comment", "string" ]}, + { "open": "", "close": "", "notIn": [ "comment", "string" ]} ], "surroundingPairs": [ - ["<", ">"], - ["'", "'"], - ["\"", "\""] - ] - - // enhancedBrackets: [{ - // tokenType: 'tag.tag-$1.xml', - // openTrigger: '>', - // open: /<(\w[\w\d]*)([^\/>]*(?!\/)>)[^<>]*$/i, - // closeComplete: '', - // closeTrigger: '>', - // close: /<\/(\w[\w\d]*)\s*>$/i - // }], - - // autoClosingPairs: [['\'', '\''], ['"', '"'] ] - + { "open": "'", "close": "'" }, + { "open": "\"", "close": "\"" }, + { "open": "{", "close": "}"}, + { "open": "[", "close": "]"}, + { "open": "(", "close": ")" }, + { "open": "<", "close": ">" } + ], + "folding": { + "markers": { + "start": "^\\s*", + "end": "^\\s*" + } + } } From 18a1030852c9903b848a3f27b3753c369f7d0d63 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 Jul 2019 14:52:28 +0200 Subject: [PATCH 439/710] Revert "update style.textContent instead of calling insertRule, #75061" This reverts commit 5565ddd88c6350f90e1031be4ce0d6089ac73a57. --- src/vs/base/browser/dom.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index ce34cfd69de..7e9580db4d8 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -806,7 +806,8 @@ export function createCSSRule(selector: string, cssText: string, style: HTMLStyl if (!style || !cssText) { return; } - style.textContent = `${selector}{${cssText}}\n${style.textContent}`; + + (style.sheet).insertRule(selector + '{' + cssText + '}', 0); } export function removeCSSRulesContainingSelector(ruleName: string, style: HTMLStyleElement = getSharedStyleSheet()): void { From 02a191b62554fcabb23fcb3c80a89ac1fed9a41f Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 Jul 2019 15:29:19 +0200 Subject: [PATCH 440/710] grid: catch bad deserialization --- src/vs/workbench/browser/layout.ts | 86 ++++++++++++++++-------------- 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 861efcc10d6..c2e011c5370 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -713,55 +713,63 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi this.panelPartView = panelPart; this.statusBarPartView = statusBar; + let workbenchGrid: SerializableGrid | undefined; + const savedGrid = this.storageService.get(Storage.GRID_LAYOUT, StorageScope.GLOBAL, undefined); if (savedGrid) { const parsedGrid: ISerializedGrid = JSON.parse(savedGrid); - this.workbenchGrid = SerializableGrid.deserialize(parsedGrid, { - fromJSON: (serializedPart: { type: Parts } | null) => { - if (serializedPart && serializedPart.type) { - switch (serializedPart.type) { - case Parts.ACTIVITYBAR_PART: - return this.activityBarPartView; - case Parts.TITLEBAR_PART: - return this.titleBarPartView; - case Parts.EDITOR_PART: - return this.editorPartView; - case Parts.PANEL_PART: - return this.panelPartView; - case Parts.SIDEBAR_PART: - return this.sideBarPartView; - case Parts.STATUSBAR_PART: - return this.statusBarPartView; - default: - return this.editorPartView; - } - } else { - return this.editorPartView; + + const fromJSON = (serializedPart: { type: Parts } | null) => { + if (serializedPart && serializedPart.type) { + switch (serializedPart.type) { + case Parts.ACTIVITYBAR_PART: + return this.activityBarPartView; + case Parts.TITLEBAR_PART: + return this.titleBarPartView; + case Parts.EDITOR_PART: + return this.editorPartView; + case Parts.PANEL_PART: + return this.panelPartView; + case Parts.SIDEBAR_PART: + return this.sideBarPartView; + case Parts.STATUSBAR_PART: + return this.statusBarPartView; + default: + return this.editorPartView; + } + } else { + return this.editorPartView; + } + }; + + try { + workbenchGrid = SerializableGrid.deserialize(parsedGrid, { fromJSON }, { proportionalLayout: false }); + + // Set some layout state + this.state.sideBar.position = Position.LEFT; + for (let view of workbenchGrid.getNeighborViews(this.sideBarPartView, Direction.Right)) { + if (view === this.activityBarPartView) { + this.state.sideBar.position = Position.RIGHT; } } - }, - { proportionalLayout: false }); - - // Set some layout state - this.state.sideBar.position = Position.LEFT; - for (let view of this.workbenchGrid.getNeighborViews(this.sideBarPartView, Direction.Right)) { - if (view === this.activityBarPartView) { - this.state.sideBar.position = Position.RIGHT; + this.state.panel.position = Position.BOTTOM; + for (let view of workbenchGrid.getNeighborViews(this.panelPartView, Direction.Left)) { + if (view === this.editorPartView) { + this.state.panel.position = Position.RIGHT; + } } + } catch (err) { + console.error(err); } - - this.state.panel.position = Position.BOTTOM; - for (let view of this.workbenchGrid.getNeighborViews(this.panelPartView, Direction.Left)) { - if (view === this.editorPartView) { - this.state.panel.position = Position.RIGHT; - } - } - } else { - this.workbenchGrid = new SerializableGrid(this.editorPartView, { proportionalLayout: false }); } - this.container.prepend(this.workbenchGrid.element); + if (!workbenchGrid) { + workbenchGrid = new SerializableGrid(this.editorPartView, { proportionalLayout: false }); + } + + this.container.prepend(workbenchGrid.element); + this.workbenchGrid = workbenchGrid; this._register((this.sideBarPartView as SidebarPart).onDidVisibilityChange((visible) => { this.setSideBarHidden(!visible, true); From 048d15f4d50e469beb3ec8dddf84dad81b9d4882 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 Jul 2019 16:12:55 +0200 Subject: [PATCH 441/710] splitview: fix layout priority on resizeView --- src/vs/base/browser/ui/splitview/splitview.ts | 70 ++++++++----------- .../browser/ui/splitview/splitview.test.ts | 14 ++-- 2 files changed, 36 insertions(+), 48 deletions(-) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index b7a6cc4f018..7599cc6808d 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -325,13 +325,13 @@ export class SplitView extends Disposable { container.appendChild(view.element); - let highPriorityIndex: number | undefined; + let highPriorityIndexes: number[] | undefined; if (typeof size !== 'number' && size.type === 'split') { - highPriorityIndex = size.index; + highPriorityIndexes = [size.index]; } - this.relayout(index, highPriorityIndex); + this.relayout([index], highPriorityIndexes); this.state = State.Idle; if (typeof size !== 'number' && size.type === 'distribute') { @@ -420,17 +420,6 @@ export class SplitView extends Disposable { this.layoutViews(); } - private relayout(lowPriorityIndex?: number, highPriorityIndex?: number): void { - const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); - const lowPriorityIndexes = typeof lowPriorityIndex === 'number' ? [lowPriorityIndex] : undefined; - const highPriorityIndexes = typeof highPriorityIndex === 'number' ? [highPriorityIndex] : undefined; - - this.resize(this.viewItems.length - 1, this.size - contentSize, undefined, lowPriorityIndexes, highPriorityIndexes); - this.distributeEmptySpace(); - this.layoutViews(); - this.saveProportions(); - } - layout(size: number): void { const previousSize = Math.max(this.size, this.contentSize); this.size = size; @@ -582,7 +571,7 @@ export class SplitView extends Disposable { this.layoutViews(); } else { item.size = size; - this.relayout(index, undefined); + this.relayout([index], undefined); } } @@ -597,42 +586,32 @@ export class SplitView extends Disposable { return; } + const indexes = range(this.viewItems.length).filter(i => i !== index); + const lowPriorityIndexes = [...indexes.filter(i => this.viewItems[i].priority === LayoutPriority.Low), index]; + const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === LayoutPriority.High); + const item = this.viewItems[index]; size = Math.round(size); - size = clamp(size, item.minimumSize, item.maximumSize); - let delta = size - item.size; + size = clamp(size, item.minimumSize, Math.min(item.maximumSize, this.size)); - if (delta !== 0 && index < this.viewItems.length - 1) { - const downIndexes = range(index + 1, this.viewItems.length); - const collapseDown = downIndexes.reduce((r, i) => r + (this.viewItems[i].size - this.viewItems[i].minimumSize), 0); - const expandDown = downIndexes.reduce((r, i) => r + (this.viewItems[i].maximumSize - this.viewItems[i].size), 0); - const deltaDown = clamp(delta, -expandDown, collapseDown); - - this.resize(index, deltaDown); - delta -= deltaDown; - } - - if (delta !== 0 && index > 0) { - const upIndexes = range(index - 1, -1); - const collapseUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].size - this.viewItems[i].minimumSize), 0); - const expandUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].maximumSize - this.viewItems[i].size), 0); - const deltaUp = clamp(-delta, -collapseUp, expandUp); - - this.resize(index - 1, deltaUp); - } - - this.distributeEmptySpace(); - this.layoutViews(); - this.saveProportions(); + item.size = size; + this.relayout(lowPriorityIndexes, highPriorityIndexes); this.state = State.Idle; } distributeViewSizes(): void { const size = Math.floor(this.size / this.viewItems.length); - for (let i = 0; i < this.viewItems.length - 1; i++) { - this.resizeView(i, size); + for (let i = 0; i < this.viewItems.length; i++) { + const item = this.viewItems[i]; + item.size = clamp(size, item.minimumSize, item.maximumSize); } + + const indexes = range(this.viewItems.length); + const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === LayoutPriority.Low); + const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === LayoutPriority.High); + + this.relayout(lowPriorityIndexes, highPriorityIndexes); } getViewSize(index: number): number { @@ -643,6 +622,15 @@ export class SplitView extends Disposable { return this.viewItems[index].size; } + private relayout(lowPriorityIndexes?: number[], highPriorityIndexes?: number[]): void { + const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); + + this.resize(this.viewItems.length - 1, this.size - contentSize, undefined, lowPriorityIndexes, highPriorityIndexes); + this.distributeEmptySpace(); + this.layoutViews(); + this.saveProportions(); + } + private resize( index: number, delta: number, diff --git a/src/vs/base/test/browser/ui/splitview/splitview.test.ts b/src/vs/base/test/browser/ui/splitview/splitview.test.ts index 00c698c79cb..504e665f21a 100644 --- a/src/vs/base/test/browser/ui/splitview/splitview.test.ts +++ b/src/vs/base/test/browser/ui/splitview/splitview.test.ts @@ -196,8 +196,8 @@ suite('Splitview', () => { splitview.resizeView(0, 70); assert.equal(view1.size, 70, 'view1 is collapsed'); - assert.equal(view2.size, 110, 'view2 is expanded'); - assert.equal(view3.size, 20, 'view3 stays the same'); + assert.equal(view2.size, 40, 'view2 stays the same'); + assert.equal(view3.size, 90, 'view3 is stretched'); splitview.resizeView(2, 40); @@ -474,10 +474,10 @@ suite('Splitview', () => { splitview.addView(view1, Sizing.Distribute); splitview.addView(view2, Sizing.Distribute); splitview.addView(view3, Sizing.Distribute); - assert.deepEqual([view1.size, view2.size, view3.size], [66, 66, 68]); + assert.deepEqual([view1.size, view2.size, view3.size], [66, 68, 66]); splitview.layout(180); - assert.deepEqual([view1.size, view2.size, view3.size], [66, 46, 68]); + assert.deepEqual([view1.size, view2.size, view3.size], [66, 48, 66]); splitview.layout(124); assert.deepEqual([view1.size, view2.size, view3.size], [66, 20, 38]); @@ -504,13 +504,13 @@ suite('Splitview', () => { splitview.addView(view1, Sizing.Distribute); splitview.addView(view2, Sizing.Distribute); splitview.addView(view3, Sizing.Distribute); - assert.deepEqual([view1.size, view2.size, view3.size], [66, 66, 68]); + assert.deepEqual([view1.size, view2.size, view3.size], [66, 68, 66]); splitview.layout(180); - assert.deepEqual([view1.size, view2.size, view3.size], [66, 46, 68]); + assert.deepEqual([view1.size, view2.size, view3.size], [66, 48, 66]); splitview.layout(132); - assert.deepEqual([view1.size, view2.size, view3.size], [44, 20, 68]); + assert.deepEqual([view1.size, view2.size, view3.size], [46, 20, 66]); splitview.layout(60); assert.deepEqual([view1.size, view2.size, view3.size], [20, 20, 20]); From 170beba5db9d87d58ce52ae5fd8d60076f301c7a Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Mon, 22 Jul 2019 07:33:49 -0700 Subject: [PATCH 442/710] Move resolve shell launch config above fork the process --- src/vs/workbench/api/node/extHostTerminalService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 55942c11733..3b9eef355e1 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -321,6 +321,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { const terminal = new ExtHostTerminal(this._proxy, name); terminal.create(shellPath, shellArgs); this._terminals.push(terminal); + return terminal; } @@ -612,12 +613,12 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { baseEnv ); + this._proxy.$sendResolvedLaunchConfig(id, shellLaunchConfig); // Fork the process and listen for messages this._logService.debug(`Terminal process launching on ext host`, shellLaunchConfig, initialCwd, cols, rows, env); // TODO: Support conpty on remote, it doesn't seem to work for some reason? // TODO: When conpty is enabled, only enable it when accessibilityMode is off const enableConpty = false; //terminalConfig.get('windowsEnableConpty') as boolean; - this._proxy.$sendResolvedLaunchConfig(id, shellLaunchConfig); this._setupExtHostProcessListeners(id, new TerminalProcess(shellLaunchConfig, initialCwd, cols, rows, env, enableConpty, this._logService)); } From e9dd4687435751144ca5c6139882f07dc3218ef3 Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Mon, 22 Jul 2019 09:45:49 -0500 Subject: [PATCH 443/710] Add proposed DiagnosticTag.Deprecated enum member --- src/vs/vscode.proposed.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 5bca4d0d507..6a31141bb94 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1274,4 +1274,18 @@ declare module 'vscode' { } //#endregion + + //#region Deprecated support + + export enum DiagnosticTag { + /** + * Deprecated or obsolete code + * + * Can be used to style with strikeout or other "obsolete" styling. See: + * https://github.com/microsoft/vscode/issues/50972 + */ + Deprecated = 2, + } + + //#endregion } From 33765aa444b89365cace216e595a82e71570959d Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 8 Jan 2019 15:24:07 +0100 Subject: [PATCH 444/710] wip: compressed trees --- .../ui/tree/compressedObjectTreeModel.ts | 88 +++++++++++++++++++ .../ui/tree/compressedObjectTreeModel.test.ts | 77 ++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts create mode 100644 src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts new file mode 100644 index 00000000000..3bd0bcf113a --- /dev/null +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { ISpliceable } from 'vs/base/common/sequence'; +import { Iterator, ISequence } from 'vs/base/common/iterator'; +import { Event } from 'vs/base/common/event'; +import { ITreeModel, ITreeNode, ITreeElement, ICollapseStateChangeEvent } from 'vs/base/browser/ui/tree/tree'; +import { IObjectTreeModelOptions, ObjectTreeModel } from 'vs/base/browser/ui/tree/objectTreeModel'; + +export interface ICompressedObjectTreeModelOptions extends IObjectTreeModelOptions { } + +export class CompressedObjectTreeModel, TFilterData extends NonNullable = void> implements ITreeModel { + + readonly rootRef = null; + + private model: ObjectTreeModel; + + get onDidChangeCollapseState(): Event> { + throw new Error('not implemented'); + } + + get onDidChangeRenderNodeCount(): Event> { + throw new Error('not implemented'); + } + + get size(): number { + throw new Error('not implemented'); + } + + constructor(list: ISpliceable>, options: ICompressedObjectTreeModelOptions = {}) { + this.model = new ObjectTreeModel(list, options); + } + + setChildren( + element: T | null, + children: ISequence> | undefined, + onDidCreateNode?: (node: ITreeNode) => void, + onDidDeleteNode?: (node: ITreeNode) => void + ): Iterator> { + throw new Error('not implemented'); + } + + getParentElement(ref: T | null = null): T | null { + throw new Error('not implemented'); + } + + getFirstElementChild(ref: T | null = null): T | null | undefined { + throw new Error('not implemented'); + } + + getLastElementAncestor(ref: T | null = null): T | null | undefined { + throw new Error('not implemented'); + } + + getListIndex(element: T): number { + throw new Error('not implemented'); + } + + isCollapsible(element: T): boolean { + throw new Error('not implemented'); + } + + isCollapsed(element: T): boolean { + throw new Error('not implemented'); + } + + setCollapsed(element: T, collapsed?: boolean, recursive?: boolean): boolean { + throw new Error('not implemented'); + } + + getNode(element: T | null = null): ITreeNode { + throw new Error('not implemented'); + } + + getNodeLocation(node: ITreeNode): T { + throw new Error('not implemented'); + } + + getParentNodeLocation(element: T): T | null { + throw new Error('not implemented'); + } + + refilter(): void { + this.model.refilter(); + } +} diff --git a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts new file mode 100644 index 00000000000..eec0bc26dac --- /dev/null +++ b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts @@ -0,0 +1,77 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; +import { ITreeNode } from 'vs/base/browser/ui/tree/tree'; +import { ISpliceable } from 'vs/base/common/sequence'; +import { CompressedObjectTreeModel } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; +import { Iterator } from 'vs/base/common/iterator'; + +function toSpliceable(arr: T[]): ISpliceable { + return { + splice(start: number, deleteCount: number, elements: T[]): void { + arr.splice(start, deleteCount, ...elements); + } + }; +} + +function toArray(list: ITreeNode[]): T[] { + return list.map(i => i.element); +} + +suite('CompressedObjectTreeModel', function () { + + test('ctor', () => { + const list: ITreeNode[] = []; + const model = new CompressedObjectTreeModel(toSpliceable(list)); + + assert.deepEqual(toArray(list), []); + assert.equal(model.size, 0); + }); + + test('no compression', () => { + const list: ITreeNode[] = []; + const model = new CompressedObjectTreeModel(toSpliceable(list)); + + model.setChildren(null, [ + { element: 'a' }, + { element: 'b' }, + { element: 'c' } + ]); + + assert.deepEqual(toArray(list), [['a'], ['b'], ['c']]); + assert.equal(model.size, 3); + + model.setChildren(null, Iterator.empty()); + assert.deepEqual(toArray(list), []); + assert.equal(model.size, 0); + }); + + test('simple compression', () => { + const list: ITreeNode[] = []; + const model = new CompressedObjectTreeModel(toSpliceable(list)); + + model.setChildren(null, [ + { + element: 'foo', children: [ + { + element: 'bar', children: [ + { element: 'hello' } + ] + } + ] + }, + { element: 'b' }, + { element: 'c' } + ]); + + assert.deepEqual(toArray(list), [['foo', 'bar', 'hello'], ['b'], ['c']]); + assert.equal(model.size, 3); + + model.setChildren(null, Iterator.empty()); + assert.deepEqual(toArray(list), []); + assert.equal(model.size, 0); + }); +}); \ No newline at end of file From 90e98c173afab8a79ce5a2989d9baefb3924a8f6 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 8 Jan 2019 16:51:36 +0100 Subject: [PATCH 445/710] compressionMap first steps --- .../ui/tree/compressedObjectTreeModel.ts | 44 ++++++++++++++----- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index 3bd0bcf113a..dc02ae35392 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -8,14 +8,18 @@ import { Iterator, ISequence } from 'vs/base/common/iterator'; import { Event } from 'vs/base/common/event'; import { ITreeModel, ITreeNode, ITreeElement, ICollapseStateChangeEvent } from 'vs/base/browser/ui/tree/tree'; import { IObjectTreeModelOptions, ObjectTreeModel } from 'vs/base/browser/ui/tree/objectTreeModel'; +import { isUndefinedOrNull } from 'vs/base/common/types'; export interface ICompressedObjectTreeModelOptions extends IObjectTreeModelOptions { } export class CompressedObjectTreeModel, TFilterData extends NonNullable = void> implements ITreeModel { - readonly rootRef = null; - private model: ObjectTreeModel; + private compressionMap: Map = new Map(); + + get rootRef(): any { + return this.model.rootRef; + } get onDidChangeCollapseState(): Event> { throw new Error('not implemented'); @@ -43,31 +47,46 @@ export class CompressedObjectTreeModel, TFilterData e } getParentElement(ref: T | null = null): T | null { - throw new Error('not implemented'); + const parentElements = this.model.getParentElement(this.compressionMap.get(ref)); + if (isUndefinedOrNull(parentElements)) { + return parentElements; + } + + return parentElements[parentElements.length - 1]; } getFirstElementChild(ref: T | null = null): T | null | undefined { - throw new Error('not implemented'); + const childElements = this.model.getFirstElementChild(this.compressionMap.get(ref)); + if (isUndefinedOrNull(childElements)) { + return childElements; + } + + return childElements[childElements.length - 1]; } getLastElementAncestor(ref: T | null = null): T | null | undefined { - throw new Error('not implemented'); + const ancestors = this.model.getLastElementAncestor(this.compressionMap.get(ref)); + if (isUndefinedOrNull(ancestors)) { + return ancestors; + } + + return ancestors[ancestors.length - 1]; } getListIndex(element: T): number { - throw new Error('not implemented'); + return this.model.getListIndex(this.compressionMap.get(element)); } isCollapsible(element: T): boolean { - throw new Error('not implemented'); + return this.model.isCollapsible(this.compressionMap.get(element)); } isCollapsed(element: T): boolean { - throw new Error('not implemented'); + return this.model.isCollapsed(this.compressionMap.get(element)); } setCollapsed(element: T, collapsed?: boolean, recursive?: boolean): boolean { - throw new Error('not implemented'); + return this.model.setCollapsed(this.compressionMap.get(element), collapsed, recursive); } getNode(element: T | null = null): ITreeNode { @@ -79,7 +98,12 @@ export class CompressedObjectTreeModel, TFilterData e } getParentNodeLocation(element: T): T | null { - throw new Error('not implemented'); + const parentNodes = this.model.getParentNodeLocation(this.compressionMap.get(element)); + if (isUndefinedOrNull(parentNodes)) { + return parentNodes; + } + + return parentNodes[parentNodes.length - 1]; } refilter(): void { From bf42158e898e7bb490a7c4cae565a6aa2f0b0e9f Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 9 Jan 2019 16:19:48 +0100 Subject: [PATCH 446/710] compressSequence and decompressSequence --- .../ui/tree/compressedObjectTreeModel.ts | 109 +++++++++++++++++- 1 file changed, 106 insertions(+), 3 deletions(-) diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index dc02ae35392..bfe1b9c109f 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { ISpliceable } from 'vs/base/common/sequence'; -import { Iterator, ISequence } from 'vs/base/common/iterator'; +import { Iterator, ISequence, getSequenceIterator, IteratorResult } from 'vs/base/common/iterator'; import { Event } from 'vs/base/common/event'; import { ITreeModel, ITreeNode, ITreeElement, ICollapseStateChangeEvent } from 'vs/base/browser/ui/tree/tree'; import { IObjectTreeModelOptions, ObjectTreeModel } from 'vs/base/browser/ui/tree/objectTreeModel'; @@ -15,7 +15,7 @@ export interface ICompressedObjectTreeModelOptions extends IObje export class CompressedObjectTreeModel, TFilterData extends NonNullable = void> implements ITreeModel { private model: ObjectTreeModel; - private compressionMap: Map = new Map(); + private compressionMap = new Map(); get rootRef(): any { return this.model.rootRef; @@ -43,7 +43,110 @@ export class CompressedObjectTreeModel, TFilterData e onDidCreateNode?: (node: ITreeNode) => void, onDidDeleteNode?: (node: ITreeNode) => void ): Iterator> { - throw new Error('not implemented'); + const compressedChildren = this.compressSequence(children); + // todo@ connect element with children and update compressed map + + const deleted = this.model.setChildren(this.compressionMap.get(element), compressedChildren, undefined, undefined); + return this.decompressSequence(deleted); + } + + private compressSequence(sequence: ISequence>): ISequence> { + const iterator = getSequenceIterator(sequence); + const compressedModel = this; + + return { + next() { + const element = iterator.next(); + if (element.done) { + return element; + } + + const compressed = [element.value.element]; + compressedModel.compressionMap.set(element.value.element, compressed); + + let childIterator: Iterator>; + let first: IteratorResult>; + let second: IteratorResult>; + let child = element.value; + let last: ITreeElement; + + while (true) { + childIterator = getSequenceIterator(child.children); + first = childIterator.next(); + second = undefined; + if (!first.done) { + second = childIterator.next(); + } + last = child; + child = second && second.done && first.value.collapsible ? first.value : undefined; + + if (!child) { + break; + } + compressed.push(child.element); + compressedModel.compressionMap.set(child.element, compressed); + } + + let nextCalled = 0; + return { + done: false, + value: { + element: compressed, + children: compressedModel.compressSequence({ + next() { + if (nextCalled > 1) { + return childIterator.next(); + } else { + nextCalled++; + if (nextCalled === 1) { + return first; + } + return second; + } + } + }), + collapsed: last.collapsed, + collapsible: last.collapsible + } + }; + } + }; + } + + private decompressSequence(sequence: ISequence>): Iterator> { + const iterator = getSequenceIterator(sequence); + const compressedModel = this; + let currentArray: ITreeElement; + let index: number; + + return { + next(): IteratorResult> { + if (!currentArray) { + const element = iterator.next(); + if (element.done) { + return element; + } + currentArray = element.value; + index = currentArray.element.length - 1; + } + + const result: IteratorResult> = { + done: false, + value: { + element: currentArray[index], + children: compressedModel.decompressSequence(currentArray.children), // todo returning same children for all the elements + collapsed: currentArray.collapsed, + collapsible: currentArray.collapsible + } + }; + + if (--index === 0) { + currentArray = undefined; + } + + return result; + } + }; } getParentElement(ref: T | null = null): T | null { From cb7618dbed41f2b13d373750e14c55ee6487b17b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 Jul 2019 16:57:20 +0200 Subject: [PATCH 447/710] wip --- .../ui/tree/compressedObjectTreeModel.ts | 234 +++++------------- .../base/browser/ui/tree/objectTreeModel.ts | 6 +- .../ui/tree/compressedObjectTreeModel.test.ts | 69 +++--- 3 files changed, 100 insertions(+), 209 deletions(-) diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index bfe1b9c109f..676240c42d1 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -4,34 +4,36 @@ *--------------------------------------------------------------------------------------------*/ import { ISpliceable } from 'vs/base/common/sequence'; -import { Iterator, ISequence, getSequenceIterator, IteratorResult } from 'vs/base/common/iterator'; -import { Event } from 'vs/base/common/event'; -import { ITreeModel, ITreeNode, ITreeElement, ICollapseStateChangeEvent } from 'vs/base/browser/ui/tree/tree'; +import { Iterator, ISequence } from 'vs/base/common/iterator'; +import { Event, Emitter } from 'vs/base/common/event'; +import { ITreeModel, ITreeNode, ITreeElement, ICollapseStateChangeEvent, ITreeModelSpliceEvent } from 'vs/base/browser/ui/tree/tree'; import { IObjectTreeModelOptions, ObjectTreeModel } from 'vs/base/browser/ui/tree/objectTreeModel'; -import { isUndefinedOrNull } from 'vs/base/common/types'; + +export function compress(iterator: Iterator>): Iterator> { + throw new Error('todo'); +} + +export function decompress(sequence: Iterator>): Iterator> { + throw new Error('todo'); +} export interface ICompressedObjectTreeModelOptions extends IObjectTreeModelOptions { } export class CompressedObjectTreeModel, TFilterData extends NonNullable = void> implements ITreeModel { + readonly rootRef = null; + + private _onDidSplice = new Emitter>(); + readonly onDidSplice: Event> = this._onDidSplice.event; + + private _onDidChangeCollapseState = new Emitter>(); + readonly onDidChangeCollapseState: Event> = this._onDidChangeCollapseState.event; + + private _onDidChangeRenderNodeCount = new Emitter>(); + readonly onDidChangeRenderNodeCount: Event> = this._onDidChangeRenderNodeCount.event; + private model: ObjectTreeModel; - private compressionMap = new Map(); - - get rootRef(): any { - return this.model.rootRef; - } - - get onDidChangeCollapseState(): Event> { - throw new Error('not implemented'); - } - - get onDidChangeRenderNodeCount(): Event> { - throw new Error('not implemented'); - } - - get size(): number { - throw new Error('not implemented'); - } + private map = new Map(); constructor(list: ISpliceable>, options: ICompressedObjectTreeModelOptions = {}) { this.model = new ObjectTreeModel(list, options); @@ -39,174 +41,72 @@ export class CompressedObjectTreeModel, TFilterData e setChildren( element: T | null, - children: ISequence> | undefined, - onDidCreateNode?: (node: ITreeNode) => void, - onDidDeleteNode?: (node: ITreeNode) => void + children: ISequence> | undefined ): Iterator> { - const compressedChildren = this.compressSequence(children); - // todo@ connect element with children and update compressed map - - const deleted = this.model.setChildren(this.compressionMap.get(element), compressedChildren, undefined, undefined); - return this.decompressSequence(deleted); - } - - private compressSequence(sequence: ISequence>): ISequence> { - const iterator = getSequenceIterator(sequence); - const compressedModel = this; - - return { - next() { - const element = iterator.next(); - if (element.done) { - return element; - } - - const compressed = [element.value.element]; - compressedModel.compressionMap.set(element.value.element, compressed); - - let childIterator: Iterator>; - let first: IteratorResult>; - let second: IteratorResult>; - let child = element.value; - let last: ITreeElement; - - while (true) { - childIterator = getSequenceIterator(child.children); - first = childIterator.next(); - second = undefined; - if (!first.done) { - second = childIterator.next(); - } - last = child; - child = second && second.done && first.value.collapsible ? first.value : undefined; - - if (!child) { - break; - } - compressed.push(child.element); - compressedModel.compressionMap.set(child.element, compressed); - } - - let nextCalled = 0; - return { - done: false, - value: { - element: compressed, - children: compressedModel.compressSequence({ - next() { - if (nextCalled > 1) { - return childIterator.next(); - } else { - nextCalled++; - if (nextCalled === 1) { - return first; - } - return second; - } - } - }), - collapsed: last.collapsed, - collapsible: last.collapsible - } - }; - } - }; - } - - private decompressSequence(sequence: ISequence>): Iterator> { - const iterator = getSequenceIterator(sequence); - const compressedModel = this; - let currentArray: ITreeElement; - let index: number; - - return { - next(): IteratorResult> { - if (!currentArray) { - const element = iterator.next(); - if (element.done) { - return element; - } - currentArray = element.value; - index = currentArray.element.length - 1; - } - - const result: IteratorResult> = { - done: false, - value: { - element: currentArray[index], - children: compressedModel.decompressSequence(currentArray.children), // todo returning same children for all the elements - collapsed: currentArray.collapsed, - collapsible: currentArray.collapsible - } - }; - - if (--index === 0) { - currentArray = undefined; - } - - return result; - } - }; - } - - getParentElement(ref: T | null = null): T | null { - const parentElements = this.model.getParentElement(this.compressionMap.get(ref)); - if (isUndefinedOrNull(parentElements)) { - return parentElements; + if (element !== null && !this.map.has(element)) { + throw new Error('missing element'); } - return parentElements[parentElements.length - 1]; + const compressedElement = element === null ? null : this.map.get(element)!; + const compressedChildren = this.compress(Iterator.from(children)); + const deleted = this.model.setChildren(compressedElement, compressedChildren); + return this.decompress(deleted); } - getFirstElementChild(ref: T | null = null): T | null | undefined { - const childElements = this.model.getFirstElementChild(this.compressionMap.get(ref)); - if (isUndefinedOrNull(childElements)) { - return childElements; - } - - return childElements[childElements.length - 1]; + private compress(iterator: Iterator>): Iterator> { + throw new Error('todo'); } - getLastElementAncestor(ref: T | null = null): T | null | undefined { - const ancestors = this.model.getLastElementAncestor(this.compressionMap.get(ref)); - if (isUndefinedOrNull(ancestors)) { - return ancestors; - } - - return ancestors[ancestors.length - 1]; + private decompress(sequence: Iterator>): Iterator> { + throw new Error('todo'); } - getListIndex(element: T): number { - return this.model.getListIndex(this.compressionMap.get(element)); + getListIndex(location: T | null): number { + throw new Error('Method not implemented.'); } - isCollapsible(element: T): boolean { - return this.model.isCollapsible(this.compressionMap.get(element)); + getListRenderCount(location: T | null): number { + throw new Error('Method not implemented.'); } - isCollapsed(element: T): boolean { - return this.model.isCollapsed(this.compressionMap.get(element)); + getNode(location?: T | null | undefined): ITreeNode { + throw new Error('Method not implemented.'); } - setCollapsed(element: T, collapsed?: boolean, recursive?: boolean): boolean { - return this.model.setCollapsed(this.compressionMap.get(element), collapsed, recursive); + getNodeLocation(node: ITreeNode): T | null { + throw new Error('Method not implemented.'); } - getNode(element: T | null = null): ITreeNode { - throw new Error('not implemented'); + getParentNodeLocation(location: T | null): T | null { + throw new Error('Method not implemented.'); } - getNodeLocation(node: ITreeNode): T { - throw new Error('not implemented'); + getParentElement(location: T | null): T | null { + throw new Error('Method not implemented.'); } - getParentNodeLocation(element: T): T | null { - const parentNodes = this.model.getParentNodeLocation(this.compressionMap.get(element)); - if (isUndefinedOrNull(parentNodes)) { - return parentNodes; - } + getFirstElementChild(location: T | null): T | null | undefined { + throw new Error('Method not implemented.'); + } - return parentNodes[parentNodes.length - 1]; + getLastElementAncestor(location?: T | null | undefined): T | null | undefined { + throw new Error('Method not implemented.'); + } + + isCollapsible(location: T | null): boolean { + throw new Error('Method not implemented.'); + } + + isCollapsed(location: T | null): boolean { + throw new Error('Method not implemented.'); + } + + setCollapsed(location: T | null, collapsed?: boolean | undefined, recursive?: boolean | undefined): boolean { + throw new Error('Method not implemented.'); + } + + expandTo(location: T | null): void { + throw new Error('Method not implemented.'); } refilter(): void { diff --git a/src/vs/base/browser/ui/tree/objectTreeModel.ts b/src/vs/base/browser/ui/tree/objectTreeModel.ts index d836e39f116..8ab76b67adc 100644 --- a/src/vs/base/browser/ui/tree/objectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/objectTreeModel.ts @@ -53,7 +53,7 @@ export class ObjectTreeModel, TFilterData extends Non children: ISequence> | undefined, onDidCreateNode?: (node: ITreeNode) => void, onDidDeleteNode?: (node: ITreeNode) => void - ): Iterator> { + ): Iterator> { const location = this.getElementLocation(element); return this._setChildren(location, this.preserveCollapseState(children), onDidCreateNode, onDidDeleteNode); } @@ -63,7 +63,7 @@ export class ObjectTreeModel, TFilterData extends Non children: ISequence> | undefined, onDidCreateNode?: (node: ITreeNode) => void, onDidDeleteNode?: (node: ITreeNode) => void - ): Iterator> { + ): Iterator> { const insertedElements = new Set(); const insertedElementIds = new Set(); @@ -107,7 +107,7 @@ export class ObjectTreeModel, TFilterData extends Non _onDidDeleteNode ); - return result; + return result as Iterator>; } private preserveCollapseState(elements: ISequence> | undefined): ISequence> { diff --git a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts index eec0bc26dac..7c7907452d5 100644 --- a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts +++ b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; -import { ITreeNode } from 'vs/base/browser/ui/tree/tree'; +import { ITreeNode, ITreeElement } from 'vs/base/browser/ui/tree/tree'; import { ISpliceable } from 'vs/base/common/sequence'; -import { CompressedObjectTreeModel } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; +import { CompressedObjectTreeModel, compress } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; import { Iterator } from 'vs/base/common/iterator'; function toSpliceable(arr: T[]): ISpliceable { @@ -21,57 +21,48 @@ function toArray(list: ITreeNode[]): T[] { return list.map(i => i.element); } +interface Node { + element: T; + children?: Node[]; +} + +// function asTreeElement(node: Node): ITreeElement { +// if (Array.isArray(node)) { +// return { element: node, children: Iterator.map(Iterator.from(node), asTreeElement) }; +// } else { +// return { element: node }; +// } +} + suite('CompressedObjectTreeModel', function () { test('ctor', () => { const list: ITreeNode[] = []; const model = new CompressedObjectTreeModel(toSpliceable(list)); + assert(model); assert.deepEqual(toArray(list), []); - assert.equal(model.size, 0); }); - test('no compression', () => { - const list: ITreeNode[] = []; - const model = new CompressedObjectTreeModel(toSpliceable(list)); + test('compress', () => { - model.setChildren(null, [ - { element: 'a' }, - { element: 'b' }, - { element: 'c' } - ]); - - assert.deepEqual(toArray(list), [['a'], ['b'], ['c']]); - assert.equal(model.size, 3); - - model.setChildren(null, Iterator.empty()); - assert.deepEqual(toArray(list), []); - assert.equal(model.size, 0); - }); - - test('simple compression', () => { - const list: ITreeNode[] = []; - const model = new CompressedObjectTreeModel(toSpliceable(list)); - - model.setChildren(null, [ + const rootChildren: Node[] = [ { - element: 'foo', children: [ - { - element: 'bar', children: [ - { element: 'hello' } - ] - } + element: 1, children: [ + { element: 11 }, + { element: 12 }, ] }, - { element: 'b' }, - { element: 'c' } - ]); + { element: 2 }, + { element: 3 }, + ]; - assert.deepEqual(toArray(list), [['foo', 'bar', 'hello'], ['b'], ['c']]); - assert.equal(model.size, 3); + const actual = [0, [[100]], 2, [[[3000, 3001]], 31, 32], 4]; + const expected = [0, [100], 2, [[3000, 3001], 31, 32], 4]; - model.setChildren(null, Iterator.empty()); - assert.deepEqual(toArray(list), []); - assert.equal(model.size, 0); + const element = asTreeElement(root); + const iterator = Iterator.from([element]); + + const result = Iterator.collect(compress(iterator)); }); }); \ No newline at end of file From 4554bfb241998b4970da09f5268d95d698208b22 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 19 Jul 2019 07:22:16 +0200 Subject: [PATCH 448/710] wip --- .../ui/tree/compressedObjectTreeModel.test.ts | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts index 7c7907452d5..24dc48f9b83 100644 --- a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts +++ b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts @@ -26,13 +26,15 @@ interface Node { children?: Node[]; } +type Node2 = [T, Node2[]]; + // function asTreeElement(node: Node): ITreeElement { // if (Array.isArray(node)) { // return { element: node, children: Iterator.map(Iterator.from(node), asTreeElement) }; // } else { // return { element: node }; // } -} +// } suite('CompressedObjectTreeModel', function () { @@ -45,20 +47,35 @@ suite('CompressedObjectTreeModel', function () { }); test('compress', () => { - - const rootChildren: Node[] = [ + const actual: Node[] = [ { element: 1, children: [ - { element: 11 }, - { element: 12 }, + { + element: 11, children: [ + { + element: 111, children: [ + { element: 1111 }, + { element: 1112 }, + { element: 1113 }, + { element: 1114 }, + ] + } + ] + }, ] - }, - { element: 2 }, - { element: 3 }, + } ]; - const actual = [0, [[100]], 2, [[[3000, 3001]], 31, 32], 4]; - const expected = [0, [100], 2, [[3000, 3001], 31, 32], 4]; + const expected: Node[] = [ + { + element: [1, 11, 111], children: [ + { element: [1111] }, + { element: [1112] }, + { element: [1113] }, + { element: [1114] }, + ] + } + ]; const element = asTreeElement(root); const iterator = Iterator.from([element]); From 1030c0d044595bad528e7b0a8ad751d106f32e08 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 19 Jul 2019 09:25:28 +0200 Subject: [PATCH 449/710] compressed trees: compress tests --- .../ui/tree/compressedObjectTreeModel.ts | 35 ++- src/vs/base/common/iterator.ts | 40 ++- .../ui/tree/compressedObjectTreeModel.test.ts | 250 ++++++++++++++++-- src/vs/base/test/common/iterator.test.ts | 19 ++ 4 files changed, 314 insertions(+), 30 deletions(-) create mode 100644 src/vs/base/test/common/iterator.test.ts diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index 676240c42d1..72b148fe4a8 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -9,11 +9,40 @@ import { Event, Emitter } from 'vs/base/common/event'; import { ITreeModel, ITreeNode, ITreeElement, ICollapseStateChangeEvent, ITreeModelSpliceEvent } from 'vs/base/browser/ui/tree/tree'; import { IObjectTreeModelOptions, ObjectTreeModel } from 'vs/base/browser/ui/tree/objectTreeModel'; -export function compress(iterator: Iterator>): Iterator> { - throw new Error('todo'); +export interface ICompressedTreeElement extends ITreeElement { + readonly children?: Iterator> | ICompressedTreeElement[]; + readonly incompressible?: boolean; } -export function decompress(sequence: Iterator>): Iterator> { +export function compress(element: ICompressedTreeElement): ITreeElement { + const result = [element.element]; + let childrenIterator: Iterator>; + let children: ITreeElement[]; + + while (true) { + childrenIterator = Iterator.from(element.children); + children = Iterator.collect(childrenIterator, 2); + + if (children.length !== 1) { + break; + } + + element = children[0]; + + if (element.incompressible) { + break; + } + + result.push(element.element); + } + + return { + element: result, + children: Iterator.map(Iterator.concat(Iterator.fromArray(children), childrenIterator), compress) + }; +} + +export function decompress(element: ITreeElement): ITreeElement { throw new Error('todo'); } diff --git a/src/vs/base/common/iterator.ts b/src/vs/base/common/iterator.ts index 038bf263222..208335e16c6 100644 --- a/src/vs/base/common/iterator.ts +++ b/src/vs/base/common/iterator.ts @@ -86,11 +86,47 @@ export module Iterator { } } - export function collect(iterator: Iterator): T[] { + export function collect(iterator: Iterator, atMost: number = Number.POSITIVE_INFINITY): T[] { const result: T[] = []; - forEach(iterator, value => result.push(value)); + + if (atMost === 0) { + return result; + } + + let i = 0; + + for (let next = iterator.next(); !next.done; next = iterator.next()) { + result.push(next.value); + + if (++i >= atMost) { + break; + } + } + return result; } + + export function concat(...iterators: Iterator[]): Iterator { + let i = 0; + + return { + next() { + if (i >= iterators.length) { + return FIN; + } + + const iterator = iterators[i]; + const result = iterator.next(); + + if (result.done) { + i++; + return this.next(); + } + + return result; + } + }; + } } export type ISequence = Iterator | T[]; diff --git a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts index 24dc48f9b83..bde6dbc85d1 100644 --- a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts +++ b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import { ITreeNode, ITreeElement } from 'vs/base/browser/ui/tree/tree'; import { ISpliceable } from 'vs/base/common/sequence'; -import { CompressedObjectTreeModel, compress } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; +import { CompressedObjectTreeModel, compress, ICompressedTreeElement } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; import { Iterator } from 'vs/base/common/iterator'; function toSpliceable(arr: T[]): ISpliceable { @@ -21,24 +21,26 @@ function toArray(list: ITreeNode[]): T[] { return list.map(i => i.element); } -interface Node { - element: T; - children?: Node[]; + +interface IResolvedTreeElement extends ITreeElement { + readonly element: T; + readonly children?: ITreeElement[]; } -type Node2 = [T, Node2[]]; +function resolve(treeElement: ITreeElement): IResolvedTreeElement { + const element = treeElement.element; + const children = Iterator.collect(Iterator.map(Iterator.from(treeElement.children), resolve)); -// function asTreeElement(node: Node): ITreeElement { -// if (Array.isArray(node)) { -// return { element: node, children: Iterator.map(Iterator.from(node), asTreeElement) }; -// } else { -// return { element: node }; -// } -// } + if (children.length === 0) { + return { element }; + } + + return { element, children }; +} suite('CompressedObjectTreeModel', function () { - test('ctor', () => { + test('ctor', function () { const list: ITreeNode[] = []; const model = new CompressedObjectTreeModel(toSpliceable(list)); @@ -46,9 +48,58 @@ suite('CompressedObjectTreeModel', function () { assert.deepEqual(toArray(list), []); }); - test('compress', () => { - const actual: Node[] = [ - { + suite('compress', function () { + + test('small', function () { + const actual: ICompressedTreeElement = { element: 1 }; + const expected: IResolvedTreeElement = { element: [1] }; + assert.deepEqual(resolve(compress(actual)), expected); + }); + + test('no compression', function () { + const actual: ICompressedTreeElement = { + element: 1, children: [ + { element: 11 }, + { element: 12 }, + { element: 13 }, + ] + }; + + const expected: IResolvedTreeElement = { + element: [1], children: [ + { element: [11] }, + { element: [12] }, + { element: [13] }, + ] + }; + + assert.deepEqual(resolve(compress(actual)), expected); + }); + + test('single hierarchy', function () { + const actual: ICompressedTreeElement = { + element: 1, children: [ + { + element: 11, children: [ + { + element: 111, children: [ + { element: 1111 } + ] + } + ] + }, + ] + }; + + const expected: IResolvedTreeElement = { + element: [1, 11, 111, 1111] + }; + + assert.deepEqual(resolve(compress(actual)), expected); + }); + + test('deep compression', function () { + const actual: ICompressedTreeElement = { element: 1, children: [ { element: 11, children: [ @@ -63,23 +114,172 @@ suite('CompressedObjectTreeModel', function () { ] }, ] - } - ]; + }; - const expected: Node[] = [ - { + const expected: IResolvedTreeElement = { element: [1, 11, 111], children: [ { element: [1111] }, { element: [1112] }, { element: [1113] }, { element: [1114] }, ] - } - ]; + }; - const element = asTreeElement(root); - const iterator = Iterator.from([element]); + assert.deepEqual(resolve(compress(actual)), expected); + }); - const result = Iterator.collect(compress(iterator)); + test('double deep compression', function () { + const actual: ICompressedTreeElement = { + element: 1, children: [ + { + element: 11, children: [ + { + element: 111, children: [ + { element: 1112 }, + { element: 1113 }, + ] + }, + ] + }, + { + element: 12, children: [ + { + element: 121, children: [ + { element: 1212 }, + { element: 1213 }, + ] + }, + ] + } + ] + }; + + const expected: IResolvedTreeElement = { + element: [1], children: [ + { + element: [11, 111], children: [ + { element: [1112] }, + { element: [1113] }, + ] + }, + { + element: [12, 121], children: [ + { element: [1212] }, + { element: [1213] }, + ] + } + ] + }; + + assert.deepEqual(resolve(compress(actual)), expected); + }); + + test('incompressible leaf', function () { + const actual: ICompressedTreeElement = { + element: 1, children: [ + { + element: 11, children: [ + { + element: 111, children: [ + { element: 1111, incompressible: true } + ] + } + ] + }, + ] + }; + + const expected: IResolvedTreeElement = { + element: [1, 11, 111], children: [ + { element: [1111] } + ] + }; + + assert.deepEqual(resolve(compress(actual)), expected); + }); + + test('incompressible branch', function () { + const actual: ICompressedTreeElement = { + element: 1, children: [ + { + element: 11, children: [ + { + element: 111, incompressible: true, children: [ + { element: 1111 } + ] + } + ] + }, + ] + }; + + const expected: IResolvedTreeElement = { + element: [1, 11], children: [ + { element: [111, 1111] } + ] + }; + + assert.deepEqual(resolve(compress(actual)), expected); + }); + + test('incompressible chain', function () { + const actual: ICompressedTreeElement = { + element: 1, children: [ + { + element: 11, children: [ + { + element: 111, incompressible: true, children: [ + { element: 1111, incompressible: true } + ] + } + ] + }, + ] + }; + + const expected: IResolvedTreeElement = { + element: [1, 11], children: [ + { + element: [111], children: [ + { element: [1111] } + ] + } + ] + }; + + assert.deepEqual(resolve(compress(actual)), expected); + }); + + test('incompressible tree', function () { + const actual: ICompressedTreeElement = { + element: 1, children: [ + { + element: 11, incompressible: true, children: [ + { + element: 111, incompressible: true, children: [ + { element: 1111, incompressible: true } + ] + } + ] + }, + ] + }; + + const expected: IResolvedTreeElement = { + element: [1], children: [ + { + element: [11], children: [ + { + element: [111], children: [ + { element: [1111] } + ] + } + ] + } + ] + }; + + assert.deepEqual(resolve(compress(actual)), expected); + }); }); }); \ No newline at end of file diff --git a/src/vs/base/test/common/iterator.test.ts b/src/vs/base/test/common/iterator.test.ts new file mode 100644 index 00000000000..b7a165c5095 --- /dev/null +++ b/src/vs/base/test/common/iterator.test.ts @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; +import { Iterator } from 'vs/base/common/iterator'; + +suite('Iterator', () => { + test('concat', () => { + const first = Iterator.fromArray([1, 2, 3]); + const second = Iterator.fromArray([4, 5, 6]); + const third = Iterator.fromArray([7, 8, 9]); + const actualIterator = Iterator.concat(first, second, third); + const actual = Iterator.collect(actualIterator); + + assert.deepEqual(actual, [1, 2, 3, 4, 5, 6, 7, 8, 9]); + }); +}); \ No newline at end of file From 5cbc5357f7d8029d2cfe85ff412c3f4daf72f251 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 19 Jul 2019 13:49:29 +0200 Subject: [PATCH 450/710] :lipstick: --- .../ui/tree/compressedObjectTreeModel.test.ts | 46 +++++-------------- 1 file changed, 12 insertions(+), 34 deletions(-) diff --git a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts index bde6dbc85d1..7d5c5113292 100644 --- a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts +++ b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts @@ -4,24 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; -import { ITreeNode, ITreeElement } from 'vs/base/browser/ui/tree/tree'; -import { ISpliceable } from 'vs/base/common/sequence'; -import { CompressedObjectTreeModel, compress, ICompressedTreeElement } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; +import { ITreeElement } from 'vs/base/browser/ui/tree/tree'; +import { compress, ICompressedTreeElement } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; import { Iterator } from 'vs/base/common/iterator'; -function toSpliceable(arr: T[]): ISpliceable { - return { - splice(start: number, deleteCount: number, elements: T[]): void { - arr.splice(start, deleteCount, ...elements); - } - }; -} - -function toArray(list: ITreeNode[]): T[] { - return list.map(i => i.element); -} - - interface IResolvedTreeElement extends ITreeElement { readonly element: T; readonly children?: ITreeElement[]; @@ -40,14 +26,6 @@ function resolve(treeElement: ITreeElement): IResolvedTreeElement { suite('CompressedObjectTreeModel', function () { - test('ctor', function () { - const list: ITreeNode[] = []; - const model = new CompressedObjectTreeModel(toSpliceable(list)); - - assert(model); - assert.deepEqual(toArray(list), []); - }); - suite('compress', function () { test('small', function () { @@ -61,7 +39,7 @@ suite('CompressedObjectTreeModel', function () { element: 1, children: [ { element: 11 }, { element: 12 }, - { element: 13 }, + { element: 13 } ] }; @@ -69,7 +47,7 @@ suite('CompressedObjectTreeModel', function () { element: [1], children: [ { element: [11] }, { element: [12] }, - { element: [13] }, + { element: [13] } ] }; @@ -87,7 +65,7 @@ suite('CompressedObjectTreeModel', function () { ] } ] - }, + } ] }; @@ -112,7 +90,7 @@ suite('CompressedObjectTreeModel', function () { ] } ] - }, + } ] }; @@ -138,7 +116,7 @@ suite('CompressedObjectTreeModel', function () { { element: 1112 }, { element: 1113 }, ] - }, + } ] }, { @@ -148,7 +126,7 @@ suite('CompressedObjectTreeModel', function () { { element: 1212 }, { element: 1213 }, ] - }, + } ] } ] @@ -185,7 +163,7 @@ suite('CompressedObjectTreeModel', function () { ] } ] - }, + } ] }; @@ -209,7 +187,7 @@ suite('CompressedObjectTreeModel', function () { ] } ] - }, + } ] }; @@ -233,7 +211,7 @@ suite('CompressedObjectTreeModel', function () { ] } ] - }, + } ] }; @@ -261,7 +239,7 @@ suite('CompressedObjectTreeModel', function () { ] } ] - }, + } ] }; From 023a2a6eca1069d41879a4dc8590f0b1e8c218da Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 19 Jul 2019 14:54:31 +0200 Subject: [PATCH 451/710] compressed tree: remember incompressable state --- .../ui/tree/compressedObjectTreeModel.ts | 17 ++-- .../ui/tree/compressedObjectTreeModel.test.ts | 90 +++++++++++-------- 2 files changed, 64 insertions(+), 43 deletions(-) diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index 72b148fe4a8..40990c89426 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -14,8 +14,15 @@ export interface ICompressedTreeElement extends ITreeElement { readonly incompressible?: boolean; } -export function compress(element: ICompressedTreeElement): ITreeElement { - const result = [element.element]; +export interface ICompressedTreeNode { + readonly elements: T[]; + readonly incompressible: boolean; +} + +export function compress(element: ICompressedTreeElement): ITreeElement> { + const elements = [element.element]; + const incompressible = element.incompressible || false; + let childrenIterator: Iterator>; let children: ITreeElement[]; @@ -33,16 +40,16 @@ export function compress(element: ICompressedTreeElement): ITreeElement(element: ITreeElement): ITreeElement { +export function decompress(element: ITreeElement>): ITreeElement { throw new Error('todo'); } diff --git a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts index 7d5c5113292..6ff3bb1ee0a 100644 --- a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts +++ b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts @@ -5,7 +5,7 @@ import * as assert from 'assert'; import { ITreeElement } from 'vs/base/browser/ui/tree/tree'; -import { compress, ICompressedTreeElement } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; +import { compress, ICompressedTreeElement, ICompressedTreeNode } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; import { Iterator } from 'vs/base/common/iterator'; interface IResolvedTreeElement extends ITreeElement { @@ -30,7 +30,9 @@ suite('CompressedObjectTreeModel', function () { test('small', function () { const actual: ICompressedTreeElement = { element: 1 }; - const expected: IResolvedTreeElement = { element: [1] }; + const expected: IResolvedTreeElement> = + { element: { elements: [1], incompressible: false } }; + assert.deepEqual(resolve(compress(actual)), expected); }); @@ -43,11 +45,12 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement = { - element: [1], children: [ - { element: [11] }, - { element: [12] }, - { element: [13] } + const expected: IResolvedTreeElement> = { + element: { elements: [1], incompressible: false }, + children: [ + { element: { elements: [11], incompressible: false } }, + { element: { elements: [12], incompressible: false } }, + { element: { elements: [13], incompressible: false } } ] }; @@ -69,8 +72,8 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement = { - element: [1, 11, 111, 1111] + const expected: IResolvedTreeElement> = { + element: { elements: [1, 11, 111, 1111], incompressible: false } }; assert.deepEqual(resolve(compress(actual)), expected); @@ -94,12 +97,13 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement = { - element: [1, 11, 111], children: [ - { element: [1111] }, - { element: [1112] }, - { element: [1113] }, - { element: [1114] }, + const expected: IResolvedTreeElement> = { + element: { elements: [1, 11, 111], incompressible: false }, + children: [ + { element: { elements: [1111], incompressible: false } }, + { element: { elements: [1112], incompressible: false } }, + { element: { elements: [1113], incompressible: false } }, + { element: { elements: [1114], incompressible: false } }, ] }; @@ -132,18 +136,21 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement = { - element: [1], children: [ + const expected: IResolvedTreeElement> = { + element: { elements: [1], incompressible: false }, + children: [ { - element: [11, 111], children: [ - { element: [1112] }, - { element: [1113] }, + element: { elements: [11, 111], incompressible: false }, + children: [ + { element: { elements: [1112], incompressible: false } }, + { element: { elements: [1113], incompressible: false } }, ] }, { - element: [12, 121], children: [ - { element: [1212] }, - { element: [1213] }, + element: { elements: [12, 121], incompressible: false }, + children: [ + { element: { elements: [1212], incompressible: false } }, + { element: { elements: [1213], incompressible: false } }, ] } ] @@ -167,9 +174,10 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement = { - element: [1, 11, 111], children: [ - { element: [1111] } + const expected: IResolvedTreeElement> = { + element: { elements: [1, 11, 111], incompressible: false }, + children: [ + { element: { elements: [1111], incompressible: true } } ] }; @@ -191,9 +199,10 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement = { - element: [1, 11], children: [ - { element: [111, 1111] } + const expected: IResolvedTreeElement> = { + element: { elements: [1, 11], incompressible: false }, + children: [ + { element: { elements: [111, 1111], incompressible: true } } ] }; @@ -215,11 +224,13 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement = { - element: [1, 11], children: [ + const expected: IResolvedTreeElement> = { + element: { elements: [1, 11], incompressible: false }, + children: [ { - element: [111], children: [ - { element: [1111] } + element: { elements: [111], incompressible: true }, + children: [ + { element: { elements: [1111], incompressible: true } } ] } ] @@ -243,13 +254,16 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement = { - element: [1], children: [ + const expected: IResolvedTreeElement> = { + element: { elements: [1], incompressible: false }, + children: [ { - element: [11], children: [ + element: { elements: [11], incompressible: true }, + children: [ { - element: [111], children: [ - { element: [1111] } + element: { elements: [111], incompressible: true }, + children: [ + { element: { elements: [1111], incompressible: true } } ] } ] From f2adc2100ca987ae7c5663f517878b85a8fb4cdd Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 19 Jul 2019 16:20:37 +0200 Subject: [PATCH 452/710] compressed tree: decompress --- .../ui/tree/compressedObjectTreeModel.ts | 20 ++++- src/vs/base/common/iterator.ts | 15 ++++ .../ui/tree/compressedObjectTreeModel.test.ts | 84 +++++++++++-------- 3 files changed, 81 insertions(+), 38 deletions(-) diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index 40990c89426..5b352291155 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -49,8 +49,24 @@ export function compress(element: ICompressedTreeElement): ITreeElement(element: ITreeElement>): ITreeElement { - throw new Error('todo'); +export function _decompress(element: ITreeElement>, index = 0): ICompressedTreeElement { + let children: Iterator>; + + if (index < element.element.elements.length - 1) { + children = Iterator.single(_decompress(element, index + 1)); + } else { + children = Iterator.map(Iterator.from(element.children), el => _decompress(el, 0)); + } + + if (index === 0 && element.element.incompressible) { + return { element: element.element.elements[index], children, incompressible: true }; + } + + return { element: element.element.elements[index], children }; +} + +export function decompress(element: ITreeElement>): ICompressedTreeElement { + return _decompress(element, 0); } export interface ICompressedObjectTreeModelOptions extends IObjectTreeModelOptions { } diff --git a/src/vs/base/common/iterator.ts b/src/vs/base/common/iterator.ts index 208335e16c6..db53b8aef57 100644 --- a/src/vs/base/common/iterator.ts +++ b/src/vs/base/common/iterator.ts @@ -29,6 +29,21 @@ export module Iterator { return _empty; } + export function single(value: T): Iterator { + let done = false; + + return { + next(): IteratorResult { + if (done) { + return FIN; + } + + done = true; + return { done: false, value }; + } + }; + } + export function fromArray(array: T[], index = 0, length = array.length): Iterator { return { next(): IteratorResult { diff --git a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts index 6ff3bb1ee0a..c48d95296f0 100644 --- a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts +++ b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts @@ -4,24 +4,27 @@ *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; -import { ITreeElement } from 'vs/base/browser/ui/tree/tree'; -import { compress, ICompressedTreeElement, ICompressedTreeNode } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; +import { compress, ICompressedTreeElement, ICompressedTreeNode, decompress } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; import { Iterator } from 'vs/base/common/iterator'; -interface IResolvedTreeElement extends ITreeElement { +interface IResolvedCompressedTreeElement extends ICompressedTreeElement { readonly element: T; - readonly children?: ITreeElement[]; + readonly children?: ICompressedTreeElement[]; } -function resolve(treeElement: ITreeElement): IResolvedTreeElement { - const element = treeElement.element; +function resolve(treeElement: ICompressedTreeElement): IResolvedCompressedTreeElement { + const result: any = { element: treeElement.element }; const children = Iterator.collect(Iterator.map(Iterator.from(treeElement.children), resolve)); - if (children.length === 0) { - return { element }; + if (treeElement.incompressible) { + result.incompressible = true; } - return { element, children }; + if (children.length > 0) { + result.children = children; + } + + return result; } suite('CompressedObjectTreeModel', function () { @@ -29,15 +32,16 @@ suite('CompressedObjectTreeModel', function () { suite('compress', function () { test('small', function () { - const actual: ICompressedTreeElement = { element: 1 }; - const expected: IResolvedTreeElement> = + const decompressed: ICompressedTreeElement = { element: 1 }; + const compressed: IResolvedCompressedTreeElement> = { element: { elements: [1], incompressible: false } }; - assert.deepEqual(resolve(compress(actual)), expected); + assert.deepEqual(resolve(compress(decompressed)), compressed); + assert.deepEqual(resolve(decompress(compressed)), decompressed); }); test('no compression', function () { - const actual: ICompressedTreeElement = { + const decompressed: ICompressedTreeElement = { element: 1, children: [ { element: 11 }, { element: 12 }, @@ -45,7 +49,7 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement> = { + const compressed: IResolvedCompressedTreeElement> = { element: { elements: [1], incompressible: false }, children: [ { element: { elements: [11], incompressible: false } }, @@ -54,11 +58,12 @@ suite('CompressedObjectTreeModel', function () { ] }; - assert.deepEqual(resolve(compress(actual)), expected); + assert.deepEqual(resolve(compress(decompressed)), compressed); + assert.deepEqual(resolve(decompress(compressed)), decompressed); }); test('single hierarchy', function () { - const actual: ICompressedTreeElement = { + const decompressed: ICompressedTreeElement = { element: 1, children: [ { element: 11, children: [ @@ -72,15 +77,16 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement> = { + const compressed: IResolvedCompressedTreeElement> = { element: { elements: [1, 11, 111, 1111], incompressible: false } }; - assert.deepEqual(resolve(compress(actual)), expected); + assert.deepEqual(resolve(compress(decompressed)), compressed); + assert.deepEqual(resolve(decompress(compressed)), decompressed); }); test('deep compression', function () { - const actual: ICompressedTreeElement = { + const decompressed: ICompressedTreeElement = { element: 1, children: [ { element: 11, children: [ @@ -97,7 +103,7 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement> = { + const compressed: IResolvedCompressedTreeElement> = { element: { elements: [1, 11, 111], incompressible: false }, children: [ { element: { elements: [1111], incompressible: false } }, @@ -107,11 +113,12 @@ suite('CompressedObjectTreeModel', function () { ] }; - assert.deepEqual(resolve(compress(actual)), expected); + assert.deepEqual(resolve(compress(decompressed)), compressed); + assert.deepEqual(resolve(decompress(compressed)), decompressed); }); test('double deep compression', function () { - const actual: ICompressedTreeElement = { + const decompressed: ICompressedTreeElement = { element: 1, children: [ { element: 11, children: [ @@ -136,7 +143,7 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement> = { + const compressed: IResolvedCompressedTreeElement> = { element: { elements: [1], incompressible: false }, children: [ { @@ -156,11 +163,12 @@ suite('CompressedObjectTreeModel', function () { ] }; - assert.deepEqual(resolve(compress(actual)), expected); + assert.deepEqual(resolve(compress(decompressed)), compressed); + assert.deepEqual(resolve(decompress(compressed)), decompressed); }); test('incompressible leaf', function () { - const actual: ICompressedTreeElement = { + const decompressed: ICompressedTreeElement = { element: 1, children: [ { element: 11, children: [ @@ -174,18 +182,19 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement> = { + const compressed: IResolvedCompressedTreeElement> = { element: { elements: [1, 11, 111], incompressible: false }, children: [ { element: { elements: [1111], incompressible: true } } ] }; - assert.deepEqual(resolve(compress(actual)), expected); + assert.deepEqual(resolve(compress(decompressed)), compressed); + assert.deepEqual(resolve(decompress(compressed)), decompressed); }); test('incompressible branch', function () { - const actual: ICompressedTreeElement = { + const decompressed: ICompressedTreeElement = { element: 1, children: [ { element: 11, children: [ @@ -199,18 +208,19 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement> = { + const compressed: IResolvedCompressedTreeElement> = { element: { elements: [1, 11], incompressible: false }, children: [ { element: { elements: [111, 1111], incompressible: true } } ] }; - assert.deepEqual(resolve(compress(actual)), expected); + assert.deepEqual(resolve(compress(decompressed)), compressed); + assert.deepEqual(resolve(decompress(compressed)), decompressed); }); test('incompressible chain', function () { - const actual: ICompressedTreeElement = { + const decompressed: ICompressedTreeElement = { element: 1, children: [ { element: 11, children: [ @@ -224,7 +234,7 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement> = { + const compressed: IResolvedCompressedTreeElement> = { element: { elements: [1, 11], incompressible: false }, children: [ { @@ -236,11 +246,12 @@ suite('CompressedObjectTreeModel', function () { ] }; - assert.deepEqual(resolve(compress(actual)), expected); + assert.deepEqual(resolve(compress(decompressed)), compressed); + assert.deepEqual(resolve(decompress(compressed)), decompressed); }); test('incompressible tree', function () { - const actual: ICompressedTreeElement = { + const decompressed: ICompressedTreeElement = { element: 1, children: [ { element: 11, incompressible: true, children: [ @@ -254,7 +265,7 @@ suite('CompressedObjectTreeModel', function () { ] }; - const expected: IResolvedTreeElement> = { + const compressed: IResolvedCompressedTreeElement> = { element: { elements: [1], incompressible: false }, children: [ { @@ -271,7 +282,8 @@ suite('CompressedObjectTreeModel', function () { ] }; - assert.deepEqual(resolve(compress(actual)), expected); + assert.deepEqual(resolve(compress(decompressed)), compressed); + assert.deepEqual(resolve(decompress(compressed)), decompressed); }); }); }); \ No newline at end of file From 29ed9b3abadc8610ff5af3d5906adf880a1a89e0 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Sun, 21 Jul 2019 15:59:17 +0200 Subject: [PATCH 453/710] compressed tree: setChildren --- .../ui/tree/compressedObjectTreeModel.ts | 96 +++++++++++++++---- .../ui/tree/compressedObjectTreeModel.test.ts | 58 ++++++++++- 2 files changed, 132 insertions(+), 22 deletions(-) diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index 5b352291155..5d8090bc34a 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -69,7 +69,18 @@ export function decompress(element: ITreeElement>): IC return _decompress(element, 0); } -export interface ICompressedObjectTreeModelOptions extends IObjectTreeModelOptions { } +export function splice(treeElement: ICompressedTreeElement, element: T, children: Iterator>): ICompressedTreeElement { + if (treeElement.element === element) { + return { element, children }; + } + + return { + ...treeElement, + children: Iterator.map(Iterator.from(treeElement.children), e => splice(e, element, children)) + }; +} + +export interface ICompressedObjectTreeModelOptions extends IObjectTreeModelOptions, TFilterData> { } export class CompressedObjectTreeModel, TFilterData extends NonNullable = void> implements ITreeModel { @@ -84,33 +95,80 @@ export class CompressedObjectTreeModel, TFilterData e private _onDidChangeRenderNodeCount = new Emitter>(); readonly onDidChangeRenderNodeCount: Event> = this._onDidChangeRenderNodeCount.event; - private model: ObjectTreeModel; - private map = new Map(); + private model: ObjectTreeModel, TFilterData>; + private nodes = new Map>(); - constructor(list: ISpliceable>, options: ICompressedObjectTreeModelOptions = {}) { + get size(): number { return this.nodes.size; } + + constructor(list: ISpliceable, TFilterData>>, options: ICompressedObjectTreeModelOptions = {}) { this.model = new ObjectTreeModel(list, options); } setChildren( element: T | null, - children: ISequence> | undefined + children: ISequence> | undefined, + onDidCreateNode?: (node: ITreeNode, TFilterData>) => void, + onDidDeleteNode?: (node: ITreeNode, TFilterData>) => void ): Iterator> { - if (element !== null && !this.map.has(element)) { - throw new Error('missing element'); + const insertedElements = new Set(); + const _onDidCreateNode = (node: ITreeNode, TFilterData>) => { + for (const element of node.element.elements) { + insertedElements.add(element); + this.nodes.set(element, node.element); + } + + // if (this.identityProvider) { + // const id = this.identityProvider.getId(node.element).toString(); + // insertedElementIds.add(id); + // this.nodesByIdentity.set(id, node); + // } + + if (onDidCreateNode) { + onDidCreateNode(node); + } + }; + + const _onDidDeleteNode = (node: ITreeNode, TFilterData>) => { + for (const element of node.element.elements) { + if (!insertedElements.has(element)) { + this.nodes.delete(element); + } + } + + // if (this.identityProvider) { + // const id = this.identityProvider.getId(node.element).toString(); + // if (!insertedElementIds.has(id)) { + // this.nodesByIdentity.delete(id); + // } + // } + + if (onDidDeleteNode) { + onDidDeleteNode(node); + } + }; + + if (element === null) { + const compressedChildren = Iterator.map(Iterator.from(children), compress); + const result = this.model.setChildren(null, compressedChildren, _onDidCreateNode, _onDidDeleteNode); + return Iterator.map(result, decompress); } - const compressedElement = element === null ? null : this.map.get(element)!; - const compressedChildren = this.compress(Iterator.from(children)); - const deleted = this.model.setChildren(compressedElement, compressedChildren); - return this.decompress(deleted); - } + const compressedNode = this.nodes.get(element); + const node = this.model.getNode(compressedNode) as ITreeNode, TFilterData>; + const parent = node.parent!; - private compress(iterator: Iterator>): Iterator> { - throw new Error('todo'); - } + const decompressedElement = decompress(node); + const splicedElement = splice(decompressedElement, element, Iterator.from(children)); + const recompressedElement = compress(splicedElement); - private decompress(sequence: Iterator>): Iterator> { - throw new Error('todo'); + const parentChildren = parent.children + .map(child => child === node ? recompressedElement : child); + + + this.model.setChildren(parent.element, parentChildren, _onDidCreateNode, _onDidDeleteNode); + + // TODO + return Iterator.empty(); } getListIndex(location: T | null): number { @@ -121,11 +179,11 @@ export class CompressedObjectTreeModel, TFilterData e throw new Error('Method not implemented.'); } - getNode(location?: T | null | undefined): ITreeNode { + getNode(location?: T | null | undefined): ITreeNode { throw new Error('Method not implemented.'); } - getNodeLocation(node: ITreeNode): T | null { + getNodeLocation(node: ITreeNode): T | null { throw new Error('Method not implemented.'); } diff --git a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts index c48d95296f0..42c2f6e8952 100644 --- a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts +++ b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts @@ -4,8 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; -import { compress, ICompressedTreeElement, ICompressedTreeNode, decompress } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; +import { compress, ICompressedTreeElement, ICompressedTreeNode, decompress, CompressedObjectTreeModel } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; import { Iterator } from 'vs/base/common/iterator'; +import { ITreeNode } from 'vs/base/browser/ui/tree/tree'; +import { ISpliceable } from 'vs/base/common/sequence'; interface IResolvedCompressedTreeElement extends ICompressedTreeElement { readonly element: T; @@ -27,9 +29,9 @@ function resolve(treeElement: ICompressedTreeElement): IResolvedCompressed return result; } -suite('CompressedObjectTreeModel', function () { +suite('CompressedObjectTree', function () { - suite('compress', function () { + suite('compress & decompress', function () { test('small', function () { const decompressed: ICompressedTreeElement = { element: 1 }; @@ -286,4 +288,54 @@ suite('CompressedObjectTreeModel', function () { assert.deepEqual(resolve(decompress(compressed)), decompressed); }); }); + + function toSpliceable(arr: T[]): ISpliceable { + return { + splice(start: number, deleteCount: number, elements: T[]): void { + arr.splice(start, deleteCount, ...elements); + } + }; + } + + function toArray(list: ITreeNode>[]): T[][] { + return list.map(i => i.element.elements); + } + + suite('CompressedObjectTreeModel', function () { + + test('ctor', () => { + const list: ITreeNode>[] = []; + const model = new CompressedObjectTreeModel(toSpliceable(list)); + assert(model); + assert.equal(list.length, 0); + assert.equal(model.size, 0); + }); + + test('flat', () => { + const list: ITreeNode>[] = []; + const model = new CompressedObjectTreeModel(toSpliceable(list)); + + model.setChildren(null, Iterator.fromArray([ + { element: 0 }, + { element: 1 }, + { element: 2 } + ])); + + assert.deepEqual(toArray(list), [[0], [1], [2]]); + assert.equal(model.size, 3); + + model.setChildren(null, Iterator.fromArray([ + { element: 3 }, + { element: 4 }, + { element: 5 }, + ])); + + assert.deepEqual(toArray(list), [[3], [4], [5]]); + assert.equal(model.size, 3); + + model.setChildren(null, Iterator.empty()); + assert.deepEqual(toArray(list), []); + assert.equal(model.size, 0); + }); + }); }); \ No newline at end of file From 8f0aed0ce6acb21ef43cc9d500ea5f9b47581d37 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Sun, 21 Jul 2019 16:02:16 +0200 Subject: [PATCH 454/710] compressed tree: first full test --- .../ui/tree/compressedObjectTreeModel.test.ts | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts index 42c2f6e8952..e7eba095792 100644 --- a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts +++ b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts @@ -337,5 +337,63 @@ suite('CompressedObjectTree', function () { assert.deepEqual(toArray(list), []); assert.equal(model.size, 0); }); + + test('nested', () => { + const list: ITreeNode>[] = []; + const model = new CompressedObjectTreeModel(toSpliceable(list)); + + model.setChildren(null, Iterator.fromArray([ + { + element: 0, children: Iterator.fromArray([ + { element: 10 }, + { element: 11 }, + { element: 12 }, + ]) + }, + { element: 1 }, + { element: 2 } + ])); + + assert.deepEqual(toArray(list), [[0], [10], [11], [12], [1], [2]]); + assert.equal(model.size, 6); + + model.setChildren(12, Iterator.fromArray([ + { element: 120 }, + { element: 121 } + ])); + + assert.deepEqual(toArray(list), [[0], [10], [11], [12], [120], [121], [1], [2]]); + assert.equal(model.size, 8); + + model.setChildren(0, Iterator.empty()); + assert.deepEqual(toArray(list), [[0], [1], [2]]); + assert.equal(model.size, 3); + + model.setChildren(null, Iterator.empty()); + assert.deepEqual(toArray(list), []); + assert.equal(model.size, 0); + }); + + test('compressed', () => { + const list: ITreeNode>[] = []; + const model = new CompressedObjectTreeModel(toSpliceable(list)); + + model.setChildren(null, Iterator.fromArray([ + { + element: 1, children: Iterator.fromArray([{ + element: 11, children: Iterator.fromArray([{ + element: 111, children: Iterator.fromArray([ + { element: 1111 }, + { element: 1112 }, + { element: 1113 }, + ]) + }]) + }]) + } + ])); + + assert.deepEqual(toArray(list), [[1, 11, 111], [1111], [1112], [1113]]); + assert.equal(model.size, 6); + }); }); }); \ No newline at end of file From e0960021f2d1d68da5e5942654e5b974db246d5c Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Sun, 21 Jul 2019 16:13:13 +0200 Subject: [PATCH 455/710] compressed tree: more tests --- .../ui/tree/compressedObjectTreeModel.test.ts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts index e7eba095792..e952c56fdf9 100644 --- a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts +++ b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts @@ -394,6 +394,37 @@ suite('CompressedObjectTree', function () { assert.deepEqual(toArray(list), [[1, 11, 111], [1111], [1112], [1113]]); assert.equal(model.size, 6); + + model.setChildren(11, Iterator.fromArray([ + { element: 111 }, + { element: 112 }, + { element: 113 }, + ])); + + assert.deepEqual(toArray(list), [[1, 11], [111], [112], [113]]); + assert.equal(model.size, 5); + + model.setChildren(113, Iterator.fromArray([ + { element: 1131 } + ])); + + assert.deepEqual(toArray(list), [[1, 11], [111], [112], [113, 1131]]); + assert.equal(model.size, 6); + + model.setChildren(1131, Iterator.fromArray([ + { element: 1132 } + ])); + + assert.deepEqual(toArray(list), [[1, 11], [111], [112], [113, 1131, 1132]]); + assert.equal(model.size, 7); + + model.setChildren(1131, Iterator.fromArray([ + { element: 1132 }, + { element: 1133 }, + ])); + + assert.deepEqual(toArray(list), [[1, 11], [111], [112], [113, 1131], [1132], [1133]]); + assert.equal(model.size, 8); }); }); }); \ No newline at end of file From bbde6d2bc0ffbb4e5a2de7a31534be1b274bc4b7 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Sun, 21 Jul 2019 16:29:23 +0200 Subject: [PATCH 456/710] compressed trees: typing --- .../ui/tree/compressedObjectTreeModel.ts | 55 +++++++++++++------ .../base/browser/ui/tree/objectTreeModel.ts | 4 +- 2 files changed, 40 insertions(+), 19 deletions(-) diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index 5d8090bc34a..f224cacc1b6 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -82,18 +82,18 @@ export function splice(treeElement: ICompressedTreeElement, element: T, ch export interface ICompressedObjectTreeModelOptions extends IObjectTreeModelOptions, TFilterData> { } -export class CompressedObjectTreeModel, TFilterData extends NonNullable = void> implements ITreeModel { +export class CompressedObjectTreeModel, TFilterData extends NonNullable = void> implements ITreeModel | null, TFilterData, T | null> { readonly rootRef = null; - private _onDidSplice = new Emitter>(); - readonly onDidSplice: Event> = this._onDidSplice.event; + private _onDidSplice = new Emitter | null, TFilterData>>(); + readonly onDidSplice: Event | null, TFilterData>> = this._onDidSplice.event; - private _onDidChangeCollapseState = new Emitter>(); - readonly onDidChangeCollapseState: Event> = this._onDidChangeCollapseState.event; + private _onDidChangeCollapseState = new Emitter, TFilterData>>(); + readonly onDidChangeCollapseState: Event, TFilterData>> = this._onDidChangeCollapseState.event; - private _onDidChangeRenderNodeCount = new Emitter>(); - readonly onDidChangeRenderNodeCount: Event> = this._onDidChangeRenderNodeCount.event; + private _onDidChangeRenderNodeCount = new Emitter, TFilterData>>(); + readonly onDidChangeRenderNodeCount: Event, TFilterData>> = this._onDidChangeRenderNodeCount.event; private model: ObjectTreeModel, TFilterData>; private nodes = new Map>(); @@ -171,19 +171,26 @@ export class CompressedObjectTreeModel, TFilterData e return Iterator.empty(); } - getListIndex(location: T | null): number { - throw new Error('Method not implemented.'); + getListIndex(location: T): number { + const node = this.getCompressedNode(location); + return this.model.getListIndex(node); } - getListRenderCount(location: T | null): number { - throw new Error('Method not implemented.'); + getListRenderCount(location: T): number { + const node = this.getCompressedNode(location); + return this.model.getListRenderCount(node); } - getNode(location?: T | null | undefined): ITreeNode { - throw new Error('Method not implemented.'); + getNode(location?: T | null | undefined): ITreeNode | null, TFilterData> { + if (typeof location === 'undefined') { + return this.model.getNode(); + } + + const node = this.getCompressedNode(location); + return this.model.getNode(node); } - getNodeLocation(node: ITreeNode): T | null { + getNodeLocation(node: ITreeNode | null, TFilterData>): T | null { throw new Error('Method not implemented.'); } @@ -191,15 +198,15 @@ export class CompressedObjectTreeModel, TFilterData e throw new Error('Method not implemented.'); } - getParentElement(location: T | null): T | null { + getParentElement(location: T | null): ICompressedTreeNode | null { throw new Error('Method not implemented.'); } - getFirstElementChild(location: T | null): T | null | undefined { + getFirstElementChild(location: T | null): ICompressedTreeNode | null | undefined { throw new Error('Method not implemented.'); } - getLastElementAncestor(location?: T | null | undefined): T | null | undefined { + getLastElementAncestor(location?: T | null | undefined): ICompressedTreeNode | null | undefined { throw new Error('Method not implemented.'); } @@ -222,4 +229,18 @@ export class CompressedObjectTreeModel, TFilterData e refilter(): void { this.model.refilter(); } + + private getCompressedNode(element: T | null): ICompressedTreeNode | null { + if (element === null) { + return null; + } + + const node = this.nodes.get(element); + + if (!node) { + throw new Error(`Tree element not found: ${element}`); + } + + return node; + } } diff --git a/src/vs/base/browser/ui/tree/objectTreeModel.ts b/src/vs/base/browser/ui/tree/objectTreeModel.ts index 8ab76b67adc..29d4314e375 100644 --- a/src/vs/base/browser/ui/tree/objectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/objectTreeModel.ts @@ -190,12 +190,12 @@ export class ObjectTreeModel, TFilterData extends Non return this.model.getLastElementAncestor(location); } - getListIndex(element: T): number { + getListIndex(element: T | null): number { const location = this.getElementLocation(element); return this.model.getListIndex(location); } - getListRenderCount(element: T): number { + getListRenderCount(element: T | null): number { const location = this.getElementLocation(element); return this.model.getListRenderCount(location); } From d2757d83c88a7ca46134eed1158a83db89c4bba8 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Mon, 22 Jul 2019 08:06:14 -0700 Subject: [PATCH 457/710] Fix #77746, de-emphasizes pre/post scripts --- extensions/npm/resources/dark/prepostscript.svg | 4 +++- extensions/npm/resources/light/prepostscript.svg | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/npm/resources/dark/prepostscript.svg b/extensions/npm/resources/dark/prepostscript.svg index 7137a9d7bb5..a8c87f2d8f6 100644 --- a/extensions/npm/resources/dark/prepostscript.svg +++ b/extensions/npm/resources/dark/prepostscript.svg @@ -1,3 +1,5 @@ - + + + diff --git a/extensions/npm/resources/light/prepostscript.svg b/extensions/npm/resources/light/prepostscript.svg index 60f77501db7..87eb59e12a6 100644 --- a/extensions/npm/resources/light/prepostscript.svg +++ b/extensions/npm/resources/light/prepostscript.svg @@ -1,3 +1,5 @@ - + + + From 21c19f759cc8d0e0b20b25f037322daac7f15249 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 Jul 2019 17:55:15 +0200 Subject: [PATCH 458/710] use async await --- .../extensionsActions.test.ts | 197 ++++++++---------- 1 file changed, 85 insertions(+), 112 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index f77e97db712..3936d501162 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -1133,23 +1133,22 @@ suite('ExtensionsActions Test', () => { assert.ok(!testObject.enabled); }); - test('Test ReloadAction when extension is installed and uninstalled', () => { + test('Test ReloadAction when extension is installed and uninstalled', async () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]); const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); const gallery = aGalleryExtension('a'); instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(gallery)); - return instantiationService.get(IExtensionsWorkbenchService).queryGallery(CancellationToken.None) - .then((paged) => { - testObject.extension = paged.firstPage[0]; - const identifier = gallery.identifier; - installEvent.fire({ identifier, gallery }); - didInstallEvent.fire({ identifier, gallery, operation: InstallOperation.Install, local: aLocalExtension('a', gallery, { identifier }) }); - uninstallEvent.fire(identifier); - didUninstallEvent.fire({ identifier }); + const paged = await instantiationService.get(IExtensionsWorkbenchService).queryGallery(CancellationToken.None); - assert.ok(!testObject.enabled); - }); + testObject.extension = paged.firstPage[0]; + const identifier = gallery.identifier; + installEvent.fire({ identifier, gallery }); + didInstallEvent.fire({ identifier, gallery, operation: InstallOperation.Install, local: aLocalExtension('a', gallery, { identifier }) }); + uninstallEvent.fire(identifier); + didUninstallEvent.fire({ identifier }); + + assert.ok(!testObject.enabled); }); test('Test ReloadAction when extension is uninstalled', async () => { @@ -1172,25 +1171,24 @@ suite('ExtensionsActions Test', () => { }); }); - test('Test ReloadAction when extension is uninstalled and installed', () => { + test('Test ReloadAction when extension is uninstalled and installed', async () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.a'), version: '1.0.0', extensionLocation: URI.file('pub.a') }]); const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); const local = aLocalExtension('a'); instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); - return instantiationService.get(IExtensionsWorkbenchService).queryLocal() - .then(extensions => { - testObject.extension = extensions[0]; - uninstallEvent.fire(local.identifier); - didUninstallEvent.fire({ identifier: local.identifier }); + const extensions = await instantiationService.get(IExtensionsWorkbenchService).queryLocal(); - const gallery = aGalleryExtension('a'); - const identifier = gallery.identifier; - installEvent.fire({ identifier, gallery }); - didInstallEvent.fire({ identifier, gallery, operation: InstallOperation.Install, local }); + testObject.extension = extensions[0]; + uninstallEvent.fire(local.identifier); + didUninstallEvent.fire({ identifier: local.identifier }); - assert.ok(!testObject.enabled); - }); + const gallery = aGalleryExtension('a'); + const identifier = gallery.identifier; + installEvent.fire({ identifier, gallery }); + didInstallEvent.fire({ identifier, gallery, operation: InstallOperation.Install, local }); + + assert.ok(!testObject.enabled); }); test('Test ReloadAction when extension is updated while running', async () => { @@ -1215,128 +1213,103 @@ suite('ExtensionsActions Test', () => { }); }); - test('Test ReloadAction when extension is updated when not running', () => { + test('Test ReloadAction when extension is updated when not running', async () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]); const local = aLocalExtension('a', { version: '1.0.1' }); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) - .then(() => { - const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); - instantiationService.createInstance(ExtensionContainers, [testObject]); - const workbenchService = instantiationService.get(IExtensionsWorkbenchService); - instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); - return workbenchService.queryLocal() - .then(extensions => { - testObject.extension = extensions[0]; + await instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally); + const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + const workbenchService = instantiationService.get(IExtensionsWorkbenchService); + instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); + const extensions = await workbenchService.queryLocal(); + testObject.extension = extensions[0]; - const gallery = aGalleryExtension('a', { identifier: local.identifier, version: '1.0.2' }); - installEvent.fire({ identifier: gallery.identifier, gallery }); - didInstallEvent.fire({ identifier: gallery.identifier, gallery, operation: InstallOperation.Update, local: aLocalExtension('a', gallery, gallery) }); + const gallery = aGalleryExtension('a', { identifier: local.identifier, version: '1.0.2' }); + installEvent.fire({ identifier: gallery.identifier, gallery }); + didInstallEvent.fire({ identifier: gallery.identifier, gallery, operation: InstallOperation.Update, local: aLocalExtension('a', gallery, gallery) }); - assert.ok(!testObject.enabled); - }); - }); + assert.ok(!testObject.enabled); }); - test('Test ReloadAction when extension is disabled when running', () => { + test('Test ReloadAction when extension is disabled when running', async () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.a'), extensionLocation: URI.file('pub.a') }]); const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); const local = aLocalExtension('a'); const workbenchService = instantiationService.get(IExtensionsWorkbenchService); instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); - return workbenchService.queryLocal().then(extensions => { - testObject.extension = extensions[0]; - return workbenchService.setEnablement(extensions[0], EnablementState.DisabledGlobally) - .then(() => testObject.update()) - .then(() => { - assert.ok(testObject.enabled); - assert.equal('Please reload Visual Studio Code to disable this extension.', testObject.tooltip); - }); - }); + const extensions = await workbenchService.queryLocal(); + testObject.extension = extensions[0]; + await workbenchService.setEnablement(extensions[0], EnablementState.DisabledGlobally); + await testObject.update(); + + assert.ok(testObject.enabled); + assert.equal('Please reload Visual Studio Code to disable this extension.', testObject.tooltip); }); - test('Test ReloadAction when extension enablement is toggled when running', () => { + test('Test ReloadAction when extension enablement is toggled when running', async () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.a'), version: '1.0.0', extensionLocation: URI.file('pub.a') }]); const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); instantiationService.createInstance(ExtensionContainers, [testObject]); const local = aLocalExtension('a'); const workbenchService = instantiationService.get(IExtensionsWorkbenchService); instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); - return workbenchService.queryLocal(). - then(extensions => { - testObject.extension = extensions[0]; - return workbenchService.setEnablement(extensions[0], EnablementState.DisabledGlobally) - .then(() => workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally)) - .then(() => assert.ok(!testObject.enabled)); - }); + const extensions = await workbenchService.queryLocal(); + testObject.extension = extensions[0]; + await workbenchService.setEnablement(extensions[0], EnablementState.DisabledGlobally); + await workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally); + assert.ok(!testObject.enabled); }); - test('Test ReloadAction when extension is enabled when not running', () => { + test('Test ReloadAction when extension is enabled when not running', async () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]); const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) - .then(() => { - const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); - instantiationService.createInstance(ExtensionContainers, [testObject]); - const workbenchService = instantiationService.get(IExtensionsWorkbenchService); - instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); - return workbenchService.queryLocal() - .then(extensions => { - testObject.extension = extensions[0]; - return workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally) - .then(() => testObject.update()) - .then(() => { - assert.ok(testObject.enabled); - assert.equal('Please reload Visual Studio Code to enable this extension.', testObject.tooltip); - }); - }); - }); + await instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally); + const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + const workbenchService = instantiationService.get(IExtensionsWorkbenchService); + instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); + const extensions = await workbenchService.queryLocal(); + testObject.extension = extensions[0]; + await workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally); + await testObject.update(); + assert.ok(testObject.enabled); + assert.equal('Please reload Visual Studio Code to enable this extension.', testObject.tooltip); }); - test('Test ReloadAction when extension enablement is toggled when not running', () => { + test('Test ReloadAction when extension enablement is toggled when not running', async () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]); const local = aLocalExtension('a'); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) - .then(() => { - const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); - instantiationService.createInstance(ExtensionContainers, [testObject]); - const workbenchService = instantiationService.get(IExtensionsWorkbenchService); - instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); - return workbenchService.queryLocal() - .then(extensions => { - testObject.extension = extensions[0]; - return workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally) - .then(() => workbenchService.setEnablement(extensions[0], EnablementState.DisabledGlobally)) - .then(() => assert.ok(!testObject.enabled)); - }); - }); + await instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally); + const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + const workbenchService = instantiationService.get(IExtensionsWorkbenchService); + instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); + const extensions = await workbenchService.queryLocal(); + testObject.extension = extensions[0]; + await workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally); + await workbenchService.setEnablement(extensions[0], EnablementState.DisabledGlobally); + assert.ok(!testObject.enabled); }); - test('Test ReloadAction when extension is updated when not running and enabled', () => { + test('Test ReloadAction when extension is updated when not running and enabled', async () => { instantiationService.stubPromise(IExtensionService, 'getExtensions', [{ identifier: new ExtensionIdentifier('pub.b'), extensionLocation: URI.file('pub.b') }]); const local = aLocalExtension('a', { version: '1.0.1' }); - return instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally) - .then(() => { - const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); - instantiationService.createInstance(ExtensionContainers, [testObject]); - const workbenchService = instantiationService.get(IExtensionsWorkbenchService); - instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); - return workbenchService.queryLocal() - .then(extensions => { - testObject.extension = extensions[0]; + await instantiationService.get(IExtensionEnablementService).setEnablement([local], EnablementState.DisabledGlobally); + const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + const workbenchService = instantiationService.get(IExtensionsWorkbenchService); + instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); + const extensions = await workbenchService.queryLocal(); + testObject.extension = extensions[0]; - const gallery = aGalleryExtension('a', { identifier: local.identifier, version: '1.0.2' }); - installEvent.fire({ identifier: gallery.identifier, gallery }); - didInstallEvent.fire({ identifier: gallery.identifier, gallery, operation: InstallOperation.Install, local: aLocalExtension('a', gallery, gallery) }); - return workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally) - .then(() => testObject.update()) - .then(() => { - assert.ok(testObject.enabled); - assert.equal('Please reload Visual Studio Code to enable this extension.', testObject.tooltip); - }); - - }); - }); + const gallery = aGalleryExtension('a', { identifier: local.identifier, version: '1.0.2' }); + installEvent.fire({ identifier: gallery.identifier, gallery }); + didInstallEvent.fire({ identifier: gallery.identifier, gallery, operation: InstallOperation.Install, local: aLocalExtension('a', gallery, gallery) }); + await workbenchService.setEnablement(extensions[0], EnablementState.EnabledGlobally); + await testObject.update(); + assert.ok(testObject.enabled); + assert.equal('Please reload Visual Studio Code to enable this extension.', testObject.tooltip); }); test('Test ReloadAction when a localization extension is newly installed', async () => { From 8007de360293198f1ce94a39c2b6e4f6b9ec2d7f Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 Jul 2019 18:01:34 +0200 Subject: [PATCH 459/710] fix #77764 --- .../extensions/browser/extensionsActions.ts | 2 +- .../extensionsActions.test.ts | 30 ++++++++++++++----- .../electron-browser/extensionService.ts | 4 +-- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 9ff2539cdb6..ea26aa79a2c 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -1200,7 +1200,7 @@ export class ReloadAction extends ExtensionAction { const isSameExtensionRunning = runningExtension && this.extension.server === this.extensionManagementServerService.getExtensionManagementServer(runningExtension.extensionLocation); if (isUninstalled) { - if (isSameExtensionRunning) { + if (isSameExtensionRunning && !this.extensionService.canRemoveExtension(runningExtension)) { this.enabled = true; this.label = localize('reloadRequired', "Reload Required"); this.tooltip = localize('postUninstallTooltip', "Please reload Visual Studio Code to complete the uninstallation of this extension."); diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index 3936d501162..c13fb820c2a 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -1160,15 +1160,29 @@ suite('ExtensionsActions Test', () => { const extensions = await instantiationService.get(IExtensionsWorkbenchService).queryLocal(); testObject.extension = extensions[0]; - return new Promise(c => { - testObject.onDidChange(() => { - if (testObject.enabled && testObject.tooltip === 'Please reload Visual Studio Code to complete the uninstallation of this extension.') { - c(); - } - }); - uninstallEvent.fire(local.identifier); - didUninstallEvent.fire({ identifier: local.identifier }); + uninstallEvent.fire(local.identifier); + didUninstallEvent.fire({ identifier: local.identifier }); + assert.ok(testObject.enabled); + assert.equal(testObject.tooltip, 'Please reload Visual Studio Code to complete the uninstallation of this extension.'); + }); + + test('Test ReloadAction when extension is uninstalled and can be removed', async () => { + const local = aLocalExtension('a'); + instantiationService.stub(IExtensionService, >{ + getExtensions: () => Promise.resolve([ExtensionsActions.toExtensionDescription(local)]), + onDidChangeExtensions: new Emitter().event, + canRemoveExtension: (extension) => true, + canAddExtension: (extension) => true }); + const testObject: ExtensionsActions.ReloadAction = instantiationService.createInstance(ExtensionsActions.ReloadAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [local]); + const extensions = await instantiationService.get(IExtensionsWorkbenchService).queryLocal(); + testObject.extension = extensions[0]; + + uninstallEvent.fire(local.identifier); + didUninstallEvent.fire({ identifier: local.identifier }); + assert.ok(!testObject.enabled); }); test('Test ReloadAction when extension is uninstalled and installed', async () => { diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index 53d85cbeaa8..e7350dc0c0c 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -203,6 +203,8 @@ export class ExtensionService extends AbstractExtensionService implements IExten // Update the local registry const result = this._registry.deltaExtensions(toAdd, toRemove.map(e => e.identifier)); + this._onDidChangeExtensions.fire(undefined); + toRemove = toRemove.concat(result.removedDueToLooping); if (result.removedDueToLooping.length > 0) { this._logOrShowMessage(Severity.Error, nls.localize('looping', "The following extensions contain dependency loops and have been disabled: {0}", result.removedDueToLooping.map(e => `'${e.identifier.value}'`).join(', '))); @@ -219,8 +221,6 @@ export class ExtensionService extends AbstractExtensionService implements IExten await this._extensionHostProcessManagers[0].deltaExtensions(toAdd, toRemove.map(e => e.identifier)); } - this._onDidChangeExtensions.fire(undefined); - for (let i = 0; i < toAdd.length; i++) { this._activateAddedExtensionIfNeeded(toAdd[i]); } From f88f79b6e06040c45628551ea977f78269435228 Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Mon, 22 Jul 2019 11:34:27 -0500 Subject: [PATCH 460/710] Add Deprecated enum member to extHostTypes --- src/vs/workbench/api/common/extHostTypes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index b8aebf92b45..de8d3eec8b3 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -773,6 +773,7 @@ export class SnippetString { export enum DiagnosticTag { Unnecessary = 1, + Deprecated = 2 } export enum DiagnosticSeverity { From d61e1849df41a02016c0470dacb7f29b242bf153 Mon Sep 17 00:00:00 2001 From: Brett Cannon <54418+brettcannon@users.noreply.github.com> Date: Mon, 22 Jul 2019 09:40:59 -0700 Subject: [PATCH 461/710] Fix a spellling mistake in a doc string --- src/vs/vscode.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 786439397ef..65892f8b976 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3826,7 +3826,7 @@ declare module 'vscode' { /** * Provide selection ranges for the given positions. * - * Selection ranges should be computed individually and independend for each position. The editor will merge + * Selection ranges should be computed individually and independent for each position. The editor will merge * and deduplicate ranges but providers must return hierarchies of selection ranges so that a range * is [contained](#Range.contains) by its parent. * From 6b3ae43691a3729e4a988d1182abe6b7aba2f045 Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Mon, 22 Jul 2019 11:52:48 -0500 Subject: [PATCH 462/710] Add Deprecated to MarkerTag --- src/vs/editor/common/standalone/standaloneEnums.ts | 3 ++- src/vs/monaco.d.ts | 3 ++- src/vs/platform/markers/common/markers.ts | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/standalone/standaloneEnums.ts b/src/vs/editor/common/standalone/standaloneEnums.ts index df80861b2a8..46d295d2398 100644 --- a/src/vs/editor/common/standalone/standaloneEnums.ts +++ b/src/vs/editor/common/standalone/standaloneEnums.ts @@ -7,7 +7,8 @@ export enum MarkerTag { - Unnecessary = 1 + Unnecessary = 1, + Deprecated = 2 } export enum MarkerSeverity { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 945d10d7e14..982a16b87ef 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -27,7 +27,8 @@ declare namespace monaco { export enum MarkerTag { - Unnecessary = 1 + Unnecessary = 1, + Deprecated = 2 } export enum MarkerSeverity { diff --git a/src/vs/platform/markers/common/markers.ts b/src/vs/platform/markers/common/markers.ts index 9461b506c21..235c4b12f36 100644 --- a/src/vs/platform/markers/common/markers.ts +++ b/src/vs/platform/markers/common/markers.ts @@ -39,6 +39,7 @@ export interface IRelatedInformation { export const enum MarkerTag { Unnecessary = 1, + Deprecated = 2 } export enum MarkerSeverity { From f2046aeaace7438ad04248b3ff4e7852b1f39a6b Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 Jul 2019 18:58:09 +0200 Subject: [PATCH 463/710] fix #76995 --- .../configurationService.test.ts | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts b/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts index 3c059ad069f..fb34733022e 100644 --- a/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts +++ b/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts @@ -42,7 +42,6 @@ import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemPro import { ConfigurationCache } from 'vs/workbench/services/configuration/node/configurationCache'; import { IRemoteAgentEnvironment } from 'vs/platform/remote/common/remoteAgentEnvironment'; import { IConfigurationCache } from 'vs/workbench/services/configuration/common/configuration'; -// import { VSBuffer } from 'vs/base/common/buffer'; import { SignService } from 'vs/platform/sign/browser/signService'; import { FileUserDataProvider } from 'vs/workbench/services/userData/common/fileUserDataProvider'; import { IKeybindingEditingService, KeybindingsEditingService } from 'vs/workbench/services/keybinding/common/keybindingEditing'; @@ -1586,26 +1585,26 @@ suite('WorkspaceConfigurationService - Remote Folder', () => { return promise; }); - // test('update remote settings', async () => { - // registerRemoteFileSystemProvider(); - // resolveRemoteEnvironment(); - // await initialize(); - // assert.equal(testObject.getValue('configurationService.remote.machineSetting'), 'isSet'); - // const promise = new Promise((c, e) => { - // testObject.onDidChangeConfiguration(event => { - // try { - // assert.equal(event.source, ConfigurationTarget.USER); - // assert.deepEqual(event.affectedKeys, ['configurationService.remote.machineSetting']); - // assert.equal(testObject.getValue('configurationService.remote.machineSetting'), 'remoteValue'); - // c(); - // } catch (error) { - // e(error); - // } - // }); - // }); - // await instantiationService.get(IFileService).writeFile(URI.file(remoteSettingsFile), VSBuffer.fromString('{ "configurationService.remote.machineSetting": "remoteValue" }')); - // return promise; - // }); + test('update remote settings', async () => { + registerRemoteFileSystemProvider(); + resolveRemoteEnvironment(); + await initialize(); + assert.equal(testObject.getValue('configurationService.remote.machineSetting'), 'isSet'); + const promise = new Promise((c, e) => { + testObject.onDidChangeConfiguration(event => { + try { + assert.equal(event.source, ConfigurationTarget.USER); + assert.deepEqual(event.affectedKeys, ['configurationService.remote.machineSetting']); + assert.equal(testObject.getValue('configurationService.remote.machineSetting'), 'remoteValue'); + c(); + } catch (error) { + e(error); + } + }); + }); + fs.writeFileSync(remoteSettingsFile, '{ "configurationService.remote.machineSetting": "remoteValue" }'); + return promise; + }); test('machine settings in local user settings does not override defaults', async () => { fs.writeFileSync(globalSettingsFile, '{ "configurationService.remote.machineSetting": "globalValue" }'); From 36c9106350a290fb0d128f6a3f24cedcbb9fcf63 Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Mon, 22 Jul 2019 11:59:00 -0500 Subject: [PATCH 464/710] Add DiagnosticTag case for MarkerTag.Deprecated --- src/vs/workbench/api/common/extHostTypeConverters.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/api/common/extHostTypeConverters.ts b/src/vs/workbench/api/common/extHostTypeConverters.ts index 80fef1bdda0..bc2951b6220 100644 --- a/src/vs/workbench/api/common/extHostTypeConverters.ts +++ b/src/vs/workbench/api/common/extHostTypeConverters.ts @@ -108,6 +108,8 @@ export namespace DiagnosticTag { switch (value) { case types.DiagnosticTag.Unnecessary: return MarkerTag.Unnecessary; + case types.DiagnosticTag.Deprecated: + return MarkerTag.Deprecated; } return undefined; } From e68e29827b9238873d632ef7fe70b02cbb66c059 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 Jul 2019 19:16:23 +0200 Subject: [PATCH 465/710] disable the test --- .../configurationService.test.ts | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts b/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts index fb34733022e..5f4a9ced4a2 100644 --- a/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts +++ b/src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts @@ -1585,26 +1585,26 @@ suite('WorkspaceConfigurationService - Remote Folder', () => { return promise; }); - test('update remote settings', async () => { - registerRemoteFileSystemProvider(); - resolveRemoteEnvironment(); - await initialize(); - assert.equal(testObject.getValue('configurationService.remote.machineSetting'), 'isSet'); - const promise = new Promise((c, e) => { - testObject.onDidChangeConfiguration(event => { - try { - assert.equal(event.source, ConfigurationTarget.USER); - assert.deepEqual(event.affectedKeys, ['configurationService.remote.machineSetting']); - assert.equal(testObject.getValue('configurationService.remote.machineSetting'), 'remoteValue'); - c(); - } catch (error) { - e(error); - } - }); - }); - fs.writeFileSync(remoteSettingsFile, '{ "configurationService.remote.machineSetting": "remoteValue" }'); - return promise; - }); + // test('update remote settings', async () => { + // registerRemoteFileSystemProvider(); + // resolveRemoteEnvironment(); + // await initialize(); + // assert.equal(testObject.getValue('configurationService.remote.machineSetting'), 'isSet'); + // const promise = new Promise((c, e) => { + // testObject.onDidChangeConfiguration(event => { + // try { + // assert.equal(event.source, ConfigurationTarget.USER); + // assert.deepEqual(event.affectedKeys, ['configurationService.remote.machineSetting']); + // assert.equal(testObject.getValue('configurationService.remote.machineSetting'), 'remoteValue'); + // c(); + // } catch (error) { + // e(error); + // } + // }); + // }); + // fs.writeFileSync(remoteSettingsFile, '{ "configurationService.remote.machineSetting": "remoteValue" }'); + // return promise; + // }); test('machine settings in local user settings does not override defaults', async () => { fs.writeFileSync(globalSettingsFile, '{ "configurationService.remote.machineSetting": "globalValue" }'); From a3e98848e91ca41c6d75d35e6478b3c8fc4eb61d Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 22 Jul 2019 17:40:48 +0200 Subject: [PATCH 466/710] Fixes #49454: Store the column selection start location --- .../editor/browser/controller/coreCommands.ts | 25 ++++--- src/vs/editor/browser/view/viewController.ts | 11 +-- src/vs/editor/common/controller/cursor.ts | 9 ++- .../controller/cursorColumnSelection.ts | 72 ++++++++++--------- .../editor/common/controller/cursorCommon.ts | 3 + .../test/browser/controller/cursor.test.ts | 12 ++-- 6 files changed, 75 insertions(+), 57 deletions(-) diff --git a/src/vs/editor/browser/controller/coreCommands.ts b/src/vs/editor/browser/controller/coreCommands.ts index e72acd359f3..193ff840ac4 100644 --- a/src/vs/editor/browser/controller/coreCommands.ts +++ b/src/vs/editor/browser/controller/coreCommands.ts @@ -316,6 +316,9 @@ export namespace CoreNavigationCommands { const result = this._getColumnSelectResult(cursors.context, cursors.getPrimaryCursor(), cursors.getColumnSelectData(), args); cursors.setStates(args.source, CursorChangeReason.Explicit, result.viewStates.map((viewState) => CursorState.fromViewState(viewState))); cursors.setColumnSelectData({ + isReal: true, + fromViewLineNumber: result.fromLineNumber, + fromViewVisualColumn: result.fromVisualColumn, toViewLineNumber: result.toLineNumber, toViewVisualColumn: result.toVisualColumn }); @@ -338,15 +341,15 @@ export namespace CoreNavigationCommands { // validate `args` const validatedPosition = context.model.validatePosition(args.position); + const validatedViewPosition = context.validateViewPosition(new Position(args.viewPosition.lineNumber, args.viewPosition.column), validatedPosition); - let validatedViewPosition: Position; - if (args.viewPosition) { - validatedViewPosition = context.validateViewPosition(new Position(args.viewPosition.lineNumber, args.viewPosition.column), validatedPosition); - } else { - validatedViewPosition = context.convertModelPositionToViewPosition(validatedPosition); + let fromViewLineNumber = prevColumnSelectData.fromViewLineNumber; + let fromViewVisualColumn = prevColumnSelectData.fromViewVisualColumn; + if (!prevColumnSelectData.isReal && args.setAnchorIfNotSet) { + fromViewLineNumber = validatedViewPosition.lineNumber; + fromViewVisualColumn = args.mouseColumn - 1; } - - return ColumnSelection.columnSelect(context.config, context.viewModel, primary.viewState.selection, validatedViewPosition.lineNumber, args.mouseColumn - 1); + return ColumnSelection.columnSelect(context.config, context.viewModel, fromViewLineNumber, fromViewVisualColumn, validatedViewPosition.lineNumber, args.mouseColumn - 1); } }); @@ -365,7 +368,7 @@ export namespace CoreNavigationCommands { } protected _getColumnSelectResult(context: CursorContext, primary: CursorState, prevColumnSelectData: IColumnSelectData, args: any): IColumnSelectResult { - return ColumnSelection.columnSelectLeft(context.config, context.viewModel, primary.viewState, prevColumnSelectData.toViewLineNumber, prevColumnSelectData.toViewVisualColumn); + return ColumnSelection.columnSelectLeft(context.config, context.viewModel, prevColumnSelectData); } }); @@ -384,7 +387,7 @@ export namespace CoreNavigationCommands { } protected _getColumnSelectResult(context: CursorContext, primary: CursorState, prevColumnSelectData: IColumnSelectData, args: any): IColumnSelectResult { - return ColumnSelection.columnSelectRight(context.config, context.viewModel, primary.viewState, prevColumnSelectData.toViewLineNumber, prevColumnSelectData.toViewVisualColumn); + return ColumnSelection.columnSelectRight(context.config, context.viewModel, prevColumnSelectData); } }); @@ -398,7 +401,7 @@ export namespace CoreNavigationCommands { } protected _getColumnSelectResult(context: CursorContext, primary: CursorState, prevColumnSelectData: IColumnSelectData, args: any): IColumnSelectResult { - return ColumnSelection.columnSelectUp(context.config, context.viewModel, primary.viewState, this._isPaged, prevColumnSelectData.toViewLineNumber, prevColumnSelectData.toViewVisualColumn); + return ColumnSelection.columnSelectUp(context.config, context.viewModel, prevColumnSelectData, this._isPaged); } } @@ -436,7 +439,7 @@ export namespace CoreNavigationCommands { } protected _getColumnSelectResult(context: CursorContext, primary: CursorState, prevColumnSelectData: IColumnSelectData, args: any): IColumnSelectResult { - return ColumnSelection.columnSelectDown(context.config, context.viewModel, primary.viewState, this._isPaged, prevColumnSelectData.toViewLineNumber, prevColumnSelectData.toViewVisualColumn); + return ColumnSelection.columnSelectDown(context.config, context.viewModel, prevColumnSelectData, this._isPaged); } } diff --git a/src/vs/editor/browser/view/viewController.ts b/src/vs/editor/browser/view/viewController.ts index d2389995052..10fb2e1aa6b 100644 --- a/src/vs/editor/browser/view/viewController.ts +++ b/src/vs/editor/browser/view/viewController.ts @@ -133,7 +133,7 @@ export class ViewController { public dispatchMouse(data: IMouseDispatchData): void { if (data.middleButton) { if (data.inSelectionMode) { - this._columnSelect(data.position, data.mouseColumn); + this._columnSelect(data.position, data.mouseColumn, true); } else { this.moveTo(data.position); } @@ -182,7 +182,7 @@ export class ViewController { if (this._hasMulticursorModifier(data)) { if (!this._hasNonMulticursorModifier(data)) { if (data.shiftKey) { - this._columnSelect(data.position, data.mouseColumn); + this._columnSelect(data.position, data.mouseColumn, false); } else { // Do multi-cursor operations only when purely alt is pressed if (data.inSelectionMode) { @@ -195,7 +195,7 @@ export class ViewController { } else { if (data.inSelectionMode) { if (data.altKey) { - this._columnSelect(data.position, data.mouseColumn); + this._columnSelect(data.position, data.mouseColumn, true); } else { this._moveToSelect(data.position); } @@ -222,12 +222,13 @@ export class ViewController { this._execMouseCommand(CoreNavigationCommands.MoveToSelect, this._usualArgs(viewPosition)); } - private _columnSelect(viewPosition: Position, mouseColumn: number): void { + private _columnSelect(viewPosition: Position, mouseColumn: number, setAnchorIfNotSet: boolean): void { viewPosition = this._validateViewColumn(viewPosition); this._execMouseCommand(CoreNavigationCommands.ColumnSelect, { position: this._convertViewToModelPosition(viewPosition), viewPosition: viewPosition, - mouseColumn: mouseColumn + mouseColumn: mouseColumn, + setAnchorIfNotSet: setAnchorIfNotSet }); } diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 81493777b1c..add9f3444a9 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -314,9 +314,14 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { } const primaryCursor = this._cursors.getPrimaryCursor(); const primaryPos = primaryCursor.viewState.position; + const viewLineNumber = primaryPos.lineNumber; + const viewVisualColumn = CursorColumns.visibleColumnFromColumn2(this.context.config, this.context.viewModel, primaryPos); return { - toViewLineNumber: primaryPos.lineNumber, - toViewVisualColumn: CursorColumns.visibleColumnFromColumn2(this.context.config, this.context.viewModel, primaryPos) + isReal: false, + fromViewLineNumber: viewLineNumber, + fromViewVisualColumn: viewVisualColumn, + toViewLineNumber: viewLineNumber, + toViewVisualColumn: viewVisualColumn, }; } diff --git a/src/vs/editor/common/controller/cursorColumnSelection.ts b/src/vs/editor/common/controller/cursorColumnSelection.ts index efa35ca08e1..cb89e0efcbd 100644 --- a/src/vs/editor/common/controller/cursorColumnSelection.ts +++ b/src/vs/editor/common/controller/cursorColumnSelection.ts @@ -3,21 +3,22 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CursorColumns, CursorConfiguration, ICursorSimpleModel, SingleCursorState } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, CursorConfiguration, ICursorSimpleModel, SingleCursorState, IColumnSelectData } from 'vs/editor/common/controller/cursorCommon'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; -import { Selection } from 'vs/editor/common/core/selection'; export interface IColumnSelectResult { viewStates: SingleCursorState[]; reversed: boolean; + fromLineNumber: number; + fromVisualColumn: number; toLineNumber: number; toVisualColumn: number; } export class ColumnSelection { - private static _columnSelect(config: CursorConfiguration, model: ICursorSimpleModel, fromLineNumber: number, fromVisibleColumn: number, toLineNumber: number, toVisibleColumn: number): IColumnSelectResult { + public static columnSelect(config: CursorConfiguration, model: ICursorSimpleModel, fromLineNumber: number, fromVisibleColumn: number, toLineNumber: number, toVisibleColumn: number): IColumnSelectResult { let lineCount = Math.abs(toLineNumber - fromLineNumber) + 1; let reversed = (fromLineNumber > toLineNumber); let isRTL = (fromVisibleColumn > toVisibleColumn); @@ -61,64 +62,65 @@ export class ColumnSelection { )); } + if (result.length === 0) { + // We are after all the lines, so add cursor at the end of each line + for (let i = 0; i < lineCount; i++) { + const lineNumber = fromLineNumber + (reversed ? -i : i); + const maxColumn = model.getLineMaxColumn(lineNumber); + + result.push(new SingleCursorState( + new Range(lineNumber, maxColumn, lineNumber, maxColumn), 0, + new Position(lineNumber, maxColumn), 0 + )); + } + } + return { viewStates: result, reversed: reversed, + fromLineNumber: fromLineNumber, + fromVisualColumn: fromVisibleColumn, toLineNumber: toLineNumber, toVisualColumn: toVisibleColumn }; } - public static columnSelect(config: CursorConfiguration, model: ICursorSimpleModel, fromViewSelection: Selection, toViewLineNumber: number, toViewVisualColumn: number): IColumnSelectResult { - const fromViewPosition = new Position(fromViewSelection.selectionStartLineNumber, fromViewSelection.selectionStartColumn); - const fromViewVisibleColumn = CursorColumns.visibleColumnFromColumn2(config, model, fromViewPosition); - return ColumnSelection._columnSelect(config, model, fromViewPosition.lineNumber, fromViewVisibleColumn, toViewLineNumber, toViewVisualColumn); - } - - public static columnSelectLeft(config: CursorConfiguration, model: ICursorSimpleModel, cursor: SingleCursorState, toViewLineNumber: number, toViewVisualColumn: number): IColumnSelectResult { + public static columnSelectLeft(config: CursorConfiguration, model: ICursorSimpleModel, prevColumnSelectData: IColumnSelectData): IColumnSelectResult { + let toViewVisualColumn = prevColumnSelectData.toViewVisualColumn; if (toViewVisualColumn > 1) { toViewVisualColumn--; } - return this.columnSelect(config, model, cursor.selection, toViewLineNumber, toViewVisualColumn); + return ColumnSelection.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, prevColumnSelectData.toViewLineNumber, toViewVisualColumn); } - public static columnSelectRight(config: CursorConfiguration, model: ICursorSimpleModel, cursor: SingleCursorState, toViewLineNumber: number, toViewVisualColumn: number): IColumnSelectResult { + public static columnSelectRight(config: CursorConfiguration, model: ICursorSimpleModel, prevColumnSelectData: IColumnSelectData): IColumnSelectResult { let maxVisualViewColumn = 0; - let minViewLineNumber = Math.min(cursor.position.lineNumber, toViewLineNumber); - let maxViewLineNumber = Math.max(cursor.position.lineNumber, toViewLineNumber); + const minViewLineNumber = Math.min(prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.toViewLineNumber); + const maxViewLineNumber = Math.max(prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.toViewLineNumber); for (let lineNumber = minViewLineNumber; lineNumber <= maxViewLineNumber; lineNumber++) { - let lineMaxViewColumn = model.getLineMaxColumn(lineNumber); - let lineMaxVisualViewColumn = CursorColumns.visibleColumnFromColumn2(config, model, new Position(lineNumber, lineMaxViewColumn)); + const lineMaxViewColumn = model.getLineMaxColumn(lineNumber); + const lineMaxVisualViewColumn = CursorColumns.visibleColumnFromColumn2(config, model, new Position(lineNumber, lineMaxViewColumn)); maxVisualViewColumn = Math.max(maxVisualViewColumn, lineMaxVisualViewColumn); } + let toViewVisualColumn = prevColumnSelectData.toViewVisualColumn; if (toViewVisualColumn < maxVisualViewColumn) { toViewVisualColumn++; } - return this.columnSelect(config, model, cursor.selection, toViewLineNumber, toViewVisualColumn); + return this.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, prevColumnSelectData.toViewLineNumber, toViewVisualColumn); } - public static columnSelectUp(config: CursorConfiguration, model: ICursorSimpleModel, cursor: SingleCursorState, isPaged: boolean, toViewLineNumber: number, toViewVisualColumn: number): IColumnSelectResult { - let linesCount = isPaged ? config.pageSize : 1; - - toViewLineNumber -= linesCount; - if (toViewLineNumber < 1) { - toViewLineNumber = 1; - } - - return this.columnSelect(config, model, cursor.selection, toViewLineNumber, toViewVisualColumn); + public static columnSelectUp(config: CursorConfiguration, model: ICursorSimpleModel, prevColumnSelectData: IColumnSelectData, isPaged: boolean): IColumnSelectResult { + const linesCount = isPaged ? config.pageSize : 1; + const toViewLineNumber = Math.max(1, prevColumnSelectData.toViewLineNumber - linesCount); + return this.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, toViewLineNumber, prevColumnSelectData.toViewVisualColumn); } - public static columnSelectDown(config: CursorConfiguration, model: ICursorSimpleModel, cursor: SingleCursorState, isPaged: boolean, toViewLineNumber: number, toViewVisualColumn: number): IColumnSelectResult { - let linesCount = isPaged ? config.pageSize : 1; - - toViewLineNumber += linesCount; - if (toViewLineNumber > model.getLineCount()) { - toViewLineNumber = model.getLineCount(); - } - - return this.columnSelect(config, model, cursor.selection, toViewLineNumber, toViewVisualColumn); + public static columnSelectDown(config: CursorConfiguration, model: ICursorSimpleModel, prevColumnSelectData: IColumnSelectData, isPaged: boolean): IColumnSelectResult { + const linesCount = isPaged ? config.pageSize : 1; + const toViewLineNumber = Math.min(model.getLineCount(), prevColumnSelectData.toViewLineNumber + linesCount); + return this.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, toViewLineNumber, prevColumnSelectData.toViewVisualColumn); } } diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index d6a64206ec4..844387516d6 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -21,6 +21,9 @@ import { VerticalRevealType } from 'vs/editor/common/view/viewEvents'; import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; export interface IColumnSelectData { + isReal: boolean; + fromViewLineNumber: number; + fromViewVisualColumn: number; toViewLineNumber: number; toViewVisualColumn: number; } diff --git a/src/vs/editor/test/browser/controller/cursor.test.ts b/src/vs/editor/test/browser/controller/cursor.test.ts index aee33dba412..cf0905a08ea 100644 --- a/src/vs/editor/test/browser/controller/cursor.test.ts +++ b/src/vs/editor/test/browser/controller/cursor.test.ts @@ -710,7 +710,8 @@ suite('Editor Controller - Cursor', () => { CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { position: new Position(4, 4), viewPosition: new Position(4, 4), - mouseColumn: 15 + mouseColumn: 15, + setAnchorIfNotSet: false }); let expectedSelections = [ @@ -745,7 +746,8 @@ suite('Editor Controller - Cursor', () => { CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { position: new Position(4, 1), viewPosition: new Position(4, 1), - mouseColumn: 1 + mouseColumn: 1, + setAnchorIfNotSet: false }); assertCursor(cursor, [ @@ -784,7 +786,8 @@ suite('Editor Controller - Cursor', () => { CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { position: new Position(1, 1), viewPosition: new Position(1, 1), - mouseColumn: 1 + mouseColumn: 1, + setAnchorIfNotSet: false }); assertCursor(cursor, [ new Selection(10, 10, 10, 1), @@ -802,7 +805,8 @@ suite('Editor Controller - Cursor', () => { CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { position: new Position(1, 1), viewPosition: new Position(1, 1), - mouseColumn: 1 + mouseColumn: 1, + setAnchorIfNotSet: false }); assertCursor(cursor, [ new Selection(10, 10, 10, 1), From 98f298843513d9dbca52043e2249beb6194dbbb0 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 Jul 2019 17:50:04 +0200 Subject: [PATCH 467/710] compressed tree: filling out the blanks --- .../ui/tree/compressedObjectTreeModel.ts | 42 ++++++++++++------- .../base/browser/ui/tree/objectTreeModel.ts | 8 +++- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index f224cacc1b6..83bcdf05ce5 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -5,7 +5,7 @@ import { ISpliceable } from 'vs/base/common/sequence'; import { Iterator, ISequence } from 'vs/base/common/iterator'; -import { Event, Emitter } from 'vs/base/common/event'; +import { Event } from 'vs/base/common/event'; import { ITreeModel, ITreeNode, ITreeElement, ICollapseStateChangeEvent, ITreeModelSpliceEvent } from 'vs/base/browser/ui/tree/tree'; import { IObjectTreeModelOptions, ObjectTreeModel } from 'vs/base/browser/ui/tree/objectTreeModel'; @@ -86,14 +86,9 @@ export class CompressedObjectTreeModel, TFilterData e readonly rootRef = null; - private _onDidSplice = new Emitter | null, TFilterData>>(); - readonly onDidSplice: Event | null, TFilterData>> = this._onDidSplice.event; - - private _onDidChangeCollapseState = new Emitter, TFilterData>>(); - readonly onDidChangeCollapseState: Event, TFilterData>> = this._onDidChangeCollapseState.event; - - private _onDidChangeRenderNodeCount = new Emitter, TFilterData>>(); - readonly onDidChangeRenderNodeCount: Event, TFilterData>> = this._onDidChangeRenderNodeCount.event; + get onDidSplice(): Event | null, TFilterData>> { return this.model.onDidSplice; } + get onDidChangeCollapseState(): Event, TFilterData>> { return this.model.onDidChangeCollapseState; } + get onDidChangeRenderNodeCount(): Event, TFilterData>> { return this.model.onDidChangeRenderNodeCount; } private model: ObjectTreeModel, TFilterData>; private nodes = new Map>(); @@ -164,19 +159,18 @@ export class CompressedObjectTreeModel, TFilterData e const parentChildren = parent.children .map(child => child === node ? recompressedElement : child); - this.model.setChildren(parent.element, parentChildren, _onDidCreateNode, _onDidDeleteNode); // TODO return Iterator.empty(); } - getListIndex(location: T): number { + getListIndex(location: T | null): number { const node = this.getCompressedNode(location); return this.model.getListIndex(node); } - getListRenderCount(location: T): number { + getListRenderCount(location: T | null): number { const node = this.getCompressedNode(location); return this.model.getListRenderCount(node); } @@ -190,16 +184,32 @@ export class CompressedObjectTreeModel, TFilterData e return this.model.getNode(node); } - getNodeLocation(node: ITreeNode | null, TFilterData>): T | null { - throw new Error('Method not implemented.'); + // TODO: review this + getNodeLocation(node: ITreeNode, TFilterData>): T | null { + const compressedNode = this.model.getNodeLocation(node); + + if (compressedNode === null) { + return null; + } + + return compressedNode.elements[compressedNode.elements.length - 1]; } + // TODO: review this getParentNodeLocation(location: T | null): T | null { - throw new Error('Method not implemented.'); + const compressedNode = this.getCompressedNode(location); + const parentNode = this.model.getParentNodeLocation(compressedNode); + + if (parentNode === null) { + return null; + } + + return parentNode.elements[parentNode.elements.length - 1]; } getParentElement(location: T | null): ICompressedTreeNode | null { - throw new Error('Method not implemented.'); + const compressedNode = this.getCompressedNode(location); + return this.model.getParentElement(compressedNode); } getFirstElementChild(location: T | null): ICompressedTreeNode | null | undefined { diff --git a/src/vs/base/browser/ui/tree/objectTreeModel.ts b/src/vs/base/browser/ui/tree/objectTreeModel.ts index 29d4314e375..13375f87c4b 100644 --- a/src/vs/base/browser/ui/tree/objectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/objectTreeModel.ts @@ -238,11 +238,15 @@ export class ObjectTreeModel, TFilterData extends Non return node; } - getNodeLocation(node: ITreeNode): T { + getNodeLocation(node: ITreeNode): T | null { return node.element; } - getParentNodeLocation(element: T): T | null { + getParentNodeLocation(element: T | null): T | null { + if (element === null) { + throw new Error(`Invalid getParentNodeLocation call`); + } + const node = this.nodes.get(element); if (!node) { From 97285db92e7b33bad0c7b78a8f69cc6ca1c8562c Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Mon, 22 Jul 2019 17:47:30 +0200 Subject: [PATCH 468/710] close browser on EH termination --- .../services/extensions/common/remoteExtensionHostClient.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts b/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts index 0860739eb21..3f2f768a3a8 100644 --- a/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts +++ b/src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts @@ -162,6 +162,11 @@ export class RemoteExtensionHostClient extends Disposable implements IExtensionH } private _onExtHostConnectionLost(): void { + + if (this._isExtensionDevHost && this._environmentService.debugExtensionHost.debugId) { + this._extensionHostDebugService.close(this._environmentService.debugExtensionHost.debugId); + } + if (this._terminating) { // Expected termination path (we asked the process to terminate) return; From edf8024989f85780756da5dd41af1b43cbea594e Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Mon, 22 Jul 2019 13:08:21 -0500 Subject: [PATCH 469/710] Add generated warning to monaco --- build/monaco/monaco.d.ts.recipe | 2 ++ src/vs/monaco.d.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/build/monaco/monaco.d.ts.recipe b/build/monaco/monaco.d.ts.recipe index ed3a8f5d260..afba093b25c 100644 --- a/build/monaco/monaco.d.ts.recipe +++ b/build/monaco/monaco.d.ts.recipe @@ -5,6 +5,8 @@ declare namespace monaco { + // THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. + export type Thenable = PromiseLike; export interface IDisposable { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 945d10d7e14..46c03a102a0 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -5,6 +5,8 @@ declare namespace monaco { + // THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. + export type Thenable = PromiseLike; export interface IDisposable { From 1c28c30760ed2f329afba38d6f523ec7199e20af Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Mon, 22 Jul 2019 11:20:46 -0700 Subject: [PATCH 470/710] Click to follow link --- src/vs/editor/contrib/links/links.ts | 121 +++++++-------------------- 1 file changed, 29 insertions(+), 92 deletions(-) diff --git a/src/vs/editor/contrib/links/links.ts b/src/vs/editor/contrib/links/links.ts index de26df3e3d4..53ea1177390 100644 --- a/src/vs/editor/contrib/links/links.ts +++ b/src/vs/editor/contrib/links/links.ts @@ -25,79 +25,43 @@ import { IOpenerService } from 'vs/platform/opener/common/opener'; import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -const HOVER_MESSAGE_GENERAL_META = new MarkdownString().appendText( - platform.isMacintosh - ? nls.localize('links.navigate.mac', "Follow link (cmd + click)") - : nls.localize('links.navigate', "Follow link (ctrl + click)") -); +function getHoverMessage(link: Link, useMetaKey: boolean): MarkdownString { + const executeCmd = link.url && /^command:/i.test(link.url.toString()); -const HOVER_MESSAGE_COMMAND_META = new MarkdownString().appendText( - platform.isMacintosh - ? nls.localize('links.command.mac', "Execute command (cmd + click)") - : nls.localize('links.command', "Execute command (ctrl + click)") -); + const label = link.tooltip + ? link.tooltip + : executeCmd + ? nls.localize('links.navigate.executeCmd', 'Execute command') + : nls.localize('links.navigate.follow', 'Follow link'); -const HOVER_MESSAGE_GENERAL_ALT = new MarkdownString().appendText( - platform.isMacintosh - ? nls.localize('links.navigate.al.mac', "Follow link (option + click)") - : nls.localize('links.navigate.al', "Follow link (alt + click)") -); + const kb = useMetaKey + ? platform.isMacintosh + ? nls.localize('links.navigate.kb.meta.mac', "cmd + click") + : nls.localize('links.navigate.kb.meta', "ctrl + click") + : platform.isMacintosh + ? nls.localize('links.navigate.kb.alt.mac', "option + click") + : nls.localize('links.navigate.kb.alt', "alt + click"); -const HOVER_MESSAGE_COMMAND_ALT = new MarkdownString().appendText( - platform.isMacintosh - ? nls.localize('links.command.al.mac', "Execute command (option + click)") - : nls.localize('links.command.al', "Execute command (alt + click)") -); + if (link.url) { + const hoverMessage = new MarkdownString().appendMarkdown(`[${label}](${link.url.toString()}) (${kb})`); + hoverMessage.isTrusted = true; + return hoverMessage; + } else { + return new MarkdownString().appendText(`${label} (${kb})`); + } +} const decoration = { - meta: ModelDecorationOptions.register({ + general: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, collapseOnReplaceEdit: true, - inlineClassName: 'detected-link', - hoverMessage: HOVER_MESSAGE_GENERAL_META + inlineClassName: 'detected-link' }), - metaActive: ModelDecorationOptions.register({ + active: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, collapseOnReplaceEdit: true, - inlineClassName: 'detected-link-active', - hoverMessage: HOVER_MESSAGE_GENERAL_META - }), - alt: ModelDecorationOptions.register({ - stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - collapseOnReplaceEdit: true, - inlineClassName: 'detected-link', - hoverMessage: HOVER_MESSAGE_GENERAL_ALT - }), - altActive: ModelDecorationOptions.register({ - stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - collapseOnReplaceEdit: true, - inlineClassName: 'detected-link-active', - hoverMessage: HOVER_MESSAGE_GENERAL_ALT - }), - altCommand: ModelDecorationOptions.register({ - stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - collapseOnReplaceEdit: true, - inlineClassName: 'detected-link', - hoverMessage: HOVER_MESSAGE_COMMAND_ALT - }), - altCommandActive: ModelDecorationOptions.register({ - stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - collapseOnReplaceEdit: true, - inlineClassName: 'detected-link-active', - hoverMessage: HOVER_MESSAGE_COMMAND_ALT - }), - metaCommand: ModelDecorationOptions.register({ - stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - collapseOnReplaceEdit: true, - inlineClassName: 'detected-link', - hoverMessage: HOVER_MESSAGE_COMMAND_META - }), - metaCommandActive: ModelDecorationOptions.register({ - stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - collapseOnReplaceEdit: true, - inlineClassName: 'detected-link-active', - hoverMessage: HOVER_MESSAGE_COMMAND_META - }), + inlineClassName: 'detected-link-active' + }) }; @@ -111,38 +75,11 @@ class LinkOccurrence { } private static _getOptions(link: Link, useMetaKey: boolean, isActive: boolean): ModelDecorationOptions { - const options = { ...this._getBaseOptions(link, useMetaKey, isActive) }; - if (typeof link.tooltip === 'string') { - const message = new MarkdownString().appendText( - platform.isMacintosh - ? useMetaKey - ? nls.localize('links.custom.mac', "{0} (cmd + click)", link.tooltip) - : nls.localize('links.custom.mac.al', "{0} (option + click)", link.tooltip) - : useMetaKey - ? nls.localize('links.custom', "{0} (ctrl + click)", link.tooltip) - : nls.localize('links.custom.al', "{0} (alt + click)", link.tooltip) - ); - options.hoverMessage = message; - } + const options = { ... (isActive ? decoration.active : decoration.general) }; + options.hoverMessage = getHoverMessage(link, useMetaKey); return options; } - private static _getBaseOptions(link: Link, useMetaKey: boolean, isActive: boolean): ModelDecorationOptions { - if (link.url && /^command:/i.test(link.url.toString())) { - if (useMetaKey) { - return (isActive ? decoration.metaCommandActive : decoration.metaCommand); - } else { - return (isActive ? decoration.altCommandActive : decoration.altCommand); - } - } else { - if (useMetaKey) { - return (isActive ? decoration.metaActive : decoration.meta); - } else { - return (isActive ? decoration.altActive : decoration.alt); - } - } - } - public decorationId: string; public link: Link; From 37e26c095f5ea5adfed437673f7b1dc76ffca6c1 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 22 Jul 2019 11:26:17 -0700 Subject: [PATCH 471/710] Handle commands in WebviewEditorOverlay correctly Fixes #77772 --- src/vs/workbench/contrib/webview/browser/webviewService.ts | 4 ++++ src/vs/workbench/contrib/webview/common/webview.ts | 2 ++ .../contrib/webview/electron-browser/webviewCommands.ts | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/src/vs/workbench/contrib/webview/browser/webviewService.ts b/src/vs/workbench/contrib/webview/browser/webviewService.ts index a151f3840df..2ffed7621a3 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewService.ts @@ -192,6 +192,10 @@ class DynamicWebviewEditorOverlay extends Disposable implements WebviewEditorOve showFind(): void { this.withWebview(webview => webview.showFind()); } hideFind(): void { this.withWebview(webview => webview.hideFind()); } + public getInnerWebview() { + return this._webview.value; + } + private withWebview(f: (webview: Webview) => void): void { if (this._webview.value) { f(this._webview.value); diff --git a/src/vs/workbench/contrib/webview/common/webview.ts b/src/vs/workbench/contrib/webview/common/webview.ts index 5f2d3053ff1..8d81b487a5a 100644 --- a/src/vs/workbench/contrib/webview/common/webview.ts +++ b/src/vs/workbench/contrib/webview/common/webview.ts @@ -97,6 +97,8 @@ export interface WebviewEditorOverlay extends Webview { claim(owner: any): void; release(owner: any): void; + + getInnerWebview(): Webview | undefined; } export const webviewDeveloperCategory = nls.localize('developer', "Developer"); diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewCommands.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewCommands.ts index d2b6f7d531b..a1d8ecda01a 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewCommands.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewCommands.ts @@ -9,6 +9,7 @@ import { Command, ServicesAccessor } from 'vs/editor/browser/editorExtensions'; import { WebviewEditor } from 'vs/workbench/contrib/webview/browser/webviewEditor'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement'; +import { WebviewEditorOverlay } from 'vs/workbench/contrib/webview/common/webview'; export class OpenWebviewDeveloperToolsAction extends Action { static readonly ID = 'workbench.action.webview.openDeveloperTools'; @@ -92,6 +93,11 @@ function withActiveWebviewBasedWebview(accessor: ServicesAccessor, f: (webview: webViewEditor.withWebview(webview => { if (webview instanceof ElectronWebviewBasedWebview) { f(webview); + } else if ((webview as WebviewEditorOverlay).getInnerWebview) { + const innerWebview = (webview as WebviewEditorOverlay).getInnerWebview(); + if (innerWebview instanceof ElectronWebviewBasedWebview) { + f(innerWebview); + } } }); } From 28a403e38bc9796f5d75f71e6111d6d5ea7adabc Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Mon, 22 Jul 2019 11:40:09 -0700 Subject: [PATCH 472/710] Handle edge cases --- src/vs/editor/contrib/find/findWidget.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index 1737388025c..738971c7879 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -384,9 +384,13 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas private _getAriaLabel(label: string, currentMatch: Range | null, searchString: string): string { if (label === NLS_NO_RESULTS) { - return nls.localize('ariaSearchNoResult', "{0} found for {1}", label, searchString); + return searchString === '' + ? nls.localize('ariaSearchNoResultEmpty', "{0} found", label) + : nls.localize('ariaSearchNoResult', "{0} found for {1}", label, searchString); } - return nls.localize('ariaSearchNoResultWithLineNum', "{0} found for {1} at {2}", label, searchString, (currentMatch ? currentMatch.startLineNumber + ':' + currentMatch.startColumn : '')); + return currentMatch + ? nls.localize('ariaSearchNoResultWithLineNum', "{0} found for {1} at {2}", label, searchString, currentMatch.startLineNumber + ':' + currentMatch.startColumn) + : nls.localize('ariaSearchNoResultWithLineNumNoCurrentMatch', "{0} found for {1}", label, searchString); } /** From 765d6812973de937dfe9db4ed14f518281cf8b94 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Mon, 22 Jul 2019 11:49:04 -0700 Subject: [PATCH 473/710] Add 'selection' option to render whitespace, closes #1477 --- .../browser/viewParts/lines/viewLine.ts | 23 +- .../editor/browser/widget/diffEditorWidget.ts | 3 +- src/vs/editor/browser/widget/diffReview.ts | 3 +- .../common/config/commonEditorConfig.ts | 3 +- src/vs/editor/common/config/editorOptions.ts | 6 +- .../common/viewLayout/viewLineRenderer.ts | 83 +++++- src/vs/editor/standalone/browser/colorizer.ts | 9 +- .../viewLayout/viewLineRenderer.test.ts | 248 +++++++++++++++--- src/vs/monaco.d.ts | 4 +- 9 files changed, 324 insertions(+), 58 deletions(-) diff --git a/src/vs/editor/browser/viewParts/lines/viewLine.ts b/src/vs/editor/browser/viewParts/lines/viewLine.ts index e2397249709..00b684e7ef4 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLine.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLine.ts @@ -12,7 +12,7 @@ import { IStringBuilder } from 'vs/editor/common/core/stringBuilder'; import { IConfiguration } from 'vs/editor/common/editorCommon'; import { HorizontalRange } from 'vs/editor/common/view/renderingContext'; import { LineDecoration } from 'vs/editor/common/viewLayout/lineDecorations'; -import { CharacterMapping, ForeignElementType, RenderLineInput, renderViewLine } from 'vs/editor/common/viewLayout/viewLineRenderer'; +import { CharacterMapping, ForeignElementType, RenderLineInput, renderViewLine, LineRange } from 'vs/editor/common/viewLayout/viewLineRenderer'; import { ViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; import { InlineDecorationType } from 'vs/editor/common/viewModel/viewModel'; import { HIGH_CONTRAST, ThemeType } from 'vs/platform/theme/common/themeService'; @@ -69,7 +69,7 @@ export class DomReadingContext { export class ViewLineOptions { public readonly themeType: ThemeType; - public readonly renderWhitespace: 'none' | 'boundary' | 'all'; + public readonly renderWhitespace: 'none' | 'boundary' | 'selection' | 'all'; public readonly renderControlCharacters: boolean; public readonly spaceWidth: number; public readonly useMonospaceOptimizations: boolean; @@ -152,7 +152,7 @@ export class ViewLine implements IVisibleLine { this._options = newOptions; } public onSelectionChanged(): boolean { - if (alwaysRenderInlineSelection || this._options.themeType === HIGH_CONTRAST) { + if (alwaysRenderInlineSelection || this._options.themeType === HIGH_CONTRAST || this._options.renderWhitespace === 'selection') { this._isMaybeInvalid = true; return true; } @@ -171,7 +171,9 @@ export class ViewLine implements IVisibleLine { const options = this._options; const actualInlineDecorations = LineDecoration.filter(lineData.inlineDecorations, lineNumber, lineData.minColumn, lineData.maxColumn); - if (alwaysRenderInlineSelection || options.themeType === HIGH_CONTRAST) { + // Only send selection information when needed for rendering whitespace + let selectionsOnLine: LineRange[] | null = null; + if (alwaysRenderInlineSelection || options.themeType === HIGH_CONTRAST || this._options.renderWhitespace === 'selection') { const selections = viewportData.selections; for (const selection of selections) { @@ -184,7 +186,15 @@ export class ViewLine implements IVisibleLine { const endColumn = (selection.endLineNumber === lineNumber ? selection.endColumn : lineData.maxColumn); if (startColumn < endColumn) { - actualInlineDecorations.push(new LineDecoration(startColumn, endColumn, 'inline-selected-text', InlineDecorationType.Regular)); + if (this._options.renderWhitespace !== 'selection') { + actualInlineDecorations.push(new LineDecoration(startColumn, endColumn, 'inline-selected-text', InlineDecorationType.Regular)); + } else { + if (!selectionsOnLine) { + selectionsOnLine = []; + } + + selectionsOnLine.push(new LineRange(startColumn - 1, endColumn - 1)); + } } } } @@ -204,7 +214,8 @@ export class ViewLine implements IVisibleLine { options.stopRenderingLineAfter, options.renderWhitespace, options.renderControlCharacters, - options.fontLigatures + options.fontLigatures, + selectionsOnLine ); if (this._renderedViewLine && this._renderedViewLine.input.equals(renderLineInput)) { diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index a285c5af16f..9c3c0df63e8 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -2027,7 +2027,8 @@ class InlineViewZonesComputer extends ViewZonesComputer { config.viewInfo.stopRenderingLineAfter, config.viewInfo.renderWhitespace, config.viewInfo.renderControlCharacters, - config.viewInfo.fontLigatures + config.viewInfo.fontLigatures, + null // Send no selections, original line cannot be selected ), sb); sb.appendASCIIString(''); diff --git a/src/vs/editor/browser/widget/diffReview.ts b/src/vs/editor/browser/widget/diffReview.ts index beb608e6d74..037883dd530 100644 --- a/src/vs/editor/browser/widget/diffReview.ts +++ b/src/vs/editor/browser/widget/diffReview.ts @@ -780,7 +780,8 @@ export class DiffReview extends Disposable { config.viewInfo.stopRenderingLineAfter, config.viewInfo.renderWhitespace, config.viewInfo.renderControlCharacters, - config.viewInfo.fontLigatures + config.viewInfo.fontLigatures, + null )); return r.html; diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index f7b61db2b35..e9fcfe8030a 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -901,10 +901,11 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.renderWhitespace': { 'type': 'string', - 'enum': ['none', 'boundary', 'all'], + 'enum': ['none', 'boundary', 'selection', 'all'], 'enumDescriptions': [ '', nls.localize('renderWhiteSpace.boundary', "Render whitespace characters except for single spaces between words."), + nls.localize('renderWhitespace.selection', "Render whitespace characters only on selected text."), '' ], default: EDITOR_DEFAULTS.viewInfo.renderWhitespace, diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 6c010edc1cf..79ba4dc836d 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -664,7 +664,7 @@ export interface IEditorOptions { * Enable rendering of whitespace. * Defaults to none. */ - renderWhitespace?: 'none' | 'boundary' | 'all'; + renderWhitespace?: 'none' | 'boundary' | 'selection' | 'all'; /** * Enable rendering of control characters. * Defaults to false. @@ -999,7 +999,7 @@ export interface InternalEditorViewOptions { readonly scrollBeyondLastColumn: number; readonly smoothScrolling: boolean; readonly stopRenderingLineAfter: number; - readonly renderWhitespace: 'none' | 'boundary' | 'all'; + readonly renderWhitespace: 'none' | 'boundary' | 'selection' | 'all'; readonly renderControlCharacters: boolean; readonly fontLigatures: boolean; readonly renderIndentGuides: boolean; @@ -2017,7 +2017,7 @@ export class EditorOptionsValidator { } else if (renderWhitespace === false) { renderWhitespace = 'none'; } - renderWhitespace = _stringSet<'none' | 'boundary' | 'all'>(renderWhitespace, defaults.renderWhitespace, ['none', 'boundary', 'all']); + renderWhitespace = _stringSet<'none' | 'boundary' | 'selection' | 'all'>(renderWhitespace, defaults.renderWhitespace, ['none', 'boundary', 'selection', 'all']); } let renderLineHighlight = opts.renderLineHighlight; diff --git a/src/vs/editor/common/viewLayout/viewLineRenderer.ts b/src/vs/editor/common/viewLayout/viewLineRenderer.ts index f1b5c0422cb..bbb9b39cb8c 100644 --- a/src/vs/editor/common/viewLayout/viewLineRenderer.ts +++ b/src/vs/editor/common/viewLayout/viewLineRenderer.ts @@ -13,7 +13,8 @@ import { InlineDecorationType } from 'vs/editor/common/viewModel/viewModel'; export const enum RenderWhitespace { None = 0, Boundary = 1, - All = 2 + Selection = 2, + All = 3 } class LinePart { @@ -31,6 +32,28 @@ class LinePart { } } +export class LineRange { + /** + * Zero-based offset on which the range starts, inclusive. + */ + public readonly startOffset: number; + + /** + * Zero-based offset on which the range ends, inclusive. + */ + public readonly endOffset: number; + + constructor(startIndex: number, endIndex: number) { + this.startOffset = startIndex; + this.endOffset = endIndex; + } + + public equals(otherLineRange: LineRange) { + return this.startOffset === otherLineRange.startOffset + && this.endOffset === otherLineRange.endOffset; + } +} + export class RenderLineInput { public readonly useMonospaceOptimizations: boolean; @@ -49,6 +72,12 @@ export class RenderLineInput { public readonly renderControlCharacters: boolean; public readonly fontLigatures: boolean; + /** + * Defined only when renderWhitespace is 'selection'. Selections are non-overlapping, + * and ordered by position within the line. + */ + public readonly selectionsOnLine: LineRange[] | null; + constructor( useMonospaceOptimizations: boolean, canUseHalfwidthRightwardsArrow: boolean, @@ -62,9 +91,10 @@ export class RenderLineInput { tabSize: number, spaceWidth: number, stopRenderingLineAfter: number, - renderWhitespace: 'none' | 'boundary' | 'all', + renderWhitespace: 'none' | 'boundary' | 'selection' | 'all', renderControlCharacters: boolean, - fontLigatures: boolean + fontLigatures: boolean, + selectionsOnLine: LineRange[] | null ) { this.useMonospaceOptimizations = useMonospaceOptimizations; this.canUseHalfwidthRightwardsArrow = canUseHalfwidthRightwardsArrow; @@ -83,10 +113,35 @@ export class RenderLineInput { ? RenderWhitespace.All : renderWhitespace === 'boundary' ? RenderWhitespace.Boundary - : RenderWhitespace.None + : renderWhitespace === 'selection' + ? RenderWhitespace.Selection + : RenderWhitespace.None ); this.renderControlCharacters = renderControlCharacters; this.fontLigatures = fontLigatures; + this.selectionsOnLine = selectionsOnLine && selectionsOnLine.sort((a, b) => a.startOffset < b.startOffset ? -1 : 1); + } + + private sameSelection(otherSelections: LineRange[] | null): boolean { + if (this.selectionsOnLine === null) { + return otherSelections === null; + } + + if (otherSelections === null) { + return false; + } + + if (otherSelections.length !== this.selectionsOnLine.length) { + return false; + } + + for (let i = 0; i < this.selectionsOnLine.length; i++) { + if (!this.selectionsOnLine[i].equals(otherSelections[i])) { + return false; + } + } + + return true; } public equals(other: RenderLineInput): boolean { @@ -106,6 +161,7 @@ export class RenderLineInput { && this.fontLigatures === other.fontLigatures && LineDecoration.equalsArr(this.lineDecorations, other.lineDecorations) && this.lineTokens.equals(other.lineTokens) + && this.sameSelection(other.selectionsOnLine) ); } } @@ -338,8 +394,8 @@ function resolveRenderLineInput(input: RenderLineInput): ResolvedRenderLineInput } let tokens = transformAndRemoveOverflowing(input.lineTokens, input.fauxIndentLength, len); - if (input.renderWhitespace === RenderWhitespace.All || input.renderWhitespace === RenderWhitespace.Boundary) { - tokens = _applyRenderWhitespace(lineContent, len, input.continuesWithWrappedLine, tokens, input.fauxIndentLength, input.tabSize, useMonospaceOptimizations, input.renderWhitespace === RenderWhitespace.Boundary); + if (input.renderWhitespace === RenderWhitespace.All || input.renderWhitespace === RenderWhitespace.Boundary || (input.renderWhitespace === RenderWhitespace.Selection && !!input.selectionsOnLine)) { + tokens = _applyRenderWhitespace(lineContent, len, input.continuesWithWrappedLine, tokens, input.fauxIndentLength, input.tabSize, useMonospaceOptimizations, input.selectionsOnLine, input.renderWhitespace === RenderWhitespace.Boundary); } let containsForeignElements = ForeignElementType.None; if (input.lineDecorations.length > 0) { @@ -481,7 +537,7 @@ function splitLargeTokens(lineContent: string, tokens: LinePart[], onlyAtSpaces: * Moreover, a token is created for every visual indent because on some fonts the glyphs used for rendering whitespace (→ or ·) do not have the same width as  . * The rendering phase will generate `style="width:..."` for these tokens. */ -function _applyRenderWhitespace(lineContent: string, len: number, continuesWithWrappedLine: boolean, tokens: LinePart[], fauxIndentLength: number, tabSize: number, useMonospaceOptimizations: boolean, onlyBoundary: boolean): LinePart[] { +function _applyRenderWhitespace(lineContent: string, len: number, continuesWithWrappedLine: boolean, tokens: LinePart[], fauxIndentLength: number, tabSize: number, useMonospaceOptimizations: boolean, selections: LineRange[] | null, onlyBoundary: boolean): LinePart[] { let result: LinePart[] = [], resultLen = 0; let tokenIndex = 0; @@ -511,11 +567,17 @@ function _applyRenderWhitespace(lineContent: string, len: number, continuesWithW } } tmpIndent = tmpIndent % tabSize; - let wasInWhitespace = false; + let currentSelectionIndex = 0; + let currentSelection = selections && selections[currentSelectionIndex]; for (let charIndex = fauxIndentLength; charIndex < len; charIndex++) { const chCode = lineContent.charCodeAt(charIndex); + if (currentSelection && charIndex >= currentSelection.endOffset) { + currentSelectionIndex++; + currentSelection = selections && selections[currentSelectionIndex]; + } + let isInWhitespace: boolean; if (charIndex < firstNonWhitespaceIndex || charIndex > lastNonWhitespaceIndex) { // in leading or trailing whitespace @@ -540,6 +602,11 @@ function _applyRenderWhitespace(lineContent: string, len: number, continuesWithW isInWhitespace = false; } + // If rendering whitespace on selection, check that the charIndex falls within a selection + if (isInWhitespace && selections) { + isInWhitespace = !!currentSelection && currentSelection.startOffset <= charIndex && currentSelection.endOffset > charIndex; + } + if (wasInWhitespace) { // was in whitespace token if (!isInWhitespace || (!useMonospaceOptimizations && tmpIndent >= tabSize)) { diff --git a/src/vs/editor/standalone/browser/colorizer.ts b/src/vs/editor/standalone/browser/colorizer.ts index ff47bd408c0..d72d141046b 100644 --- a/src/vs/editor/standalone/browser/colorizer.ts +++ b/src/vs/editor/standalone/browser/colorizer.ts @@ -128,7 +128,8 @@ export class Colorizer { -1, 'none', false, - false + false, + null )); return renderResult.html; } @@ -195,7 +196,8 @@ function _fakeColorize(lines: string[], tabSize: number): string { -1, 'none', false, - false + false, + null )); html = html.concat(renderResult.html); @@ -231,7 +233,8 @@ function _actualColorize(lines: string[], tabSize: number, tokenizationSupport: -1, 'none', false, - false + false, + null )); html = html.concat(renderResult.html); diff --git a/src/vs/editor/test/common/viewLayout/viewLineRenderer.test.ts b/src/vs/editor/test/common/viewLayout/viewLineRenderer.test.ts index 0112ef018b6..e3e6ad4c22b 100644 --- a/src/vs/editor/test/common/viewLayout/viewLineRenderer.test.ts +++ b/src/vs/editor/test/common/viewLayout/viewLineRenderer.test.ts @@ -9,7 +9,7 @@ import * as strings from 'vs/base/common/strings'; import { IViewLineTokens } from 'vs/editor/common/core/lineTokens'; import { MetadataConsts } from 'vs/editor/common/modes'; import { LineDecoration } from 'vs/editor/common/viewLayout/lineDecorations'; -import { CharacterMapping, RenderLineInput, renderViewLine2 as renderViewLine } from 'vs/editor/common/viewLayout/viewLineRenderer'; +import { CharacterMapping, RenderLineInput, renderViewLine2 as renderViewLine, LineRange } from 'vs/editor/common/viewLayout/viewLineRenderer'; import { InlineDecorationType } from 'vs/editor/common/viewModel/viewModel'; import { ViewLineToken, ViewLineTokens } from 'vs/editor/test/common/core/viewLineToken'; @@ -41,7 +41,8 @@ suite('viewLineRenderer.renderLine', () => { -1, 'none', false, - false + false, + null )); assert.equal(_actual.html, '' + expected + ''); @@ -90,7 +91,8 @@ suite('viewLineRenderer.renderLine', () => { -1, 'none', false, - false + false, + null )); assert.equal(_actual.html, '' + expected + ''); @@ -142,7 +144,8 @@ suite('viewLineRenderer.renderLine', () => { 6, 'boundary', false, - false + false, + null )); let expectedOutput = [ @@ -233,7 +236,8 @@ suite('viewLineRenderer.renderLine', () => { -1, 'boundary', false, - false + false, + null )); assert.equal(_actual.html, '' + expectedOutput + ''); @@ -295,7 +299,8 @@ suite('viewLineRenderer.renderLine', () => { -1, 'none', false, - false + false, + null )); assert.equal(_actual.html, '' + expectedOutput + ''); @@ -357,7 +362,8 @@ suite('viewLineRenderer.renderLine', () => { -1, 'none', false, - false + false, + null )); assert.equal(_actual.html, '' + expectedOutput + ''); @@ -396,7 +402,8 @@ suite('viewLineRenderer.renderLine', () => { -1, 'none', false, - false + false, + null )); assert.equal(_actual.html, '' + expectedOutput + ''); @@ -426,7 +433,8 @@ suite('viewLineRenderer.renderLine', () => { -1, 'none', false, - false + false, + null )); assert.equal(actual.html, '' + expectedOutput.join('') + '', message); } @@ -526,7 +534,8 @@ suite('viewLineRenderer.renderLine', () => { -1, 'none', false, - true + true, + null )); assert.equal(actual.html, '' + expectedOutput.join('') + '', message); } @@ -564,7 +573,8 @@ suite('viewLineRenderer.renderLine', () => { -1, 'none', false, - false + false, + null )); let expectedOutput = [ 'að ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·ð ®·', @@ -593,7 +603,8 @@ suite('viewLineRenderer.renderLine', () => { -1, 'none', false, - false + false, + null )); assert.equal(actual.html, '' + expectedOutput.join('') + ''); assert.equal(actual.containsRTL, true); @@ -639,7 +650,8 @@ suite('viewLineRenderer.renderLine', () => { -1, 'none', false, - false + false, + null )); assert.equal(_actual.html, '' + expectedOutput + ''); @@ -704,7 +716,7 @@ suite('viewLineRenderer.renderLine', () => { suite('viewLineRenderer.renderLine 2', () => { - function testCreateLineParts(fontIsMonospace: boolean, lineContent: string, tokens: ViewLineToken[], fauxIndentLength: number, renderWhitespace: 'none' | 'boundary' | 'all', expected: string): void { + function testCreateLineParts(fontIsMonospace: boolean, lineContent: string, tokens: ViewLineToken[], fauxIndentLength: number, renderWhitespace: 'none' | 'boundary' | 'selection' | 'all', selections: LineRange[] | null, expected: string): void { let actual = renderViewLine(new RenderLineInput( fontIsMonospace, true, @@ -720,7 +732,8 @@ suite('viewLineRenderer.renderLine 2', () => { -1, renderWhitespace, false, - false + false, + selections )); assert.deepEqual(actual.html, expected); @@ -745,7 +758,8 @@ suite('viewLineRenderer.renderLine 2', () => { -1, 'none', false, - false + false, + null )); let expected = [ @@ -784,7 +798,8 @@ suite('viewLineRenderer.renderLine 2', () => { -1, 'none', false, - false + false, + null )); let expected = [ @@ -811,6 +826,7 @@ suite('viewLineRenderer.renderLine 2', () => { ], 0, 'none', + null, [ '', 'Hello\u00a0world!', @@ -828,6 +844,7 @@ suite('viewLineRenderer.renderLine 2', () => { ], 0, 'none', + null, [ '', 'Hello\u00a0', @@ -847,6 +864,7 @@ suite('viewLineRenderer.renderLine 2', () => { ], 0, 'boundary', + null, [ '', '\u00b7\u00b7\u00b7\u00b7', @@ -868,6 +886,7 @@ suite('viewLineRenderer.renderLine 2', () => { ], 0, 'boundary', + null, [ '', '\u00b7\u00b7\u00b7\u00b7', @@ -891,6 +910,7 @@ suite('viewLineRenderer.renderLine 2', () => { ], 0, 'boundary', + null, [ '', '\u2192\u00a0\u00a0\u00a0', @@ -913,6 +933,7 @@ suite('viewLineRenderer.renderLine 2', () => { ], 0, 'boundary', + null, [ '', '\u00b7\u00b7\u2192\u00a0', @@ -940,6 +961,7 @@ suite('viewLineRenderer.renderLine 2', () => { ], 2, 'boundary', + null, [ '', '\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0', @@ -966,6 +988,7 @@ suite('viewLineRenderer.renderLine 2', () => { ], 2, 'boundary', + null, [ '', '\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0', @@ -989,6 +1012,7 @@ suite('viewLineRenderer.renderLine 2', () => { ], 0, 'boundary', + null, [ '', 'it', @@ -1014,6 +1038,7 @@ suite('viewLineRenderer.renderLine 2', () => { ], 0, 'all', + null, [ '', '\u00b7', @@ -1027,6 +1052,147 @@ suite('viewLineRenderer.renderLine 2', () => { ); }); + test('createLineParts render whitespace for selection with no selections', () => { + testCreateLineParts( + false, + ' Hello world!\t', + [ + createPart(4, 0), + createPart(6, 1), + createPart(14, 2) + ], + 0, + 'selection', + null, + [ + '', + '\u00a0Hel', + 'lo', + '\u00a0world!\u00a0\u00a0\u00a0', + '', + ].join('') + ); + }); + + test('createLineParts render whitespace for selection with whole line selection', () => { + testCreateLineParts( + false, + ' Hello world!\t', + [ + createPart(4, 0), + createPart(6, 1), + createPart(14, 2) + ], + 0, + 'selection', + [new LineRange(0, 14)], + [ + '', + '\u00b7', + 'Hel', + 'lo', + '\u00b7', + 'world!', + '\u2192\u00a0\u00a0', + '', + ].join('') + ); + }); + + test('createLineParts render whitespace for selection with selection spanning part of whitespace', () => { + testCreateLineParts( + false, + ' Hello world!\t', + [ + createPart(4, 0), + createPart(6, 1), + createPart(14, 2) + ], + 0, + 'selection', + [new LineRange(0, 5)], + [ + '', + '\u00b7', + 'Hel', + 'lo', + '\u00a0world!\u00a0\u00a0\u00a0', + '', + ].join('') + ); + }); + + + test('createLineParts render whitespace for selection with multiple selections', () => { + testCreateLineParts( + false, + ' Hello world!\t', + [ + createPart(4, 0), + createPart(6, 1), + createPart(14, 2) + ], + 0, + 'selection', + [new LineRange(0, 5), new LineRange(9, 14)], + [ + '', + '\u00b7', + 'Hel', + 'lo', + '\u00a0world!', + '\u2192\u00a0\u00a0', + '', + ].join('') + ); + }); + + + test('createLineParts render whitespace for selection with multiple, initially unsorted selections', () => { + testCreateLineParts( + false, + ' Hello world!\t', + [ + createPart(4, 0), + createPart(6, 1), + createPart(14, 2) + ], + 0, + 'selection', + [new LineRange(9, 14), new LineRange(0, 5)], + [ + '', + '\u00b7', + 'Hel', + 'lo', + '\u00a0world!', + '\u2192\u00a0\u00a0', + '', + ].join('') + ); + }); + + test('createLineParts render whitespace for selection with selections next to each other', () => { + testCreateLineParts( + false, + ' * S', + [ + createPart(4, 0) + ], + 0, + 'selection', + [new LineRange(0, 1), new LineRange(1, 2), new LineRange(2, 3)], + [ + '', + '\u00b7', + '*', + '\u00b7', + 'S', + '', + ].join('') + ); + }); + test('createLineParts can handle unsorted inline decorations', () => { let actual = renderViewLine(new RenderLineInput( false, @@ -1047,7 +1213,8 @@ suite('viewLineRenderer.renderLine 2', () => { -1, 'none', false, - false + false, + null )); // 01234567890 @@ -1087,7 +1254,8 @@ suite('viewLineRenderer.renderLine 2', () => { -1, 'all', false, - true + true, + null )); let expected = [ @@ -1119,7 +1287,8 @@ suite('viewLineRenderer.renderLine 2', () => { -1, 'all', false, - true + true, + null )); let expected = [ @@ -1152,7 +1321,8 @@ suite('viewLineRenderer.renderLine 2', () => { -1, 'all', false, - true + true, + null )); let expected = [ @@ -1181,7 +1351,8 @@ suite('viewLineRenderer.renderLine 2', () => { 10000, 'none', false, - false + false, + null )); let expected = [ @@ -1214,7 +1385,8 @@ suite('viewLineRenderer.renderLine 2', () => { 10000, 'none', false, - false + false, + null )); let expected = [ @@ -1246,7 +1418,8 @@ suite('viewLineRenderer.renderLine 2', () => { 10000, 'none', false, - false + false, + null )); let expected = [ @@ -1276,7 +1449,8 @@ suite('viewLineRenderer.renderLine 2', () => { 10000, 'none', false, - false + false, + null )); let expected = [ @@ -1305,7 +1479,8 @@ suite('viewLineRenderer.renderLine 2', () => { 10000, 'all', false, - false + false, + null )); let expected = [ @@ -1340,7 +1515,8 @@ suite('viewLineRenderer.renderLine 2', () => { 10000, 'none', false, - false + false, + null )); let expected = [ @@ -1369,7 +1545,8 @@ suite('viewLineRenderer.renderLine 2', () => { 10000, 'none', false, - false + false, + null )); let expected = [ @@ -1400,7 +1577,8 @@ suite('viewLineRenderer.renderLine 2', () => { 10000, 'none', false, - false + false, + null )); let expected = [ @@ -1430,7 +1608,8 @@ suite('viewLineRenderer.renderLine 2', () => { 10000, 'boundary', false, - false + false, + null )); let expected = [ @@ -1458,7 +1637,8 @@ suite('viewLineRenderer.renderLine 2', () => { 10000, 'none', false, - true + true, + null )); let expected = [ @@ -1490,7 +1670,8 @@ suite('viewLineRenderer.renderLine 2', () => { 10000, 'none', false, - true + true, + null )); let expected = [ @@ -1518,7 +1699,8 @@ suite('viewLineRenderer.renderLine 2', () => { -1, 'none', false, - false + false, + null )); return (partIndex: number, partLength: number, offset: number, expected: number) => { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 945d10d7e14..26e0b79b844 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -3031,7 +3031,7 @@ declare namespace monaco.editor { * Enable rendering of whitespace. * Defaults to none. */ - renderWhitespace?: 'none' | 'boundary' | 'all'; + renderWhitespace?: 'none' | 'boundary' | 'selection' | 'all'; /** * Enable rendering of control characters. * Defaults to false. @@ -3303,7 +3303,7 @@ declare namespace monaco.editor { readonly scrollBeyondLastColumn: number; readonly smoothScrolling: boolean; readonly stopRenderingLineAfter: number; - readonly renderWhitespace: 'none' | 'boundary' | 'all'; + readonly renderWhitespace: 'none' | 'boundary' | 'selection' | 'all'; readonly renderControlCharacters: boolean; readonly fontLigatures: boolean; readonly renderIndentGuides: boolean; From 4716b31df1810250cc49b14dd865f188cb821730 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 Jul 2019 20:07:58 +0200 Subject: [PATCH 474/710] finalize compressed object tree model --- .../ui/tree/compressedObjectTreeModel.ts | 18 ++++++++++++------ src/vs/base/browser/ui/tree/objectTreeModel.ts | 8 ++++---- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index 83bcdf05ce5..3eae4d5e4c8 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -213,27 +213,33 @@ export class CompressedObjectTreeModel, TFilterData e } getFirstElementChild(location: T | null): ICompressedTreeNode | null | undefined { - throw new Error('Method not implemented.'); + const compressedNode = this.getCompressedNode(location); + return this.model.getFirstElementChild(compressedNode); } getLastElementAncestor(location?: T | null | undefined): ICompressedTreeNode | null | undefined { - throw new Error('Method not implemented.'); + const compressedNode = typeof location === 'undefined' ? undefined : this.getCompressedNode(location); + return this.model.getLastElementAncestor(compressedNode); } isCollapsible(location: T | null): boolean { - throw new Error('Method not implemented.'); + const compressedNode = this.getCompressedNode(location); + return this.model.isCollapsible(compressedNode); } isCollapsed(location: T | null): boolean { - throw new Error('Method not implemented.'); + const compressedNode = this.getCompressedNode(location); + return this.model.isCollapsed(compressedNode); } setCollapsed(location: T | null, collapsed?: boolean | undefined, recursive?: boolean | undefined): boolean { - throw new Error('Method not implemented.'); + const compressedNode = this.getCompressedNode(location); + return this.model.setCollapsed(compressedNode, collapsed, recursive); } expandTo(location: T | null): void { - throw new Error('Method not implemented.'); + const compressedNode = this.getCompressedNode(location); + return this.model.expandTo(compressedNode); } refilter(): void { diff --git a/src/vs/base/browser/ui/tree/objectTreeModel.ts b/src/vs/base/browser/ui/tree/objectTreeModel.ts index 13375f87c4b..44254446f92 100644 --- a/src/vs/base/browser/ui/tree/objectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/objectTreeModel.ts @@ -200,22 +200,22 @@ export class ObjectTreeModel, TFilterData extends Non return this.model.getListRenderCount(location); } - isCollapsible(element: T): boolean { + isCollapsible(element: T | null): boolean { const location = this.getElementLocation(element); return this.model.isCollapsible(location); } - isCollapsed(element: T): boolean { + isCollapsed(element: T | null): boolean { const location = this.getElementLocation(element); return this.model.isCollapsed(location); } - setCollapsed(element: T, collapsed?: boolean, recursive?: boolean): boolean { + setCollapsed(element: T | null, collapsed?: boolean, recursive?: boolean): boolean { const location = this.getElementLocation(element); return this.model.setCollapsed(location, collapsed, recursive); } - expandTo(element: T): void { + expandTo(element: T | null): void { const location = this.getElementLocation(element); this.model.expandTo(location); } From ea36e04bc7a4fff8683172e71140a873229c592f Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 Jul 2019 20:13:51 +0200 Subject: [PATCH 475/710] CompressedObjectTree --- .../browser/ui/tree/compressedObjectTree.ts | 58 +++++++++++++++++++ .../ui/tree/compressedObjectTreeModel.ts | 12 +++- .../base/browser/ui/tree/objectTreeModel.ts | 2 +- src/vs/base/browser/ui/tree/tree.ts | 1 + 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 src/vs/base/browser/ui/tree/compressedObjectTree.ts diff --git a/src/vs/base/browser/ui/tree/compressedObjectTree.ts b/src/vs/base/browser/ui/tree/compressedObjectTree.ts new file mode 100644 index 00000000000..fb63e29135d --- /dev/null +++ b/src/vs/base/browser/ui/tree/compressedObjectTree.ts @@ -0,0 +1,58 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Iterator, ISequence } from 'vs/base/common/iterator'; +import { AbstractTree, IAbstractTreeOptions } from 'vs/base/browser/ui/tree/abstractTree'; +import { ISpliceable } from 'vs/base/common/sequence'; +import { ITreeNode, ITreeModel, ITreeElement, ITreeRenderer, ITreeSorter, ICollapseStateChangeEvent } from 'vs/base/browser/ui/tree/tree'; +import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list'; +import { Event } from 'vs/base/common/event'; +import { ICompressedTreeNode, CompressedObjectTreeModel } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; + +export interface ICompressedObjectTreeOptions extends IAbstractTreeOptions, TFilterData> { + sorter?: ITreeSorter>; +} + +export class CompressedObjectTree, TFilterData = void> extends AbstractTree | null, TFilterData, T | null> { + + protected model: CompressedObjectTreeModel; + + get onDidChangeCollapseState(): Event, TFilterData>> { return this.model.onDidChangeCollapseState; } + + constructor( + container: HTMLElement, + delegate: IListVirtualDelegate>, + renderers: ITreeRenderer[], + options: ICompressedObjectTreeOptions = {} + ) { + super(container, delegate, renderers, options); + } + + setChildren( + element: T | null, + children?: ISequence>, + onDidCreateNode?: (node: ITreeNode, TFilterData>) => void, + onDidDeleteNode?: (node: ITreeNode, TFilterData>) => void + ): Iterator> { + return this.model.setChildren(element, children, onDidCreateNode, onDidDeleteNode); + } + + rerender(element?: T): void { + if (element === undefined) { + this.view.rerender(); + return; + } + + this.model.rerender(element); + } + + resort(element: T, recursive = true): void { + this.model.resort(element, recursive); + } + + protected createModel(view: ISpliceable, TFilterData>>, options: ICompressedObjectTreeOptions): ITreeModel | null, TFilterData, T | null> { + return new CompressedObjectTreeModel(view, options); + } +} diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index 3eae4d5e4c8..a9ad916d647 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -239,13 +239,23 @@ export class CompressedObjectTreeModel, TFilterData e expandTo(location: T | null): void { const compressedNode = this.getCompressedNode(location); - return this.model.expandTo(compressedNode); + this.model.expandTo(compressedNode); + } + + rerender(location: T | null): void { + const compressedNode = this.getCompressedNode(location); + this.model.rerender(compressedNode); } refilter(): void { this.model.refilter(); } + resort(location: T | null = null, recursive = true): void { + const compressedNode = this.getCompressedNode(location); + this.model.resort(compressedNode, recursive); + } + private getCompressedNode(element: T | null): ICompressedTreeNode | null { if (element === null) { return null; diff --git a/src/vs/base/browser/ui/tree/objectTreeModel.ts b/src/vs/base/browser/ui/tree/objectTreeModel.ts index 44254446f92..880d5e40a6e 100644 --- a/src/vs/base/browser/ui/tree/objectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/objectTreeModel.ts @@ -144,7 +144,7 @@ export class ObjectTreeModel, TFilterData extends Non }); } - rerender(element: T): void { + rerender(element: T | null): void { const location = this.getElementLocation(element); this.model.rerender(location); } diff --git a/src/vs/base/browser/ui/tree/tree.ts b/src/vs/base/browser/ui/tree/tree.ts index 80b30fa4c55..5f9f2e14d69 100644 --- a/src/vs/base/browser/ui/tree/tree.ts +++ b/src/vs/base/browser/ui/tree/tree.ts @@ -124,6 +124,7 @@ export interface ITreeModel { setCollapsed(location: TRef, collapsed?: boolean, recursive?: boolean): boolean; expandTo(location: TRef): void; + rerender(location: TRef): void; refilter(): void; } From 377c473739b164c83bee98043cb64793756a8476 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 Jul 2019 21:11:39 +0200 Subject: [PATCH 476/710] LinearCompressedObjectTreeModel --- .../ui/tree/compressedObjectTreeModel.ts | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index a9ad916d647..57f0a74d449 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -270,3 +270,135 @@ export class CompressedObjectTreeModel, TFilterData e return node; } } + +export type ElementMapper = (elements: T[]) => T; +export const DefaultElementMapper: ElementMapper = elements => elements[elements.length - 1]; + +export type NodeMapper = (node: ITreeNode | null, TFilterData>) => ITreeNode; + +function mapNode(elementMapper: ElementMapper, node: ITreeNode | null, TFilterData>): ITreeNode { + return { + ...node, + element: node.element === null ? null : elementMapper(node.element.elements), + children: node.children.map(child => mapNode(elementMapper, child)), + parent: typeof node.parent === 'undefined' ? node.parent : mapNode(elementMapper, node.parent) + }; +} + +function createNodeMapper(elementMapper: ElementMapper): NodeMapper { + return node => mapNode(elementMapper, node); +} + +export interface ILinearCompressedObjectTreeModelOptions extends ICompressedObjectTreeModelOptions { + readonly elementMapper?: ElementMapper; +} + +export class LinearCompressedObjectTreeModel, TFilterData extends NonNullable = void> implements ITreeModel { + + readonly rootRef = null; + + get onDidSplice(): Event> { + return Event.map(this.model.onDidSplice, ({ insertedNodes, deletedNodes }) => ({ + insertedNodes: insertedNodes.map(this.mapNode), + deletedNodes: deletedNodes.map(this.mapNode), + })); + } + + get onDidChangeCollapseState(): Event> { + return Event.map(this.model.onDidChangeCollapseState, ({ node, deep }) => ({ + node: this.mapNode(node), + deep + })); + } + + get onDidChangeRenderNodeCount(): Event> { + return Event.map(this.model.onDidChangeRenderNodeCount, this.mapNode); + } + + private mapElement: ElementMapper; + private mapNode: NodeMapper; + private model: CompressedObjectTreeModel; + + constructor( + list: ISpliceable, TFilterData>>, + options: ILinearCompressedObjectTreeModelOptions = {} + ) { + this.mapElement = options.elementMapper || DefaultElementMapper; + this.mapNode = createNodeMapper(this.mapElement); + this.model = new CompressedObjectTreeModel(list, options); + } + + getListIndex(location: T | null): number { + return this.model.getListIndex(location); + } + + getListRenderCount(location: T | null): number { + return this.model.getListRenderCount(location); + } + + getNode(location?: T | null | undefined): ITreeNode { + return this.mapNode(this.model.getNode(location)); + } + + getNodeLocation(node: ITreeNode): T | null { + return node.element; + } + + getParentNodeLocation(location: T | null): T | null { + return this.model.getParentNodeLocation(location); + } + + getParentElement(location: T | null): T | null { + const result = this.model.getParentElement(location); + + if (result === null) { + return result; + } + + return this.mapElement(result.elements); + } + + getFirstElementChild(location: T | null): T | null | undefined { + const result = this.model.getFirstElementChild(location); + + if (result === null || typeof result === 'undefined') { + return result; + } + + return this.mapElement(result.elements); + } + + getLastElementAncestor(location?: T | null | undefined): T | null | undefined { + const result = this.model.getLastElementAncestor(location); + + if (result === null || typeof result === 'undefined') { + return result; + } + + return this.mapElement(result.elements); + } + + isCollapsible(location: T | null): boolean { + return this.model.isCollapsible(location); + } + + isCollapsed(location: T | null): boolean { + return this.model.isCollapsed(location); + } + + setCollapsed(location: T | null, collapsed?: boolean | undefined, recursive?: boolean | undefined): boolean { + return this.model.setCollapsed(location, collapsed, recursive); + } + + expandTo(location: T | null): void { + return this.model.expandTo(location); + } + + rerender(location: T | null): void { + return this.model.rerender(location); + } + + refilter(): void { + return this.model.refilter(); + } +} \ No newline at end of file From 72985b02d4542c42eaa79faf0174a34d40210a7b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 Jul 2019 21:12:32 +0200 Subject: [PATCH 477/710] remove compressed object tree --- .../browser/ui/tree/compressedObjectTree.ts | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 src/vs/base/browser/ui/tree/compressedObjectTree.ts diff --git a/src/vs/base/browser/ui/tree/compressedObjectTree.ts b/src/vs/base/browser/ui/tree/compressedObjectTree.ts deleted file mode 100644 index fb63e29135d..00000000000 --- a/src/vs/base/browser/ui/tree/compressedObjectTree.ts +++ /dev/null @@ -1,58 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { Iterator, ISequence } from 'vs/base/common/iterator'; -import { AbstractTree, IAbstractTreeOptions } from 'vs/base/browser/ui/tree/abstractTree'; -import { ISpliceable } from 'vs/base/common/sequence'; -import { ITreeNode, ITreeModel, ITreeElement, ITreeRenderer, ITreeSorter, ICollapseStateChangeEvent } from 'vs/base/browser/ui/tree/tree'; -import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list'; -import { Event } from 'vs/base/common/event'; -import { ICompressedTreeNode, CompressedObjectTreeModel } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; - -export interface ICompressedObjectTreeOptions extends IAbstractTreeOptions, TFilterData> { - sorter?: ITreeSorter>; -} - -export class CompressedObjectTree, TFilterData = void> extends AbstractTree | null, TFilterData, T | null> { - - protected model: CompressedObjectTreeModel; - - get onDidChangeCollapseState(): Event, TFilterData>> { return this.model.onDidChangeCollapseState; } - - constructor( - container: HTMLElement, - delegate: IListVirtualDelegate>, - renderers: ITreeRenderer[], - options: ICompressedObjectTreeOptions = {} - ) { - super(container, delegate, renderers, options); - } - - setChildren( - element: T | null, - children?: ISequence>, - onDidCreateNode?: (node: ITreeNode, TFilterData>) => void, - onDidDeleteNode?: (node: ITreeNode, TFilterData>) => void - ): Iterator> { - return this.model.setChildren(element, children, onDidCreateNode, onDidDeleteNode); - } - - rerender(element?: T): void { - if (element === undefined) { - this.view.rerender(); - return; - } - - this.model.rerender(element); - } - - resort(element: T, recursive = true): void { - this.model.resort(element, recursive); - } - - protected createModel(view: ISpliceable, TFilterData>>, options: ICompressedObjectTreeOptions): ITreeModel | null, TFilterData, T | null> { - return new CompressedObjectTreeModel(view, options); - } -} From c503af58ea41eb042b405a6b3106b12316b3c51f Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 22 Jul 2019 11:43:04 -0700 Subject: [PATCH 478/710] Use more explicit class name --- .../contrib/webview/electron-browser/webview.contribution.ts | 4 ++-- .../contrib/webview/electron-browser/webviewService.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts b/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts index 13b7185842a..084163f0459 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts @@ -15,9 +15,9 @@ import { Extensions as ActionExtensions, IWorkbenchActionRegistry } from 'vs/wor import { WebviewEditor } from 'vs/workbench/contrib/webview/browser/webviewEditor'; import { IWebviewService, webviewDeveloperCategory } from 'vs/workbench/contrib/webview/common/webview'; import * as webviewCommands from 'vs/workbench/contrib/webview/electron-browser/webviewCommands'; -import { WebviewService } from 'vs/workbench/contrib/webview/electron-browser/webviewService'; +import { ElectronWebviewService } from 'vs/workbench/contrib/webview/electron-browser/webviewService'; -registerSingleton(IWebviewService, WebviewService, true); +registerSingleton(IWebviewService, ElectronWebviewService, true); const actionRegistry = Registry.as(ActionExtensions.WorkbenchActions); diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts index 75727aa6389..ba0786266f4 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts @@ -8,7 +8,7 @@ import { WebviewService as BrowserWebviewService } from 'vs/workbench/contrib/we import { IWebviewService, WebviewContentOptions, WebviewElement, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement'; -export class WebviewService extends BrowserWebviewService implements IWebviewService { +export class ElectronWebviewService extends BrowserWebviewService implements IWebviewService { _serviceBrand: any; constructor( From 403f90edd67c5fc213cfe4e44f8f8f6370a949b9 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 22 Jul 2019 11:53:19 -0700 Subject: [PATCH 479/710] Extract DynamicWebviewEditorOverlay to own file --- .../browser/dynamicWebviewEditorOverlay.ts | 166 +++++++++++++++++ .../contrib/webview/browser/webviewService.ts | 175 +----------------- 2 files changed, 168 insertions(+), 173 deletions(-) create mode 100644 src/vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay.ts diff --git a/src/vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay.ts b/src/vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay.ts new file mode 100644 index 00000000000..c86d25f7724 --- /dev/null +++ b/src/vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay.ts @@ -0,0 +1,166 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Emitter, Event } from 'vs/base/common/event'; +import { Disposable, DisposableStore, MutableDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { URI } from 'vs/base/common/uri'; +import { IWebviewService, Webview, WebviewContentOptions, WebviewEditorOverlay, WebviewElement, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; +import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService'; +import { memoize } from 'vs/base/common/decorators'; + +/** + * Webview editor overlay that creates and destroys the underlying webview as needed. + */ +export class DynamicWebviewEditorOverlay extends Disposable implements WebviewEditorOverlay { + + private readonly _pendingMessages = new Set(); + private readonly _webview = this._register(new MutableDisposable()); + private readonly _webviewEvents = this._register(new DisposableStore()); + + private _html: string = ''; + private _initialScrollProgress: number = 0; + private _state: string | undefined = undefined; + private _owner: any = undefined; + + public constructor( + private readonly id: string, + public readonly options: WebviewOptions, + private _contentOptions: WebviewContentOptions, + @IWorkbenchLayoutService private readonly _layoutService: IWorkbenchLayoutService, + @IWebviewService private readonly _webviewService: IWebviewService + ) { + super(); + + this._register(toDisposable(() => this.container.remove())); + } + + @memoize + public get container() { + const container = document.createElement('div'); + container.id = `webview-${this.id}`; + this._layoutService.getContainer(Parts.EDITOR_PART).appendChild(container); + return container; + } + + public claim(owner: any) { + this._owner = owner; + this.show(); + } + + public release(owner: any) { + if (this._owner !== owner) { + return; + } + this._owner = undefined; + this.container.style.visibility = 'hidden'; + if (!this.options.retainContextWhenHidden) { + this._webview.clear(); + this._webviewEvents.clear(); + } + } + + private show() { + if (!this._webview.value) { + const webview = this._webviewService.createWebview(this.id, this.options, this._contentOptions); + this._webview.value = webview; + webview.state = this._state; + webview.html = this._html; + if (this.options.tryRestoreScrollPosition) { + webview.initialScrollProgress = this._initialScrollProgress; + } + this._webview.value.mountTo(this.container); + this._webviewEvents.clear(); + + webview.onDidFocus(() => { this._onDidFocus.fire(); }, undefined, this._webviewEvents); + webview.onDidClickLink(x => { this._onDidClickLink.fire(x); }, undefined, this._webviewEvents); + webview.onMessage(x => { this._onMessage.fire(x); }, undefined, this._webviewEvents); + + webview.onDidScroll(x => { + this._initialScrollProgress = x.scrollYPercentage; + this._onDidScroll.fire(x); + }, undefined, this._webviewEvents); + + webview.onDidUpdateState(state => { + this._state = state; + this._onDidUpdateState.fire(state); + }, undefined, this._webviewEvents); + + this._pendingMessages.forEach(msg => webview.sendMessage(msg)); + this._pendingMessages.clear(); + } + this.container.style.visibility = 'visible'; + } + + public get html(): string { return this._html; } + public set html(value: string) { + this._html = value; + this.withWebview(webview => webview.html = value); + } + + public get initialScrollProgress(): number { return this._initialScrollProgress; } + public set initialScrollProgress(value: number) { + this._initialScrollProgress = value; + this.withWebview(webview => webview.initialScrollProgress = value); + } + + public get state(): string | undefined { return this._state; } + public set state(value: string | undefined) { + this._state = value; + this.withWebview(webview => webview.state = value); + } + + public get contentOptions(): WebviewContentOptions { return this._contentOptions; } + public set contentOptions(value: WebviewContentOptions) { + this._contentOptions = value; + this.withWebview(webview => webview.contentOptions = value); + } + + private readonly _onDidFocus = this._register(new Emitter()); + public readonly onDidFocus: Event = this._onDidFocus.event; + + private readonly _onDidClickLink = this._register(new Emitter()); + public readonly onDidClickLink: Event = this._onDidClickLink.event; + + private readonly _onDidScroll = this._register(new Emitter<{ scrollYPercentage: number; }>()); + public readonly onDidScroll: Event<{ scrollYPercentage: number; }> = this._onDidScroll.event; + + private readonly _onDidUpdateState = this._register(new Emitter()); + public readonly onDidUpdateState: Event = this._onDidUpdateState.event; + + private readonly _onMessage = this._register(new Emitter()); + public readonly onMessage: Event = this._onMessage.event; + + sendMessage(data: any): void { + if (this._webview.value) { + this._webview.value.sendMessage(data); + } else { + this._pendingMessages.add(data); + } + } + + update(html: string, options: WebviewContentOptions, retainContextWhenHidden: boolean): void { + this._contentOptions = options; + this._html = html; + this.withWebview(webview => { + webview.update(html, options, retainContextWhenHidden); + }); + } + + layout(): void { this.withWebview(webview => webview.layout()); } + focus(): void { this.withWebview(webview => webview.focus()); } + reload(): void { this.withWebview(webview => webview.reload()); } + showFind(): void { this.withWebview(webview => webview.showFind()); } + hideFind(): void { this.withWebview(webview => webview.hideFind()); } + + public getInnerWebview() { + return this._webview.value; + } + + private withWebview(f: (webview: Webview) => void): void { + if (this._webview.value) { + f(this._webview.value); + } + } +} diff --git a/src/vs/workbench/contrib/webview/browser/webviewService.ts b/src/vs/workbench/contrib/webview/browser/webviewService.ts index 2ffed7621a3..1995a857f5e 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewService.ts @@ -3,14 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Emitter, Event } from 'vs/base/common/event'; -import { Disposable, DisposableStore, MutableDisposable, toDisposable } from 'vs/base/common/lifecycle'; -import { URI } from 'vs/base/common/uri'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IFrameWebview } from 'vs/workbench/contrib/webview/browser/webviewElement'; -import { IWebviewService, Webview, WebviewContentOptions, WebviewEditorOverlay, WebviewElement, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; -import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService'; -import { memoize } from 'vs/base/common/decorators'; +import { IWebviewService, WebviewContentOptions, WebviewEditorOverlay, WebviewElement, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; +import { DynamicWebviewEditorOverlay } from './dynamicWebviewEditorOverlay'; export class WebviewService implements IWebviewService { _serviceBrand: any; @@ -35,170 +31,3 @@ export class WebviewService implements IWebviewService { return this._instantiationService.createInstance(DynamicWebviewEditorOverlay, id, options, contentOptions); } } - -/** - * Webview editor overlay that creates and destroys the underlying webview as needed. - */ -class DynamicWebviewEditorOverlay extends Disposable implements WebviewEditorOverlay { - - private readonly _pendingMessages = new Set(); - private readonly _webview = this._register(new MutableDisposable()); - private readonly _webviewEvents = this._register(new DisposableStore()); - - private _html: string = ''; - private _initialScrollProgress: number = 0; - private _state: string | undefined = undefined; - private _owner: any = undefined; - - public constructor( - private readonly id: string, - public readonly options: WebviewOptions, - private _contentOptions: WebviewContentOptions, - @IWorkbenchLayoutService private readonly _layoutService: IWorkbenchLayoutService, - @IWebviewService private readonly _webviewService: IWebviewService, - ) { - super(); - - this._register(toDisposable(() => this.container.remove())); - } - - @memoize - public get container() { - const container = document.createElement('div'); - container.id = `webview-${this.id}`; - this._layoutService.getContainer(Parts.EDITOR_PART).appendChild(container); - return container; - } - - public claim(owner: any) { - this._owner = owner; - this.show(); - } - - public release(owner: any) { - if (this._owner !== owner) { - return; - } - - this._owner = undefined; - this.container.style.visibility = 'hidden'; - if (!this.options.retainContextWhenHidden) { - this._webview.clear(); - this._webviewEvents.clear(); - } - } - - private show() { - if (!this._webview.value) { - const webview = this._webviewService.createWebview(this.id, this.options, this._contentOptions); - this._webview.value = webview; - webview.state = this._state; - webview.html = this._html; - - if (this.options.tryRestoreScrollPosition) { - webview.initialScrollProgress = this._initialScrollProgress; - } - - this._webview.value.mountTo(this.container); - - this._webviewEvents.clear(); - - webview.onDidFocus(() => { - this._onDidFocus.fire(); - }, undefined, this._webviewEvents); - - webview.onDidClickLink(x => { - this._onDidClickLink.fire(x); - }, undefined, this._webviewEvents); - - webview.onDidScroll(x => { - this._initialScrollProgress = x.scrollYPercentage; - this._onDidScroll.fire(x); - }, undefined, this._webviewEvents); - - webview.onDidUpdateState(state => { - this._state = state; - this._onDidUpdateState.fire(state); - }, undefined, this._webviewEvents); - - webview.onMessage(x => { - this._onMessage.fire(x); - }, undefined, this._webviewEvents); - - this._pendingMessages.forEach(msg => webview.sendMessage(msg)); - this._pendingMessages.clear(); - } - this.container.style.visibility = 'visible'; - } - - public get html(): string { return this._html; } - public set html(value: string) { - this._html = value; - this.withWebview(webview => webview.html = value); - } - - public get initialScrollProgress(): number { return this._initialScrollProgress; } - public set initialScrollProgress(value: number) { - this._initialScrollProgress = value; - this.withWebview(webview => webview.initialScrollProgress = value); - } - - public get state(): string | undefined { return this._state; } - public set state(value: string | undefined) { - this._state = value; - this.withWebview(webview => webview.state = value); - } - - public get contentOptions(): WebviewContentOptions { return this._contentOptions; } - public set contentOptions(value: WebviewContentOptions) { - this._contentOptions = value; - this.withWebview(webview => webview.contentOptions = value); - } - - private readonly _onDidFocus = this._register(new Emitter()); - public readonly onDidFocus: Event = this._onDidFocus.event; - - private readonly _onDidClickLink = this._register(new Emitter()); - public readonly onDidClickLink: Event = this._onDidClickLink.event; - - private readonly _onDidScroll = this._register(new Emitter<{ scrollYPercentage: number; }>()); - public readonly onDidScroll: Event<{ scrollYPercentage: number; }> = this._onDidScroll.event; - - private readonly _onDidUpdateState = this._register(new Emitter()); - public readonly onDidUpdateState: Event = this._onDidUpdateState.event; - - private readonly _onMessage = this._register(new Emitter()); - public readonly onMessage: Event = this._onMessage.event; - - sendMessage(data: any): void { - if (this._webview.value) { - this._webview.value.sendMessage(data); - } else { - this._pendingMessages.add(data); - } - } - - update(html: string, options: WebviewContentOptions, retainContextWhenHidden: boolean): void { - this._contentOptions = options; - this._html = html; - this.withWebview(webview => { - webview.update(html, options, retainContextWhenHidden); - }); - } - - layout(): void { this.withWebview(webview => webview.layout()); } - focus(): void { this.withWebview(webview => webview.focus()); } - reload(): void { this.withWebview(webview => webview.reload()); } - showFind(): void { this.withWebview(webview => webview.showFind()); } - hideFind(): void { this.withWebview(webview => webview.hideFind()); } - - public getInnerWebview() { - return this._webview.value; - } - - private withWebview(f: (webview: Webview) => void): void { - if (this._webview.value) { - f(this._webview.value); - } - } -} \ No newline at end of file From b330068ab9a1743646bffe02eb40fbf761bf088f Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 22 Jul 2019 11:55:55 -0700 Subject: [PATCH 480/710] ElectronWebviewService should not extend BrowserWebviewService --- .../electron-browser/webviewService.ts | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts index ba0786266f4..6533704e2ab 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts @@ -4,24 +4,30 @@ *--------------------------------------------------------------------------------------------*/ import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { WebviewService as BrowserWebviewService } from 'vs/workbench/contrib/webview/browser/webviewService'; -import { IWebviewService, WebviewContentOptions, WebviewElement, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; +import { DynamicWebviewEditorOverlay } from 'vs/workbench/contrib/webview/browser/DynamicWebviewEditorOverlay'; +import { IWebviewService, WebviewContentOptions, WebviewEditorOverlay, WebviewElement, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement'; -export class ElectronWebviewService extends BrowserWebviewService implements IWebviewService { +export class ElectronWebviewService implements IWebviewService { _serviceBrand: any; constructor( - @IInstantiationService private readonly instantiationService: IInstantiationService, - ) { - super(instantiationService); - } + @IInstantiationService private readonly _instantiationService: IInstantiationService, + ) { } createWebview( _id: string, options: WebviewOptions, contentOptions: WebviewContentOptions ): WebviewElement { - return this.instantiationService.createInstance(ElectronWebviewBasedWebview, options, contentOptions); + return this._instantiationService.createInstance(ElectronWebviewBasedWebview, options, contentOptions); + } + + createWebviewEditorOverlay( + id: string, + options: WebviewOptions, + contentOptions: WebviewContentOptions, + ): WebviewEditorOverlay { + return this._instantiationService.createInstance(DynamicWebviewEditorOverlay, id, options, contentOptions); } } \ No newline at end of file From d5fd351a883ab4eaf6c010aca733f740412be7b7 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 22 Jul 2019 13:31:40 -0700 Subject: [PATCH 481/710] Add setting that enables using a dynamic endpoint for hosting the static webview content For #77132 --- src/vs/code/browser/workbench/workbench.html | 2 +- .../code/electron-browser/workbench/workbench.html | 2 +- .../contrib/webview/browser/webviewElement.ts | 8 ++++++-- .../webview/electron-browser/webviewService.ts | 12 ++++++++++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/vs/code/browser/workbench/workbench.html b/src/vs/code/browser/workbench/workbench.html index 829ce5e4aea..097dd15b3c5 100644 --- a/src/vs/code/browser/workbench/workbench.html +++ b/src/vs/code/browser/workbench/workbench.html @@ -10,7 +10,7 @@ + content="default-src 'none'; img-src 'self' https: data: blob: vscode-remote:; media-src 'none'; frame-src 'self' {{WEBVIEW_ENDPOINT}} https://*.vscode-webview-test.com; script-src 'self' https://az416426.vo.msecnd.net 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self' ws: wss: https:; font-src 'self' blob: vscode-remote:;"> diff --git a/src/vs/code/electron-browser/workbench/workbench.html b/src/vs/code/electron-browser/workbench/workbench.html index 7070141cca2..dfac360344a 100644 --- a/src/vs/code/electron-browser/workbench/workbench.html +++ b/src/vs/code/electron-browser/workbench/workbench.html @@ -3,7 +3,7 @@ - + diff --git a/src/vs/workbench/contrib/webview/browser/webviewElement.ts b/src/vs/workbench/contrib/webview/browser/webviewElement.ts index 22a9a4f7532..5e5df2a02cf 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewElement.ts @@ -45,7 +45,9 @@ export class IFrameWebview extends Disposable implements Webview { @IConfigurationService private readonly _configurationService: IConfigurationService, ) { super(); - if (typeof environmentService.webviewEndpoint !== 'string') { + const useExternalEndpoint = this._configurationService.getValue('webview.experimental.useExternalEndpoint'); + + if (typeof environmentService.webviewEndpoint !== 'string' && !useExternalEndpoint) { throw new Error('To use iframe based webviews, you must configure `environmentService.webviewEndpoint`'); } @@ -142,7 +144,9 @@ export class IFrameWebview extends Disposable implements Webview { } private get endpoint(): string { - const endpoint = this.environmentService.webviewEndpoint!.replace('{{uuid}}', this.id); + const useExternalEndpoint = this._configurationService.getValue('webview.experimental.useExternalEndpoint'); + const baseEndpoint = useExternalEndpoint ? 'https://{{uuid}}.vscode-webview-test.com/8fa811108f0f0524c473020ef57b6620f6c201e1' : this.environmentService.webviewEndpoint!; + const endpoint = baseEndpoint.replace('{{uuid}}', this.id); if (endpoint[endpoint.length - 1] === '/') { return endpoint.slice(0, endpoint.length - 1); } diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts index 6533704e2ab..dcce256690f 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts @@ -3,8 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { DynamicWebviewEditorOverlay } from 'vs/workbench/contrib/webview/browser/DynamicWebviewEditorOverlay'; +import { IFrameWebview } from 'vs/workbench/contrib/webview/browser/webviewElement'; import { IWebviewService, WebviewContentOptions, WebviewEditorOverlay, WebviewElement, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement'; @@ -13,14 +15,20 @@ export class ElectronWebviewService implements IWebviewService { constructor( @IInstantiationService private readonly _instantiationService: IInstantiationService, + @IConfigurationService private readonly _configService: IConfigurationService, ) { } createWebview( - _id: string, + id: string, options: WebviewOptions, contentOptions: WebviewContentOptions ): WebviewElement { - return this._instantiationService.createInstance(ElectronWebviewBasedWebview, options, contentOptions); + const useExternalEndpoint = this._configService.getValue('webview.experimental.useExternalEndpoint'); + if (useExternalEndpoint) { + return this._instantiationService.createInstance(IFrameWebview, id, options, contentOptions); + } else { + return this._instantiationService.createInstance(ElectronWebviewBasedWebview, options, contentOptions); + } } createWebviewEditorOverlay( From a0bd86e90ff2317d3546b4e6fe8e39cf893e2540 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 22 Jul 2019 13:53:42 -0700 Subject: [PATCH 482/710] Fix case of import --- .../contrib/webview/electron-browser/webviewService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts index dcce256690f..ae8eb72d06f 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts @@ -5,7 +5,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { DynamicWebviewEditorOverlay } from 'vs/workbench/contrib/webview/browser/DynamicWebviewEditorOverlay'; +import { DynamicWebviewEditorOverlay } from 'vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay'; import { IFrameWebview } from 'vs/workbench/contrib/webview/browser/webviewElement'; import { IWebviewService, WebviewContentOptions, WebviewEditorOverlay, WebviewElement, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview'; import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement'; From e6d00a52ebcc19937f1aff52a7da724cd40e0b61 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 Jul 2019 23:02:18 +0200 Subject: [PATCH 483/710] Fix #33931 #77462 --- .../browser/preferencesRenderers.ts | 154 +++++++++++++++++- .../browser/configurationService.ts | 23 ++- 2 files changed, 163 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts index 360bc205add..aff65718781 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts @@ -19,7 +19,7 @@ import { IModelDeltaDecoration, TrackedRangeStickiness } from 'vs/editor/common/ import { ModelDecorationOptions } from 'vs/editor/common/model/textModel'; import * as nls from 'vs/nls'; import { ConfigurationTarget, IConfigurationService, overrideIdentifierFromKey } from 'vs/platform/configuration/common/configuration'; -import { ConfigurationScope, Extensions as ConfigurationExtensions, IConfigurationPropertySchema, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; +import { ConfigurationScope, Extensions as ConfigurationExtensions, IConfigurationPropertySchema, IConfigurationRegistry, IConfigurationNode } from 'vs/platform/configuration/common/configurationRegistry'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { Registry } from 'vs/platform/registry/common/platform'; @@ -29,6 +29,8 @@ import { RangeHighlightDecorations } from 'vs/workbench/browser/parts/editor/ran import { DefaultSettingsHeaderWidget, EditPreferenceWidget, SettingsGroupTitleWidget, SettingsHeaderWidget } from 'vs/workbench/contrib/preferences/browser/preferencesWidgets'; import { IFilterResult, IPreferencesEditorModel, IPreferencesService, ISetting, ISettingsEditorModel, ISettingsGroup } from 'vs/workbench/services/preferences/common/preferences'; import { DefaultSettingsEditorModel, SettingsEditorModel, WorkspaceConfigurationEditorModel } from 'vs/workbench/services/preferences/common/preferencesModels'; +import { IMarkerService, IMarkerData, MarkerSeverity, MarkerTag } from 'vs/platform/markers/common/markers'; +import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; export interface IPreferencesRenderer extends IDisposable { readonly preferencesModel: IPreferencesEditorModel; @@ -65,6 +67,8 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend private readonly _onUpdatePreference = this._register(new Emitter<{ key: string, value: any, source: IIndexedSetting }>()); readonly onUpdatePreference: Event<{ key: string, value: any, source: IIndexedSetting }> = this._onUpdatePreference.event; + private unsupportedSettingsRenderer: UnsupportedSettingsRenderer; + private filterResult: IFilterResult | undefined; constructor(protected editor: ICodeEditor, readonly preferencesModel: SettingsEditorModel, @@ -78,7 +82,7 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend this.editSettingActionRenderer = this._register(this.instantiationService.createInstance(EditSettingRenderer, this.editor, this.preferencesModel, this.settingHighlighter)); this._register(this.editSettingActionRenderer.onUpdateSetting(({ key, value, source }) => this._updatePreference(key, value, source))); this._register(this.editor.getModel()!.onDidChangeContent(() => this.modelChangeDelayer.trigger(() => this.onModelChanged()))); - + this.unsupportedSettingsRenderer = this._register(instantiationService.createInstance(UnsupportedSettingsRenderer, editor, preferencesModel)); } getAssociatedPreferencesModel(): IPreferencesEditorModel { @@ -102,6 +106,7 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend if (this.filterResult) { this.filterPreferences(this.filterResult); } + this.unsupportedSettingsRenderer.render(); } private _updatePreference(key: string, value: any, source: IIndexedSetting): void { @@ -946,6 +951,151 @@ class SettingHighlighter extends Disposable { } } +class UnsupportedSettingsRenderer extends Disposable { + + private renderingDelayer: Delayer = new Delayer(200); + + constructor( + private editor: ICodeEditor, + private settingsEditorModel: SettingsEditorModel, + @IMarkerService private markerService: IMarkerService, + @IWorkbenchEnvironmentService private workbenchEnvironmentService: IWorkbenchEnvironmentService, + ) { + super(); + this._register(this.editor.getModel()!.onDidChangeContent(() => this.renderingDelayer.trigger(() => this.render()))); + } + + public render(): void { + const markerData: IMarkerData[] = this.generateMarkerData(); + if (markerData.length) { + this.markerService.changeOne('preferencesEditor', this.settingsEditorModel.uri, markerData); + } else { + this.markerService.remove('preferencesEditor', [this.settingsEditorModel.uri]); + } + } + + private generateMarkerData(): IMarkerData[] { + const markerData: IMarkerData[] = []; + const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration).getConfigurationProperties(); + for (const settingsGroup of this.settingsEditorModel.settingsGroups) { + for (const section of settingsGroup.sections) { + for (const setting of section.settings) { + const configuration = configurationRegistry[setting.key]; + if (configuration) { + switch (this.settingsEditorModel.configurationTarget) { + case ConfigurationTarget.USER_LOCAL: + this.handleLocalUserConfiguration(setting, configuration, markerData); + break; + case ConfigurationTarget.USER_REMOTE: + this.handleRemoteUserConfiguration(setting, configuration, markerData); + break; + case ConfigurationTarget.WORKSPACE: + this.handleWorkspaceConfiguration(setting, configuration, markerData); + break; + case ConfigurationTarget.WORKSPACE_FOLDER: + this.handleWorkspaceFolderConfiguration(setting, configuration, markerData); + break; + } + } else { + markerData.push({ + severity: MarkerSeverity.Hint, + tags: [MarkerTag.Unnecessary], + startLineNumber: setting.keyRange.startLineNumber, + startColumn: setting.keyRange.startColumn, + endLineNumber: setting.valueRange.endLineNumber, + endColumn: setting.valueRange.endColumn, + message: nls.localize('unknown configuration setting', "Unknown Configuration Setting") + }); + } + } + } + } + return markerData; + } + + private handleLocalUserConfiguration(setting: ISetting, configuration: IConfigurationNode, markerData: IMarkerData[]): void { + if (this.workbenchEnvironmentService.configuration.remote && configuration.scope === ConfigurationScope.MACHINE) { + markerData.push({ + severity: MarkerSeverity.Hint, + tags: [MarkerTag.Unnecessary], + startLineNumber: setting.keyRange.startLineNumber, + startColumn: setting.keyRange.startColumn, + endLineNumber: setting.valueRange.endLineNumber, + endColumn: setting.valueRange.endColumn, + message: nls.localize('unsupportedRemoteMachineSetting', "This setting can be applied only in remote machine settings") + }); + } + } + + private handleRemoteUserConfiguration(setting: ISetting, configuration: IConfigurationNode, markerData: IMarkerData[]): void { + if (configuration.scope === ConfigurationScope.APPLICATION) { + markerData.push(this.generateUnsupportedApplicationSettingMarker(setting)); + } + } + + private handleWorkspaceConfiguration(setting: ISetting, configuration: IConfigurationNode, markerData: IMarkerData[]): void { + if (configuration.scope === ConfigurationScope.APPLICATION) { + markerData.push(this.generateUnsupportedApplicationSettingMarker(setting)); + } + + if (configuration.scope === ConfigurationScope.MACHINE) { + markerData.push(this.generateUnsupportedMachineSettingMarker(setting)); + } + } + + private handleWorkspaceFolderConfiguration(setting: ISetting, configuration: IConfigurationNode, markerData: IMarkerData[]): void { + if (configuration.scope === ConfigurationScope.APPLICATION) { + markerData.push(this.generateUnsupportedApplicationSettingMarker(setting)); + } + + if (configuration.scope === ConfigurationScope.MACHINE) { + markerData.push(this.generateUnsupportedMachineSettingMarker(setting)); + } + + if (configuration.scope === ConfigurationScope.WINDOW) { + markerData.push({ + severity: MarkerSeverity.Hint, + tags: [MarkerTag.Unnecessary], + startLineNumber: setting.keyRange.startLineNumber, + startColumn: setting.keyRange.startColumn, + endLineNumber: setting.valueRange.endLineNumber, + endColumn: setting.valueRange.endColumn, + message: nls.localize('unsupportedWindowSetting', "This setting cannot be applied now. It will be applied when you open this folder directly.") + }); + } + } + + private generateUnsupportedApplicationSettingMarker(setting: ISetting): IMarkerData { + return { + severity: MarkerSeverity.Hint, + tags: [MarkerTag.Unnecessary], + startLineNumber: setting.keyRange.startLineNumber, + startColumn: setting.keyRange.startColumn, + endLineNumber: setting.keyRange.endLineNumber, + endColumn: setting.keyRange.endColumn, + message: nls.localize('unsupportedApplicationSetting', "This setting can be applied only in application user settings") + }; + } + + private generateUnsupportedMachineSettingMarker(setting: ISetting): IMarkerData { + return { + severity: MarkerSeverity.Hint, + tags: [MarkerTag.Unnecessary], + startLineNumber: setting.keyRange.startLineNumber, + startColumn: setting.keyRange.startColumn, + endLineNumber: setting.valueRange.endLineNumber, + endColumn: setting.valueRange.endColumn, + message: nls.localize('unsupportedMachineSetting', "This setting can be applied only in user settings") + }; + } + + public dispose(): void { + this.markerService.remove('preferencesEditor', [this.settingsEditorModel.uri]); + super.dispose(); + } + +} + class WorkspaceConfigurationRenderer extends Disposable { private decorationIds: string[] = []; diff --git a/src/vs/workbench/services/configuration/browser/configurationService.ts b/src/vs/workbench/services/configuration/browser/configurationService.ts index a95764ba5ca..4deec1e6057 100644 --- a/src/vs/workbench/services/configuration/browser/configurationService.ts +++ b/src/vs/workbench/services/configuration/browser/configurationService.ts @@ -23,7 +23,6 @@ import { ConfigurationEditingService, EditableConfigurationTarget } from 'vs/wor import { WorkspaceConfiguration, FolderConfiguration, RemoteUserConfiguration, UserConfiguration } from 'vs/workbench/services/configuration/browser/configuration'; import { JSONEditingService } from 'vs/workbench/services/configuration/common/jsonEditingService'; import { IJSONSchema, IJSONSchemaMap } from 'vs/base/common/jsonSchema'; -import { localize } from 'vs/nls'; import { isEqual, dirname } from 'vs/base/common/resources'; import { mark } from 'vs/base/common/performance'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; @@ -507,29 +506,29 @@ export class WorkspaceService extends Disposable implements IConfigurationServic private registerConfigurationSchemas(): void { if (this.workspace) { const jsonRegistry = Registry.as(JSONExtensions.JSONContribution); - const convertToNotSuggestedProperties = (properties: IJSONSchemaMap, errorMessage: string): IJSONSchemaMap => { + const convertToNotSuggestedProperties = (properties: IJSONSchemaMap): IJSONSchemaMap => { return Object.keys(properties).reduce((result: IJSONSchemaMap, property) => { result[property] = deepClone(properties[property]); - result[property].deprecationMessage = errorMessage; + result[property].doNotSuggest = true; return result; }, {}); }; - const unsupportedApplicationSettings = convertToNotSuggestedProperties(applicationSettings.properties, localize('unsupportedApplicationSetting', "This setting can be applied only in application user settings")); - const unsupportedMachineSettings = convertToNotSuggestedProperties(machineSettings.properties, localize('unsupportedMachineSetting', "This setting can be applied only in user settings")); - const unsupportedRemoteMachineSettings = convertToNotSuggestedProperties(machineSettings.properties, localize('unsupportedRemoteMachineSetting', "This setting can be applied only in remote machine settings")); - const allSettingsSchema: IJSONSchema = { properties: allSettings.properties, patternProperties: allSettings.patternProperties, additionalProperties: false, errorMessage: 'Unknown configuration setting' }; - const userSettingsSchema: IJSONSchema = this.remoteUserConfiguration ? { properties: { ...applicationSettings.properties, ...unsupportedRemoteMachineSettings, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: false, errorMessage: 'Unknown configuration setting' } : allSettingsSchema; - const machineSettingsSchema: IJSONSchema = { properties: { ...unsupportedApplicationSettings, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: false, errorMessage: 'Unknown configuration setting' }; - const workspaceSettingsSchema: IJSONSchema = { properties: { ...unsupportedApplicationSettings, ...unsupportedMachineSettings, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: false, errorMessage: 'Unknown configuration setting' }; + const unsupportedApplicationSettings = convertToNotSuggestedProperties(applicationSettings.properties); + const unsupportedMachineSettings = convertToNotSuggestedProperties(machineSettings.properties); + const unsupportedRemoteMachineSettings = convertToNotSuggestedProperties(machineSettings.properties); + const allSettingsSchema: IJSONSchema = { properties: allSettings.properties, patternProperties: allSettings.patternProperties, additionalProperties: true }; + const userSettingsSchema: IJSONSchema = this.remoteUserConfiguration ? { properties: { ...applicationSettings.properties, ...unsupportedRemoteMachineSettings, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true } : allSettingsSchema; + const machineSettingsSchema: IJSONSchema = { properties: { ...unsupportedApplicationSettings, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true }; + const workspaceSettingsSchema: IJSONSchema = { properties: { ...unsupportedApplicationSettings, ...unsupportedMachineSettings, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true }; jsonRegistry.registerSchema(defaultSettingsSchemaId, allSettingsSchema); jsonRegistry.registerSchema(userSettingsSchemaId, userSettingsSchema); jsonRegistry.registerSchema(machineSettingsSchemaId, machineSettingsSchema); if (WorkbenchState.WORKSPACE === this.getWorkbenchState()) { - const unsupportedWindowSettings = convertToNotSuggestedProperties(windowSettings.properties, localize('unsupportedWindowSetting', "This setting cannot be applied now. It will be applied when you open this folder directly.")); - const folderSettingsSchema: IJSONSchema = { properties: { ...unsupportedApplicationSettings, ...unsupportedMachineSettings, ...unsupportedWindowSettings, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: false, errorMessage: 'Unknown configuration setting' }; + const unsupportedWindowSettings = convertToNotSuggestedProperties(windowSettings.properties); + const folderSettingsSchema: IJSONSchema = { properties: { ...unsupportedApplicationSettings, ...unsupportedMachineSettings, ...unsupportedWindowSettings, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true }; jsonRegistry.registerSchema(workspaceSettingsSchemaId, workspaceSettingsSchema); jsonRegistry.registerSchema(folderSettingsSchemaId, folderSettingsSchema); } else { From c158038b79facf0987b3bc9ea191aaa43ad25416 Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Mon, 22 Jul 2019 14:13:43 -0700 Subject: [PATCH 484/710] enable grid layout by default --- src/vs/workbench/browser/workbench.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts index 741f4e77dc9..54496ea933a 100644 --- a/src/vs/workbench/browser/workbench.contribution.ts +++ b/src/vs/workbench/browser/workbench.contribution.ts @@ -237,7 +237,7 @@ import { isMacintosh, isWindows, isLinux, isWeb } from 'vs/base/common/platform' 'workbench.useExperimentalGridLayout': { 'type': 'boolean', 'description': nls.localize('workbench.useExperimentalGridLayout', "Enables the grid layout for the workbench. This setting may enable additional layout options for workbench components."), - 'default': false, + 'default': true, 'scope': ConfigurationScope.APPLICATION } } From 58c37da9a9101b6800f3e490993a8c244e0b5673 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 Jul 2019 23:28:36 +0200 Subject: [PATCH 485/710] Fix #75855 --- .../preferences/browser/preferences.contribution.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts b/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts index fd207e9002b..05217ca58fe 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts @@ -533,8 +533,8 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { id: OpenGlobalKeybindingsFileAction.ID, title: OpenGlobalKeybindingsFileAction.LABEL, iconLocation: { - light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/edit-json-light.svg`)), - dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/edit-json-dark.svg`)) + light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/preferences-editor-light.svg`)), + dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/preferences-editor-dark.svg`)) } }, when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR), @@ -817,8 +817,8 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { id: SETTINGS_EDITOR_COMMAND_SWITCH_TO_JSON, title: nls.localize('openSettingsJson', "Open Settings (JSON)"), iconLocation: { - dark: URI.parse(require.toUrl('vs/workbench/contrib/preferences/browser/media/edit-json-dark.svg')), - light: URI.parse(require.toUrl('vs/workbench/contrib/preferences/browser/media/edit-json-light.svg')) + dark: URI.parse(require.toUrl('vs/workbench/contrib/preferences/browser/media/preferences-editor-dark.svg')), + light: URI.parse(require.toUrl('vs/workbench/contrib/preferences/browser/media/preferences-editor-light.svg')) } }, group: 'navigation', From 71099a5c7f93baeba9acf81cad0e0082976147b8 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Mon, 22 Jul 2019 14:48:12 -0700 Subject: [PATCH 486/710] Use a newer version of @types/node in the build folder to match all other folders --- build/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/package.json b/build/package.json index d217cae2443..81e2576ecc9 100644 --- a/build/package.json +++ b/build/package.json @@ -20,7 +20,7 @@ "@types/minimatch": "^3.0.3", "@types/minimist": "^1.2.0", "@types/mocha": "2.2.39", - "@types/node": "8.0.33", + "@types/node": "^10.14.8", "@types/pump": "^1.0.1", "@types/request": "^2.47.0", "@types/rimraf": "^2.0.2", From b825e95dc0ccda2af1f192c009a57b8fbd98da9a Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Mon, 22 Jul 2019 15:08:39 -0700 Subject: [PATCH 487/710] Update comment icon css to match new icon size --- src/vs/workbench/contrib/comments/browser/media/review.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/comments/browser/media/review.css b/src/vs/workbench/contrib/comments/browser/media/review.css index dd292251cd6..767e4c97057 100644 --- a/src/vs/workbench/contrib/comments/browser/media/review.css +++ b/src/vs/workbench/contrib/comments/browser/media/review.css @@ -399,7 +399,8 @@ } .monaco-editor .review-widget .action-item { - min-width: 16px; + min-width: 18px; + min-height: 18px; margin-left: 4px; } From 78f73b97bcff88cba18f1554d4f45d8c94877848 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Mon, 22 Jul 2019 15:20:42 -0700 Subject: [PATCH 488/710] Remove unneeded call to update comment --- src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts index 26c32a87835..b7c1ea6f12a 100644 --- a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts +++ b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts @@ -311,7 +311,6 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget let currentComment = commentThread.comments![i]; let oldCommentNode = this._commentElements.filter(commentNode => commentNode.comment.uniqueIdInThread === currentComment.uniqueIdInThread); if (oldCommentNode.length) { - oldCommentNode[0].update(currentComment); lastCommentElement = oldCommentNode[0].domNode; newCommentNodeList.unshift(oldCommentNode[0]); } else { From 300eea4039a472b2f41af32778ea858684f1bc54 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Mon, 22 Jul 2019 16:15:26 -0700 Subject: [PATCH 489/710] Fix typo --- .../remote/common/remoteAgentConnection.ts | 12 +++++----- .../electron-browser/remote.contribution.ts | 22 +++++++++---------- .../electron-browser/extensionService.ts | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/vs/platform/remote/common/remoteAgentConnection.ts b/src/vs/platform/remote/common/remoteAgentConnection.ts index 64ef9b758c2..51e5915c214 100644 --- a/src/vs/platform/remote/common/remoteAgentConnection.ts +++ b/src/vs/platform/remote/common/remoteAgentConnection.ts @@ -256,7 +256,7 @@ function sleep(seconds: number): Promise { }); } -export const enum PersistenConnectionEventType { +export const enum PersistentConnectionEventType { ConnectionLost, ReconnectionWait, ReconnectionRunning, @@ -264,22 +264,22 @@ export const enum PersistenConnectionEventType { ConnectionGain } export class ConnectionLostEvent { - public readonly type = PersistenConnectionEventType.ConnectionLost; + public readonly type = PersistentConnectionEventType.ConnectionLost; } export class ReconnectionWaitEvent { - public readonly type = PersistenConnectionEventType.ReconnectionWait; + public readonly type = PersistentConnectionEventType.ReconnectionWait; constructor( public readonly durationSeconds: number ) { } } export class ReconnectionRunningEvent { - public readonly type = PersistenConnectionEventType.ReconnectionRunning; + public readonly type = PersistentConnectionEventType.ReconnectionRunning; } export class ConnectionGainEvent { - public readonly type = PersistenConnectionEventType.ConnectionGain; + public readonly type = PersistentConnectionEventType.ConnectionGain; } export class ReconnectionPermanentFailureEvent { - public readonly type = PersistenConnectionEventType.ReconnectionPermanentFailure; + public readonly type = PersistentConnectionEventType.ReconnectionPermanentFailure; } export type PersistenConnectionEvent = ConnectionGainEvent | ConnectionLostEvent | ReconnectionWaitEvent | ReconnectionRunningEvent | ReconnectionPermanentFailureEvent; diff --git a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts index e61539e255b..4fd4e7e56ad 100644 --- a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts +++ b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts @@ -30,7 +30,7 @@ import { ipcRenderer as ipc } from 'electron'; import { IDiagnosticInfoOptions, IRemoteDiagnosticInfo } from 'vs/platform/diagnostics/common/diagnosticsService'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IProgressService, IProgress, IProgressStep, ProgressLocation } from 'vs/platform/progress/common/progress'; -import { PersistenConnectionEventType } from 'vs/platform/remote/common/remoteAgentConnection'; +import { PersistentConnectionEventType } from 'vs/platform/remote/common/remoteAgentConnection'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; import Severity from 'vs/base/common/severity'; @@ -101,13 +101,13 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc if (connection) { this._register(connection.onDidStateChange((e) => { switch (e.type) { - case PersistenConnectionEventType.ConnectionLost: - case PersistenConnectionEventType.ReconnectionPermanentFailure: - case PersistenConnectionEventType.ReconnectionRunning: - case PersistenConnectionEventType.ReconnectionWait: + case PersistentConnectionEventType.ConnectionLost: + case PersistentConnectionEventType.ReconnectionPermanentFailure: + case PersistentConnectionEventType.ReconnectionRunning: + case PersistentConnectionEventType.ReconnectionWait: this.setDisconnected(true); break; - case PersistenConnectionEventType.ConnectionGain: + case PersistentConnectionEventType.ConnectionGain: this.setDisconnected(false); break; } @@ -298,7 +298,7 @@ class RemoteAgentConnectionStatusListener implements IWorkbenchContribution { currentTimer = null; } switch (e.type) { - case PersistenConnectionEventType.ConnectionLost: + case PersistentConnectionEventType.ConnectionLost: if (!currentProgressPromiseResolve) { let promise = new Promise((resolve) => currentProgressPromiseResolve = resolve); progressService!.withProgress( @@ -315,13 +315,13 @@ class RemoteAgentConnectionStatusListener implements IWorkbenchContribution { progressReporter!.report(nls.localize('connectionLost', "Connection Lost")); break; - case PersistenConnectionEventType.ReconnectionWait: + case PersistentConnectionEventType.ReconnectionWait: currentTimer = new ReconnectionTimer(progressReporter!, Date.now() + 1000 * e.durationSeconds); break; - case PersistenConnectionEventType.ReconnectionRunning: + case PersistentConnectionEventType.ReconnectionRunning: progressReporter!.report(nls.localize('reconnectionRunning', "Attempting to reconnect...")); break; - case PersistenConnectionEventType.ReconnectionPermanentFailure: + case PersistentConnectionEventType.ReconnectionPermanentFailure: currentProgressPromiseResolve!(); currentProgressPromiseResolve = null; progressReporter = null; @@ -333,7 +333,7 @@ class RemoteAgentConnectionStatusListener implements IWorkbenchContribution { } }); break; - case PersistenConnectionEventType.ConnectionGain: + case PersistentConnectionEventType.ConnectionGain: currentProgressPromiseResolve!(); currentProgressPromiseResolve = null; progressReporter = null; diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index 53d85cbeaa8..80464425f19 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -32,7 +32,7 @@ import { ExtensionHostProcessManager } from 'vs/workbench/services/extensions/co import { ExtensionIdentifier, IExtension, ExtensionType, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { Schemas } from 'vs/base/common/network'; import { IFileService } from 'vs/platform/files/common/files'; -import { PersistenConnectionEventType } from 'vs/platform/remote/common/remoteAgentConnection'; +import { PersistentConnectionEventType } from 'vs/platform/remote/common/remoteAgentConnection'; import { IProductService } from 'vs/platform/product/common/product'; import { Logger } from 'vs/workbench/services/extensions/common/extensionPoints'; @@ -473,7 +473,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten if (!remoteAuthority) { return; } - if (e.type === PersistenConnectionEventType.ConnectionLost) { + if (e.type === PersistentConnectionEventType.ConnectionLost) { this._remoteAuthorityResolverService.clearResolvedAuthority(remoteAuthority); } }); From 0366e573f5c748f00b4fb89f388a09297c5c0b95 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 22 Jul 2019 15:13:27 -0700 Subject: [PATCH 490/710] Track editor inputs and webview separately --- .../api/browser/mainThreadWebview.ts | 55 ++++++++++++------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadWebview.ts b/src/vs/workbench/api/browser/mainThreadWebview.ts index 94413dd49a7..90bdeb5ea74 100644 --- a/src/vs/workbench/api/browser/mainThreadWebview.ts +++ b/src/vs/workbench/api/browser/mainThreadWebview.ts @@ -22,6 +22,7 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten import { extHostNamedCustomer } from '../common/extHostCustomers'; import { IProductService } from 'vs/platform/product/common/product'; import { startsWith } from 'vs/base/common/strings'; +import { Webview } from 'vs/workbench/contrib/webview/common/webview'; interface OldMainThreadWebviewState { readonly viewType: string; @@ -41,9 +42,9 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews private static revivalPool = 0; - private readonly _proxy: ExtHostWebviewsShape; - private readonly _webviews = new Map(); + private readonly _webviewEditorInputs = new Map(); + private readonly _webviews = new Map(); private readonly _revivers = new Map(); private _activeWebview: WebviewPanelHandle | undefined = undefined; @@ -103,7 +104,8 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews }); this.hookupWebviewEventDelegate(handle, webview); - this._webviews.set(handle, webview); + this._webviewEditorInputs.set(handle, webview); + this._webviews.set(handle, webview.webview); /* __GDPR__ "webviews:createWebviewPanel" : { @@ -114,32 +116,32 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews } public $disposeWebview(handle: WebviewPanelHandle): void { - const webview = this.getWebview(handle); + const webview = this.getWebviewEditorInput(handle); webview.dispose(); } public $setTitle(handle: WebviewPanelHandle, value: string): void { - const webview = this.getWebview(handle); + const webview = this.getWebviewEditorInput(handle); webview.setName(value); } public $setIconPath(handle: WebviewPanelHandle, value: { light: UriComponents, dark: UriComponents } | undefined): void { - const webview = this.getWebview(handle); + const webview = this.getWebviewEditorInput(handle); webview.iconPath = reviveWebviewIcon(value); } public $setHtml(handle: WebviewPanelHandle, value: string): void { const webview = this.getWebview(handle); - webview.webview.html = value; + webview.html = value; } public $setOptions(handle: WebviewPanelHandle, options: modes.IWebviewOptions): void { const webview = this.getWebview(handle); - webview.webview.contentOptions = reviveWebviewOptions(options as any /*todo@mat */); + webview.contentOptions = reviveWebviewOptions(options as any /*todo@mat */); } public $reveal(handle: WebviewPanelHandle, showOptions: WebviewPanelShowOptions): void { - const webview = this.getWebview(handle); + const webview = this.getWebviewEditorInput(handle); if (webview.isDisposed()) { return; } @@ -152,7 +154,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews public async $postMessage(handle: WebviewPanelHandle, message: any): Promise { const webview = this.getWebview(handle); - webview.webview.sendMessage(message); + webview.sendMessage(message); return true; } @@ -173,8 +175,10 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews } const handle = `revival-${MainThreadWebviews.revivalPool++}`; - this._webviews.set(handle, webviewEditorInput); + this._webviewEditorInputs.set(handle, webviewEditorInput); + this._webviews.set(handle, webviewEditorInput.webview); this.hookupWebviewEventDelegate(handle, webviewEditorInput); + let state = undefined; if (webviewEditorInput.webview.state) { try { @@ -229,11 +233,12 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews input.webview.onMessage((message: any) => this._proxy.$onMessage(handle, message)); input.onDispose(() => { this._proxy.$onDidDisposeWebviewPanel(handle).finally(() => { + this._webviewEditorInputs.delete(handle); this._webviews.delete(handle); }); }); input.webview.onDidUpdateState((newState: any) => { - const webview = this.tryGetWebview(handle); + const webview = this.tryGetWebviewEditorInput(handle); if (!webview || webview.isDisposed()) { return; } @@ -245,8 +250,8 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews const activeEditor = this._editorService.activeControl; let newActiveWebview: { input: WebviewEditorInput, handle: WebviewPanelHandle } | undefined = undefined; if (activeEditor && activeEditor.input instanceof WebviewEditorInput) { - for (const handle of map.keys(this._webviews)) { - const input = this._webviews.get(handle)!; + for (const handle of map.keys(this._webviewEditorInputs)) { + const input = this._webviewEditorInputs.get(handle)!; if (input.matches(activeEditor.input)) { newActiveWebview = { input, handle }; break; @@ -266,7 +271,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews // Broadcast view state update for currently active if (typeof this._activeWebview !== 'undefined') { - const oldActiveWebview = this._webviews.get(this._activeWebview); + const oldActiveWebview = this._webviewEditorInputs.get(this._activeWebview); if (oldActiveWebview) { this._proxy.$onDidChangeWebviewPanelViewState(this._activeWebview, { active: false, @@ -290,7 +295,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews } private onVisibleEditorsChanged(): void { - this._webviews.forEach((input, handle) => { + this._webviewEditorInputs.forEach((input, handle) => { for (const workbenchEditor of this._editorService.visibleControls) { if (workbenchEditor.input && workbenchEditor.input.matches(input)) { const editorPosition = editorGroupToViewColumn(this._editorGroupService, workbenchEditor.group!); @@ -312,7 +317,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews return; } - const webview = this.getWebview(handle); + const webview = this.getWebviewEditorInput(handle); if (this.isSupportedLink(webview, link)) { this._openerService.open(link); } @@ -328,7 +333,19 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews return !!webview.webview.contentOptions.enableCommandUris && link.scheme === 'command'; } - private getWebview(handle: WebviewPanelHandle): WebviewEditorInput { + private getWebviewEditorInput(handle: WebviewPanelHandle): WebviewEditorInput { + const webview = this.tryGetWebviewEditorInput(handle); + if (!webview) { + throw new Error('Unknown webview handle:' + handle); + } + return webview; + } + + private tryGetWebviewEditorInput(handle: WebviewPanelHandle): WebviewEditorInput | undefined { + return this._webviewEditorInputs.get(handle); + } + + private getWebview(handle: WebviewPanelHandle): Webview { const webview = this.tryGetWebview(handle); if (!webview) { throw new Error('Unknown webview handle:' + handle); @@ -336,7 +353,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews return webview; } - private tryGetWebview(handle: WebviewPanelHandle): WebviewEditorInput | undefined { + private tryGetWebview(handle: WebviewPanelHandle): Webview | undefined { return this._webviews.get(handle); } From 1d58f092b11941501a99a96f8308bec2c3448091 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 22 Jul 2019 15:45:48 -0700 Subject: [PATCH 491/710] Use consistent style for registerEditor Most other places in our code inline the editor descriptor --- .../browser/extensions.contribution.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts index eb55efed49b..f91906a7d35 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts @@ -64,14 +64,15 @@ Registry.as(Extensions.Quickopen).registerQuickOpenHandler( ); // Editor -const editorDescriptor = new EditorDescriptor( - ExtensionEditor, - ExtensionEditor.ID, - localize('extension', "Extension") -); - -Registry.as(EditorExtensions.Editors) - .registerEditor(editorDescriptor, [new SyncDescriptor(ExtensionsInput)]); +Registry.as(EditorExtensions.Editors).registerEditor( + new EditorDescriptor( + ExtensionEditor, + ExtensionEditor.ID, + localize('extension', "Extension") + ), + [ + new SyncDescriptor(ExtensionsInput) + ]); // Viewlet const viewletDescriptor = new ViewletDescriptor( From e1d3dd53d17fb1529a002e4d6fb066db0a0bd385 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 22 Jul 2019 16:18:11 -0700 Subject: [PATCH 492/710] Mark static readonly --- extensions/markdown-language-features/src/features/preview.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/markdown-language-features/src/features/preview.ts b/extensions/markdown-language-features/src/features/preview.ts index 654812aefd8..c874f5791ed 100644 --- a/extensions/markdown-language-features/src/features/preview.ts +++ b/extensions/markdown-language-features/src/features/preview.ts @@ -75,7 +75,7 @@ export class PreviewDocumentVersion { export class MarkdownPreview extends Disposable { - public static viewType = 'markdown.preview'; + public static readonly viewType = 'markdown.preview'; private _resource: vscode.Uri; private _locked: boolean; From eaf0a669983d36eb8b628718e7950157f08ba0c4 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Mon, 22 Jul 2019 16:28:42 -0700 Subject: [PATCH 493/710] Accept yarn.lock update and bump applicationinsights to match the newer node declarations --- build/package.json | 2 +- build/yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build/package.json b/build/package.json index 81e2576ecc9..e292f7a7e41 100644 --- a/build/package.json +++ b/build/package.json @@ -29,7 +29,7 @@ "@types/uglify-es": "^3.0.0", "@types/underscore": "^1.8.9", "@types/xml2js": "0.0.33", - "applicationinsights": "1.0.6", + "applicationinsights": "1.0.8", "azure-storage": "^2.1.0", "documentdb": "1.13.0", "github-releases": "^0.4.1", diff --git a/build/yarn.lock b/build/yarn.lock index ec9ae0cc087..8f675d1fef0 100644 --- a/build/yarn.lock +++ b/build/yarn.lock @@ -195,10 +195,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb" integrity sha512-El3+WJk2D/ppWNd2X05aiP5l2k4EwF7KwheknQZls+I26eSICoWRhRIJ56jGgw2dqNGQ5LtNajmBU2ajS28EvQ== -"@types/node@8.0.33": - version "8.0.33" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.33.tgz#1126e94374014e54478092830704f6ea89df04cd" - integrity sha512-vmCdO8Bm1ExT+FWfC9sd9r4jwqM7o97gGy2WBshkkXbf/2nLAJQUrZfIhw27yVOtLUev6kSZc4cav/46KbDd8A== +"@types/node@^10.14.8": + version "10.14.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.13.tgz#ac786d623860adf39a3f51d629480aacd6a6eec7" + integrity sha512-yN/FNNW1UYsRR1wwAoyOwqvDuLDtVXnaJTZ898XIw/Q5cCaeVAlVwvsmXLX5PuiScBYwZsZU4JYSHB3TvfdwvQ== "@types/pump@^1.0.1": version "1.0.1" @@ -357,10 +357,10 @@ ansi-wrap@0.1.0: resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= -applicationinsights@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.0.6.tgz#bc201810de91cea910dab34e8ad35ecde488edeb" - integrity sha512-VQT3kBpJVPw5fCO5n+WUeSx0VHjxFtD7znYbILBlVgOS9/cMDuGFmV2Br3ObzFyZUDGNbEfW36fD1y2/vAiCKw== +applicationinsights@1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.0.8.tgz#db6e3d983cf9f9405fe1ee5ba30ac6e1914537b5" + integrity sha512-KzOOGdphOS/lXWMFZe5440LUdFbrLpMvh2SaRxn7BmiI550KAoSb2gIhiq6kJZ9Ir3AxRRztjhzif+e5P5IXIg== dependencies: diagnostic-channel "0.2.0" diagnostic-channel-publishers "0.2.1" From e40623fcb70cc8eb9ca859ddbd7f074daaad50cb Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 22 Jul 2019 16:20:24 +0200 Subject: [PATCH 494/710] Revert "Failure to launch VSCode from WSL2. Fixes microsoft/vscode-remote-release#914" This reverts commit 0288def8919e33754fd9f2138f8a585913c95ed7. --- resources/win32/bin/code.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/win32/bin/code.sh b/resources/win32/bin/code.sh index 6ae88507877..23a5afe8e71 100644 --- a/resources/win32/bin/code.sh +++ b/resources/win32/bin/code.sh @@ -34,7 +34,8 @@ if grep -qi Microsoft /proc/version; then if [ -n "$WSL_EXT_WLOC" ]; then # replace \r\n with \n in WSL_EXT_WLOC WSL_CODE=$(wslpath -u "${WSL_EXT_WLOC%%[[:cntrl:]]}")/scripts/wslCode.sh - "$WSL_CODE" "$COMMIT" "$QUALITY" "$ELECTRON" "$APP_NAME" "$DATAFOLDER" "$@" + WIN_CODE_CMD=$(wslpath -w "$VSCODE_PATH/bin/$APP_NAME.cmd") + "$WSL_CODE" "$COMMIT" "$QUALITY" "$WIN_CODE_CMD" "$APP_NAME" "$DATAFOLDER" "$@" exit $? fi else From 1e201e8ded93baaeda475cb98e5f3961592bad88 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 23 Jul 2019 09:58:07 +0200 Subject: [PATCH 495/710] Fix microsoft/vscode-remote-release/issues/1012 --- .../extensionManagement/common/extensionGalleryService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts index 1eaa274f63f..e291d436115 100644 --- a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts @@ -23,6 +23,7 @@ import { joinPath } from 'vs/base/common/resources'; import { VSBuffer } from 'vs/base/common/buffer'; import { IProductService } from 'vs/platform/product/common/product'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { optional } from 'vs/platform/instantiation/common/instantiation'; interface IRawGalleryExtensionFile { assetType: string; @@ -339,7 +340,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService { @ITelemetryService private readonly telemetryService: ITelemetryService, @IFileService private readonly fileService: IFileService, @IProductService private readonly productService: IProductService, - @IStorageService private readonly storageService: IStorageService, + @optional(IStorageService) private readonly storageService: IStorageService, ) { const config = productService.extensionsGallery; this.extensionsGalleryUrl = config && config.serviceUrl; From 7e932c35120e82a8a191dfbce34120058e951aac Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 23 Jul 2019 10:09:42 +0200 Subject: [PATCH 496/710] remote configuration file service --- .../configuration/browser/configuration.ts | 78 +++++++++++-------- .../browser/configurationService.ts | 12 +-- .../configuration/common/configuration.ts | 39 +--------- 3 files changed, 54 insertions(+), 75 deletions(-) diff --git a/src/vs/workbench/services/configuration/browser/configuration.ts b/src/vs/workbench/services/configuration/browser/configuration.ts index 515c6df2fe3..fe76b1061e3 100644 --- a/src/vs/workbench/services/configuration/browser/configuration.ts +++ b/src/vs/workbench/services/configuration/browser/configuration.ts @@ -12,7 +12,7 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import { FileChangeType, FileChangesEvent, IFileService } from 'vs/platform/files/common/files'; import { ConfigurationModel, ConfigurationModelParser } from 'vs/platform/configuration/common/configurationModels'; import { WorkspaceConfigurationModelParser, StandaloneConfigurationModelParser } from 'vs/workbench/services/configuration/common/configurationModels'; -import { FOLDER_SETTINGS_PATH, TASKS_CONFIGURATION_KEY, FOLDER_SETTINGS_NAME, LAUNCH_CONFIGURATION_KEY, IConfigurationCache, ConfigurationKey, REMOTE_MACHINE_SCOPES, FOLDER_SCOPES, WORKSPACE_SCOPES, ConfigurationFileService } from 'vs/workbench/services/configuration/common/configuration'; +import { FOLDER_SETTINGS_PATH, TASKS_CONFIGURATION_KEY, FOLDER_SETTINGS_NAME, LAUNCH_CONFIGURATION_KEY, IConfigurationCache, ConfigurationKey, REMOTE_MACHINE_SCOPES, FOLDER_SCOPES, WORKSPACE_SCOPES } from 'vs/workbench/services/configuration/common/configuration'; import { IStoredWorkspaceFolder, IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; import { JSONEditingService } from 'vs/workbench/services/configuration/common/jsonEditingService'; import { WorkbenchState, IWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; @@ -24,6 +24,20 @@ import { IConfigurationModel } from 'vs/platform/configuration/common/configurat import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; import { hash } from 'vs/base/common/hash'; +function whenProviderRegistered(scheme: string, fileService: IFileService): Promise { + if (fileService.canHandleResource(URI.from({ scheme }))) { + return Promise.resolve(); + } + return new Promise((c, e) => { + const disposable = fileService.onDidChangeFileSystemProviderRegistrations(e => { + if (e.scheme === scheme && e.added) { + disposable.dispose(); + c(); + } + }); + }); +} + export class UserConfiguration extends Disposable { private readonly parser: ConfigurationModelParser; @@ -66,7 +80,7 @@ export class UserConfiguration extends Disposable { export class RemoteUserConfiguration extends Disposable { private readonly _cachedConfiguration: CachedRemoteUserConfiguration; - private readonly _configurationFileService: ConfigurationFileService; + private readonly _fileService: IFileService; private _userConfiguration: FileServiceBasedRemoteUserConfiguration | CachedRemoteUserConfiguration; private _userConfigurationInitializationPromise: Promise | null = null; @@ -76,15 +90,15 @@ export class RemoteUserConfiguration extends Disposable { constructor( remoteAuthority: string, configurationCache: IConfigurationCache, - configurationFileService: ConfigurationFileService, + fileService: IFileService, remoteAgentService: IRemoteAgentService ) { super(); - this._configurationFileService = configurationFileService; + this._fileService = fileService; this._userConfiguration = this._cachedConfiguration = new CachedRemoteUserConfiguration(remoteAuthority, configurationCache); remoteAgentService.getEnvironment().then(async environment => { if (environment) { - const userConfiguration = this._register(new FileServiceBasedRemoteUserConfiguration(environment.settingsPath, REMOTE_MACHINE_SCOPES, this._configurationFileService)); + const userConfiguration = this._register(new FileServiceBasedRemoteUserConfiguration(environment.settingsPath, REMOTE_MACHINE_SCOPES, this._fileService)); this._register(userConfiguration.onDidChangeConfiguration(configurationModel => this.onDidUserConfigurationChange(configurationModel))); this._userConfigurationInitializationPromise = userConfiguration.initialize(); const configurationModel = await this._userConfigurationInitializationPromise; @@ -142,12 +156,12 @@ class FileServiceBasedRemoteUserConfiguration extends Disposable { constructor( private readonly configurationResource: URI, private readonly scopes: ConfigurationScope[] | undefined, - private readonly configurationFileService: ConfigurationFileService + private readonly fileService: IFileService ) { super(); this.parser = new ConfigurationModelParser(this.configurationResource.toString(), this.scopes); - this._register(configurationFileService.onFileChanges(e => this.handleFileEvents(e))); + this._register(fileService.onFileChanges(e => this.handleFileEvents(e))); this.reloadConfigurationScheduler = this._register(new RunOnceScheduler(() => this.reload().then(configurationModel => this._onDidChangeConfiguration.fire(configurationModel)), 50)); this._register(toDisposable(() => { this.stopWatchingResource(); @@ -156,7 +170,7 @@ class FileServiceBasedRemoteUserConfiguration extends Disposable { } private watchResource(): void { - this.fileWatcherDisposable = this.configurationFileService.watch(this.configurationResource); + this.fileWatcherDisposable = this.fileService.watch(this.configurationResource); } private stopWatchingResource(): void { @@ -166,7 +180,7 @@ class FileServiceBasedRemoteUserConfiguration extends Disposable { private watchDirectory(): void { const directory = resources.dirname(this.configurationResource); - this.directoryWatcherDisposable = this.configurationFileService.watch(directory); + this.directoryWatcherDisposable = this.fileService.watch(directory); } private stopWatchingDirectory(): void { @@ -175,15 +189,15 @@ class FileServiceBasedRemoteUserConfiguration extends Disposable { } async initialize(): Promise { - const exists = await this.configurationFileService.exists(this.configurationResource); + const exists = await this.fileService.exists(this.configurationResource); this.onResourceExists(exists); return this.reload(); } async reload(): Promise { try { - const content = await this.configurationFileService.readFile(this.configurationResource); - this.parser.parseContent(content); + const content = await this.fileService.readFile(this.configurationResource); + this.parser.parseContent(content.value.toString()); return this.parser.configurationModel; } catch (e) { return new ConfigurationModel(); @@ -279,7 +293,7 @@ class CachedRemoteUserConfiguration extends Disposable { export class WorkspaceConfiguration extends Disposable { - private readonly _configurationFileService: ConfigurationFileService; + private readonly _fileService: IFileService; private readonly _cachedConfiguration: CachedWorkspaceConfiguration; private _workspaceConfiguration: IWorkspaceConfiguration; private _workspaceConfigurationChangeDisposable: IDisposable = Disposable.None; @@ -293,10 +307,10 @@ export class WorkspaceConfiguration extends Disposable { constructor( configurationCache: IConfigurationCache, - configurationFileService: ConfigurationFileService + fileService: IFileService ) { super(); - this._configurationFileService = configurationFileService; + this._fileService = fileService; this._workspaceConfiguration = this._cachedConfiguration = new CachedWorkspaceConfiguration(configurationCache); } @@ -304,7 +318,7 @@ export class WorkspaceConfiguration extends Disposable { this._workspaceIdentifier = workspaceIdentifier; if (!(this._workspaceConfiguration instanceof FileServiceBasedWorkspaceConfiguration)) { if (this._workspaceIdentifier.configPath.scheme === Schemas.file) { - this.switch(new FileServiceBasedWorkspaceConfiguration(this._configurationFileService)); + this.switch(new FileServiceBasedWorkspaceConfiguration(this._fileService)); } else { this.waitAndSwitch(this._workspaceIdentifier); } @@ -339,9 +353,9 @@ export class WorkspaceConfiguration extends Disposable { } private async waitAndSwitch(workspaceIdentifier: IWorkspaceIdentifier): Promise { - await this._configurationFileService.whenProviderRegistered(workspaceIdentifier.configPath.scheme); + await whenProviderRegistered(workspaceIdentifier.configPath.scheme, this._fileService); if (!(this._workspaceConfiguration instanceof FileServiceBasedWorkspaceConfiguration)) { - const fileServiceBasedWorkspaceConfiguration = this._register(new FileServiceBasedWorkspaceConfiguration(this._configurationFileService)); + const fileServiceBasedWorkspaceConfiguration = this._register(new FileServiceBasedWorkspaceConfiguration(this._fileService)); await fileServiceBasedWorkspaceConfiguration.load(workspaceIdentifier); this.switch(fileServiceBasedWorkspaceConfiguration); this._loaded = true; @@ -396,13 +410,13 @@ class FileServiceBasedWorkspaceConfiguration extends Disposable implements IWork protected readonly _onDidChange: Emitter = this._register(new Emitter()); readonly onDidChange: Event = this._onDidChange.event; - constructor(private configurationFileService: ConfigurationFileService) { + constructor(private fileService: IFileService) { super(); this.workspaceConfigurationModelParser = new WorkspaceConfigurationModelParser(''); this.workspaceSettings = new ConfigurationModel(); - this._register(configurationFileService.onFileChanges(e => this.handleWorkspaceFileEvents(e))); + this._register(fileService.onFileChanges(e => this.handleWorkspaceFileEvents(e))); this.reloadConfigurationScheduler = this._register(new RunOnceScheduler(() => this._onDidChange.fire(), 50)); this.workspaceConfigWatcher = this._register(this.watchWorkspaceConfigurationFile()); } @@ -420,9 +434,10 @@ class FileServiceBasedWorkspaceConfiguration extends Disposable implements IWork } let contents = ''; try { - contents = await this.configurationFileService.readFile(this._workspaceIdentifier.configPath); + const content = await this.fileService.readFile(this._workspaceIdentifier.configPath); + contents = content.value.toString(); } catch (error) { - const exists = await this.configurationFileService.exists(this._workspaceIdentifier.configPath); + const exists = await this.fileService.exists(this._workspaceIdentifier.configPath); if (exists) { errors.onUnexpectedError(error); } @@ -454,7 +469,7 @@ class FileServiceBasedWorkspaceConfiguration extends Disposable implements IWork } private watchWorkspaceConfigurationFile(): IDisposable { - return this._workspaceIdentifier ? this.configurationFileService.watch(this._workspaceIdentifier.configPath) : Disposable.None; + return this._workspaceIdentifier ? this.fileService.watch(this._workspaceIdentifier.configPath) : Disposable.None; } private handleWorkspaceFileEvents(event: FileChangesEvent): void { @@ -557,7 +572,7 @@ class FileServiceBasedFolderConfiguration extends Disposable implements IFolderC protected readonly _onDidChange: Emitter = this._register(new Emitter()); readonly onDidChange: Event = this._onDidChange.event; - constructor(protected readonly configurationFolder: URI, workbenchState: WorkbenchState, private configurationFileService: ConfigurationFileService) { + constructor(protected readonly configurationFolder: URI, workbenchState: WorkbenchState, private fileService: IFileService) { super(); this.configurationNames = [FOLDER_SETTINGS_NAME /*First one should be settings */, TASKS_CONFIGURATION_KEY, LAUNCH_CONFIGURATION_KEY]; @@ -567,15 +582,16 @@ class FileServiceBasedFolderConfiguration extends Disposable implements IFolderC this._cache = new ConfigurationModel(); this.changeEventTriggerScheduler = this._register(new RunOnceScheduler(() => this._onDidChange.fire(), 50)); - this._register(configurationFileService.onFileChanges(e => this.handleWorkspaceFileEvents(e))); + this._register(fileService.onFileChanges(e => this.handleWorkspaceFileEvents(e))); } async loadConfiguration(): Promise { const configurationContents = await Promise.all(this.configurationResources.map(async resource => { try { - return await this.configurationFileService.readFile(resource); + const content = await this.fileService.readFile(resource); + return content.value.toString(); } catch (error) { - const exists = await this.configurationFileService.exists(resource); + const exists = await this.fileService.exists(resource); if (exists) { errors.onUnexpectedError(error); } @@ -724,7 +740,7 @@ export class FolderConfiguration extends Disposable implements IFolderConfigurat readonly workspaceFolder: IWorkspaceFolder, configFolderRelativePath: string, private readonly workbenchState: WorkbenchState, - configurationFileService: ConfigurationFileService, + fileService: IFileService, configurationCache: IConfigurationCache ) { super(); @@ -732,13 +748,13 @@ export class FolderConfiguration extends Disposable implements IFolderConfigurat this.configurationFolder = resources.joinPath(workspaceFolder.uri, configFolderRelativePath); this.folderConfiguration = this.cachedFolderConfiguration = new CachedFolderConfiguration(workspaceFolder.uri, configFolderRelativePath, configurationCache); if (workspaceFolder.uri.scheme === Schemas.file) { - this.folderConfiguration = new FileServiceBasedFolderConfiguration(this.configurationFolder, this.workbenchState, configurationFileService); + this.folderConfiguration = new FileServiceBasedFolderConfiguration(this.configurationFolder, this.workbenchState, fileService); } else { - configurationFileService.whenProviderRegistered(workspaceFolder.uri.scheme) + whenProviderRegistered(workspaceFolder.uri.scheme, fileService) .then(() => { this.folderConfiguration.dispose(); this.folderConfigurationDisposable.dispose(); - this.folderConfiguration = new FileServiceBasedFolderConfiguration(this.configurationFolder, this.workbenchState, configurationFileService); + this.folderConfiguration = new FileServiceBasedFolderConfiguration(this.configurationFolder, this.workbenchState, fileService); this._register(this.folderConfiguration.onDidChange(e => this.onDidFolderConfigurationChange())); this.onDidFolderConfigurationChange(); }); diff --git a/src/vs/workbench/services/configuration/browser/configurationService.ts b/src/vs/workbench/services/configuration/browser/configurationService.ts index 4deec1e6057..50ffb6be24c 100644 --- a/src/vs/workbench/services/configuration/browser/configurationService.ts +++ b/src/vs/workbench/services/configuration/browser/configurationService.ts @@ -14,7 +14,7 @@ import { IWorkspaceContextService, Workspace, WorkbenchState, IWorkspaceFolder, import { ConfigurationChangeEvent, ConfigurationModel, DefaultConfigurationModel } from 'vs/platform/configuration/common/configurationModels'; import { IConfigurationChangeEvent, ConfigurationTarget, IConfigurationOverrides, keyFromOverrideIdentifier, isConfigurationOverrides, IConfigurationData, IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { Configuration, WorkspaceConfigurationChangeEvent, AllKeysConfigurationChangeEvent } from 'vs/workbench/services/configuration/common/configurationModels'; -import { FOLDER_CONFIG_FOLDER_NAME, defaultSettingsSchemaId, userSettingsSchemaId, workspaceSettingsSchemaId, folderSettingsSchemaId, IConfigurationCache, machineSettingsSchemaId, LOCAL_MACHINE_SCOPES, ConfigurationFileService } from 'vs/workbench/services/configuration/common/configuration'; +import { FOLDER_CONFIG_FOLDER_NAME, defaultSettingsSchemaId, userSettingsSchemaId, workspaceSettingsSchemaId, folderSettingsSchemaId, IConfigurationCache, machineSettingsSchemaId, LOCAL_MACHINE_SCOPES } from 'vs/workbench/services/configuration/common/configuration'; import { Registry } from 'vs/platform/registry/common/platform'; import { IConfigurationRegistry, Extensions, allSettings, windowSettings, resourceSettings, applicationSettings, machineSettings } from 'vs/platform/configuration/common/configurationRegistry'; import { IWorkspaceIdentifier, isWorkspaceIdentifier, IStoredWorkspaceFolder, isStoredWorkspaceFolder, IWorkspaceFolderCreationData, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier, IWorkspaceInitializationPayload, isSingleFolderWorkspaceInitializationPayload, ISingleFolderWorkspaceInitializationPayload, IEmptyWorkspaceInitializationPayload, useSlashForPath, getStoredWorkspaceFolder } from 'vs/platform/workspaces/common/workspaces'; @@ -45,7 +45,7 @@ export class WorkspaceService extends Disposable implements IConfigurationServic private cachedFolderConfigs: ResourceMap; private workspaceEditingQueue: Queue; - private readonly configurationFileService: ConfigurationFileService; + private readonly fileService: IFileService; protected readonly _onDidChangeConfiguration: Emitter = this._register(new Emitter()); public readonly onDidChangeConfiguration: Event = this._onDidChangeConfiguration.event; @@ -76,16 +76,16 @@ export class WorkspaceService extends Disposable implements IConfigurationServic this.completeWorkspaceBarrier = new Barrier(); this.defaultConfiguration = new DefaultConfigurationModel(); this.configurationCache = configurationCache; - this.configurationFileService = new ConfigurationFileService(fileService); + this.fileService = fileService; this._configuration = new Configuration(this.defaultConfiguration, new ConfigurationModel(), new ConfigurationModel(), new ConfigurationModel(), new ResourceMap(), new ConfigurationModel(), new ResourceMap(), this.workspace); this.cachedFolderConfigs = new ResourceMap(); this.localUserConfiguration = this._register(new UserConfiguration(environmentService.settingsResource, remoteAuthority ? LOCAL_MACHINE_SCOPES : undefined, fileService)); this._register(this.localUserConfiguration.onDidChangeConfiguration(userConfiguration => this.onLocalUserConfigurationChanged(userConfiguration))); if (remoteAuthority) { - this.remoteUserConfiguration = this._register(new RemoteUserConfiguration(remoteAuthority, configurationCache, this.configurationFileService, remoteAgentService)); + this.remoteUserConfiguration = this._register(new RemoteUserConfiguration(remoteAuthority, configurationCache, fileService, remoteAgentService)); this._register(this.remoteUserConfiguration.onDidChangeConfiguration(userConfiguration => this.onRemoteUserConfigurationChanged(userConfiguration))); } - this.workspaceConfiguration = this._register(new WorkspaceConfiguration(configurationCache, this.configurationFileService)); + this.workspaceConfiguration = this._register(new WorkspaceConfiguration(configurationCache, fileService)); this._register(this.workspaceConfiguration.onDidUpdateConfiguration(() => { this.onWorkspaceConfigurationChanged(); if (this.workspaceConfiguration.loaded) { @@ -610,7 +610,7 @@ export class WorkspaceService extends Disposable implements IConfigurationServic return Promise.all([...folders.map(folder => { let folderConfiguration = this.cachedFolderConfigs.get(folder.uri); if (!folderConfiguration) { - folderConfiguration = new FolderConfiguration(folder, FOLDER_CONFIG_FOLDER_NAME, this.getWorkbenchState(), this.configurationFileService, this.configurationCache); + folderConfiguration = new FolderConfiguration(folder, FOLDER_CONFIG_FOLDER_NAME, this.getWorkbenchState(), this.fileService, this.configurationCache); this._register(folderConfiguration.onDidChange(() => this.onWorkspaceFolderConfigurationChanged(folder))); this.cachedFolderConfigs.set(folder.uri, this._register(folderConfiguration)); } diff --git a/src/vs/workbench/services/configuration/common/configuration.ts b/src/vs/workbench/services/configuration/common/configuration.ts index ca5948d81a6..170e3f136aa 100644 --- a/src/vs/workbench/services/configuration/common/configuration.ts +++ b/src/vs/workbench/services/configuration/common/configuration.ts @@ -3,9 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { URI } from 'vs/base/common/uri'; -import { IDisposable } from 'vs/base/common/lifecycle'; -import { IFileService } from 'vs/platform/files/common/files'; import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; export const FOLDER_CONFIG_FOLDER_NAME = '.vscode'; @@ -39,38 +36,4 @@ export interface IConfigurationCache { write(key: ConfigurationKey, content: string): Promise; remove(key: ConfigurationKey): Promise; -} - -export class ConfigurationFileService { - - constructor(private readonly fileService: IFileService) { } - - get onFileChanges() { return this.fileService.onFileChanges; } - - whenProviderRegistered(scheme: string): Promise { - if (this.fileService.canHandleResource(URI.from({ scheme }))) { - return Promise.resolve(); - } - return new Promise((c, e) => { - const disposable = this.fileService.onDidChangeFileSystemProviderRegistrations(e => { - if (e.scheme === scheme && e.added) { - disposable.dispose(); - c(); - } - }); - }); - } - - watch(resource: URI): IDisposable { - return this.fileService.watch(resource); - } - - exists(resource: URI): Promise { - return this.fileService.exists(resource); - } - - readFile(resource: URI): Promise { - return this.fileService.readFile(resource).then(content => content.value.toString()); - } - -} +} \ No newline at end of file From 18592e25bb8ccf7948201a2eb2446df011513229 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 23 Jul 2019 10:57:10 +0200 Subject: [PATCH 497/710] Fix microsoft/vscode-remote-release/issues/1014 --- .../preferences/browser/preferencesEditor.ts | 59 ++++++----------- .../browser/preferencesRenderers.ts | 4 +- .../preferences/browser/preferencesService.ts | 66 ++++++++++--------- .../preferences/common/preferences.ts | 2 +- 4 files changed, 60 insertions(+), 71 deletions(-) diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts b/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts index 3c332421281..cd164f0923d 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts @@ -548,8 +548,11 @@ class PreferencesRenderersController extends Disposable { const targetKey = resource.toString(); if (!this._prefsModelsForSearch.has(targetKey)) { try { - const model = this._register(await this.preferencesService.createPreferencesEditorModel(resource)); - this._prefsModelsForSearch.set(targetKey, model); + const model = await this.preferencesService.createPreferencesEditorModel(resource); + if (model) { + this._register(model); + this._prefsModelsForSearch.set(targetKey, model); + } } catch (e) { // Will throw when the settings file doesn't exist. return undefined; @@ -1116,16 +1119,19 @@ abstract class AbstractSettingsEditorContribution extends Disposable implements private _updatePreferencesRenderer(associatedPreferencesModelUri: URI): Promise | null> { return this.preferencesService.createPreferencesEditorModel(associatedPreferencesModelUri) .then(associatedPreferencesEditorModel => { - return this.preferencesRendererCreationPromise!.then(preferencesRenderer => { - if (preferencesRenderer) { - const associatedPreferencesModel = preferencesRenderer.getAssociatedPreferencesModel(); - if (associatedPreferencesModel) { - associatedPreferencesModel.dispose(); + if (associatedPreferencesEditorModel) { + return this.preferencesRendererCreationPromise!.then(preferencesRenderer => { + if (preferencesRenderer) { + const associatedPreferencesModel = preferencesRenderer.getAssociatedPreferencesModel(); + if (associatedPreferencesModel) { + associatedPreferencesModel.dispose(); + } + preferencesRenderer.setAssociatedPreferencesModel(associatedPreferencesEditorModel); } - preferencesRenderer.setAssociatedPreferencesModel(associatedPreferencesEditorModel); - } - return preferencesRenderer; - }); + return preferencesRenderer; + }); + } + return null; }); } @@ -1193,12 +1199,14 @@ class SettingsEditorContribution extends AbstractSettingsEditorContribution impl } protected _createPreferencesRenderer(): Promise | null> | null { - if (this.isSettingsModel()) { - return this.preferencesService.createPreferencesEditorModel(this.editor.getModel()!.uri) + const model = this.editor.getModel(); + if (model) { + return this.preferencesService.createPreferencesEditorModel(model.uri) .then(settingsModel => { if (settingsModel instanceof SettingsEditorModel && this.editor.getModel()) { switch (settingsModel.configurationTarget) { case ConfigurationTarget.USER_LOCAL: + case ConfigurationTarget.USER_REMOTE: return this.instantiationService.createInstance(UserSettingsRenderer, this.editor, settingsModel); case ConfigurationTarget.WORKSPACE: return this.instantiationService.createInstance(WorkspaceSettingsRenderer, this.editor, settingsModel); @@ -1217,31 +1225,6 @@ class SettingsEditorContribution extends AbstractSettingsEditorContribution impl } return null; } - - private isSettingsModel(): boolean { - const model = this.editor.getModel(); - if (!model) { - return false; - } - - if (this.preferencesService.userSettingsResource && this.preferencesService.userSettingsResource.toString() === model.uri.toString()) { - return true; - } - - if (this.preferencesService.workspaceSettingsResource && this.preferencesService.workspaceSettingsResource.toString() === model.uri.toString()) { - return true; - } - - for (const folder of this.workspaceContextService.getWorkspace().folders) { - const folderSettingsResource = this.preferencesService.getFolderSettingsResource(folder.uri); - if (folderSettingsResource && folderSettingsResource.toString() === model.uri.toString()) { - return true; - } - } - - return false; - } - } registerEditorContribution(SettingsEditorContribution); diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts index aff65718781..2a122ab463d 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts @@ -1071,8 +1071,8 @@ class UnsupportedSettingsRenderer extends Disposable { tags: [MarkerTag.Unnecessary], startLineNumber: setting.keyRange.startLineNumber, startColumn: setting.keyRange.startColumn, - endLineNumber: setting.keyRange.endLineNumber, - endColumn: setting.keyRange.endColumn, + endLineNumber: setting.valueRange.endLineNumber, + endColumn: setting.valueRange.endColumn, message: nls.localize('unsupportedApplicationSetting', "This setting can be applied only in application user settings") }; } diff --git a/src/vs/workbench/services/preferences/browser/preferencesService.ts b/src/vs/workbench/services/preferences/browser/preferencesService.ts index 75c7be48efc..96a7a241493 100644 --- a/src/vs/workbench/services/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/services/preferences/browser/preferencesService.ts @@ -91,11 +91,15 @@ export class PreferencesService extends Disposable implements IPreferencesServic private readonly defaultSettingsRawResource = URI.from({ scheme: network.Schemas.vscode, authority: 'defaultsettings', path: '/defaultSettings.json' }); get userSettingsResource(): URI { - return this.getEditableSettingsURI(ConfigurationTarget.USER)!; + return this.environmentService.settingsResource; } get workspaceSettingsResource(): URI | null { - return this.getEditableSettingsURI(ConfigurationTarget.WORKSPACE); + if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) { + return null; + } + const workspace = this.contextService.getWorkspace(); + return workspace.configuration || workspace.folders[0].toResource(FOLDER_SETTINGS_PATH); } get settingsEditor2Input(): SettingsEditor2Input { @@ -103,7 +107,8 @@ export class PreferencesService extends Disposable implements IPreferencesServic } getFolderSettingsResource(resource: URI): URI | null { - return this.getEditableSettingsURI(ConfigurationTarget.WORKSPACE_FOLDER, resource); + const folder = this.contextService.getWorkspaceFolder(resource); + return folder ? folder.toResource(FOLDER_SETTINGS_PATH) : null; } resolveModel(uri: URI): Promise { @@ -153,7 +158,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic return Promise.resolve(null); } - createPreferencesEditorModel(uri: URI): Promise> { + async createPreferencesEditorModel(uri: URI): Promise> { if (this.isDefaultSettingsResource(uri)) { return this.createDefaultSettingsEditorModel(uri); } @@ -162,13 +167,22 @@ export class PreferencesService extends Disposable implements IPreferencesServic return this.createEditableSettingsEditorModel(ConfigurationTarget.USER_LOCAL, uri); } - const workspaceSettingsUri = this.getEditableSettingsURI(ConfigurationTarget.WORKSPACE); + const workspaceSettingsUri = await this.getEditableSettingsURI(ConfigurationTarget.WORKSPACE); if (workspaceSettingsUri && workspaceSettingsUri.toString() === uri.toString()) { return this.createEditableSettingsEditorModel(ConfigurationTarget.WORKSPACE, workspaceSettingsUri); } if (this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) { - return this.createEditableSettingsEditorModel(ConfigurationTarget.WORKSPACE_FOLDER, uri); + const settingsUri = await this.getEditableSettingsURI(ConfigurationTarget.WORKSPACE_FOLDER, uri); + if (settingsUri) { + return this.createEditableSettingsEditorModel(ConfigurationTarget.WORKSPACE_FOLDER, uri); + } + } + + const remoteEnvironment = await this.remoteAgentService.getEnvironment(); + const remoteSettingsUri = remoteEnvironment ? remoteEnvironment.settingsPath : null; + if (remoteSettingsUri && remoteSettingsUri.toString() === uri.toString()) { + return this.createEditableSettingsEditorModel(ConfigurationTarget.USER_REMOTE, uri); } return Promise.reject(`unknown resource: ${uri.toString()}`); @@ -237,11 +251,11 @@ export class PreferencesService extends Disposable implements IPreferencesServic this.openOrSwitchSettings2(ConfigurationTarget.WORKSPACE, undefined, options, group); } - openFolderSettings(folder: URI, jsonEditor?: boolean, options?: ISettingsEditorOptions, group?: IEditorGroup): Promise { + async openFolderSettings(folder: URI, jsonEditor?: boolean, options?: ISettingsEditorOptions, group?: IEditorGroup): Promise { jsonEditor = typeof jsonEditor === 'undefined' ? this.configurationService.getValue('workbench.settings.editor') === 'json' : jsonEditor; - const folderSettingsUri = this.getEditableSettingsURI(ConfigurationTarget.WORKSPACE_FOLDER, folder); + const folderSettingsUri = await this.getEditableSettingsURI(ConfigurationTarget.WORKSPACE_FOLDER, folder); if (jsonEditor) { if (folderSettingsUri) { return this.openOrSwitchSettings(ConfigurationTarget.WORKSPACE_FOLDER, folderSettingsUri, options, group); @@ -389,8 +403,8 @@ export class PreferencesService extends Disposable implements IPreferencesServic return this.editorService.openEditor(input, SettingsEditorOptions.create(settingsOptions), group); } - private doSwitchSettings(target: ConfigurationTarget, resource: URI, input: PreferencesEditorInput, group: IEditorGroup, options?: ISettingsEditorOptions): Promise { - const settingsURI = this.getEditableSettingsURI(target, resource); + private async doSwitchSettings(target: ConfigurationTarget, resource: URI, input: PreferencesEditorInput, group: IEditorGroup, options?: ISettingsEditorOptions): Promise { + const settingsURI = await this.getEditableSettingsURI(target, resource); if (!settingsURI) { return Promise.reject(`Invalid settings URI - ${resource.toString()}`); } @@ -477,18 +491,14 @@ export class PreferencesService extends Disposable implements IPreferencesServic .then(() => this.editorService.createInput({ resource })); } - private createEditableSettingsEditorModel(configurationTarget: ConfigurationTarget, resource: URI): Promise { - const settingsUri = this.getEditableSettingsURI(configurationTarget, resource); - if (settingsUri) { - const workspace = this.contextService.getWorkspace(); - if (workspace.configuration && workspace.configuration.toString() === settingsUri.toString()) { - return this.textModelResolverService.createModelReference(settingsUri) - .then(reference => this.instantiationService.createInstance(WorkspaceConfigurationEditorModel, reference, configurationTarget)); - } + private createEditableSettingsEditorModel(configurationTarget: ConfigurationTarget, settingsUri: URI): Promise { + const workspace = this.contextService.getWorkspace(); + if (workspace.configuration && workspace.configuration.toString() === settingsUri.toString()) { return this.textModelResolverService.createModelReference(settingsUri) - .then(reference => this.instantiationService.createInstance(SettingsEditorModel, reference, configurationTarget)); + .then(reference => this.instantiationService.createInstance(WorkspaceConfigurationEditorModel, reference, configurationTarget)); } - return Promise.reject(`unknown target: ${configurationTarget} and resource: ${resource.toString()}`); + return this.textModelResolverService.createModelReference(settingsUri) + .then(reference => this.instantiationService.createInstance(SettingsEditorModel, reference, configurationTarget)); } private createDefaultSettingsEditorModel(defaultSettingsUri: URI): Promise { @@ -518,23 +528,19 @@ export class PreferencesService extends Disposable implements IPreferencesServic return this._defaultUserSettingsContentModel; } - private getEditableSettingsURI(configurationTarget: ConfigurationTarget, resource?: URI): URI | null { + private async getEditableSettingsURI(configurationTarget: ConfigurationTarget, resource?: URI): Promise { switch (configurationTarget) { case ConfigurationTarget.USER: case ConfigurationTarget.USER_LOCAL: - return this.environmentService.settingsResource; + return this.userSettingsResource; case ConfigurationTarget.USER_REMOTE: - return this.environmentService.settingsResource; + const remoteEnvironment = await this.remoteAgentService.getEnvironment(); + return remoteEnvironment ? remoteEnvironment.settingsPath : null; case ConfigurationTarget.WORKSPACE: - if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) { - return null; - } - const workspace = this.contextService.getWorkspace(); - return workspace.configuration || workspace.folders[0].toResource(FOLDER_SETTINGS_PATH); + return this.workspaceSettingsResource; case ConfigurationTarget.WORKSPACE_FOLDER: if (resource) { - const folder = this.contextService.getWorkspaceFolder(resource); - return folder ? folder.toResource(FOLDER_SETTINGS_PATH) : null; + return this.getFolderSettingsResource(resource); } } return null; diff --git a/src/vs/workbench/services/preferences/common/preferences.ts b/src/vs/workbench/services/preferences/common/preferences.ts index a5eb1902bae..abf288178cc 100644 --- a/src/vs/workbench/services/preferences/common/preferences.ts +++ b/src/vs/workbench/services/preferences/common/preferences.ts @@ -198,7 +198,7 @@ export interface IPreferencesService { getFolderSettingsResource(resource: URI): URI | null; resolveModel(uri: URI): Promise; - createPreferencesEditorModel(uri: URI): Promise>; + createPreferencesEditorModel(uri: URI): Promise | null>; createSettings2EditorModel(): Settings2EditorModel; // TODO openRawDefaultSettings(): Promise; From 5bbf920131fe086fd662c3eaa46dfdcca0057440 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 23 Jul 2019 10:45:12 +0200 Subject: [PATCH 498/710] first compressed object tree sample --- src/vs/base/browser/ui/tree/asyncDataTree.ts | 2 +- .../browser/ui/tree/compressedObjectTree.ts | 56 +++++++++++++++ .../ui/tree/compressedObjectTreeModel.ts | 32 ++++++--- src/vs/base/browser/ui/tree/objectTree.ts | 12 ++-- .../base/browser/ui/tree/objectTreeModel.ts | 17 +++-- .../ui/tree/compressedObjectTreeModel.test.ts | 10 +-- .../browser/parts/views/customView.ts | 4 ++ test/tree/public/index.html | 68 ++++++++++++++++++- 8 files changed, 173 insertions(+), 28 deletions(-) create mode 100644 src/vs/base/browser/ui/tree/compressedObjectTree.ts diff --git a/src/vs/base/browser/ui/tree/asyncDataTree.ts b/src/vs/base/browser/ui/tree/asyncDataTree.ts index e31422edf6a..f6b70591502 100644 --- a/src/vs/base/browser/ui/tree/asyncDataTree.ts +++ b/src/vs/base/browser/ui/tree/asyncDataTree.ts @@ -320,7 +320,7 @@ export class AsyncDataTree implements IDisposable get onDidFocus(): Event { return this.tree.onDidFocus; } get onDidBlur(): Event { return this.tree.onDidBlur; } - get onDidChangeCollapseState(): Event, TFilterData>> { return this.tree.onDidChangeCollapseState; } + get onDidChangeCollapseState(): Event | null, TFilterData>> { return this.tree.onDidChangeCollapseState; } get onDidUpdateOptions(): Event { return this.tree.onDidUpdateOptions; } diff --git a/src/vs/base/browser/ui/tree/compressedObjectTree.ts b/src/vs/base/browser/ui/tree/compressedObjectTree.ts new file mode 100644 index 00000000000..b05f4045871 --- /dev/null +++ b/src/vs/base/browser/ui/tree/compressedObjectTree.ts @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Iterator, ISequence } from 'vs/base/common/iterator'; +import { AbstractTree, IAbstractTreeOptions } from 'vs/base/browser/ui/tree/abstractTree'; +import { ISpliceable } from 'vs/base/common/sequence'; +import { ITreeNode, ITreeModel, ITreeElement, ITreeRenderer, ITreeSorter, ICollapseStateChangeEvent } from 'vs/base/browser/ui/tree/tree'; +import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list'; +import { Event } from 'vs/base/common/event'; +import { CompressedTreeModel, ICompressedTreeNode } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; + +export interface IObjectTreeOptions extends IAbstractTreeOptions { + sorter?: ITreeSorter; +} + +export class CompressedObjectTree, TFilterData = void> extends AbstractTree | null, TFilterData, T | null> { + + protected model: CompressedTreeModel; + + get onDidChangeCollapseState(): Event | null, TFilterData>> { return this.model.onDidChangeCollapseState; } + + constructor( + container: HTMLElement, + delegate: IListVirtualDelegate>, + renderers: ITreeRenderer[], + options: IObjectTreeOptions, TFilterData> = {} + ) { + super(container, delegate, renderers, options); + } + + setChildren( + element: T | null, + children?: ISequence> + ): Iterator> { + return this.model.setChildren(element, children); + } + + rerender(element?: T): void { + if (element === undefined) { + this.view.rerender(); + return; + } + + this.model.rerender(element); + } + + resort(element: T, recursive = true): void { + this.model.resort(element, recursive); + } + + protected createModel(view: ISpliceable, TFilterData>>, options: IObjectTreeOptions, TFilterData>): ITreeModel | null, TFilterData, T | null> { + return new CompressedTreeModel(view, options); + } +} diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index 57f0a74d449..339dfdbbe9e 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -7,7 +7,7 @@ import { ISpliceable } from 'vs/base/common/sequence'; import { Iterator, ISequence } from 'vs/base/common/iterator'; import { Event } from 'vs/base/common/event'; import { ITreeModel, ITreeNode, ITreeElement, ICollapseStateChangeEvent, ITreeModelSpliceEvent } from 'vs/base/browser/ui/tree/tree'; -import { IObjectTreeModelOptions, ObjectTreeModel } from 'vs/base/browser/ui/tree/objectTreeModel'; +import { IObjectTreeModelOptions, ObjectTreeModel, IObjectTreeModel } from 'vs/base/browser/ui/tree/objectTreeModel'; export interface ICompressedTreeElement extends ITreeElement { readonly children?: Iterator> | ICompressedTreeElement[]; @@ -80,9 +80,9 @@ export function splice(treeElement: ICompressedTreeElement, element: T, ch }; } -export interface ICompressedObjectTreeModelOptions extends IObjectTreeModelOptions, TFilterData> { } +export interface ICompressedTreeModelOptions extends IObjectTreeModelOptions, TFilterData> { } -export class CompressedObjectTreeModel, TFilterData extends NonNullable = void> implements ITreeModel | null, TFilterData, T | null> { +export class CompressedTreeModel, TFilterData extends NonNullable = void> implements ITreeModel | null, TFilterData, T | null> { readonly rootRef = null; @@ -95,7 +95,7 @@ export class CompressedObjectTreeModel, TFilterData e get size(): number { return this.nodes.size; } - constructor(list: ISpliceable, TFilterData>>, options: ICompressedObjectTreeModelOptions = {}) { + constructor(list: ISpliceable, TFilterData>>, options: ICompressedTreeModelOptions = {}) { this.model = new ObjectTreeModel(list, options); } @@ -289,11 +289,11 @@ function createNodeMapper(elementMapper: ElementMapper): Node return node => mapNode(elementMapper, node); } -export interface ILinearCompressedObjectTreeModelOptions extends ICompressedObjectTreeModelOptions { +export interface ICompressedObjectTreeModelOptions extends ICompressedTreeModelOptions { readonly elementMapper?: ElementMapper; } -export class LinearCompressedObjectTreeModel, TFilterData extends NonNullable = void> implements ITreeModel { +export class CompressedObjectTreeModel, TFilterData extends NonNullable = void> implements IObjectTreeModel { readonly rootRef = null; @@ -317,15 +317,25 @@ export class LinearCompressedObjectTreeModel, TFilter private mapElement: ElementMapper; private mapNode: NodeMapper; - private model: CompressedObjectTreeModel; + private model: CompressedTreeModel; constructor( list: ISpliceable, TFilterData>>, - options: ILinearCompressedObjectTreeModelOptions = {} + options: ICompressedObjectTreeModelOptions = {} ) { this.mapElement = options.elementMapper || DefaultElementMapper; this.mapNode = createNodeMapper(this.mapElement); - this.model = new CompressedObjectTreeModel(list, options); + this.model = new CompressedTreeModel(list, options); + } + + setChildren( + element: T | null, + children: ISequence> | undefined + ): Iterator> { + this.model.setChildren(element, children); + + // TODO + return Iterator.empty(); } getListIndex(location: T | null): number { @@ -401,4 +411,8 @@ export class LinearCompressedObjectTreeModel, TFilter refilter(): void { return this.model.refilter(); } + + resort(element: T | null = null, recursive = true): void { + return this.model.resort(element, recursive); + } } \ No newline at end of file diff --git a/src/vs/base/browser/ui/tree/objectTree.ts b/src/vs/base/browser/ui/tree/objectTree.ts index 38bca41901c..cdd1856bb09 100644 --- a/src/vs/base/browser/ui/tree/objectTree.ts +++ b/src/vs/base/browser/ui/tree/objectTree.ts @@ -7,7 +7,7 @@ import { Iterator, ISequence } from 'vs/base/common/iterator'; import { AbstractTree, IAbstractTreeOptions } from 'vs/base/browser/ui/tree/abstractTree'; import { ISpliceable } from 'vs/base/common/sequence'; import { ITreeNode, ITreeModel, ITreeElement, ITreeRenderer, ITreeSorter, ICollapseStateChangeEvent } from 'vs/base/browser/ui/tree/tree'; -import { ObjectTreeModel } from 'vs/base/browser/ui/tree/objectTreeModel'; +import { ObjectTreeModel, IObjectTreeModel } from 'vs/base/browser/ui/tree/objectTreeModel'; import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list'; import { Event } from 'vs/base/common/event'; @@ -17,9 +17,9 @@ export interface IObjectTreeOptions extends IAbstractTree export class ObjectTree, TFilterData = void> extends AbstractTree { - protected model: ObjectTreeModel; + protected model: IObjectTreeModel; - get onDidChangeCollapseState(): Event> { return this.model.onDidChangeCollapseState; } + get onDidChangeCollapseState(): Event> { return this.model.onDidChangeCollapseState; } constructor( container: HTMLElement, @@ -32,11 +32,9 @@ export class ObjectTree, TFilterData = void> extends setChildren( element: T | null, - children?: ISequence>, - onDidCreateNode?: (node: ITreeNode) => void, - onDidDeleteNode?: (node: ITreeNode) => void + children?: ISequence> ): Iterator> { - return this.model.setChildren(element, children, onDidCreateNode, onDidDeleteNode); + return this.model.setChildren(element, children); } rerender(element?: T): void { diff --git a/src/vs/base/browser/ui/tree/objectTreeModel.ts b/src/vs/base/browser/ui/tree/objectTreeModel.ts index 880d5e40a6e..626d1264daa 100644 --- a/src/vs/base/browser/ui/tree/objectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/objectTreeModel.ts @@ -10,12 +10,19 @@ import { Event } from 'vs/base/common/event'; import { ITreeModel, ITreeNode, ITreeElement, ITreeSorter, ICollapseStateChangeEvent, ITreeModelSpliceEvent } from 'vs/base/browser/ui/tree/tree'; import { IIdentityProvider } from 'vs/base/browser/ui/list/list'; +export type ITreeNodeCallback = (node: ITreeNode) => void; + +export interface IObjectTreeModel, TFilterData extends NonNullable = void> extends ITreeModel { + setChildren(element: T | null, children: ISequence> | undefined): Iterator>; + resort(element?: T | null, recursive?: boolean): void; +} + export interface IObjectTreeModelOptions extends IIndexTreeModelOptions { readonly sorter?: ITreeSorter; readonly identityProvider?: IIdentityProvider; } -export class ObjectTreeModel, TFilterData extends NonNullable = void> implements ITreeModel { +export class ObjectTreeModel, TFilterData extends NonNullable = void> implements IObjectTreeModel { readonly rootRef = null; @@ -51,8 +58,8 @@ export class ObjectTreeModel, TFilterData extends Non setChildren( element: T | null, children: ISequence> | undefined, - onDidCreateNode?: (node: ITreeNode) => void, - onDidDeleteNode?: (node: ITreeNode) => void + onDidCreateNode?: ITreeNodeCallback, + onDidDeleteNode?: ITreeNodeCallback ): Iterator> { const location = this.getElementLocation(element); return this._setChildren(location, this.preserveCollapseState(children), onDidCreateNode, onDidDeleteNode); @@ -61,8 +68,8 @@ export class ObjectTreeModel, TFilterData extends Non private _setChildren( location: number[], children: ISequence> | undefined, - onDidCreateNode?: (node: ITreeNode) => void, - onDidDeleteNode?: (node: ITreeNode) => void + onDidCreateNode?: ITreeNodeCallback, + onDidDeleteNode?: ITreeNodeCallback ): Iterator> { const insertedElements = new Set(); const insertedElementIds = new Set(); diff --git a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts index e952c56fdf9..4d03b49a0a8 100644 --- a/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts +++ b/src/vs/base/test/browser/ui/tree/compressedObjectTreeModel.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; -import { compress, ICompressedTreeElement, ICompressedTreeNode, decompress, CompressedObjectTreeModel } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; +import { compress, ICompressedTreeElement, ICompressedTreeNode, decompress, CompressedTreeModel } from 'vs/base/browser/ui/tree/compressedObjectTreeModel'; import { Iterator } from 'vs/base/common/iterator'; import { ITreeNode } from 'vs/base/browser/ui/tree/tree'; import { ISpliceable } from 'vs/base/common/sequence'; @@ -305,7 +305,7 @@ suite('CompressedObjectTree', function () { test('ctor', () => { const list: ITreeNode>[] = []; - const model = new CompressedObjectTreeModel(toSpliceable(list)); + const model = new CompressedTreeModel(toSpliceable(list)); assert(model); assert.equal(list.length, 0); assert.equal(model.size, 0); @@ -313,7 +313,7 @@ suite('CompressedObjectTree', function () { test('flat', () => { const list: ITreeNode>[] = []; - const model = new CompressedObjectTreeModel(toSpliceable(list)); + const model = new CompressedTreeModel(toSpliceable(list)); model.setChildren(null, Iterator.fromArray([ { element: 0 }, @@ -340,7 +340,7 @@ suite('CompressedObjectTree', function () { test('nested', () => { const list: ITreeNode>[] = []; - const model = new CompressedObjectTreeModel(toSpliceable(list)); + const model = new CompressedTreeModel(toSpliceable(list)); model.setChildren(null, Iterator.fromArray([ { @@ -376,7 +376,7 @@ suite('CompressedObjectTree', function () { test('compressed', () => { const list: ITreeNode>[] = []; - const model = new CompressedObjectTreeModel(toSpliceable(list)); + const model = new CompressedTreeModel(toSpliceable(list)); model.setChildren(null, Iterator.fromArray([ { diff --git a/src/vs/workbench/browser/parts/views/customView.ts b/src/vs/workbench/browser/parts/views/customView.ts index 99a141b9b3a..485360d7b56 100644 --- a/src/vs/workbench/browser/parts/views/customView.ts +++ b/src/vs/workbench/browser/parts/views/customView.ts @@ -392,6 +392,10 @@ export class CustomTreeView extends Disposable implements ITreeView { this._register(this.tree.onContextMenu(e => this.onContextMenu(treeMenus, e))); this._register(this.tree.onDidChangeSelection(e => this._onDidChangeSelection.fire(e.elements))); this._register(this.tree.onDidChangeCollapseState(e => { + if (!e.node.element) { + return; + } + const element: ITreeItem = Array.isArray(e.node.element.element) ? e.node.element.element[0] : e.node.element.element; if (e.node.collapsed) { this._onDidCollapseItem.fire(element); diff --git a/test/tree/public/index.html b/test/tree/public/index.html index 7c83e9b045c..d88b0d7e31b 100644 --- a/test/tree/public/index.html +++ b/test/tree/public/index.html @@ -44,7 +44,7 @@ require.config({ baseUrl: '/static' }); - require(['vs/base/browser/ui/tree/indexTree', 'vs/base/browser/ui/tree/asyncDataTree', 'vs/base/browser/ui/tree/dataTree', 'vs/base/browser/ui/tree/tree', 'vs/base/common/iterator'], ({ IndexTree }, { AsyncDataTree }, { DataTree }, { TreeVisibility }, { iter }) => { + require(['vs/base/browser/ui/tree/indexTree', 'vs/base/browser/ui/tree/compressedObjectTree', 'vs/base/browser/ui/tree/asyncDataTree', 'vs/base/browser/ui/tree/dataTree', 'vs/base/browser/ui/tree/tree', 'vs/base/common/iterator'], ({ IndexTree }, { CompressedObjectTree }, { AsyncDataTree }, { DataTree }, { TreeVisibility }, { iter }) => { function createIndexTree(opts) { opts = opts || {}; @@ -100,6 +100,53 @@ return { tree, treeFilter }; } + function createCompressedObjectTree(opts) { + opts = opts || {}; + + const delegate = { + getHeight() { return 22; }, + getTemplateId() { return 'template'; }, + hasDynamicHeight() { return true; } + }; + + const renderer = { + templateId: 'template', + renderTemplate(container) { return container; }, + renderElement(element, index, container) { + container.innerHTML = element.element.elements.join('/'); + }, + disposeElement() { }, + disposeTemplate() { } + }; + + const treeFilter = new class { + constructor() { + this.pattern = null; + let timeout; + filter.oninput = () => { + clearTimeout(timeout); + timeout = setTimeout(() => this.updatePattern(), 300); + }; + } + updatePattern() { + if (!filter.value) { + this.pattern = null; + } else { + this.pattern = new RegExp(filter.value, 'i'); + } + + perf('refilter', () => tree.refilter()); + } + filter(el) { + return (this.pattern ? this.pattern.test(el) : true) ? TreeVisibility.Visible : TreeVisibility.Recurse; + } + }; + + const tree = new CompressedObjectTree(container, delegate, [renderer], { ...opts, filter: treeFilter, setRowLineHeight: false }); + + return { tree, treeFilter }; + } + function createAsyncDataTree() { const delegate = { getHeight() { return 22; }, @@ -289,6 +336,25 @@ break; } + case '?compressed': { + const { tree, treeFilter } = createCompressedObjectTree(); + + expandall.onclick = () => perf('expand all', () => tree.expandAll()); + collapseall.onclick = () => perf('collapse all', () => tree.collapseAll()); + renderwidth.onclick = () => perf('renderwidth', () => tree.layoutWidth(Math.random())); + + const xhr = new XMLHttpRequest(); + xhr.open('GET', '/api/ls?path='); + xhr.send(); + xhr.onreadystatechange = function () { + if (this.readyState == 4 && this.status == 200) { + perf('splice', () => tree.setChildren(null, [JSON.parse(this.responseText)])); + treeFilter.updatePattern(); + } + }; + + break; + } case '?height': { const { tree, treeFilter } = createIndexTree({ supportDynamicHeights: true }); From c0ee1a958f54171fa12db2e36f398da207ed0d14 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 23 Jul 2019 10:58:01 +0200 Subject: [PATCH 499/710] sample compressed tree --- test/tree/public/index.html | 11 +---------- test/tree/tree.js | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 test/tree/tree.js diff --git a/test/tree/public/index.html b/test/tree/public/index.html index d88b0d7e31b..cf6761fd04a 100644 --- a/test/tree/public/index.html +++ b/test/tree/public/index.html @@ -341,17 +341,8 @@ expandall.onclick = () => perf('expand all', () => tree.expandAll()); collapseall.onclick = () => perf('collapse all', () => tree.collapseAll()); - renderwidth.onclick = () => perf('renderwidth', () => tree.layoutWidth(Math.random())); - const xhr = new XMLHttpRequest(); - xhr.open('GET', '/api/ls?path='); - xhr.send(); - xhr.onreadystatechange = function () { - if (this.readyState == 4 && this.status == 200) { - perf('splice', () => tree.setChildren(null, [JSON.parse(this.responseText)])); - treeFilter.updatePattern(); - } - }; + tree.setChildren(null, [{ "element": "core", "children": [{ "element": "org", "children": [{ "element": "eclipse", "children": [{ "element": "debug", "children": [{ "element": "core", "children": [{ "element": "DebugEvent.java" }, { "element": "DebugException.java" }, { "element": "DebugPlugin.java" }, { "element": "IBreakpointListener.java" }, { "element": "IBreakpointManager.java" }, { "element": "IBreakpointManagerListener.java" }, { "element": "IBreakpointsListener.java" }, { "element": "IDebugEventFilter.java" }, { "element": "IDebugEventSetListener.java" }, { "element": "IExpressionListener.java" }, { "element": "IExpressionManager.java" }, { "element": "IExpressionsListener.java" }, { "element": "ILaunch.java" }, { "element": "ILaunchConfiguration.java" }, { "element": "ILaunchConfigurationListener.java" }, { "element": "ILaunchConfigurationMigrationDelegate.java" }, { "element": "ILaunchConfigurationType.java" }, { "element": "ILaunchConfigurationWorkingCopy.java" }, { "element": "ILaunchDelegate.java" }, { "element": "ILaunchListener.java" }, { "element": "ILaunchManager.java" }, { "element": "ILaunchMode.java" }, { "element": "ILaunchesListener.java" }, { "element": "ILaunchesListener2.java" }, { "element": "ILogicalStructureProvider.java" }, { "element": "ILogicalStructureType.java" }, { "element": "IMemoryBlockListener.java" }, { "element": "IMemoryBlockManager.java" }, { "element": "IProcessFactory.java" }, { "element": "IPrototypeAttributesLabelProvider.java" }, { "element": "IRequest.java" }, { "element": "IStatusHandler.java" }, { "element": "IStreamListener.java" }, { "element": "Launch.java" }, { "element": "RefreshUtil.java" }, { "element": "commands", "children": [{ "element": "AbstractDebugCommand.java" }, { "element": "IDebugCommandHandler.java" }, { "element": "IDebugCommandRequest.java" }, { "element": "IDisconnectHandler.java" }, { "element": "IDropToFrameHandler.java" }, { "element": "IEnabledStateRequest.java" }, { "element": "IRestartHandler.java" }, { "element": "IResumeHandler.java" }, { "element": "IStepFiltersHandler.java" }, { "element": "IStepIntoHandler.java" }, { "element": "IStepOverHandler.java" }, { "element": "IStepReturnHandler.java" }, { "element": "ISuspendHandler.java" }, { "element": "ITerminateHandler.java" }, { "element": "package.html" }] }, { "element": "model", "children": [{ "element": "Breakpoint.java" }, { "element": "DebugElement.java" }, { "element": "IBreakpoint.java" }, { "element": "IBreakpointImportParticipant.java" }, { "element": "IDebugElement.java" }, { "element": "IDebugModelProvider.java" }, { "element": "IDebugTarget.java" }, { "element": "IDisconnect.java" }, { "element": "IDropToFrame.java" }, { "element": "IErrorReportingExpression.java" }, { "element": "IExpression.java" }, { "element": "IFilteredStep.java" }, { "element": "IFlushableStreamMonitor.java" }, { "element": "IIndexedValue.java" }, { "element": "ILaunchConfigurationDelegate.java" }, { "element": "ILaunchConfigurationDelegate2.java" }, { "element": "ILineBreakpoint.java" }, { "element": "ILogicalStructureTypeDelegate.java" }, { "element": "ILogicalStructureTypeDelegate2.java" }, { "element": "IMemoryBlock.java" }, { "element": "IMemoryBlockExtension.java" }, { "element": "IMemoryBlockRetrieval.java" }, { "element": "IMemoryBlockRetrievalExtension.java" }, { "element": "IPersistableSourceLocator.java" }, { "element": "IProcess.java" }, { "element": "IRegister.java" }, { "element": "IRegisterGroup.java" }, { "element": "ISourceLocator.java" }, { "element": "IStackFrame.java" }, { "element": "IStep.java" }, { "element": "IStepFilter.java" }, { "element": "IStepFilters.java" }, { "element": "IStreamMonitor.java" }, { "element": "IStreamsProxy.java" }, { "element": "IStreamsProxy2.java" }, { "element": "ISuspendResume.java" }, { "element": "ITerminate.java" }, { "element": "IThread.java" }, { "element": "ITriggerPoint.java" }, { "element": "IValue.java" }, { "element": "IValueModification.java" }, { "element": "IVariable.java" }, { "element": "IWatchExpression.java" }, { "element": "IWatchExpressionDelegate.java" }, { "element": "IWatchExpressionListener.java" }, { "element": "IWatchExpressionResult.java" }, { "element": "IWatchpoint.java" }, { "element": "LaunchConfigurationDelegate.java" }, { "element": "LineBreakpoint.java" }, { "element": "MemoryByte.java" }, { "element": "RuntimeProcess.java" }, { "element": "package.html" }] }, { "element": "package.html" }, { "element": "sourcelookup", "children": [{ "element": "AbstractSourceLookupDirector.java" }, { "element": "AbstractSourceLookupParticipant.java" }, { "element": "IPersistableSourceLocator2.java" }, { "element": "ISourceContainer.java" }, { "element": "ISourceContainerType.java" }, { "element": "ISourceContainerTypeDelegate.java" }, { "element": "ISourceLookupDirector.java" }, { "element": "ISourceLookupParticipant.java" }, { "element": "ISourcePathComputer.java" }, { "element": "ISourcePathComputerDelegate.java" }, { "element": "containers", "children": [{ "element": "AbstractSourceContainer.java" }, { "element": "AbstractSourceContainerTypeDelegate.java" }, { "element": "ArchiveSourceContainer.java" }, { "element": "CompositeSourceContainer.java" }, { "element": "ContainerSourceContainer.java" }, { "element": "DefaultSourceContainer.java" }, { "element": "DirectorySourceContainer.java" }, { "element": "ExternalArchiveSourceContainer.java" }, { "element": "FolderSourceContainer.java" }, { "element": "LocalFileStorage.java" }, { "element": "ProjectSourceContainer.java" }, { "element": "WorkspaceSourceContainer.java" }, { "element": "ZipEntryStorage.java" }, { "element": "package.html" }] }, { "element": "package.html" }] }] }, { "element": "internal", "children": [{ "element": "core", "children": [{ "element": "BreakpointImportParticipantDelegate.java" }, { "element": "BreakpointManager.java" }, { "element": "DebugCoreMessages.java" }, { "element": "DebugCoreMessages.properties" }, { "element": "DebugOptions.java" }, { "element": "DebugPreferenceInitializer.java" }, { "element": "EnvironmentVariableResolver.java" }, { "element": "ExpressionManager.java" }, { "element": "IConfigurationElementConstants.java" }, { "element": "IExpressionsListener2.java" }, { "element": "IInternalDebugCoreConstants.java" }, { "element": "IMementoConstants.java" }, { "element": "InputStreamMonitor.java" }, { "element": "LaunchConfiguration.java" }, { "element": "LaunchConfigurationComparator.java" }, { "element": "LaunchConfigurationInfo.java" }, { "element": "LaunchConfigurationType.java" }, { "element": "LaunchConfigurationWorkingCopy.java" }, { "element": "LaunchDelegate.java" }, { "element": "LaunchManager.java" }, { "element": "LaunchMode.java" }, { "element": "LaunchablePropertyTester.java" }, { "element": "LogicalStructureManager.java" }, { "element": "LogicalStructureProvider.java" }, { "element": "LogicalStructureType.java" }, { "element": "MemoryBlockManager.java" }, { "element": "NullStreamsProxy.java" }, { "element": "OutputStreamMonitor.java" }, { "element": "Preferences.java" }, { "element": "PreferredDelegateModifyListener.java" }, { "element": "RefreshScopeComparator.java" }, { "element": "ResourceFactory.java" }, { "element": "StepFilter.java" }, { "element": "StepFilterManager.java" }, { "element": "StreamsProxy.java" }, { "element": "SystemPropertyResolver.java" }, { "element": "SystemVariableResolver.java" }, { "element": "WatchExpression.java" }, { "element": "XMLMemento.java" }, { "element": "commands", "children": [{ "element": "CommandAdapterFactory.java" }, { "element": "DebugCommandRequest.java" }, { "element": "DisconnectCommand.java" }, { "element": "DropToFrameCommand.java" }, { "element": "ForEachCommand.java" }, { "element": "Request.java" }, { "element": "ResumeCommand.java" }, { "element": "StepCommand.java" }, { "element": "StepFiltersCommand.java" }, { "element": "StepIntoCommand.java" }, { "element": "StepOverCommand.java" }, { "element": "StepReturnCommand.java" }, { "element": "SuspendCommand.java" }, { "element": "TerminateCommand.java" }] }, { "element": "groups", "children": [{ "element": "GroupLaunch.java" }, { "element": "GroupLaunchConfigurationDelegate.java" }, { "element": "GroupLaunchElement.java" }, { "element": "GroupMemberChangeListener.java" }, { "element": "observer", "children": [{ "element": "ProcessObserver.java" }, { "element": "StreamObserver.java" }] }] }, { "element": "sourcelookup", "children": [{ "element": "SourceContainerType.java" }, { "element": "SourceLocatorMementoComparator.java" }, { "element": "SourceLookupMessages.java" }, { "element": "SourceLookupMessages.properties" }, { "element": "SourceLookupUtils.java" }, { "element": "SourcePathComputer.java" }, { "element": "containers", "children": [{ "element": "ArchiveSourceContainerType.java" }, { "element": "DefaultSourceContainerType.java" }, { "element": "DirectorySourceContainerType.java" }, { "element": "ExternalArchiveSourceContainerType.java" }, { "element": "FolderSourceContainerType.java" }, { "element": "ProjectSourceContainerType.java" }, { "element": "WorkspaceSourceContainerType.java" }] }] }, { "element": "variables", "children": [{ "element": "ContainerResolver.java" }, { "element": "DateTimeResolver.java" }, { "element": "Messages.java" }, { "element": "Messages.properties" }, { "element": "ProjectResolver.java" }, { "element": "ResourceResolver.java" }, { "element": "WorkspaceResolver.java" }] }] }] }] }] }] }] }]); break; } diff --git a/test/tree/tree.js b/test/tree/tree.js new file mode 100644 index 00000000000..01a30a92242 --- /dev/null +++ b/test/tree/tree.js @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +const path = require('path'); +const fs = require('fs'); + +function collect(location) { + const element = path.basename(location); + const stat = fs.statSync(location); + + if (!stat.isDirectory()) { + return { element }; + } + + const children = fs.readdirSync(location) + .map(child => path.join(location, child)) + .map(collect); + + return { element, children }; +} + +console.log(JSON.stringify(collect(process.cwd()))); \ No newline at end of file From 933eab7a0857b45119a8701ef47d70b8d479a975 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 23 Jul 2019 11:05:50 +0200 Subject: [PATCH 500/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 48600583dd8..c323d9d29ac 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "dbf77e1135be7d403c9d344652fdfdb766e28517", + "distro": "2971b0c2131f77e47314e59548e72b5b21088de3", "author": { "name": "Microsoft Corporation" }, From 0d8e3ab19e399d4fb471f12f806f029d94e6e0de Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 23 Jul 2019 11:09:24 +0200 Subject: [PATCH 501/710] better demo --- test/tree/public/index.html | 14 +++++++++----- test/tree/tree.js | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/test/tree/public/index.html b/test/tree/public/index.html index cf6761fd04a..4bc5ae931b9 100644 --- a/test/tree/public/index.html +++ b/test/tree/public/index.html @@ -113,7 +113,11 @@ templateId: 'template', renderTemplate(container) { return container; }, renderElement(element, index, container) { - container.innerHTML = element.element.elements.join('/'); + if (element.element.elements.length > 1) { + container.innerHTML = `🙈 ${element.element.elements.map(el => el.name).join('/')}`; + } else { + container.innerHTML = element.element.elements[0].name; + } }, disposeElement() { }, disposeTemplate() { } @@ -142,7 +146,7 @@ } }; - const tree = new CompressedObjectTree(container, delegate, [renderer], { ...opts, filter: treeFilter, setRowLineHeight: false }); + const tree = new CompressedObjectTree(container, delegate, [renderer], { ...opts, filter: treeFilter, setRowLineHeight: false, collapseByDefault: true }); return { tree, treeFilter }; } @@ -202,7 +206,7 @@ getChildren(element) { return new Promise((c, e) => { const xhr = new XMLHttpRequest(); - xhr.open('GET', element ? `/api/readdir?path=${element.element.path}` : '/api/readdir'); + xhr.open('GET', element ? `/ api / readdir ? path = ${element.element.path} ` : '/api/readdir'); xhr.send(); xhr.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { @@ -305,7 +309,7 @@ const errors = []; for (let j = 1; j <= 3; j++) { - errors.push({ element: `error #${j}` }); + errors.push({ element: `error #${j} ` }); } files.push({ element: `file #${i}`, children: errors }); @@ -342,7 +346,7 @@ expandall.onclick = () => perf('expand all', () => tree.expandAll()); collapseall.onclick = () => perf('collapse all', () => tree.collapseAll()); - tree.setChildren(null, [{ "element": "core", "children": [{ "element": "org", "children": [{ "element": "eclipse", "children": [{ "element": "debug", "children": [{ "element": "core", "children": [{ "element": "DebugEvent.java" }, { "element": "DebugException.java" }, { "element": "DebugPlugin.java" }, { "element": "IBreakpointListener.java" }, { "element": "IBreakpointManager.java" }, { "element": "IBreakpointManagerListener.java" }, { "element": "IBreakpointsListener.java" }, { "element": "IDebugEventFilter.java" }, { "element": "IDebugEventSetListener.java" }, { "element": "IExpressionListener.java" }, { "element": "IExpressionManager.java" }, { "element": "IExpressionsListener.java" }, { "element": "ILaunch.java" }, { "element": "ILaunchConfiguration.java" }, { "element": "ILaunchConfigurationListener.java" }, { "element": "ILaunchConfigurationMigrationDelegate.java" }, { "element": "ILaunchConfigurationType.java" }, { "element": "ILaunchConfigurationWorkingCopy.java" }, { "element": "ILaunchDelegate.java" }, { "element": "ILaunchListener.java" }, { "element": "ILaunchManager.java" }, { "element": "ILaunchMode.java" }, { "element": "ILaunchesListener.java" }, { "element": "ILaunchesListener2.java" }, { "element": "ILogicalStructureProvider.java" }, { "element": "ILogicalStructureType.java" }, { "element": "IMemoryBlockListener.java" }, { "element": "IMemoryBlockManager.java" }, { "element": "IProcessFactory.java" }, { "element": "IPrototypeAttributesLabelProvider.java" }, { "element": "IRequest.java" }, { "element": "IStatusHandler.java" }, { "element": "IStreamListener.java" }, { "element": "Launch.java" }, { "element": "RefreshUtil.java" }, { "element": "commands", "children": [{ "element": "AbstractDebugCommand.java" }, { "element": "IDebugCommandHandler.java" }, { "element": "IDebugCommandRequest.java" }, { "element": "IDisconnectHandler.java" }, { "element": "IDropToFrameHandler.java" }, { "element": "IEnabledStateRequest.java" }, { "element": "IRestartHandler.java" }, { "element": "IResumeHandler.java" }, { "element": "IStepFiltersHandler.java" }, { "element": "IStepIntoHandler.java" }, { "element": "IStepOverHandler.java" }, { "element": "IStepReturnHandler.java" }, { "element": "ISuspendHandler.java" }, { "element": "ITerminateHandler.java" }, { "element": "package.html" }] }, { "element": "model", "children": [{ "element": "Breakpoint.java" }, { "element": "DebugElement.java" }, { "element": "IBreakpoint.java" }, { "element": "IBreakpointImportParticipant.java" }, { "element": "IDebugElement.java" }, { "element": "IDebugModelProvider.java" }, { "element": "IDebugTarget.java" }, { "element": "IDisconnect.java" }, { "element": "IDropToFrame.java" }, { "element": "IErrorReportingExpression.java" }, { "element": "IExpression.java" }, { "element": "IFilteredStep.java" }, { "element": "IFlushableStreamMonitor.java" }, { "element": "IIndexedValue.java" }, { "element": "ILaunchConfigurationDelegate.java" }, { "element": "ILaunchConfigurationDelegate2.java" }, { "element": "ILineBreakpoint.java" }, { "element": "ILogicalStructureTypeDelegate.java" }, { "element": "ILogicalStructureTypeDelegate2.java" }, { "element": "IMemoryBlock.java" }, { "element": "IMemoryBlockExtension.java" }, { "element": "IMemoryBlockRetrieval.java" }, { "element": "IMemoryBlockRetrievalExtension.java" }, { "element": "IPersistableSourceLocator.java" }, { "element": "IProcess.java" }, { "element": "IRegister.java" }, { "element": "IRegisterGroup.java" }, { "element": "ISourceLocator.java" }, { "element": "IStackFrame.java" }, { "element": "IStep.java" }, { "element": "IStepFilter.java" }, { "element": "IStepFilters.java" }, { "element": "IStreamMonitor.java" }, { "element": "IStreamsProxy.java" }, { "element": "IStreamsProxy2.java" }, { "element": "ISuspendResume.java" }, { "element": "ITerminate.java" }, { "element": "IThread.java" }, { "element": "ITriggerPoint.java" }, { "element": "IValue.java" }, { "element": "IValueModification.java" }, { "element": "IVariable.java" }, { "element": "IWatchExpression.java" }, { "element": "IWatchExpressionDelegate.java" }, { "element": "IWatchExpressionListener.java" }, { "element": "IWatchExpressionResult.java" }, { "element": "IWatchpoint.java" }, { "element": "LaunchConfigurationDelegate.java" }, { "element": "LineBreakpoint.java" }, { "element": "MemoryByte.java" }, { "element": "RuntimeProcess.java" }, { "element": "package.html" }] }, { "element": "package.html" }, { "element": "sourcelookup", "children": [{ "element": "AbstractSourceLookupDirector.java" }, { "element": "AbstractSourceLookupParticipant.java" }, { "element": "IPersistableSourceLocator2.java" }, { "element": "ISourceContainer.java" }, { "element": "ISourceContainerType.java" }, { "element": "ISourceContainerTypeDelegate.java" }, { "element": "ISourceLookupDirector.java" }, { "element": "ISourceLookupParticipant.java" }, { "element": "ISourcePathComputer.java" }, { "element": "ISourcePathComputerDelegate.java" }, { "element": "containers", "children": [{ "element": "AbstractSourceContainer.java" }, { "element": "AbstractSourceContainerTypeDelegate.java" }, { "element": "ArchiveSourceContainer.java" }, { "element": "CompositeSourceContainer.java" }, { "element": "ContainerSourceContainer.java" }, { "element": "DefaultSourceContainer.java" }, { "element": "DirectorySourceContainer.java" }, { "element": "ExternalArchiveSourceContainer.java" }, { "element": "FolderSourceContainer.java" }, { "element": "LocalFileStorage.java" }, { "element": "ProjectSourceContainer.java" }, { "element": "WorkspaceSourceContainer.java" }, { "element": "ZipEntryStorage.java" }, { "element": "package.html" }] }, { "element": "package.html" }] }] }, { "element": "internal", "children": [{ "element": "core", "children": [{ "element": "BreakpointImportParticipantDelegate.java" }, { "element": "BreakpointManager.java" }, { "element": "DebugCoreMessages.java" }, { "element": "DebugCoreMessages.properties" }, { "element": "DebugOptions.java" }, { "element": "DebugPreferenceInitializer.java" }, { "element": "EnvironmentVariableResolver.java" }, { "element": "ExpressionManager.java" }, { "element": "IConfigurationElementConstants.java" }, { "element": "IExpressionsListener2.java" }, { "element": "IInternalDebugCoreConstants.java" }, { "element": "IMementoConstants.java" }, { "element": "InputStreamMonitor.java" }, { "element": "LaunchConfiguration.java" }, { "element": "LaunchConfigurationComparator.java" }, { "element": "LaunchConfigurationInfo.java" }, { "element": "LaunchConfigurationType.java" }, { "element": "LaunchConfigurationWorkingCopy.java" }, { "element": "LaunchDelegate.java" }, { "element": "LaunchManager.java" }, { "element": "LaunchMode.java" }, { "element": "LaunchablePropertyTester.java" }, { "element": "LogicalStructureManager.java" }, { "element": "LogicalStructureProvider.java" }, { "element": "LogicalStructureType.java" }, { "element": "MemoryBlockManager.java" }, { "element": "NullStreamsProxy.java" }, { "element": "OutputStreamMonitor.java" }, { "element": "Preferences.java" }, { "element": "PreferredDelegateModifyListener.java" }, { "element": "RefreshScopeComparator.java" }, { "element": "ResourceFactory.java" }, { "element": "StepFilter.java" }, { "element": "StepFilterManager.java" }, { "element": "StreamsProxy.java" }, { "element": "SystemPropertyResolver.java" }, { "element": "SystemVariableResolver.java" }, { "element": "WatchExpression.java" }, { "element": "XMLMemento.java" }, { "element": "commands", "children": [{ "element": "CommandAdapterFactory.java" }, { "element": "DebugCommandRequest.java" }, { "element": "DisconnectCommand.java" }, { "element": "DropToFrameCommand.java" }, { "element": "ForEachCommand.java" }, { "element": "Request.java" }, { "element": "ResumeCommand.java" }, { "element": "StepCommand.java" }, { "element": "StepFiltersCommand.java" }, { "element": "StepIntoCommand.java" }, { "element": "StepOverCommand.java" }, { "element": "StepReturnCommand.java" }, { "element": "SuspendCommand.java" }, { "element": "TerminateCommand.java" }] }, { "element": "groups", "children": [{ "element": "GroupLaunch.java" }, { "element": "GroupLaunchConfigurationDelegate.java" }, { "element": "GroupLaunchElement.java" }, { "element": "GroupMemberChangeListener.java" }, { "element": "observer", "children": [{ "element": "ProcessObserver.java" }, { "element": "StreamObserver.java" }] }] }, { "element": "sourcelookup", "children": [{ "element": "SourceContainerType.java" }, { "element": "SourceLocatorMementoComparator.java" }, { "element": "SourceLookupMessages.java" }, { "element": "SourceLookupMessages.properties" }, { "element": "SourceLookupUtils.java" }, { "element": "SourcePathComputer.java" }, { "element": "containers", "children": [{ "element": "ArchiveSourceContainerType.java" }, { "element": "DefaultSourceContainerType.java" }, { "element": "DirectorySourceContainerType.java" }, { "element": "ExternalArchiveSourceContainerType.java" }, { "element": "FolderSourceContainerType.java" }, { "element": "ProjectSourceContainerType.java" }, { "element": "WorkspaceSourceContainerType.java" }] }] }, { "element": "variables", "children": [{ "element": "ContainerResolver.java" }, { "element": "DateTimeResolver.java" }, { "element": "Messages.java" }, { "element": "Messages.properties" }, { "element": "ProjectResolver.java" }, { "element": "ResourceResolver.java" }, { "element": "WorkspaceResolver.java" }] }] }] }] }] }] }] }]); + tree.setChildren(null, [{"element":{"name":"eclipse.platform.debug"},"children":[{"element":{"name":".git"},"children":[{"element":{"name":"HEAD"},"incompressible":true},{"element":{"name":"branches"},"children":[]},{"element":{"name":"config"},"incompressible":true},{"element":{"name":"description"},"incompressible":true},{"element":{"name":"hooks"},"children":[{"element":{"name":"applypatch-msg.sample"},"incompressible":true},{"element":{"name":"commit-msg.sample"},"incompressible":true},{"element":{"name":"fsmonitor-watchman.sample"},"incompressible":true},{"element":{"name":"post-update.sample"},"incompressible":true},{"element":{"name":"pre-applypatch.sample"},"incompressible":true},{"element":{"name":"pre-commit.sample"},"incompressible":true},{"element":{"name":"pre-push.sample"},"incompressible":true},{"element":{"name":"pre-rebase.sample"},"incompressible":true},{"element":{"name":"pre-receive.sample"},"incompressible":true},{"element":{"name":"prepare-commit-msg.sample"},"incompressible":true},{"element":{"name":"update.sample"},"incompressible":true}]},{"element":{"name":"index"},"incompressible":true},{"element":{"name":"info"},"children":[{"element":{"name":"exclude"},"incompressible":true}]},{"element":{"name":"logs"},"children":[{"element":{"name":"HEAD"},"incompressible":true},{"element":{"name":"refs"},"children":[{"element":{"name":"heads"},"children":[{"element":{"name":"master"},"incompressible":true}]},{"element":{"name":"remotes"},"children":[{"element":{"name":"origin"},"children":[{"element":{"name":"HEAD"},"incompressible":true}]}]}]}]},{"element":{"name":"objects"},"children":[{"element":{"name":"info"},"children":[]},{"element":{"name":"pack"},"children":[{"element":{"name":"pack-2b1503bd0b85396d8596e9e99d956bfc3fbe497b.idx"},"incompressible":true},{"element":{"name":"pack-2b1503bd0b85396d8596e9e99d956bfc3fbe497b.pack"},"incompressible":true}]}]},{"element":{"name":"packed-refs"},"incompressible":true},{"element":{"name":"refs"},"children":[{"element":{"name":"heads"},"children":[{"element":{"name":"master"},"incompressible":true}]},{"element":{"name":"remotes"},"children":[{"element":{"name":"origin"},"children":[{"element":{"name":"HEAD"},"incompressible":true}]}]},{"element":{"name":"tags"},"children":[{"element":{"name":"I20190722-1800"},"incompressible":true}]}]},{"element":{"name":"shallow"},"incompressible":true}]},{"element":{"name":".gitignore"},"incompressible":true},{"element":{"name":"CONTRIBUTING"},"incompressible":true},{"element":{"name":"LICENSE"},"incompressible":true},{"element":{"name":"NOTICE"},"incompressible":true},{"element":{"name":"org.eclipse.core.externaltools"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"core"},"children":[{"element":{"name":"externaltools"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"ExternalToolsCore.java"},"incompressible":true},{"element":{"name":"IExternalToolConstants.java"},"incompressible":true},{"element":{"name":"launchConfigurations"},"children":[{"element":{"name":"BackgroundResourceRefresher.java"},"incompressible":true},{"element":{"name":"ExternalToolsCoreUtil.java"},"incompressible":true},{"element":{"name":"ExternalToolsProgramMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsProgramMessages.properties"},"incompressible":true},{"element":{"name":"ProgramLaunchDelegate.java"},"incompressible":true}]},{"element":{"name":"model"},"children":[{"element":{"name":"BuilderCoreUtils.java"},"incompressible":true},{"element":{"name":"ExternalToolBuilder.java"},"incompressible":true},{"element":{"name":"ExternalToolsModelMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsModelMessages.properties"},"incompressible":true}]},{"element":{"name":"registry"},"children":[{"element":{"name":"ExternalToolMigration.java"},"incompressible":true},{"element":{"name":"ExternalToolsMigrationMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsMigrationMessages.properties"},"incompressible":true}]}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.core.variables"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"schema"},"children":[{"element":{"name":"dynamicVariables.exsd"},"incompressible":true},{"element":{"name":"valueVariables.exsd"},"incompressible":true}]},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"core"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"variables"},"children":[{"element":{"name":"ContributedValueVariable.java"},"incompressible":true},{"element":{"name":"DynamicVariable.java"},"incompressible":true},{"element":{"name":"EclipseHomeVariableResolver.java"},"incompressible":true},{"element":{"name":"StringSubstitutionEngine.java"},"incompressible":true},{"element":{"name":"StringVariable.java"},"incompressible":true},{"element":{"name":"StringVariableManager.java"},"incompressible":true},{"element":{"name":"ValueVariable.java"},"incompressible":true},{"element":{"name":"VariablesMessages.java"},"incompressible":true},{"element":{"name":"VariablesMessages.properties"},"incompressible":true}]}]},{"element":{"name":"variables"},"children":[{"element":{"name":"IDynamicVariable.java"},"incompressible":true},{"element":{"name":"IDynamicVariableResolver.java"},"incompressible":true},{"element":{"name":"IStringVariable.java"},"incompressible":true},{"element":{"name":"IStringVariableManager.java"},"incompressible":true},{"element":{"name":"IValueVariable.java"},"incompressible":true},{"element":{"name":"IValueVariableInitializer.java"},"incompressible":true},{"element":{"name":"IValueVariableListener.java"},"incompressible":true},{"element":{"name":"VariablesPlugin.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]}]}]}]}]}]},{"element":{"name":"org.eclipse.debug.core"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".options"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"core"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"core"},"children":[{"element":{"name":"DebugEvent.java"},"incompressible":true},{"element":{"name":"DebugException.java"},"incompressible":true},{"element":{"name":"DebugPlugin.java"},"incompressible":true},{"element":{"name":"IBreakpointListener.java"},"incompressible":true},{"element":{"name":"IBreakpointManager.java"},"incompressible":true},{"element":{"name":"IBreakpointManagerListener.java"},"incompressible":true},{"element":{"name":"IBreakpointsListener.java"},"incompressible":true},{"element":{"name":"IDebugEventFilter.java"},"incompressible":true},{"element":{"name":"IDebugEventSetListener.java"},"incompressible":true},{"element":{"name":"IExpressionListener.java"},"incompressible":true},{"element":{"name":"IExpressionManager.java"},"incompressible":true},{"element":{"name":"IExpressionsListener.java"},"incompressible":true},{"element":{"name":"ILaunch.java"},"incompressible":true},{"element":{"name":"ILaunchConfiguration.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationListener.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationMigrationDelegate.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationType.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationWorkingCopy.java"},"incompressible":true},{"element":{"name":"ILaunchDelegate.java"},"incompressible":true},{"element":{"name":"ILaunchListener.java"},"incompressible":true},{"element":{"name":"ILaunchManager.java"},"incompressible":true},{"element":{"name":"ILaunchMode.java"},"incompressible":true},{"element":{"name":"ILaunchesListener.java"},"incompressible":true},{"element":{"name":"ILaunchesListener2.java"},"incompressible":true},{"element":{"name":"ILogicalStructureProvider.java"},"incompressible":true},{"element":{"name":"ILogicalStructureType.java"},"incompressible":true},{"element":{"name":"IMemoryBlockListener.java"},"incompressible":true},{"element":{"name":"IMemoryBlockManager.java"},"incompressible":true},{"element":{"name":"IProcessFactory.java"},"incompressible":true},{"element":{"name":"IPrototypeAttributesLabelProvider.java"},"incompressible":true},{"element":{"name":"IRequest.java"},"incompressible":true},{"element":{"name":"IStatusHandler.java"},"incompressible":true},{"element":{"name":"IStreamListener.java"},"incompressible":true},{"element":{"name":"Launch.java"},"incompressible":true},{"element":{"name":"RefreshUtil.java"},"incompressible":true},{"element":{"name":"commands"},"children":[{"element":{"name":"AbstractDebugCommand.java"},"incompressible":true},{"element":{"name":"IDebugCommandHandler.java"},"incompressible":true},{"element":{"name":"IDebugCommandRequest.java"},"incompressible":true},{"element":{"name":"IDisconnectHandler.java"},"incompressible":true},{"element":{"name":"IDropToFrameHandler.java"},"incompressible":true},{"element":{"name":"IEnabledStateRequest.java"},"incompressible":true},{"element":{"name":"IRestartHandler.java"},"incompressible":true},{"element":{"name":"IResumeHandler.java"},"incompressible":true},{"element":{"name":"IStepFiltersHandler.java"},"incompressible":true},{"element":{"name":"IStepIntoHandler.java"},"incompressible":true},{"element":{"name":"IStepOverHandler.java"},"incompressible":true},{"element":{"name":"IStepReturnHandler.java"},"incompressible":true},{"element":{"name":"ISuspendHandler.java"},"incompressible":true},{"element":{"name":"ITerminateHandler.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"model"},"children":[{"element":{"name":"Breakpoint.java"},"incompressible":true},{"element":{"name":"DebugElement.java"},"incompressible":true},{"element":{"name":"IBreakpoint.java"},"incompressible":true},{"element":{"name":"IBreakpointImportParticipant.java"},"incompressible":true},{"element":{"name":"IDebugElement.java"},"incompressible":true},{"element":{"name":"IDebugModelProvider.java"},"incompressible":true},{"element":{"name":"IDebugTarget.java"},"incompressible":true},{"element":{"name":"IDisconnect.java"},"incompressible":true},{"element":{"name":"IDropToFrame.java"},"incompressible":true},{"element":{"name":"IErrorReportingExpression.java"},"incompressible":true},{"element":{"name":"IExpression.java"},"incompressible":true},{"element":{"name":"IFilteredStep.java"},"incompressible":true},{"element":{"name":"IFlushableStreamMonitor.java"},"incompressible":true},{"element":{"name":"IIndexedValue.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationDelegate.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationDelegate2.java"},"incompressible":true},{"element":{"name":"ILineBreakpoint.java"},"incompressible":true},{"element":{"name":"ILogicalStructureTypeDelegate.java"},"incompressible":true},{"element":{"name":"ILogicalStructureTypeDelegate2.java"},"incompressible":true},{"element":{"name":"IMemoryBlock.java"},"incompressible":true},{"element":{"name":"IMemoryBlockExtension.java"},"incompressible":true},{"element":{"name":"IMemoryBlockRetrieval.java"},"incompressible":true},{"element":{"name":"IMemoryBlockRetrievalExtension.java"},"incompressible":true},{"element":{"name":"IPersistableSourceLocator.java"},"incompressible":true},{"element":{"name":"IProcess.java"},"incompressible":true},{"element":{"name":"IRegister.java"},"incompressible":true},{"element":{"name":"IRegisterGroup.java"},"incompressible":true},{"element":{"name":"ISourceLocator.java"},"incompressible":true},{"element":{"name":"IStackFrame.java"},"incompressible":true},{"element":{"name":"IStep.java"},"incompressible":true},{"element":{"name":"IStepFilter.java"},"incompressible":true},{"element":{"name":"IStepFilters.java"},"incompressible":true},{"element":{"name":"IStreamMonitor.java"},"incompressible":true},{"element":{"name":"IStreamsProxy.java"},"incompressible":true},{"element":{"name":"IStreamsProxy2.java"},"incompressible":true},{"element":{"name":"ISuspendResume.java"},"incompressible":true},{"element":{"name":"ITerminate.java"},"incompressible":true},{"element":{"name":"IThread.java"},"incompressible":true},{"element":{"name":"ITriggerPoint.java"},"incompressible":true},{"element":{"name":"IValue.java"},"incompressible":true},{"element":{"name":"IValueModification.java"},"incompressible":true},{"element":{"name":"IVariable.java"},"incompressible":true},{"element":{"name":"IWatchExpression.java"},"incompressible":true},{"element":{"name":"IWatchExpressionDelegate.java"},"incompressible":true},{"element":{"name":"IWatchExpressionListener.java"},"incompressible":true},{"element":{"name":"IWatchExpressionResult.java"},"incompressible":true},{"element":{"name":"IWatchpoint.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationDelegate.java"},"incompressible":true},{"element":{"name":"LineBreakpoint.java"},"incompressible":true},{"element":{"name":"MemoryByte.java"},"incompressible":true},{"element":{"name":"RuntimeProcess.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"package.html"},"incompressible":true},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"AbstractSourceLookupDirector.java"},"incompressible":true},{"element":{"name":"AbstractSourceLookupParticipant.java"},"incompressible":true},{"element":{"name":"IPersistableSourceLocator2.java"},"incompressible":true},{"element":{"name":"ISourceContainer.java"},"incompressible":true},{"element":{"name":"ISourceContainerType.java"},"incompressible":true},{"element":{"name":"ISourceContainerTypeDelegate.java"},"incompressible":true},{"element":{"name":"ISourceLookupDirector.java"},"incompressible":true},{"element":{"name":"ISourceLookupParticipant.java"},"incompressible":true},{"element":{"name":"ISourcePathComputer.java"},"incompressible":true},{"element":{"name":"ISourcePathComputerDelegate.java"},"incompressible":true},{"element":{"name":"containers"},"children":[{"element":{"name":"AbstractSourceContainer.java"},"incompressible":true},{"element":{"name":"AbstractSourceContainerTypeDelegate.java"},"incompressible":true},{"element":{"name":"ArchiveSourceContainer.java"},"incompressible":true},{"element":{"name":"CompositeSourceContainer.java"},"incompressible":true},{"element":{"name":"ContainerSourceContainer.java"},"incompressible":true},{"element":{"name":"DefaultSourceContainer.java"},"incompressible":true},{"element":{"name":"DirectorySourceContainer.java"},"incompressible":true},{"element":{"name":"ExternalArchiveSourceContainer.java"},"incompressible":true},{"element":{"name":"FolderSourceContainer.java"},"incompressible":true},{"element":{"name":"LocalFileStorage.java"},"incompressible":true},{"element":{"name":"ProjectSourceContainer.java"},"incompressible":true},{"element":{"name":"WorkspaceSourceContainer.java"},"incompressible":true},{"element":{"name":"ZipEntryStorage.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"package.html"},"incompressible":true}]}]},{"element":{"name":"internal"},"children":[{"element":{"name":"core"},"children":[{"element":{"name":"BreakpointImportParticipantDelegate.java"},"incompressible":true},{"element":{"name":"BreakpointManager.java"},"incompressible":true},{"element":{"name":"DebugCoreMessages.java"},"incompressible":true},{"element":{"name":"DebugCoreMessages.properties"},"incompressible":true},{"element":{"name":"DebugOptions.java"},"incompressible":true},{"element":{"name":"DebugPreferenceInitializer.java"},"incompressible":true},{"element":{"name":"EnvironmentVariableResolver.java"},"incompressible":true},{"element":{"name":"ExpressionManager.java"},"incompressible":true},{"element":{"name":"IConfigurationElementConstants.java"},"incompressible":true},{"element":{"name":"IExpressionsListener2.java"},"incompressible":true},{"element":{"name":"IInternalDebugCoreConstants.java"},"incompressible":true},{"element":{"name":"IMementoConstants.java"},"incompressible":true},{"element":{"name":"InputStreamMonitor.java"},"incompressible":true},{"element":{"name":"LaunchConfiguration.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationComparator.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationInfo.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationType.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationWorkingCopy.java"},"incompressible":true},{"element":{"name":"LaunchDelegate.java"},"incompressible":true},{"element":{"name":"LaunchManager.java"},"incompressible":true},{"element":{"name":"LaunchMode.java"},"incompressible":true},{"element":{"name":"LaunchablePropertyTester.java"},"incompressible":true},{"element":{"name":"LogicalStructureManager.java"},"incompressible":true},{"element":{"name":"LogicalStructureProvider.java"},"incompressible":true},{"element":{"name":"LogicalStructureType.java"},"incompressible":true},{"element":{"name":"MemoryBlockManager.java"},"incompressible":true},{"element":{"name":"NullStreamsProxy.java"},"incompressible":true},{"element":{"name":"OutputStreamMonitor.java"},"incompressible":true},{"element":{"name":"Preferences.java"},"incompressible":true},{"element":{"name":"PreferredDelegateModifyListener.java"},"incompressible":true},{"element":{"name":"RefreshScopeComparator.java"},"incompressible":true},{"element":{"name":"ResourceFactory.java"},"incompressible":true},{"element":{"name":"StepFilter.java"},"incompressible":true},{"element":{"name":"StepFilterManager.java"},"incompressible":true},{"element":{"name":"StreamsProxy.java"},"incompressible":true},{"element":{"name":"SystemPropertyResolver.java"},"incompressible":true},{"element":{"name":"SystemVariableResolver.java"},"incompressible":true},{"element":{"name":"WatchExpression.java"},"incompressible":true},{"element":{"name":"XMLMemento.java"},"incompressible":true},{"element":{"name":"commands"},"children":[{"element":{"name":"CommandAdapterFactory.java"},"incompressible":true},{"element":{"name":"DebugCommandRequest.java"},"incompressible":true},{"element":{"name":"DisconnectCommand.java"},"incompressible":true},{"element":{"name":"DropToFrameCommand.java"},"incompressible":true},{"element":{"name":"ForEachCommand.java"},"incompressible":true},{"element":{"name":"Request.java"},"incompressible":true},{"element":{"name":"ResumeCommand.java"},"incompressible":true},{"element":{"name":"StepCommand.java"},"incompressible":true},{"element":{"name":"StepFiltersCommand.java"},"incompressible":true},{"element":{"name":"StepIntoCommand.java"},"incompressible":true},{"element":{"name":"StepOverCommand.java"},"incompressible":true},{"element":{"name":"StepReturnCommand.java"},"incompressible":true},{"element":{"name":"SuspendCommand.java"},"incompressible":true},{"element":{"name":"TerminateCommand.java"},"incompressible":true}]},{"element":{"name":"groups"},"children":[{"element":{"name":"GroupLaunch.java"},"incompressible":true},{"element":{"name":"GroupLaunchConfigurationDelegate.java"},"incompressible":true},{"element":{"name":"GroupLaunchElement.java"},"incompressible":true},{"element":{"name":"GroupMemberChangeListener.java"},"incompressible":true},{"element":{"name":"observer"},"children":[{"element":{"name":"ProcessObserver.java"},"incompressible":true},{"element":{"name":"StreamObserver.java"},"incompressible":true}]}]},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"SourceContainerType.java"},"incompressible":true},{"element":{"name":"SourceLocatorMementoComparator.java"},"incompressible":true},{"element":{"name":"SourceLookupMessages.java"},"incompressible":true},{"element":{"name":"SourceLookupMessages.properties"},"incompressible":true},{"element":{"name":"SourceLookupUtils.java"},"incompressible":true},{"element":{"name":"SourcePathComputer.java"},"incompressible":true},{"element":{"name":"containers"},"children":[{"element":{"name":"ArchiveSourceContainerType.java"},"incompressible":true},{"element":{"name":"DefaultSourceContainerType.java"},"incompressible":true},{"element":{"name":"DirectorySourceContainerType.java"},"incompressible":true},{"element":{"name":"ExternalArchiveSourceContainerType.java"},"incompressible":true},{"element":{"name":"FolderSourceContainerType.java"},"incompressible":true},{"element":{"name":"ProjectSourceContainerType.java"},"incompressible":true},{"element":{"name":"WorkspaceSourceContainerType.java"},"incompressible":true}]}]},{"element":{"name":"variables"},"children":[{"element":{"name":"ContainerResolver.java"},"incompressible":true},{"element":{"name":"DateTimeResolver.java"},"incompressible":true},{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"Messages.properties"},"incompressible":true},{"element":{"name":"ProjectResolver.java"},"incompressible":true},{"element":{"name":"ResourceResolver.java"},"incompressible":true},{"element":{"name":"WorkspaceResolver.java"},"incompressible":true}]}]}]}]}]}]}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"schema"},"children":[{"element":{"name":"breakpointImportParticipants.exsd"},"incompressible":true},{"element":{"name":"breakpoints.exsd"},"incompressible":true},{"element":{"name":"launchConfigurationComparators.exsd"},"incompressible":true},{"element":{"name":"launchConfigurationTypes.exsd"},"incompressible":true},{"element":{"name":"launchDelegates.exsd"},"incompressible":true},{"element":{"name":"launchModes.exsd"},"incompressible":true},{"element":{"name":"launchers.exsd"},"incompressible":true},{"element":{"name":"logicalStructureProviders.exsd"},"incompressible":true},{"element":{"name":"logicalStructureTypes.exsd"},"incompressible":true},{"element":{"name":"processFactories.exsd"},"incompressible":true},{"element":{"name":"sourceContainerTypes.exsd"},"incompressible":true},{"element":{"name":"sourceLocators.exsd"},"incompressible":true},{"element":{"name":"sourcePathComputers.exsd"},"incompressible":true},{"element":{"name":"statusHandlers.exsd"},"incompressible":true},{"element":{"name":"stepFilters.exsd"},"incompressible":true},{"element":{"name":"watchExpressionDelegates.exsd"},"incompressible":true}]},{"element":{"name":"scripts"},"children":[{"element":{"name":"exportplugin.xml"},"incompressible":true}]}]},{"element":{"name":"org.eclipse.debug.examples.core"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"OSGI-INF"},"children":[{"element":{"name":"l10n"},"children":[{"element":{"name":"bundle.properties"},"incompressible":true}]}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"forceQualifierUpdate.txt"},"incompressible":true},{"element":{"name":"pdavm"},"children":[{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"pdavm"},"children":[{"element":{"name":"PDAVirtualMachine.java"},"incompressible":true}]}]}]}]}]}]},{"element":{"name":"tests"},"children":[{"element":{"name":"vmtest10.pda"},"incompressible":true},{"element":{"name":"vmtest2.pda"},"incompressible":true},{"element":{"name":"vmtest3.pda"},"incompressible":true},{"element":{"name":"vmtest6.pda"},"incompressible":true},{"element":{"name":"vmtest8.pda"},"incompressible":true},{"element":{"name":"vmtest9.pda"},"incompressible":true},{"element":{"name":"vmtest_children.pda"},"incompressible":true}]}]},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"readme.html"},"incompressible":true},{"element":{"name":"samples"},"children":[{"element":{"name":"counter.pda"},"incompressible":true},{"element":{"name":"drop.pda"},"incompressible":true},{"element":{"name":"example.pda"},"incompressible":true},{"element":{"name":"fibonacci.pda"},"incompressible":true},{"element":{"name":"registers.pda"},"incompressible":true},{"element":{"name":"stack.pda"},"incompressible":true},{"element":{"name":"structures.pda"},"incompressible":true}]},{"element":{"name":"scripts"},"children":[{"element":{"name":"build.xml"},"incompressible":true}]},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"core"},"children":[{"element":{"name":"midi"},"children":[{"element":{"name":"launcher"},"children":[{"element":{"name":"ClockControl.java"},"incompressible":true},{"element":{"name":"LengthControl.java"},"incompressible":true},{"element":{"name":"MidiLaunch.java"},"incompressible":true},{"element":{"name":"MidiLaunchDelegate.java"},"incompressible":true},{"element":{"name":"SequencerControl.java"},"incompressible":true},{"element":{"name":"TempoControl.java"},"incompressible":true},{"element":{"name":"TimeControl.java"},"incompressible":true}]}]},{"element":{"name":"pda"},"children":[{"element":{"name":"DebugCorePlugin.java"},"incompressible":true},{"element":{"name":"breakpoints"},"children":[{"element":{"name":"PDALineBreakpoint.java"},"incompressible":true},{"element":{"name":"PDARunToLineBreakpoint.java"},"incompressible":true},{"element":{"name":"PDAWatchpoint.java"},"incompressible":true}]},{"element":{"name":"launcher"},"children":[{"element":{"name":"PDALaunchDelegate.java"},"incompressible":true}]},{"element":{"name":"model"},"children":[{"element":{"name":"IPDAEventListener.java"},"incompressible":true},{"element":{"name":"PDAArray.java"},"incompressible":true},{"element":{"name":"PDAArrayEntry.java"},"incompressible":true},{"element":{"name":"PDADebugElement.java"},"incompressible":true},{"element":{"name":"PDADebugTarget.java"},"incompressible":true},{"element":{"name":"PDAMemoryBlock.java"},"incompressible":true},{"element":{"name":"PDAStackFrame.java"},"incompressible":true},{"element":{"name":"PDAStackValue.java"},"incompressible":true},{"element":{"name":"PDAThread.java"},"incompressible":true},{"element":{"name":"PDAValue.java"},"incompressible":true},{"element":{"name":"PDAVariable.java"},"incompressible":true},{"element":{"name":"WordStructureDelegate.java"},"incompressible":true}]},{"element":{"name":"protocol"},"children":[{"element":{"name":"PDABitFieldData.java"},"incompressible":true},{"element":{"name":"PDAChildrenCommand.java"},"incompressible":true},{"element":{"name":"PDAClearBreakpointCommand.java"},"incompressible":true},{"element":{"name":"PDACommand.java"},"incompressible":true},{"element":{"name":"PDACommandResult.java"},"incompressible":true},{"element":{"name":"PDADataCommand.java"},"incompressible":true},{"element":{"name":"PDADropFrameCommand.java"},"incompressible":true},{"element":{"name":"PDAEvalCommand.java"},"incompressible":true},{"element":{"name":"PDAEvalResultEvent.java"},"incompressible":true},{"element":{"name":"PDAEvent.java"},"incompressible":true},{"element":{"name":"PDAEventStopCommand.java"},"incompressible":true},{"element":{"name":"PDAExitedEvent.java"},"incompressible":true},{"element":{"name":"PDAFrameCommand.java"},"incompressible":true},{"element":{"name":"PDAFrameCommandResult.java"},"incompressible":true},{"element":{"name":"PDAFrameData.java"},"incompressible":true},{"element":{"name":"PDAGroupsCommand.java"},"incompressible":true},{"element":{"name":"PDAListResult.java"},"incompressible":true},{"element":{"name":"PDANoSuchLabelEvent.java"},"incompressible":true},{"element":{"name":"PDAPopDataCommand.java"},"incompressible":true},{"element":{"name":"PDAPushDataCommand.java"},"incompressible":true},{"element":{"name":"PDARegisterData.java"},"incompressible":true},{"element":{"name":"PDARegistersCommand.java"},"incompressible":true},{"element":{"name":"PDARegistersCommandResult.java"},"incompressible":true},{"element":{"name":"PDARegistersEvent.java"},"incompressible":true},{"element":{"name":"PDARestartCommand.java"},"incompressible":true},{"element":{"name":"PDAResumeCommand.java"},"incompressible":true},{"element":{"name":"PDAResumedEvent.java"},"incompressible":true},{"element":{"name":"PDARunControlEvent.java"},"incompressible":true},{"element":{"name":"PDASetBreakpointCommand.java"},"incompressible":true},{"element":{"name":"PDASetDataCommand.java"},"incompressible":true},{"element":{"name":"PDASetVarCommand.java"},"incompressible":true},{"element":{"name":"PDAStackCommand.java"},"incompressible":true},{"element":{"name":"PDAStackCommandResult.java"},"incompressible":true},{"element":{"name":"PDAStackDepthCommand.java"},"incompressible":true},{"element":{"name":"PDAStackDepthCommandResult.java"},"incompressible":true},{"element":{"name":"PDAStartedEvent.java"},"incompressible":true},{"element":{"name":"PDAStepCommand.java"},"incompressible":true},{"element":{"name":"PDAStepReturnCommand.java"},"incompressible":true},{"element":{"name":"PDASuspendCommand.java"},"incompressible":true},{"element":{"name":"PDASuspendedEvent.java"},"incompressible":true},{"element":{"name":"PDATerminateCommand.java"},"incompressible":true},{"element":{"name":"PDATerminatedEvent.java"},"incompressible":true},{"element":{"name":"PDAUnimplementedInstructionEvent.java"},"incompressible":true},{"element":{"name":"PDAVMResumeCommand.java"},"incompressible":true},{"element":{"name":"PDAVMResumedEvent.java"},"incompressible":true},{"element":{"name":"PDAVMStartedEvent.java"},"incompressible":true},{"element":{"name":"PDAVMSuspendCommand.java"},"incompressible":true},{"element":{"name":"PDAVMSuspendedEvent.java"},"incompressible":true},{"element":{"name":"PDAVMTerminatedEvent.java"},"incompressible":true},{"element":{"name":"PDAVarCommand.java"},"incompressible":true},{"element":{"name":"PDAWatchCommand.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"PDASourceLookupDirector.java"},"incompressible":true},{"element":{"name":"PDASourceLookupParticipant.java"},"incompressible":true},{"element":{"name":"PDASourcePathComputerDelegate.java"},"incompressible":true}]}]}]}]}]}]}]}]},{"element":{"name":"src_ant"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"ant"},"children":[{"element":{"name":"tasks"},"children":[{"element":{"name":"PreProcessor.java"},"incompressible":true}]}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.debug.examples.memory"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"full"},"children":[{"element":{"name":"obj16"},"children":[{"element":{"name":"hex_tree.gif"},"incompressible":true},{"element":{"name":"launch.gif"},"incompressible":true},{"element":{"name":"memory_segment.gif"},"incompressible":true},{"element":{"name":"memory_unit.gif"},"incompressible":true}]}]}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"memory"},"children":[{"element":{"name":"MemoryViewSamplePlugin.java"},"incompressible":true},{"element":{"name":"core"},"children":[{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"SampleDebugTarget.java"},"incompressible":true},{"element":{"name":"SampleMemoryBlock.java"},"incompressible":true},{"element":{"name":"SampleRegister.java"},"incompressible":true},{"element":{"name":"SampleRegisterGroup.java"},"incompressible":true},{"element":{"name":"SampleStackFrame.java"},"incompressible":true},{"element":{"name":"SampleThread.java"},"incompressible":true},{"element":{"name":"SampleValue.java"},"incompressible":true},{"element":{"name":"SampleVariable.java"},"incompressible":true},{"element":{"name":"messages.properties"},"incompressible":true}]},{"element":{"name":"engine"},"children":[{"element":{"name":"SampleEngine.java"},"incompressible":true},{"element":{"name":"SampleMemoryUnit.java"},"incompressible":true}]},{"element":{"name":"launchconfig"},"children":[{"element":{"name":"SampleLaunchConfigurationDelegateEx.java"},"incompressible":true},{"element":{"name":"SampleLaunchTabGroup.java"},"incompressible":true},{"element":{"name":"SampleModelPresentation.java"},"incompressible":true}]}]}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.debug.examples.mixedmode"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"OSGI-INF"},"children":[{"element":{"name":"l10n"},"children":[{"element":{"name":"bundle.properties"},"incompressible":true}]}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"mixedmode"},"children":[{"element":{"name":"Activator.java"},"incompressible":true},{"element":{"name":"AntExtraTab.java"},"incompressible":true},{"element":{"name":"ClearPreferredDelegatesHandler.java"},"incompressible":true},{"element":{"name":"DoNothingLaunchConfigurationDelegate.java"},"incompressible":true},{"element":{"name":"DoNothingMainTab.java"},"incompressible":true},{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"messages.properties"},"incompressible":true}]}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.debug.examples.ui"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"OSGI-INF"},"children":[{"element":{"name":"l10n"},"children":[{"element":{"name":"bundle.properties"},"incompressible":true}]}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"full"},"children":[{"element":{"name":"dlcl16"},"children":[{"element":{"name":"pop.gif"},"incompressible":true},{"element":{"name":"push.gif"},"incompressible":true}]},{"element":{"name":"elcl16"},"children":[{"element":{"name":"pop.gif"},"incompressible":true},{"element":{"name":"push.gif"},"incompressible":true}]},{"element":{"name":"obj16"},"children":[{"element":{"name":"clef.png"},"incompressible":true},{"element":{"name":"note.gif"},"incompressible":true},{"element":{"name":"pda.gif"},"incompressible":true}]}]}]},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"ui"},"children":[{"element":{"name":"midi"},"children":[{"element":{"name":"adapters"},"children":[{"element":{"name":"CheckboxModelProxyFactory.java"},"incompressible":true},{"element":{"name":"ControlCellModifier.java"},"incompressible":true},{"element":{"name":"ControlEditor.java"},"incompressible":true},{"element":{"name":"ControlEventHandler.java"},"incompressible":true},{"element":{"name":"ControlLabelProvider.java"},"incompressible":true},{"element":{"name":"ControlsMementoProvider.java"},"incompressible":true},{"element":{"name":"MidiAdapterFactory.java"},"incompressible":true},{"element":{"name":"MidiEventLabelProvider.java"},"incompressible":true},{"element":{"name":"MidiEventModelProxy.java"},"incompressible":true},{"element":{"name":"MidiStepOverHandler.java"},"incompressible":true},{"element":{"name":"SequencerColumnFactory.java"},"incompressible":true},{"element":{"name":"SequencerColumnPresentation.java"},"incompressible":true},{"element":{"name":"SequencerContentProvider.java"},"incompressible":true},{"element":{"name":"SequencerControlsModelProxy.java"},"incompressible":true},{"element":{"name":"SequencerModelProxyFactory.java"},"incompressible":true},{"element":{"name":"TrackColumnFactory.java"},"incompressible":true},{"element":{"name":"TrackColumnPresentation.java"},"incompressible":true},{"element":{"name":"TrackContentProvider.java"},"incompressible":true},{"element":{"name":"TrackLabelProvider.java"},"incompressible":true},{"element":{"name":"TrackModelProxy.java"},"incompressible":true}]},{"element":{"name":"detailpanes"},"children":[{"element":{"name":"ClockSliderDetailPane.java"},"incompressible":true},{"element":{"name":"ControlDetailPaneFactory.java"},"incompressible":true},{"element":{"name":"TempoSliderDetailPane.java"},"incompressible":true}]},{"element":{"name":"launcher"},"children":[{"element":{"name":"ExampleLaunchStatusHandler.java"},"incompressible":true},{"element":{"name":"MidiLaunchShortcut.java"},"incompressible":true},{"element":{"name":"MidiMainTab.java"},"incompressible":true},{"element":{"name":"MidiTabGroup.java"},"incompressible":true}]}]},{"element":{"name":"pda"},"children":[{"element":{"name":"DebugUIPlugin.java"},"incompressible":true},{"element":{"name":"adapters"},"children":[{"element":{"name":"AdapterFactory.java"},"incompressible":true},{"element":{"name":"AddPDAMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"CommandAdapterFactory.java"},"incompressible":true},{"element":{"name":"ModelProxyFactory.java"},"incompressible":true},{"element":{"name":"PDADebugTargetContentProvider.java"},"incompressible":true},{"element":{"name":"PDADebugTargetProxy.java"},"incompressible":true},{"element":{"name":"PDARestartDebugCommand.java"},"incompressible":true},{"element":{"name":"PDAThreadEventHandler.java"},"incompressible":true},{"element":{"name":"PDAViewActionProvider.java"},"incompressible":true},{"element":{"name":"PDAVirtualFindAction.java"},"incompressible":true}]},{"element":{"name":"breakpoints"},"children":[{"element":{"name":"PDABreakpointAdapter.java"},"incompressible":true},{"element":{"name":"PDAEditorAdapterFactory.java"},"incompressible":true},{"element":{"name":"PDARunToLineAdapter.java"},"incompressible":true},{"element":{"name":"PDAToggleWatchpointsTarget.java"},"incompressible":true},{"element":{"name":"PDAToggleWatchpointsTargetFactory.java"},"incompressible":true}]},{"element":{"name":"editor"},"children":[{"element":{"name":"AnnotationHover.java"},"incompressible":true},{"element":{"name":"PDAContentAssistProcessor.java"},"incompressible":true},{"element":{"name":"PDAContentAssistant.java"},"incompressible":true},{"element":{"name":"PDAEditor.java"},"incompressible":true},{"element":{"name":"PDAEditorMessages.properties"},"incompressible":true},{"element":{"name":"PDAScanner.java"},"incompressible":true},{"element":{"name":"PDASourceViewerConfiguration.java"},"incompressible":true},{"element":{"name":"PopFrameActionDelegate.java"},"incompressible":true},{"element":{"name":"TextHover.java"},"incompressible":true},{"element":{"name":"WordFinder.java"},"incompressible":true}]},{"element":{"name":"launcher"},"children":[{"element":{"name":"PDALaunchShortcut.java"},"incompressible":true},{"element":{"name":"PDAMainTab.java"},"incompressible":true},{"element":{"name":"PDATabGroup.java"},"incompressible":true}]},{"element":{"name":"presentation"},"children":[{"element":{"name":"PDAModelPresentation.java"},"incompressible":true}]},{"element":{"name":"views"},"children":[{"element":{"name":"AbstractDataStackViewHandler.java"},"incompressible":true},{"element":{"name":"CanPushTester.java"},"incompressible":true},{"element":{"name":"CheckboxView.java"},"incompressible":true},{"element":{"name":"DataStackView.java"},"incompressible":true},{"element":{"name":"PopHandler.java"},"incompressible":true},{"element":{"name":"PushHandler.java"},"incompressible":true}]}]}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.debug.tests"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"Platform Debug Test Suite.launch"},"incompressible":true},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"forceQualifierUpdate.txt"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"image1.gif"},"incompressible":true},{"element":{"name":"image2.gif"},"incompressible":true}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"tests"},"children":[{"element":{"name":"AbstractDebugTest.java"},"incompressible":true},{"element":{"name":"AutomatedSuite.java"},"incompressible":true},{"element":{"name":"LocalSuite.java"},"incompressible":true},{"element":{"name":"PerformanceSuite.java"},"incompressible":true},{"element":{"name":"TestUtil.java"},"incompressible":true},{"element":{"name":"TestsPlugin.java"},"incompressible":true},{"element":{"name":"breakpoint"},"children":[{"element":{"name":"BreakpointOrderingTests.java"},"incompressible":true}]},{"element":{"name":"console"},"children":[{"element":{"name":"ConsoleDocumentAdapterTests.java"},"incompressible":true},{"element":{"name":"ConsoleManagerTests.java"},"incompressible":true},{"element":{"name":"ConsoleTests.java"},"incompressible":true},{"element":{"name":"IOConsoleTestUtil.java"},"incompressible":true},{"element":{"name":"IOConsoleTests.java"},"incompressible":true},{"element":{"name":"MockProcess.java"},"incompressible":true},{"element":{"name":"ProcessConsoleManagerTests.java"},"incompressible":true},{"element":{"name":"ProcessConsoleTests.java"},"incompressible":true},{"element":{"name":"StreamsProxyTests.java"},"incompressible":true}]},{"element":{"name":"expressions"},"children":[{"element":{"name":"ExpressionManagerTests.java"},"incompressible":true}]},{"element":{"name":"launching"},"children":[{"element":{"name":"AbstractLaunchTest.java"},"incompressible":true},{"element":{"name":"AcceleratorSubstitutionTests.java"},"incompressible":true},{"element":{"name":"ArgumentParsingTests.java"},"incompressible":true},{"element":{"name":"ArgumentsPrinter.java"},"incompressible":true},{"element":{"name":"CancellingLaunchDelegate.java"},"incompressible":true},{"element":{"name":"DebugFileStore.java"},"incompressible":true},{"element":{"name":"DebugFileSystem.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTests.java"},"incompressible":true},{"element":{"name":"LaunchFavoriteTests.java"},"incompressible":true},{"element":{"name":"LaunchGroupTests.java"},"incompressible":true},{"element":{"name":"LaunchHistoryTests.java"},"incompressible":true},{"element":{"name":"LaunchManagerTests.java"},"incompressible":true},{"element":{"name":"LaunchTests.java"},"incompressible":true},{"element":{"name":"RefreshTabTests.java"},"incompressible":true},{"element":{"name":"TestLaunchDelegate.java"},"incompressible":true}]},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"SourceLookupFacilityTests.java"},"incompressible":true},{"element":{"name":"TestLaunch.java"},"incompressible":true},{"element":{"name":"TestSourceDirector.java"},"incompressible":true},{"element":{"name":"TestSourceLocator.java"},"incompressible":true},{"element":{"name":"TestStackFrame.java"},"incompressible":true}]},{"element":{"name":"statushandlers"},"children":[{"element":{"name":"StatusHandler.java"},"incompressible":true},{"element":{"name":"StatusHandlerTests.java"},"incompressible":true}]},{"element":{"name":"stepfilters"},"children":[{"element":{"name":"StepFiltersTests.java"},"incompressible":true},{"element":{"name":"TestStepFilter.java"},"incompressible":true}]},{"element":{"name":"view"},"children":[{"element":{"name":"memory"},"children":[{"element":{"name":"DynamicRenderingBindings.java"},"incompressible":true},{"element":{"name":"MemoryBlock.java"},"incompressible":true},{"element":{"name":"MemoryBlockDynamic.java"},"incompressible":true},{"element":{"name":"MemoryBlockOne.java"},"incompressible":true},{"element":{"name":"MemoryBlockThree.java"},"incompressible":true},{"element":{"name":"MemoryBlockTwo.java"},"incompressible":true},{"element":{"name":"MemoryRenderingTests.java"},"incompressible":true},{"element":{"name":"RenderingTypeDelegate.java"},"incompressible":true}]}]},{"element":{"name":"viewer"},"children":[{"element":{"name":"model"},"children":[{"element":{"name":"AbstractViewerModelTest.java"},"incompressible":true},{"element":{"name":"CheckTests.java"},"incompressible":true},{"element":{"name":"ChildrenUpdateTests.java"},"incompressible":true},{"element":{"name":"ColumnPresentationTests.java"},"incompressible":true},{"element":{"name":"ContentTests.java"},"incompressible":true},{"element":{"name":"DeltaTests.java"},"incompressible":true},{"element":{"name":"FilterTests.java"},"incompressible":true},{"element":{"name":"FilterTransformTests.java"},"incompressible":true},{"element":{"name":"ITestModelUpdatesListenerConstants.java"},"incompressible":true},{"element":{"name":"JFaceViewerCheckTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerContentTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerDeltaTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerFilterTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerLazyTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerPerformanceTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerPopupTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerSelectionTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerStateTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerTopIndexTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerUpdateTests.java"},"incompressible":true},{"element":{"name":"LazyTests.java"},"incompressible":true},{"element":{"name":"PerformanceTests.java"},"incompressible":true},{"element":{"name":"PopupTests.java"},"incompressible":true},{"element":{"name":"PresentationContextTests.java"},"incompressible":true},{"element":{"name":"SelectionTests.java"},"incompressible":true},{"element":{"name":"StateTests.java"},"incompressible":true},{"element":{"name":"TestModel.java"},"incompressible":true},{"element":{"name":"TestModelUpdatesListener.java"},"incompressible":true},{"element":{"name":"TreeModelViewerAutopopulateAgent.java"},"incompressible":true},{"element":{"name":"TreePathWrapper.java"},"incompressible":true},{"element":{"name":"UpdateTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerContentTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerDeltaTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerFilterTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerLazyModeTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerPerformanceTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerPopupTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerSelectionTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerStateTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerUpdateTests.java"},"incompressible":true},{"element":{"name":"VisibleVirtualItemValidator.java"},"incompressible":true}]}]}]}]}]}]}]},{"element":{"name":"test-import"},"children":[{"element":{"name":"Import1.launch"},"incompressible":true},{"element":{"name":"Import2.launch"},"incompressible":true},{"element":{"name":"Import3.launch"},"incompressible":true},{"element":{"name":"Import4.launch"},"incompressible":true},{"element":{"name":"Import5.launch"},"incompressible":true}]},{"element":{"name":"test.xml"},"incompressible":true}]},{"element":{"name":"org.eclipse.debug.ui"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".options"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":".api_filters"},"incompressible":true},{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"css"},"children":[{"element":{"name":"e4-dark_debug_prefstyle.css"},"incompressible":true},{"element":{"name":"e4-light_debug_prefstyle.css"},"incompressible":true}]},{"element":{"name":"forceQualifierUpdate.txt"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"full"},"children":[{"element":{"name":"dlcl16"},"children":[{"element":{"name":"changevariablevalue_co.png"},"incompressible":true},{"element":{"name":"changevariablevalue_co@2x.png"},"incompressible":true},{"element":{"name":"clear_co.gif"},"incompressible":true},{"element":{"name":"collapseall.png"},"incompressible":true},{"element":{"name":"collapseall@2x.png"},"incompressible":true},{"element":{"name":"copy_edit_co.png"},"incompressible":true},{"element":{"name":"copy_edit_co@2x.png"},"incompressible":true},{"element":{"name":"copyviewtoclipboard_tsk.png"},"incompressible":true},{"element":{"name":"copyviewtoclipboard_tsk@2x.png"},"incompressible":true},{"element":{"name":"debug_view_auto.png"},"incompressible":true},{"element":{"name":"debug_view_auto@2x.png"},"incompressible":true},{"element":{"name":"debug_view_compact.png"},"incompressible":true},{"element":{"name":"debug_view_compact@2x.png"},"incompressible":true},{"element":{"name":"debug_view_tree.png"},"incompressible":true},{"element":{"name":"debug_view_tree@2x.png"},"incompressible":true},{"element":{"name":"debuglast_co.gif.png"},"incompressible":true},{"element":{"name":"debuglast_co.gif@2x.png"},"incompressible":true},{"element":{"name":"debuglast_co.png"},"incompressible":true},{"element":{"name":"debuglast_co@2x.png"},"incompressible":true},{"element":{"name":"delete_config.png"},"incompressible":true},{"element":{"name":"delete_config@2x.png"},"incompressible":true},{"element":{"name":"det_pane_auto.png"},"incompressible":true},{"element":{"name":"det_pane_auto@2x.png"},"incompressible":true},{"element":{"name":"det_pane_hide.png"},"incompressible":true},{"element":{"name":"det_pane_hide@2x.png"},"incompressible":true},{"element":{"name":"det_pane_right.png"},"incompressible":true},{"element":{"name":"det_pane_right@2x.png"},"incompressible":true},{"element":{"name":"det_pane_under.png"},"incompressible":true},{"element":{"name":"det_pane_under@2x.png"},"incompressible":true},{"element":{"name":"disabled_co.png"},"incompressible":true},{"element":{"name":"disabled_co@2x.png"},"incompressible":true},{"element":{"name":"disconnect_co.png"},"incompressible":true},{"element":{"name":"disconnect_co@2x.png"},"incompressible":true},{"element":{"name":"display_selected_mb.png"},"incompressible":true},{"element":{"name":"display_selected_mb@2x.png"},"incompressible":true},{"element":{"name":"dissolve_group.png"},"incompressible":true},{"element":{"name":"dissolve_group@2x.png"},"incompressible":true},{"element":{"name":"drop_to_frame.png"},"incompressible":true},{"element":{"name":"drop_to_frame@2x.png"},"incompressible":true},{"element":{"name":"edtsrclkup_co.png"},"incompressible":true},{"element":{"name":"edtsrclkup_co@2x.png"},"incompressible":true},{"element":{"name":"enabled_co.png"},"incompressible":true},{"element":{"name":"enabled_co@2x.png"},"incompressible":true},{"element":{"name":"expandall.png"},"incompressible":true},{"element":{"name":"expandall@2x.png"},"incompressible":true},{"element":{"name":"export_brkpts.png"},"incompressible":true},{"element":{"name":"export_brkpts@2x.png"},"incompressible":true},{"element":{"name":"export_config.png"},"incompressible":true},{"element":{"name":"export_config@2x.png"},"incompressible":true},{"element":{"name":"filter_ps.png"},"incompressible":true},{"element":{"name":"filter_ps@2x.png"},"incompressible":true},{"element":{"name":"hierarchicalLayout.png"},"incompressible":true},{"element":{"name":"hierarchicalLayout@2x.png"},"incompressible":true},{"element":{"name":"import_brkpts.png"},"incompressible":true},{"element":{"name":"import_brkpts@2x.png"},"incompressible":true},{"element":{"name":"link_proto.png"},"incompressible":true},{"element":{"name":"link_proto@2x.png"},"incompressible":true},{"element":{"name":"lock_co.png"},"incompressible":true},{"element":{"name":"lock_co@2x.png"},"incompressible":true},{"element":{"name":"memoryreset_tsk.png"},"incompressible":true},{"element":{"name":"memoryreset_tsk@2x.png"},"incompressible":true},{"element":{"name":"metharg_obj.png"},"incompressible":true},{"element":{"name":"metharg_obj@2x.png"},"incompressible":true},{"element":{"name":"monitorexpression_tsk.png"},"incompressible":true},{"element":{"name":"monitorexpression_tsk@2x.png"},"incompressible":true},{"element":{"name":"new_con.png"},"incompressible":true},{"element":{"name":"new_con@2x.png"},"incompressible":true},{"element":{"name":"new_proto.png"},"incompressible":true},{"element":{"name":"new_proto@2x.png"},"incompressible":true},{"element":{"name":"next_thread_nav.png"},"incompressible":true},{"element":{"name":"next_thread_nav@2x.png"},"incompressible":true},{"element":{"name":"pin.png"},"incompressible":true},{"element":{"name":"pin@2x.png"},"incompressible":true},{"element":{"name":"prev_thread_nav.png"},"incompressible":true},{"element":{"name":"prev_thread_nav@2x.png"},"incompressible":true},{"element":{"name":"printview_tsk.png"},"incompressible":true},{"element":{"name":"printview_tsk@2x.png"},"incompressible":true},{"element":{"name":"prop_ps.png"},"incompressible":true},{"element":{"name":"prop_ps@2x.png"},"incompressible":true},{"element":{"name":"rem_all_co.png"},"incompressible":true},{"element":{"name":"rem_all_co@2x.png"},"incompressible":true},{"element":{"name":"rem_all_triggers.png"},"incompressible":true},{"element":{"name":"rem_co.png"},"incompressible":true},{"element":{"name":"rem_co@2x.png"},"incompressible":true},{"element":{"name":"removememory_tsk.png"},"incompressible":true},{"element":{"name":"removememory_tsk@2x.png"},"incompressible":true},{"element":{"name":"reset_proto.png"},"incompressible":true},{"element":{"name":"reset_proto@2x.png"},"incompressible":true},{"element":{"name":"restart_co.png"},"incompressible":true},{"element":{"name":"restart_co@2x.png"},"incompressible":true},{"element":{"name":"resume_co.png"},"incompressible":true},{"element":{"name":"resume_co@2x.png"},"incompressible":true},{"element":{"name":"runlast_co.png"},"incompressible":true},{"element":{"name":"runlast_co@2x.png"},"incompressible":true},{"element":{"name":"runtoline_co.png"},"incompressible":true},{"element":{"name":"runtoline_co@2x.png"},"incompressible":true},{"element":{"name":"skip_brkp.png"},"incompressible":true},{"element":{"name":"skip_brkp@2x.png"},"incompressible":true},{"element":{"name":"stepbystep_co.png"},"incompressible":true},{"element":{"name":"stepbystep_co@2x.png"},"incompressible":true},{"element":{"name":"stepinto_co.png"},"incompressible":true},{"element":{"name":"stepinto_co@2x.png"},"incompressible":true},{"element":{"name":"stepover_co.png"},"incompressible":true},{"element":{"name":"stepover_co@2x.png"},"incompressible":true},{"element":{"name":"stepreturn_co.png"},"incompressible":true},{"element":{"name":"stepreturn_co@2x.png"},"incompressible":true},{"element":{"name":"suspend_co.png"},"incompressible":true},{"element":{"name":"suspend_co@2x.png"},"incompressible":true},{"element":{"name":"synced.png"},"incompressible":true},{"element":{"name":"synced@2x.png"},"incompressible":true},{"element":{"name":"terminate_all_co.png"},"incompressible":true},{"element":{"name":"terminate_all_co@2x.png"},"incompressible":true},{"element":{"name":"terminate_co.png"},"incompressible":true},{"element":{"name":"terminate_co@2x.png"},"incompressible":true},{"element":{"name":"terminate_rem_co.png"},"incompressible":true},{"element":{"name":"terminate_rem_co@2x.png"},"incompressible":true},{"element":{"name":"tnames_co.png"},"incompressible":true},{"element":{"name":"tnames_co@2x.png"},"incompressible":true},{"element":{"name":"toggledetailpane_co.png"},"incompressible":true},{"element":{"name":"toggledetailpane_co@2x.png"},"incompressible":true},{"element":{"name":"unlink_proto.png"},"incompressible":true},{"element":{"name":"unlink_proto@2x.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr@2x.png"},"incompressible":true},{"element":{"name":"writeerr_co.png"},"incompressible":true},{"element":{"name":"writeerr_co@2x.png"},"incompressible":true},{"element":{"name":"writeout_co.png"},"incompressible":true},{"element":{"name":"writeout_co@2x.png"},"incompressible":true}]},{"element":{"name":"dtool16"},"children":[{"element":{"name":"debug_exc.png"},"incompressible":true},{"element":{"name":"debug_exc@2x.png"},"incompressible":true},{"element":{"name":"environment_co.png"},"incompressible":true},{"element":{"name":"environment_co@2x.png"},"incompressible":true},{"element":{"name":"profile_exc.png"},"incompressible":true},{"element":{"name":"profile_exc@2x.png"},"incompressible":true},{"element":{"name":"run_exc.png"},"incompressible":true},{"element":{"name":"run_exc@2x.png"},"incompressible":true},{"element":{"name":"term_restart.png"},"incompressible":true},{"element":{"name":"term_restart@2x.png"},"incompressible":true},{"element":{"name":"watch_exp.png"},"incompressible":true},{"element":{"name":"watch_exp@2x.png"},"incompressible":true}]},{"element":{"name":"dview16"},"children":[{"element":{"name":"breakpoint_view.png"},"incompressible":true},{"element":{"name":"breakpoint_view@2x.png"},"incompressible":true},{"element":{"name":"debug_persp.png"},"incompressible":true},{"element":{"name":"debug_persp@2x.png"},"incompressible":true},{"element":{"name":"debug_view.png"},"incompressible":true},{"element":{"name":"debug_view@2x.png"},"incompressible":true},{"element":{"name":"details_view.png"},"incompressible":true},{"element":{"name":"details_view@2x.png"},"incompressible":true},{"element":{"name":"memory_view.png"},"incompressible":true},{"element":{"name":"memory_view@2x.png"},"incompressible":true},{"element":{"name":"module_view.png"},"incompressible":true},{"element":{"name":"module_view@2x.png"},"incompressible":true},{"element":{"name":"register_view.png"},"incompressible":true},{"element":{"name":"register_view@2x.png"},"incompressible":true},{"element":{"name":"variable_view.png"},"incompressible":true},{"element":{"name":"variable_view@2x.png"},"incompressible":true},{"element":{"name":"watchlist_view.png"},"incompressible":true},{"element":{"name":"watchlist_view@2x.png"},"incompressible":true}]},{"element":{"name":"elcl16"},"children":[{"element":{"name":"changevariablevalue_co.png"},"incompressible":true},{"element":{"name":"changevariablevalue_co@2x.png"},"incompressible":true},{"element":{"name":"collapseall.png"},"incompressible":true},{"element":{"name":"collapseall@2x.png"},"incompressible":true},{"element":{"name":"copy_edit_co.png"},"incompressible":true},{"element":{"name":"copy_edit_co@2x.png"},"incompressible":true},{"element":{"name":"copyviewtoclipboard_tsk.png"},"incompressible":true},{"element":{"name":"copyviewtoclipboard_tsk@2x.png"},"incompressible":true},{"element":{"name":"debug_view_auto.png"},"incompressible":true},{"element":{"name":"debug_view_auto@2x.png"},"incompressible":true},{"element":{"name":"debug_view_compact.png"},"incompressible":true},{"element":{"name":"debug_view_compact@2x.png"},"incompressible":true},{"element":{"name":"debug_view_tree.png"},"incompressible":true},{"element":{"name":"debug_view_tree@2x.png"},"incompressible":true},{"element":{"name":"debuglast_co.png"},"incompressible":true},{"element":{"name":"debuglast_co@2x.png"},"incompressible":true},{"element":{"name":"delete_config.png"},"incompressible":true},{"element":{"name":"delete_config@2x.png"},"incompressible":true},{"element":{"name":"det_pane_auto.png"},"incompressible":true},{"element":{"name":"det_pane_auto@2x.png"},"incompressible":true},{"element":{"name":"det_pane_hide.png"},"incompressible":true},{"element":{"name":"det_pane_hide@2x.png"},"incompressible":true},{"element":{"name":"det_pane_right.png"},"incompressible":true},{"element":{"name":"det_pane_right@2x.png"},"incompressible":true},{"element":{"name":"det_pane_under.png"},"incompressible":true},{"element":{"name":"det_pane_under@2x.png"},"incompressible":true},{"element":{"name":"disabled_co.png"},"incompressible":true},{"element":{"name":"disabled_co@2x.png"},"incompressible":true},{"element":{"name":"disconnect_co.png"},"incompressible":true},{"element":{"name":"disconnect_co@2x.png"},"incompressible":true},{"element":{"name":"display_selected_mb.png"},"incompressible":true},{"element":{"name":"display_selected_mb@2x.png"},"incompressible":true},{"element":{"name":"dissolve_group.png"},"incompressible":true},{"element":{"name":"dissolve_group@2x.png"},"incompressible":true},{"element":{"name":"drop_to_frame.png"},"incompressible":true},{"element":{"name":"drop_to_frame@2x.png"},"incompressible":true},{"element":{"name":"edtsrclkup_co.png"},"incompressible":true},{"element":{"name":"edtsrclkup_co@2x.png"},"incompressible":true},{"element":{"name":"enabled_co.png"},"incompressible":true},{"element":{"name":"enabled_co@2x.png"},"incompressible":true},{"element":{"name":"expandall.png"},"incompressible":true},{"element":{"name":"expandall@2x.png"},"incompressible":true},{"element":{"name":"export_brkpts.png"},"incompressible":true},{"element":{"name":"export_brkpts@2x.png"},"incompressible":true},{"element":{"name":"export_config.png"},"incompressible":true},{"element":{"name":"export_config@2x.png"},"incompressible":true},{"element":{"name":"filter_ps.png"},"incompressible":true},{"element":{"name":"filter_ps@2x.png"},"incompressible":true},{"element":{"name":"hierarchicalLayout.png"},"incompressible":true},{"element":{"name":"hierarchicalLayout@2x.png"},"incompressible":true},{"element":{"name":"import_brkpts.png"},"incompressible":true},{"element":{"name":"import_brkpts@2x.png"},"incompressible":true},{"element":{"name":"link_proto.png"},"incompressible":true},{"element":{"name":"link_proto@2x.png"},"incompressible":true},{"element":{"name":"lock_co.png"},"incompressible":true},{"element":{"name":"lock_co@2x.png"},"incompressible":true},{"element":{"name":"memoryreset_tsk.png"},"incompressible":true},{"element":{"name":"memoryreset_tsk@2x.png"},"incompressible":true},{"element":{"name":"metharg_obj.png"},"incompressible":true},{"element":{"name":"metharg_obj@2x.png"},"incompressible":true},{"element":{"name":"monitorexpression_tsk.png"},"incompressible":true},{"element":{"name":"monitorexpression_tsk@2x.png"},"incompressible":true},{"element":{"name":"new_con.png"},"incompressible":true},{"element":{"name":"new_con@2x.png"},"incompressible":true},{"element":{"name":"new_proto.png"},"incompressible":true},{"element":{"name":"new_proto@2x.png"},"incompressible":true},{"element":{"name":"next_thread_nav.png"},"incompressible":true},{"element":{"name":"next_thread_nav@2x.png"},"incompressible":true},{"element":{"name":"pin.png"},"incompressible":true},{"element":{"name":"pin@2x.png"},"incompressible":true},{"element":{"name":"prev_thread_nav.png"},"incompressible":true},{"element":{"name":"prev_thread_nav@2x.png"},"incompressible":true},{"element":{"name":"printview_tsk.png"},"incompressible":true},{"element":{"name":"printview_tsk@2x.png"},"incompressible":true},{"element":{"name":"prop_ps.png"},"incompressible":true},{"element":{"name":"prop_ps@2x.png"},"incompressible":true},{"element":{"name":"rem_all_co.png"},"incompressible":true},{"element":{"name":"rem_all_co@2x.png"},"incompressible":true},{"element":{"name":"rem_all_triggers.png"},"incompressible":true},{"element":{"name":"rem_co.png"},"incompressible":true},{"element":{"name":"rem_co@2x.png"},"incompressible":true},{"element":{"name":"removememory_tsk.png"},"incompressible":true},{"element":{"name":"removememory_tsk@2x.png"},"incompressible":true},{"element":{"name":"reset_proto.png"},"incompressible":true},{"element":{"name":"reset_proto@2x.png"},"incompressible":true},{"element":{"name":"restart_co.png"},"incompressible":true},{"element":{"name":"restart_co@2x.png"},"incompressible":true},{"element":{"name":"resume_co.png"},"incompressible":true},{"element":{"name":"resume_co@2x.png"},"incompressible":true},{"element":{"name":"runlast_co.png"},"incompressible":true},{"element":{"name":"runlast_co@2x.png"},"incompressible":true},{"element":{"name":"runtoline_co.png"},"incompressible":true},{"element":{"name":"runtoline_co@2x.png"},"incompressible":true},{"element":{"name":"skip_brkp.png"},"incompressible":true},{"element":{"name":"skip_brkp@2x.png"},"incompressible":true},{"element":{"name":"stepbystep_co.png"},"incompressible":true},{"element":{"name":"stepbystep_co@2x.png"},"incompressible":true},{"element":{"name":"stepinto_co.png"},"incompressible":true},{"element":{"name":"stepinto_co@2x.png"},"incompressible":true},{"element":{"name":"stepover_co.png"},"incompressible":true},{"element":{"name":"stepover_co@2x.png"},"incompressible":true},{"element":{"name":"stepreturn_co.png"},"incompressible":true},{"element":{"name":"stepreturn_co@2x.png"},"incompressible":true},{"element":{"name":"suspend_co.png"},"incompressible":true},{"element":{"name":"suspend_co@2x.png"},"incompressible":true},{"element":{"name":"synced.png"},"incompressible":true},{"element":{"name":"synced@2x.png"},"incompressible":true},{"element":{"name":"terminate_all_co.png"},"incompressible":true},{"element":{"name":"terminate_all_co@2x.png"},"incompressible":true},{"element":{"name":"terminate_co.png"},"incompressible":true},{"element":{"name":"terminate_co@2x.png"},"incompressible":true},{"element":{"name":"terminate_rem_co.png"},"incompressible":true},{"element":{"name":"terminate_rem_co@2x.png"},"incompressible":true},{"element":{"name":"tnames_co.png"},"incompressible":true},{"element":{"name":"tnames_co@2x.png"},"incompressible":true},{"element":{"name":"toggledetailpane_co.png"},"incompressible":true},{"element":{"name":"toggledetailpane_co@2x.png"},"incompressible":true},{"element":{"name":"unlink_proto.png"},"incompressible":true},{"element":{"name":"unlink_proto@2x.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr@2x.png"},"incompressible":true},{"element":{"name":"writeerr_co.png"},"incompressible":true},{"element":{"name":"writeerr_co@2x.png"},"incompressible":true},{"element":{"name":"writeout_co.png"},"incompressible":true},{"element":{"name":"writeout_co@2x.png"},"incompressible":true}]},{"element":{"name":"etool16"},"children":[{"element":{"name":"debug_exc.png"},"incompressible":true},{"element":{"name":"debug_exc@2x.png"},"incompressible":true},{"element":{"name":"environment_co.png"},"incompressible":true},{"element":{"name":"environment_co@2x.png"},"incompressible":true},{"element":{"name":"profile_exc.png"},"incompressible":true},{"element":{"name":"profile_exc@2x.png"},"incompressible":true},{"element":{"name":"run_exc.png"},"incompressible":true},{"element":{"name":"run_exc@2x.png"},"incompressible":true},{"element":{"name":"term_restart.png"},"incompressible":true},{"element":{"name":"term_restart@2x.png"},"incompressible":true},{"element":{"name":"watch_exp.png"},"incompressible":true},{"element":{"name":"watch_exp@2x.png"},"incompressible":true}]},{"element":{"name":"eview16"},"children":[{"element":{"name":"breakpoint_view.gif"},"incompressible":true},{"element":{"name":"breakpoint_view.png"},"incompressible":true},{"element":{"name":"breakpoint_view@2x.png"},"incompressible":true},{"element":{"name":"debug_persp.gif"},"incompressible":true},{"element":{"name":"debug_persp.png"},"incompressible":true},{"element":{"name":"debug_persp@2x.png"},"incompressible":true},{"element":{"name":"debug_view.gif"},"incompressible":true},{"element":{"name":"debug_view.png"},"incompressible":true},{"element":{"name":"debug_view@2x.png"},"incompressible":true},{"element":{"name":"details_view.gif"},"incompressible":true},{"element":{"name":"details_view.png"},"incompressible":true},{"element":{"name":"details_view@2x.png"},"incompressible":true},{"element":{"name":"memory_view.gif"},"incompressible":true},{"element":{"name":"memory_view.png"},"incompressible":true},{"element":{"name":"memory_view@2x.png"},"incompressible":true},{"element":{"name":"module_view.gif"},"incompressible":true},{"element":{"name":"module_view.png"},"incompressible":true},{"element":{"name":"module_view@2x.png"},"incompressible":true},{"element":{"name":"register_view.gif"},"incompressible":true},{"element":{"name":"register_view.png"},"incompressible":true},{"element":{"name":"register_view@2x.png"},"incompressible":true},{"element":{"name":"variable_view.gif"},"incompressible":true},{"element":{"name":"variable_view.png"},"incompressible":true},{"element":{"name":"variable_view@2x.png"},"incompressible":true},{"element":{"name":"watchlist_view.gif"},"incompressible":true},{"element":{"name":"watchlist_view.png"},"incompressible":true},{"element":{"name":"watchlist_view@2x.png"},"incompressible":true}]},{"element":{"name":"obj16"},"children":[{"element":{"name":"arraypartition_obj.png"},"incompressible":true},{"element":{"name":"arraypartition_obj@2x.png"},"incompressible":true},{"element":{"name":"brkp_grp.png"},"incompressible":true},{"element":{"name":"brkp_grp@2x.png"},"incompressible":true},{"element":{"name":"brkp_grp_disabled.png"},"incompressible":true},{"element":{"name":"brkp_grp_disabled@2x.png"},"incompressible":true},{"element":{"name":"brkp_obj.png"},"incompressible":true},{"element":{"name":"brkp_obj@2x.png"},"incompressible":true},{"element":{"name":"brkp_type.png"},"incompressible":true},{"element":{"name":"brkp_type@2x.png"},"incompressible":true},{"element":{"name":"brkpd_obj.png"},"incompressible":true},{"element":{"name":"brkpd_obj@2x.png"},"incompressible":true},{"element":{"name":"check.png"},"incompressible":true},{"element":{"name":"check@2x.png"},"incompressible":true},{"element":{"name":"common_tab.png"},"incompressible":true},{"element":{"name":"common_tab@2x.png"},"incompressible":true},{"element":{"name":"debugt_obj.png"},"incompressible":true},{"element":{"name":"debugt_obj@2x.png"},"incompressible":true},{"element":{"name":"debugts_obj.png"},"incompressible":true},{"element":{"name":"debugts_obj@2x.png"},"incompressible":true},{"element":{"name":"debugtt_obj.png"},"incompressible":true},{"element":{"name":"debugtt_obj@2x.png"},"incompressible":true},{"element":{"name":"environment_obj.png"},"incompressible":true},{"element":{"name":"environment_obj@2x.png"},"incompressible":true},{"element":{"name":"envvar_obj.png"},"incompressible":true},{"element":{"name":"envvar_obj@2x.png"},"incompressible":true},{"element":{"name":"export_config_obj.png"},"incompressible":true},{"element":{"name":"export_config_obj@2x.png"},"incompressible":true},{"element":{"name":"expression_obj.png"},"incompressible":true},{"element":{"name":"expression_obj@2x.png"},"incompressible":true},{"element":{"name":"file_obj.png"},"incompressible":true},{"element":{"name":"file_obj@2x.png"},"incompressible":true},{"element":{"name":"fldr_obj.png"},"incompressible":true},{"element":{"name":"fldr_obj@2x.png"},"incompressible":true},{"element":{"name":"genericreggroup_obj.png"},"incompressible":true},{"element":{"name":"genericreggroup_obj@2x.png"},"incompressible":true},{"element":{"name":"genericregister_obj.png"},"incompressible":true},{"element":{"name":"genericregister_obj@2x.png"},"incompressible":true},{"element":{"name":"genericvariable_obj.png"},"incompressible":true},{"element":{"name":"genericvariable_obj@2x.png"},"incompressible":true},{"element":{"name":"import_config_obj.png"},"incompressible":true},{"element":{"name":"import_config_obj@2x.png"},"incompressible":true},{"element":{"name":"inst_ptr.png"},"incompressible":true},{"element":{"name":"inst_ptr@2x.png"},"incompressible":true},{"element":{"name":"inst_ptr_top.png"},"incompressible":true},{"element":{"name":"inst_ptr_top@2x.png"},"incompressible":true},{"element":{"name":"jar_obj.png"},"incompressible":true},{"element":{"name":"jar_obj@2x.png"},"incompressible":true},{"element":{"name":"ldebug_obj.png"},"incompressible":true},{"element":{"name":"ldebug_obj@2x.png"},"incompressible":true},{"element":{"name":"lgroup_obj.png"},"incompressible":true},{"element":{"name":"lgroup_obj@2x.png"},"incompressible":true},{"element":{"name":"lrun_obj.png"},"incompressible":true},{"element":{"name":"lrun_obj@2x.png"},"incompressible":true},{"element":{"name":"memory_obj.png"},"incompressible":true},{"element":{"name":"memory_obj@2x.png"},"incompressible":true},{"element":{"name":"memorychanged_obj.png"},"incompressible":true},{"element":{"name":"memorychanged_obj@2x.png"},"incompressible":true},{"element":{"name":"osprc_obj.png"},"incompressible":true},{"element":{"name":"osprc_obj@2x.png"},"incompressible":true},{"element":{"name":"osprct_obj.png"},"incompressible":true},{"element":{"name":"osprct_obj@2x.png"},"incompressible":true},{"element":{"name":"persp_tab.png"},"incompressible":true},{"element":{"name":"persp_tab@2x.png"},"incompressible":true},{"element":{"name":"prj_obj.png"},"incompressible":true},{"element":{"name":"prj_obj@2x.png"},"incompressible":true},{"element":{"name":"proto_tab.png"},"incompressible":true},{"element":{"name":"proto_tab@2x.png"},"incompressible":true},{"element":{"name":"read_obj.png"},"incompressible":true},{"element":{"name":"read_obj@2x.png"},"incompressible":true},{"element":{"name":"read_obj_disabled.png"},"incompressible":true},{"element":{"name":"read_obj_disabled@2x.png"},"incompressible":true},{"element":{"name":"readwrite_obj.png"},"incompressible":true},{"element":{"name":"readwrite_obj@2x.png"},"incompressible":true},{"element":{"name":"readwrite_obj_disabled.png"},"incompressible":true},{"element":{"name":"readwrite_obj_disabled@2x.png"},"incompressible":true},{"element":{"name":"refresh_tab.png"},"incompressible":true},{"element":{"name":"refresh_tab@2x.png"},"incompressible":true},{"element":{"name":"rundebug.png"},"incompressible":true},{"element":{"name":"rundebug@2x.png"},"incompressible":true},{"element":{"name":"stckframe_obj.gif"},"incompressible":true},{"element":{"name":"stckframe_obj.png"},"incompressible":true},{"element":{"name":"stckframe_obj@2x.png"},"incompressible":true},{"element":{"name":"stckframe_running_obj.png"},"incompressible":true},{"element":{"name":"stckframe_running_obj@2x.png"},"incompressible":true},{"element":{"name":"terminatedlaunch_obj.png"},"incompressible":true},{"element":{"name":"terminatedlaunch_obj@2x.png"},"incompressible":true},{"element":{"name":"thread_obj.png"},"incompressible":true},{"element":{"name":"thread_obj@2x.png"},"incompressible":true},{"element":{"name":"threads_obj.png"},"incompressible":true},{"element":{"name":"threads_obj@2x.png"},"incompressible":true},{"element":{"name":"threadt_obj.png"},"incompressible":true},{"element":{"name":"threadt_obj@2x.png"},"incompressible":true},{"element":{"name":"uncheck.png"},"incompressible":true},{"element":{"name":"uncheck@2x.png"},"incompressible":true},{"element":{"name":"workset.png"},"incompressible":true},{"element":{"name":"workset@2x.png"},"incompressible":true},{"element":{"name":"write_obj.png"},"incompressible":true},{"element":{"name":"write_obj@2x.png"},"incompressible":true},{"element":{"name":"write_obj_disabled.png"},"incompressible":true},{"element":{"name":"write_obj_disabled@2x.png"},"incompressible":true}]},{"element":{"name":"ovr16"},"children":[{"element":{"name":"error.png"},"incompressible":true},{"element":{"name":"error@2x.png"},"incompressible":true},{"element":{"name":"prototype.png"},"incompressible":true},{"element":{"name":"prototype@2x.png"},"incompressible":true},{"element":{"name":"skip_breakpoint_ov.png"},"incompressible":true},{"element":{"name":"skip_breakpoint_ov@2x.png"},"incompressible":true},{"element":{"name":"stcksync_ov.png"},"incompressible":true},{"element":{"name":"stcksync_ov@2x.png"},"incompressible":true},{"element":{"name":"transparent.png"},"incompressible":true},{"element":{"name":"transparent@2x.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr_ov.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr_ov@2x.png"},"incompressible":true}]},{"element":{"name":"wizban"},"children":[{"element":{"name":"adddir_wiz.png"},"incompressible":true},{"element":{"name":"addsrcloc_wiz.png"},"incompressible":true},{"element":{"name":"debug_wiz.png"},"incompressible":true},{"element":{"name":"editdir_wiz.png"},"incompressible":true},{"element":{"name":"edtsrclkup_wiz.png"},"incompressible":true},{"element":{"name":"export_brkpts_wizban.png"},"incompressible":true},{"element":{"name":"export_config_wizban.png"},"incompressible":true},{"element":{"name":"import_brkpts_wizban.png"},"incompressible":true},{"element":{"name":"import_config_wizban.png"},"incompressible":true},{"element":{"name":"profile_wiz.png"},"incompressible":true},{"element":{"name":"run_wiz.png"},"incompressible":true}]}]}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"schema"},"children":[{"element":{"name":"breakpointOrganizers.exsd"},"incompressible":true},{"element":{"name":"consoleColorProviders.exsd"},"incompressible":true},{"element":{"name":"consoleLineTrackers.exsd"},"incompressible":true},{"element":{"name":"contextViewBindings.exsd"},"incompressible":true},{"element":{"name":"debugModelContextBindings.exsd"},"incompressible":true},{"element":{"name":"debugModelPresentations.exsd"},"incompressible":true},{"element":{"name":"detailPaneFactories.exsd"},"incompressible":true},{"element":{"name":"launchConfigurationTabGroups.exsd"},"incompressible":true},{"element":{"name":"launchConfigurationTabs.exsd"},"incompressible":true},{"element":{"name":"launchConfigurationTypeImages.exsd"},"incompressible":true},{"element":{"name":"launchGroups.exsd"},"incompressible":true},{"element":{"name":"launchShortcuts.exsd"},"incompressible":true},{"element":{"name":"memoryRenderings.exsd"},"incompressible":true},{"element":{"name":"sourceContainerPresentations.exsd"},"incompressible":true},{"element":{"name":"stringVariablePresentations.exsd"},"incompressible":true},{"element":{"name":"toggleBreakpointsTargetFactories.exsd"},"incompressible":true},{"element":{"name":"variableValueEditors.exsd"},"incompressible":true}]},{"element":{"name":"scripts"},"children":[{"element":{"name":"exportplugin.xml"},"incompressible":true}]},{"element":{"name":"ui"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"ui"},"children":[{"element":{"name":"AbstractDebugCheckboxSelectionDialog.java"},"incompressible":true},{"element":{"name":"AbstractDebugListSelectionDialog.java"},"incompressible":true},{"element":{"name":"AbstractDebugSelectionDialog.java"},"incompressible":true},{"element":{"name":"BreakpointImageProvider.java"},"incompressible":true},{"element":{"name":"BuildBeforeLaunchStatusHandler.java"},"incompressible":true},{"element":{"name":"ColorManager.java"},"incompressible":true},{"element":{"name":"CompositeDebugImageDescriptor.java"},"incompressible":true},{"element":{"name":"DebugModelPropertyTester.java"},"incompressible":true},{"element":{"name":"DebugPerspectiveFactory.java"},"incompressible":true},{"element":{"name":"DebugPluginImages.java"},"incompressible":true},{"element":{"name":"DebugUIAdapterFactory.java"},"incompressible":true},{"element":{"name":"DebugUIMessages.java"},"incompressible":true},{"element":{"name":"DebugUIMessages.properties"},"incompressible":true},{"element":{"name":"DebugUIPlugin.java"},"incompressible":true},{"element":{"name":"DebugUIPreferenceInitializer.java"},"incompressible":true},{"element":{"name":"DefaultLabelProvider.java"},"incompressible":true},{"element":{"name":"DelegatingModelPresentation.java"},"incompressible":true},{"element":{"name":"DynamicInstructionPointerAnnotation.java"},"incompressible":true},{"element":{"name":"IDebugHelpContextIds.java"},"incompressible":true},{"element":{"name":"IInternalDebugUIConstants.java"},"incompressible":true},{"element":{"name":"ILaunchHistoryChangedListener.java"},"incompressible":true},{"element":{"name":"ILaunchLabelChangedListener.java"},"incompressible":true},{"element":{"name":"ImageDescriptorRegistry.java"},"incompressible":true},{"element":{"name":"InstructionPointerAnnotation.java"},"incompressible":true},{"element":{"name":"InstructionPointerContext.java"},"incompressible":true},{"element":{"name":"InstructionPointerImageProvider.java"},"incompressible":true},{"element":{"name":"InstructionPointerManager.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTabExtension.java"},"incompressible":true},{"element":{"name":"LazyModelPresentation.java"},"incompressible":true},{"element":{"name":"MultipleInputDialog.java"},"incompressible":true},{"element":{"name":"Pair.java"},"incompressible":true},{"element":{"name":"ResourceExtender.java"},"incompressible":true},{"element":{"name":"SWTFactory.java"},"incompressible":true},{"element":{"name":"TerminateToggleValue.java"},"incompressible":true},{"element":{"name":"TextGetSetEditingSupport.java"},"incompressible":true},{"element":{"name":"VariableValueEditorManager.java"},"incompressible":true},{"element":{"name":"VariablesViewModelPresentation.java"},"incompressible":true},{"element":{"name":"WorkingDirectoryStatusHandler.java"},"incompressible":true},{"element":{"name":"actions"},"children":[{"element":{"name":"AbstractDebugActionDelegate.java"},"incompressible":true},{"element":{"name":"AbstractRemoveAllActionDelegate.java"},"incompressible":true},{"element":{"name":"AbstractSelectionActionDelegate.java"},"incompressible":true},{"element":{"name":"ActionMessages.java"},"incompressible":true},{"element":{"name":"ActionMessages.properties"},"incompressible":true},{"element":{"name":"AddToFavoritesAction.java"},"incompressible":true},{"element":{"name":"CollapseAllAction.java"},"incompressible":true},{"element":{"name":"ConfigureColumnsAction.java"},"incompressible":true},{"element":{"name":"DebugAsAction.java"},"incompressible":true},{"element":{"name":"DebugContextualLaunchAction.java"},"incompressible":true},{"element":{"name":"DebugHistoryMenuAction.java"},"incompressible":true},{"element":{"name":"DebugLastAction.java"},"incompressible":true},{"element":{"name":"DebugToolbarAction.java"},"incompressible":true},{"element":{"name":"EditLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"ExecutionAction.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"LaunchShortcutAction.java"},"incompressible":true},{"element":{"name":"LaunchablePropertyTester.java"},"incompressible":true},{"element":{"name":"OpenDebugConfigurations.java"},"incompressible":true},{"element":{"name":"OpenProfileConfigurations.java"},"incompressible":true},{"element":{"name":"OpenRunConfigurations.java"},"incompressible":true},{"element":{"name":"ProfileAsAction.java"},"incompressible":true},{"element":{"name":"ProfileContextualLaunchAction.java"},"incompressible":true},{"element":{"name":"ProfileHistoryMenuAction.java"},"incompressible":true},{"element":{"name":"ProfileLastAction.java"},"incompressible":true},{"element":{"name":"ProfileToolbarAction.java"},"incompressible":true},{"element":{"name":"RelaunchActionDelegate.java"},"incompressible":true},{"element":{"name":"RelaunchLastAction.java"},"incompressible":true},{"element":{"name":"RemoveAllTerminatedAction.java"},"incompressible":true},{"element":{"name":"RetargetAction.java"},"incompressible":true},{"element":{"name":"RetargetRunToLineAction.java"},"incompressible":true},{"element":{"name":"RunAsAction.java"},"incompressible":true},{"element":{"name":"RunContextualLaunchAction.java"},"incompressible":true},{"element":{"name":"RunHistoryMenuAction.java"},"incompressible":true},{"element":{"name":"RunLastAction.java"},"incompressible":true},{"element":{"name":"RunToolbarAction.java"},"incompressible":true},{"element":{"name":"SelectAllAction.java"},"incompressible":true},{"element":{"name":"StatusInfo.java"},"incompressible":true},{"element":{"name":"ToggleBreakpointsTargetManager.java"},"incompressible":true},{"element":{"name":"ToggleFilterAction.java"},"incompressible":true},{"element":{"name":"ViewManagementAction.java"},"incompressible":true},{"element":{"name":"breakpointGroups"},"children":[{"element":{"name":"AbstractBreakpointsViewAction.java"},"incompressible":true},{"element":{"name":"AdvancedGroupBreakpointsByAction.java"},"incompressible":true},{"element":{"name":"BreakpointGroupMessages.java"},"incompressible":true},{"element":{"name":"BreakpointGroupMessages.properties"},"incompressible":true},{"element":{"name":"BreakpointSelectionAction.java"},"incompressible":true},{"element":{"name":"BreakpointWorkingSetAction.java"},"incompressible":true},{"element":{"name":"ClearDefaultBreakpointGroupAction.java"},"incompressible":true},{"element":{"name":"CopyBreakpointsActionDelegate.java"},"incompressible":true},{"element":{"name":"EditBreakpointGroupAction.java"},"incompressible":true},{"element":{"name":"GroupBreakpointsAction.java"},"incompressible":true},{"element":{"name":"GroupBreakpointsByAction.java"},"incompressible":true},{"element":{"name":"GroupBreakpointsByDialog.java"},"incompressible":true},{"element":{"name":"PasteBreakpointsAction.java"},"incompressible":true},{"element":{"name":"RemoveFromWorkingSetAction.java"},"incompressible":true},{"element":{"name":"SelectBreakpointWorkingsetDialog.java"},"incompressible":true},{"element":{"name":"SetDefaultBreakpointGroupAction.java"},"incompressible":true},{"element":{"name":"ToggleDefaultGroupAction.java"},"incompressible":true},{"element":{"name":"WorkingSetsAction.java"},"incompressible":true}]},{"element":{"name":"breakpointSortBy"},"children":[{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"Messages.properties"},"incompressible":true},{"element":{"name":"SortBreakpointsAction.java"},"incompressible":true},{"element":{"name":"SortBreakpointsByAction.java"},"incompressible":true}]},{"element":{"name":"breakpoints"},"children":[{"element":{"name":"AccessWatchpointToggleAction.java"},"incompressible":true},{"element":{"name":"BreakpointsCollapseAllAction.java"},"incompressible":true},{"element":{"name":"BreakpointsExpandAllAction.java"},"incompressible":true},{"element":{"name":"DeleteWorkingsetsMessageDialog.java"},"incompressible":true},{"element":{"name":"DisableBreakpointsAction.java"},"incompressible":true},{"element":{"name":"EnableBreakpointsAction.java"},"incompressible":true},{"element":{"name":"LinkBreakpointsWithDebugViewAction.java"},"incompressible":true},{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"Messages.properties"},"incompressible":true},{"element":{"name":"ModificationWatchpointToggleAction.java"},"incompressible":true},{"element":{"name":"ModifyWatchpointAction.java"},"incompressible":true},{"element":{"name":"OpenBreakpointMarkerAction.java"},"incompressible":true},{"element":{"name":"RemoveAllBreakpointsAction.java"},"incompressible":true},{"element":{"name":"RemoveAllTriggerPointsAction.java"},"incompressible":true},{"element":{"name":"RemoveBreakpointAction.java"},"incompressible":true},{"element":{"name":"RetargetBreakpointAction.java"},"incompressible":true},{"element":{"name":"RetargetMethodBreakpointAction.java"},"incompressible":true},{"element":{"name":"RetargetToggleBreakpointAction.java"},"incompressible":true},{"element":{"name":"RetargetToggleLineBreakpointAction.java"},"incompressible":true},{"element":{"name":"RetargetWatchpointAction.java"},"incompressible":true},{"element":{"name":"RulerEnableDisableBreakpointAction.java"},"incompressible":true},{"element":{"name":"SelectAllBreakpointsAction.java"},"incompressible":true},{"element":{"name":"ShowSupportedBreakpointsAction.java"},"incompressible":true},{"element":{"name":"ShowTargetBreakpointsAction.java"},"incompressible":true},{"element":{"name":"SkipAllBreakpointsAction.java"},"incompressible":true},{"element":{"name":"ToggleBreakpointObjectActionDelegate.java"},"incompressible":true}]},{"element":{"name":"expressions"},"children":[{"element":{"name":"AddWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"ConvertToWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"CopyExpressionsToClipboardActionDelegate.java"},"incompressible":true},{"element":{"name":"DisableWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"EditWatchExpressinInPlaceAction.java"},"incompressible":true},{"element":{"name":"EditWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"EnableWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"PasteWatchExpressionsAction.java"},"incompressible":true},{"element":{"name":"ReevaluateWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"RemoveAllExpressionsAction.java"},"incompressible":true},{"element":{"name":"RemoveExpressionAction.java"},"incompressible":true},{"element":{"name":"SelectAllExpressionsAction.java"},"incompressible":true},{"element":{"name":"WatchExpressionAction.java"},"incompressible":true},{"element":{"name":"WatchExpressionDialog.java"},"incompressible":true},{"element":{"name":"WatchExpressionFactoryTester.java"},"incompressible":true},{"element":{"name":"WatchHandler.java"},"incompressible":true}]},{"element":{"name":"variables"},"children":[{"element":{"name":"ChangeVariableValueAction.java"},"incompressible":true},{"element":{"name":"ChangeVariableValueInputDialog.java"},"incompressible":true},{"element":{"name":"SelectAllVariablesAction.java"},"incompressible":true},{"element":{"name":"ShowTypesAction.java"},"incompressible":true},{"element":{"name":"ToggleDetailPaneAction.java"},"incompressible":true},{"element":{"name":"details"},"children":[{"element":{"name":"DetailPaneAssignValueAction.java"},"incompressible":true},{"element":{"name":"DetailPaneMaxLengthAction.java"},"incompressible":true},{"element":{"name":"DetailPaneMaxLengthDialog.java"},"incompressible":true},{"element":{"name":"DetailPaneWordWrapAction.java"},"incompressible":true}]}]}]},{"element":{"name":"breakpoints"},"children":[{"element":{"name":"provisional"},"children":[{"element":{"name":"IBreakpointContainer.java"},"incompressible":true},{"element":{"name":"IBreakpointOrganizer.java"},"incompressible":true},{"element":{"name":"IBreakpointUIConstants.java"},"incompressible":true},{"element":{"name":"OtherBreakpointCategory.java"},"incompressible":true}]}]},{"element":{"name":"commands"},"children":[{"element":{"name":"actions"},"children":[{"element":{"name":"AbstractRequestMonitor.java"},"incompressible":true},{"element":{"name":"ActionsUpdater.java"},"incompressible":true},{"element":{"name":"DebugActionHandler.java"},"incompressible":true},{"element":{"name":"DebugCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"DebugCommandService.java"},"incompressible":true},{"element":{"name":"DisconnectCommandAction.java"},"incompressible":true},{"element":{"name":"DisconnectCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"DisconnectCommandHandler.java"},"incompressible":true},{"element":{"name":"DropToFrameCommandAction.java"},"incompressible":true},{"element":{"name":"DropToFrameCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"DropToFrameCommandHandler.java"},"incompressible":true},{"element":{"name":"ExecuteActionRequest.java"},"incompressible":true},{"element":{"name":"ICommandParticipant.java"},"incompressible":true},{"element":{"name":"IEnabledTarget.java"},"incompressible":true},{"element":{"name":"RestartCommandAction.java"},"incompressible":true},{"element":{"name":"RestartCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"RestartCommandHandler.java"},"incompressible":true},{"element":{"name":"ResumeCommandAction.java"},"incompressible":true},{"element":{"name":"ResumeCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"ResumeCommandHandler.java"},"incompressible":true},{"element":{"name":"StepIntoCommandAction.java"},"incompressible":true},{"element":{"name":"StepIntoCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"StepIntoCommandHandler.java"},"incompressible":true},{"element":{"name":"StepOverCommandAction.java"},"incompressible":true},{"element":{"name":"StepOverCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"StepOverCommandHandler.java"},"incompressible":true},{"element":{"name":"StepReturnCommandAction.java"},"incompressible":true},{"element":{"name":"StepReturnCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"StepReturnCommandHandler.java"},"incompressible":true},{"element":{"name":"SuspendCommandAction.java"},"incompressible":true},{"element":{"name":"SuspendCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"SuspendCommandHandler.java"},"incompressible":true},{"element":{"name":"TerminateAllAction.java"},"incompressible":true},{"element":{"name":"TerminateAllActionDelegate.java"},"incompressible":true},{"element":{"name":"TerminateAndRelaunchAction.java"},"incompressible":true},{"element":{"name":"TerminateAndRelaunchHandler.java"},"incompressible":true},{"element":{"name":"TerminateAndRemoveAction.java"},"incompressible":true},{"element":{"name":"TerminateCommandAction.java"},"incompressible":true},{"element":{"name":"TerminateCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"TerminateCommandHandler.java"},"incompressible":true},{"element":{"name":"ToggleStepFiltersAction.java"},"incompressible":true},{"element":{"name":"ToggleStepFiltersCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"ToggleStepFiltersCommandHandler.java"},"incompressible":true},{"element":{"name":"UpdateActionsRequest.java"},"incompressible":true},{"element":{"name":"UpdateHandlerRequest.java"},"incompressible":true}]}]},{"element":{"name":"contextlaunching"},"children":[{"element":{"name":"ContextMessages.java"},"incompressible":true},{"element":{"name":"ContextMessages.properties"},"incompressible":true},{"element":{"name":"ContextRunner.java"},"incompressible":true},{"element":{"name":"LaunchingResourceManager.java"},"incompressible":true}]},{"element":{"name":"contexts"},"children":[{"element":{"name":"DebugContextManager.java"},"incompressible":true},{"element":{"name":"DebugContextSourceProvider.java"},"incompressible":true},{"element":{"name":"DebugModelContextBindingManager.java"},"incompressible":true},{"element":{"name":"DebugWindowContextService.java"},"incompressible":true},{"element":{"name":"LaunchSuspendTrigger.java"},"incompressible":true},{"element":{"name":"SuspendTriggerAdapterFactory.java"},"incompressible":true}]},{"element":{"name":"elements"},"children":[{"element":{"name":"adapters"},"children":[{"element":{"name":"AsynchronousDebugLabelAdapter.java"},"incompressible":true},{"element":{"name":"DefaultBreakpointsViewInput.java"},"incompressible":true},{"element":{"name":"DefaultVariableCellModifier.java"},"incompressible":true},{"element":{"name":"DefaultViewerInputProvider.java"},"incompressible":true},{"element":{"name":"MemoryBlockContentAdapter.java"},"incompressible":true},{"element":{"name":"MemoryBlockLabelAdapter.java"},"incompressible":true},{"element":{"name":"MemoryRetrievalContentAdapter.java"},"incompressible":true},{"element":{"name":"MemorySegmentLabelAdapter.java"},"incompressible":true},{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"Messages.properties"},"incompressible":true},{"element":{"name":"RegisterGroupProxy.java"},"incompressible":true},{"element":{"name":"StackFrameSourceDisplayAdapter.java"},"incompressible":true},{"element":{"name":"StackFrameViewerInputProvider.java"},"incompressible":true},{"element":{"name":"VariableColumnFactoryAdapter.java"},"incompressible":true},{"element":{"name":"VariableColumnPresentation.java"},"incompressible":true},{"element":{"name":"WatchExpressionCellModifier.java"},"incompressible":true}]}]},{"element":{"name":"groups"},"children":[{"element":{"name":"CommonTabLite.java"},"incompressible":true},{"element":{"name":"GroupCycleHandler.java"},"incompressible":true},{"element":{"name":"GroupElementLaunchedHandler.java"},"incompressible":true},{"element":{"name":"GroupLaunchConfigurationSelectionDialog.java"},"incompressible":true},{"element":{"name":"GroupLaunchConfigurationTabGroup.java"},"incompressible":true},{"element":{"name":"GroupLaunchHandler.java"},"incompressible":true},{"element":{"name":"UnsupportedModeHandler.java"},"incompressible":true}]},{"element":{"name":"hover"},"children":[{"element":{"name":"DebugTextHover.java"},"incompressible":true},{"element":{"name":"ExpressionInformationControlCreator.java"},"incompressible":true}]},{"element":{"name":"importexport"},"children":[{"element":{"name":"breakpoints"},"children":[{"element":{"name":"BreakpointImportExport.properties"},"incompressible":true},{"element":{"name":"BreakpointsPathDecorator.java"},"incompressible":true},{"element":{"name":"EmbeddedBreakpointsViewer.java"},"incompressible":true},{"element":{"name":"ExportBreakpoints.java"},"incompressible":true},{"element":{"name":"IImportExportConstants.java"},"incompressible":true},{"element":{"name":"ImportBreakpoints.java"},"incompressible":true},{"element":{"name":"ImportExportMessages.java"},"incompressible":true},{"element":{"name":"WizardExportBreakpoints.java"},"incompressible":true},{"element":{"name":"WizardExportBreakpointsPage.java"},"incompressible":true},{"element":{"name":"WizardImportBreakpoints.java"},"incompressible":true},{"element":{"name":"WizardImportBreakpointsPage.java"},"incompressible":true},{"element":{"name":"WizardImportBreakpointsSelectionPage.java"},"incompressible":true}]},{"element":{"name":"launchconfigurations"},"children":[{"element":{"name":"ExportLaunchConfigurationsWizard.java"},"incompressible":true},{"element":{"name":"ExportLaunchConfigurationsWizardPage.java"},"incompressible":true},{"element":{"name":"ImportLaunchConfigurationsWizard.java"},"incompressible":true},{"element":{"name":"ImportLaunchConfigurationsWizardPage.java"},"incompressible":true},{"element":{"name":"WizardMessages.java"},"incompressible":true},{"element":{"name":"WizardMessages.properties"},"incompressible":true}]}]},{"element":{"name":"launchConfigurations"},"children":[{"element":{"name":"AbstractLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"ClosedProjectFilter.java"},"incompressible":true},{"element":{"name":"CollapseAllLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"CompileErrorProjectPromptStatusHandler.java"},"incompressible":true},{"element":{"name":"CompileErrorPromptStatusHandler.java"},"incompressible":true},{"element":{"name":"CreateLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"CreateLaunchConfigurationPrototypeAction.java"},"incompressible":true},{"element":{"name":"DebugModePromptStatusHandler.java"},"incompressible":true},{"element":{"name":"DeleteLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"DeletedProjectFilter.java"},"incompressible":true},{"element":{"name":"DuplicateLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"DuplicateLaunchDelegatesStatusHandler.java"},"incompressible":true},{"element":{"name":"EnvironmentVariable.java"},"incompressible":true},{"element":{"name":"ExportLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"FavoritesDialog.java"},"incompressible":true},{"element":{"name":"FilterDropDownMenuCreator.java"},"incompressible":true},{"element":{"name":"FilterLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"LaunchCategoryFilter.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationComparator.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationDialog.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationEditDialog.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationFilteredTree.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationManager.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationPresentationManager.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationPropertiesDialog.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationSelectionDialog.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTabGroupExtension.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTabGroupViewer.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTabGroupWrapper.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTabImageDescriptor.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTreeContentProvider.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTypeContribution.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTypeFilter.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationView.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationViewer.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationsDialog.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationsMessages.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationsMessages.properties"},"incompressible":true},{"element":{"name":"LaunchDelegateContribution.java"},"incompressible":true},{"element":{"name":"LaunchDelegateNotAvailableHandler.java"},"incompressible":true},{"element":{"name":"LaunchGroupExtension.java"},"incompressible":true},{"element":{"name":"LaunchGroupFilter.java"},"incompressible":true},{"element":{"name":"LaunchHistory.java"},"incompressible":true},{"element":{"name":"LaunchShortcutExtension.java"},"incompressible":true},{"element":{"name":"LaunchShortcutSelectionDialog.java"},"incompressible":true},{"element":{"name":"LaunchTabContribution.java"},"incompressible":true},{"element":{"name":"LinkPrototypeAction.java"},"incompressible":true},{"element":{"name":"OrganizeFavoritesAction.java"},"incompressible":true},{"element":{"name":"PerspectiveManager.java"},"incompressible":true},{"element":{"name":"ResetWithPrototypeValuesAction.java"},"incompressible":true},{"element":{"name":"SaveScopeResourcesHandler.java"},"incompressible":true},{"element":{"name":"SelectFavoritesDialog.java"},"incompressible":true},{"element":{"name":"SelectLaunchModesDialog.java"},"incompressible":true},{"element":{"name":"SelectLaunchersDialog.java"},"incompressible":true},{"element":{"name":"ShowCommandLineDialog.java"},"incompressible":true},{"element":{"name":"UnlinkPrototypeAction.java"},"incompressible":true},{"element":{"name":"WorkingSetComparator.java"},"incompressible":true},{"element":{"name":"WorkingSetsFilter.java"},"incompressible":true}]},{"element":{"name":"memory"},"children":[{"element":{"name":"IMemoryBlockConnection.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingUpdater.java"},"incompressible":true},{"element":{"name":"IPersistableDebugElement.java"},"incompressible":true},{"element":{"name":"MemoryRenderingManager.java"},"incompressible":true},{"element":{"name":"MemoryRenderingType.java"},"incompressible":true},{"element":{"name":"RenderingBindings.java"},"incompressible":true},{"element":{"name":"provisional"},"children":[{"element":{"name":"AbstractAsyncTableRendering.java"},"incompressible":true},{"element":{"name":"AbstractAsyncTextRendering.java"},"incompressible":true},{"element":{"name":"MemoryViewPresentationContext.java"},"incompressible":true}]}]},{"element":{"name":"model"},"children":[{"element":{"name":"elements"},"children":[{"element":{"name":"BreakpointContainerLabelProvider.java"},"incompressible":true},{"element":{"name":"BreakpointContainerMementoProvider.java"},"incompressible":true},{"element":{"name":"BreakpointContentProvider.java"},"incompressible":true},{"element":{"name":"BreakpointLabelProvider.java"},"incompressible":true},{"element":{"name":"BreakpointManagerContentProvider.java"},"incompressible":true},{"element":{"name":"BreakpointManagerInputMementoProvider.java"},"incompressible":true},{"element":{"name":"BreakpointMementoProvider.java"},"incompressible":true},{"element":{"name":"DebugElementLabelProvider.java"},"incompressible":true},{"element":{"name":"DebugElementMementoProvider.java"},"incompressible":true},{"element":{"name":"DebugTargetContentProvider.java"},"incompressible":true},{"element":{"name":"ElementContentProvider.java"},"incompressible":true},{"element":{"name":"ElementLabelProvider.java"},"incompressible":true},{"element":{"name":"ElementMementoProvider.java"},"incompressible":true},{"element":{"name":"ExpressionContentProvider.java"},"incompressible":true},{"element":{"name":"ExpressionLabelProvider.java"},"incompressible":true},{"element":{"name":"ExpressionManagerContentProvider.java"},"incompressible":true},{"element":{"name":"ExpressionManagerMementoProvider.java"},"incompressible":true},{"element":{"name":"ExpressionMementoProvider.java"},"incompressible":true},{"element":{"name":"LaunchContentProvider.java"},"incompressible":true},{"element":{"name":"LaunchManagerContentProvider.java"},"incompressible":true},{"element":{"name":"MemoryBlockContentProvider.java"},"incompressible":true},{"element":{"name":"MemoryBlockLabelProvider.java"},"incompressible":true},{"element":{"name":"MemoryRetrievalContentProvider.java"},"incompressible":true},{"element":{"name":"MemoryViewElementMementoProvider.java"},"incompressible":true},{"element":{"name":"ProcessContentProvider.java"},"incompressible":true},{"element":{"name":"RegisterGroupContentProvider.java"},"incompressible":true},{"element":{"name":"RegisterGroupLabelProvider.java"},"incompressible":true},{"element":{"name":"RegisterGroupMementoProvider.java"},"incompressible":true},{"element":{"name":"StackFrameContentProvider.java"},"incompressible":true},{"element":{"name":"StackFrameMementoProvider.java"},"incompressible":true},{"element":{"name":"ThreadContentProvider.java"},"incompressible":true},{"element":{"name":"VariableContentProvider.java"},"incompressible":true},{"element":{"name":"VariableEditor.java"},"incompressible":true},{"element":{"name":"VariableLabelProvider.java"},"incompressible":true},{"element":{"name":"VariableMementoProvider.java"},"incompressible":true},{"element":{"name":"ViewerInputProvider.java"},"incompressible":true},{"element":{"name":"WatchExpressionEditor.java"},"incompressible":true}]}]},{"element":{"name":"preferences"},"children":[{"element":{"name":"BooleanFieldEditor2.java"},"incompressible":true},{"element":{"name":"ConsolePreferencePage.java"},"incompressible":true},{"element":{"name":"DebugPreferencePage.java"},"incompressible":true},{"element":{"name":"DebugPreferencesMessages.java"},"incompressible":true},{"element":{"name":"DebugPreferencesMessages.properties"},"incompressible":true},{"element":{"name":"IDebugPreferenceConstants.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationsPreferencePage.java"},"incompressible":true},{"element":{"name":"LaunchPerspectivePreferencePage.java"},"incompressible":true},{"element":{"name":"LaunchersPreferencePage.java"},"incompressible":true},{"element":{"name":"LaunchingPreferencePage.java"},"incompressible":true},{"element":{"name":"ProcessPropertyPage.java"},"incompressible":true},{"element":{"name":"RunDebugPropertiesPage.java"},"incompressible":true},{"element":{"name":"StringVariablePreferencePage.java"},"incompressible":true},{"element":{"name":"ViewManagementPreferencePage.java"},"incompressible":true}]},{"element":{"name":"quickaccess"},"children":[{"element":{"name":"AbstractLaunchQuickAccessComputer.java"},"incompressible":true},{"element":{"name":"DebugQuickAccessComputer.java"},"incompressible":true},{"element":{"name":"LaunchQuickAccessElement.java"},"incompressible":true},{"element":{"name":"ProfileQuickAccessComputer.java"},"incompressible":true},{"element":{"name":"RunQuickAccessComputer.java"},"incompressible":true}]},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"AddContainerAction.java"},"incompressible":true},{"element":{"name":"AddSourceContainerDialog.java"},"incompressible":true},{"element":{"name":"BasicContainerContentProvider.java"},"incompressible":true},{"element":{"name":"DownAction.java"},"incompressible":true},{"element":{"name":"EditContainerAction.java"},"incompressible":true},{"element":{"name":"EditSourceLookupPathAction.java"},"incompressible":true},{"element":{"name":"LookupSourceAction.java"},"incompressible":true},{"element":{"name":"Prompter.java"},"incompressible":true},{"element":{"name":"RemoveAction.java"},"incompressible":true},{"element":{"name":"ResolveDuplicatesHandler.java"},"incompressible":true},{"element":{"name":"RestoreDefaultAction.java"},"incompressible":true},{"element":{"name":"SourceContainerAction.java"},"incompressible":true},{"element":{"name":"SourceContainerAdapterFactory.java"},"incompressible":true},{"element":{"name":"SourceContainerLabelProvider.java"},"incompressible":true},{"element":{"name":"SourceContainerViewer.java"},"incompressible":true},{"element":{"name":"SourceContainerWorkbenchAdapter.java"},"incompressible":true},{"element":{"name":"SourceElementAdapterFactory.java"},"incompressible":true},{"element":{"name":"SourceElementLabelProvider.java"},"incompressible":true},{"element":{"name":"SourceElementWorkbenchAdapter.java"},"incompressible":true},{"element":{"name":"SourceLookupFacility.java"},"incompressible":true},{"element":{"name":"SourceLookupManager.java"},"incompressible":true},{"element":{"name":"SourceLookupPanel.java"},"incompressible":true},{"element":{"name":"SourceLookupResult.java"},"incompressible":true},{"element":{"name":"SourceLookupService.java"},"incompressible":true},{"element":{"name":"SourceLookupUIMessages.java"},"incompressible":true},{"element":{"name":"SourceLookupUIMessages.properties"},"incompressible":true},{"element":{"name":"SourceLookupUIUtils.java"},"incompressible":true},{"element":{"name":"UpAction.java"},"incompressible":true},{"element":{"name":"WorkingSetSourceContainerType.java"},"incompressible":true},{"element":{"name":"browsers"},"children":[{"element":{"name":"ArchiveFilter.java"},"incompressible":true},{"element":{"name":"ArchiveSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"DirectorySourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"DirectorySourceContainerDialog.java"},"incompressible":true},{"element":{"name":"ExternalArchiveSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"FolderSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"FolderSourceContainerDialog.java"},"incompressible":true},{"element":{"name":"ProjectSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"ProjectSourceContainerDialog.java"},"incompressible":true},{"element":{"name":"WorkingSetSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"WorkspaceSourceContainerBrowser.java"},"incompressible":true}]}]},{"element":{"name":"stringsubstitution"},"children":[{"element":{"name":"FilePrompt.java"},"incompressible":true},{"element":{"name":"FolderPrompt.java"},"incompressible":true},{"element":{"name":"IArgumentSelector.java"},"incompressible":true},{"element":{"name":"PasswordPrompt.java"},"incompressible":true},{"element":{"name":"PromptingResolver.java"},"incompressible":true},{"element":{"name":"ResourceSelector.java"},"incompressible":true},{"element":{"name":"SelectedResourceManager.java"},"incompressible":true},{"element":{"name":"SelectedResourceResolver.java"},"incompressible":true},{"element":{"name":"SelectedTextResolver.java"},"incompressible":true},{"element":{"name":"StringPrompt.java"},"incompressible":true},{"element":{"name":"StringSubstitutionMessages.java"},"incompressible":true},{"element":{"name":"StringSubstitutionMessages.properties"},"incompressible":true},{"element":{"name":"StringVariableLabelProvider.java"},"incompressible":true},{"element":{"name":"StringVariablePresentationManager.java"},"incompressible":true},{"element":{"name":"SystemPropertyArgumentSelector.java"},"incompressible":true}]},{"element":{"name":"viewers"},"children":[{"element":{"name":"AbstractUpdatePolicy.java"},"incompressible":true},{"element":{"name":"AsynchronousModel.java"},"incompressible":true},{"element":{"name":"AsynchronousRequestMonitor.java"},"incompressible":true},{"element":{"name":"AsynchronousSchedulingRuleFactory.java"},"incompressible":true},{"element":{"name":"AsynchronousTableModel.java"},"incompressible":true},{"element":{"name":"AsynchronousTableViewer.java"},"incompressible":true},{"element":{"name":"AsynchronousViewer.java"},"incompressible":true},{"element":{"name":"ChildrenRequestMonitor.java"},"incompressible":true},{"element":{"name":"FindElementDialog.java"},"incompressible":true},{"element":{"name":"ILabelResult.java"},"incompressible":true},{"element":{"name":"LabelRequestMonitor.java"},"incompressible":true},{"element":{"name":"LabelResult.java"},"incompressible":true},{"element":{"name":"ModelNode.java"},"incompressible":true},{"element":{"name":"PartPresentationContext.java"},"incompressible":true},{"element":{"name":"TableAddRequestMonitor.java"},"incompressible":true},{"element":{"name":"TableEditorImpl.java"},"incompressible":true},{"element":{"name":"TableInsertRequestMonitor.java"},"incompressible":true},{"element":{"name":"TableRemoveRequestMonitor.java"},"incompressible":true},{"element":{"name":"TableReplaceRequestMonitor.java"},"incompressible":true},{"element":{"name":"TableUpdatePolicy.java"},"incompressible":true},{"element":{"name":"breadcrumb"},"children":[{"element":{"name":"AbstractBreadcrumb.java"},"incompressible":true},{"element":{"name":"BreadcrumbItem.java"},"incompressible":true},{"element":{"name":"BreadcrumbItemDetails.java"},"incompressible":true},{"element":{"name":"BreadcrumbItemDropDown.java"},"incompressible":true},{"element":{"name":"BreadcrumbMessages.java"},"incompressible":true},{"element":{"name":"BreadcrumbMessages.properties"},"incompressible":true},{"element":{"name":"BreadcrumbViewer.java"},"incompressible":true},{"element":{"name":"IBreadcrumbDropDownSite.java"},"incompressible":true},{"element":{"name":"TreeViewerDropDown.java"},"incompressible":true}]},{"element":{"name":"model"},"children":[{"element":{"name":"ChildrenCountUpdate.java"},"incompressible":true},{"element":{"name":"ChildrenUpdate.java"},"incompressible":true},{"element":{"name":"ElementCompareRequest.java"},"incompressible":true},{"element":{"name":"ElementMementoRequest.java"},"incompressible":true},{"element":{"name":"FilterTransform.java"},"incompressible":true},{"element":{"name":"HasChildrenUpdate.java"},"incompressible":true},{"element":{"name":"IInternalTreeModelViewer.java"},"incompressible":true},{"element":{"name":"ILabelUpdateListener.java"},"incompressible":true},{"element":{"name":"ITreeModelContentProvider.java"},"incompressible":true},{"element":{"name":"ITreeModelLabelProvider.java"},"incompressible":true},{"element":{"name":"ITreeModelViewer.java"},"incompressible":true},{"element":{"name":"InternalTreeModelViewer.java"},"incompressible":true},{"element":{"name":"InternalVirtualTreeModelViewer.java"},"incompressible":true},{"element":{"name":"LabelUpdate.java"},"incompressible":true},{"element":{"name":"MementoUpdate.java"},"incompressible":true},{"element":{"name":"SubTreeModelViewer.java"},"incompressible":true},{"element":{"name":"TimeTriggeredProgressMonitorDialog.java"},"incompressible":true},{"element":{"name":"TreeModelContentProvider.java"},"incompressible":true},{"element":{"name":"TreeModelLabelProvider.java"},"incompressible":true},{"element":{"name":"ViewerAdapterService.java"},"incompressible":true},{"element":{"name":"ViewerInputUpdate.java"},"incompressible":true},{"element":{"name":"ViewerStateTracker.java"},"incompressible":true},{"element":{"name":"ViewerUpdateMonitor.java"},"incompressible":true},{"element":{"name":"VirtualCopyToClipboardActionDelegate.java"},"incompressible":true},{"element":{"name":"VirtualFindAction.java"},"incompressible":true},{"element":{"name":"provisional"},"children":[{"element":{"name":"ICheckUpdate.java"},"incompressible":true},{"element":{"name":"ICheckboxModelProxy.java"},"incompressible":true},{"element":{"name":"IChildrenCountUpdate.java"},"incompressible":true},{"element":{"name":"IChildrenUpdate.java"},"incompressible":true},{"element":{"name":"IColumnPresentation.java"},"incompressible":true},{"element":{"name":"IColumnPresentation2.java"},"incompressible":true},{"element":{"name":"IColumnPresentationFactory.java"},"incompressible":true},{"element":{"name":"IElementCompareRequest.java"},"incompressible":true},{"element":{"name":"IElementContentProvider.java"},"incompressible":true},{"element":{"name":"IElementEditor.java"},"incompressible":true},{"element":{"name":"IElementLabelProvider.java"},"incompressible":true},{"element":{"name":"IElementMementoProvider.java"},"incompressible":true},{"element":{"name":"IElementMementoRequest.java"},"incompressible":true},{"element":{"name":"IHasChildrenUpdate.java"},"incompressible":true},{"element":{"name":"ILabelUpdate.java"},"incompressible":true},{"element":{"name":"IModelChangedListener.java"},"incompressible":true},{"element":{"name":"IModelDelta.java"},"incompressible":true},{"element":{"name":"IModelDeltaVisitor.java"},"incompressible":true},{"element":{"name":"IModelProxy.java"},"incompressible":true},{"element":{"name":"IModelProxy2.java"},"incompressible":true},{"element":{"name":"IModelProxyFactory.java"},"incompressible":true},{"element":{"name":"IModelProxyFactory2.java"},"incompressible":true},{"element":{"name":"IModelSelectionPolicy.java"},"incompressible":true},{"element":{"name":"IModelSelectionPolicyFactory.java"},"incompressible":true},{"element":{"name":"IPresentationContext.java"},"incompressible":true},{"element":{"name":"IStateUpdateListener.java"},"incompressible":true},{"element":{"name":"IStatusMonitor.java"},"incompressible":true},{"element":{"name":"ITreeModelViewer.java"},"incompressible":true},{"element":{"name":"IViewActionProvider.java"},"incompressible":true},{"element":{"name":"IViewerInputProvider.java"},"incompressible":true},{"element":{"name":"IViewerInputRequestor.java"},"incompressible":true},{"element":{"name":"IViewerInputUpdate.java"},"incompressible":true},{"element":{"name":"IViewerUpdate.java"},"incompressible":true},{"element":{"name":"IViewerUpdateListener.java"},"incompressible":true},{"element":{"name":"IVirtualItemListener.java"},"incompressible":true},{"element":{"name":"IVirtualItemValidator.java"},"incompressible":true},{"element":{"name":"ModelDelta.java"},"incompressible":true},{"element":{"name":"PresentationContext.java"},"incompressible":true},{"element":{"name":"TreeModelViewer.java"},"incompressible":true},{"element":{"name":"TreeModelViewerFilter.java"},"incompressible":true},{"element":{"name":"ViewerInputService.java"},"incompressible":true},{"element":{"name":"VirtualItem.java"},"incompressible":true},{"element":{"name":"VirtualTree.java"},"incompressible":true},{"element":{"name":"VirtualTreeModelViewer.java"},"incompressible":true}]}]},{"element":{"name":"provisional"},"children":[{"element":{"name":"AbstractColumnPresentation.java"},"incompressible":true},{"element":{"name":"AbstractModelProxy.java"},"incompressible":true},{"element":{"name":"AsynchronousContentAdapter.java"},"incompressible":true},{"element":{"name":"AsynchronousLabelAdapter.java"},"incompressible":true},{"element":{"name":"IAsynchronousContentAdapter.java"},"incompressible":true},{"element":{"name":"IAsynchronousLabelAdapter.java"},"incompressible":true},{"element":{"name":"IChildrenRequestMonitor.java"},"incompressible":true},{"element":{"name":"IContainerRequestMonitor.java"},"incompressible":true},{"element":{"name":"ILabelRequestMonitor.java"},"incompressible":true}]},{"element":{"name":"update"},"children":[{"element":{"name":"BreakpointContainerProxy.java"},"incompressible":true},{"element":{"name":"BreakpointManagerProxy.java"},"incompressible":true},{"element":{"name":"BreakpointProxy.java"},"incompressible":true},{"element":{"name":"DebugEventHandler.java"},"incompressible":true},{"element":{"name":"DebugTargetEventHandler.java"},"incompressible":true},{"element":{"name":"DebugTargetProxy.java"},"incompressible":true},{"element":{"name":"DefaultExpressionModelProxy.java"},"incompressible":true},{"element":{"name":"DefaultModelProxyFactory.java"},"incompressible":true},{"element":{"name":"DefaultModelSelectionPolicyFactory.java"},"incompressible":true},{"element":{"name":"DefaultSelectionPolicy.java"},"incompressible":true},{"element":{"name":"DefaultVariableViewModelProxy.java"},"incompressible":true},{"element":{"name":"DefaultWatchExpressionModelProxy.java"},"incompressible":true},{"element":{"name":"EventHandlerModelProxy.java"},"incompressible":true},{"element":{"name":"ExpressionEventHandler.java"},"incompressible":true},{"element":{"name":"ExpressionManagerModelProxy.java"},"incompressible":true},{"element":{"name":"LaunchManagerProxy.java"},"incompressible":true},{"element":{"name":"LaunchProxy.java"},"incompressible":true},{"element":{"name":"MemoryBlockProxy.java"},"incompressible":true},{"element":{"name":"MemoryRetrievalProxy.java"},"incompressible":true},{"element":{"name":"ProcessProxy.java"},"incompressible":true},{"element":{"name":"StackFrameEventHandler.java"},"incompressible":true},{"element":{"name":"ThreadEventHandler.java"},"incompressible":true},{"element":{"name":"VariablesViewEventHandler.java"},"incompressible":true}]}]},{"element":{"name":"views"},"children":[{"element":{"name":"DebugModelPresentationContext.java"},"incompressible":true},{"element":{"name":"DebugUIViewsMessages.java"},"incompressible":true},{"element":{"name":"DebugUIViewsMessages.properties"},"incompressible":true},{"element":{"name":"IDebugExceptionHandler.java"},"incompressible":true},{"element":{"name":"ViewContextManager.java"},"incompressible":true},{"element":{"name":"ViewContextService.java"},"incompressible":true},{"element":{"name":"breakpoints"},"children":[{"element":{"name":"BreakpointContainer.java"},"incompressible":true},{"element":{"name":"BreakpointContainerWorkbenchAdapter.java"},"incompressible":true},{"element":{"name":"BreakpointFactory.java"},"incompressible":true},{"element":{"name":"BreakpointOrganizerExtension.java"},"incompressible":true},{"element":{"name":"BreakpointOrganizerManager.java"},"incompressible":true},{"element":{"name":"BreakpointPersistableElementAdapter.java"},"incompressible":true},{"element":{"name":"BreakpointSetOrganizer.java"},"incompressible":true},{"element":{"name":"BreakpointTypeOrganizer.java"},"incompressible":true},{"element":{"name":"BreakpointWorkingSetCache.java"},"incompressible":true},{"element":{"name":"BreakpointWorkingSetElementAdapter.java"},"incompressible":true},{"element":{"name":"BreakpointWorkingSetPage.java"},"incompressible":true},{"element":{"name":"BreakpointsComparator.java"},"incompressible":true},{"element":{"name":"BreakpointsContentProvider.java"},"incompressible":true},{"element":{"name":"BreakpointsDragAdapter.java"},"incompressible":true},{"element":{"name":"BreakpointsDropAdapter.java"},"incompressible":true},{"element":{"name":"BreakpointsLabelProvider.java"},"incompressible":true},{"element":{"name":"BreakpointsView.java"},"incompressible":true},{"element":{"name":"BreakpointsViewer.java"},"incompressible":true},{"element":{"name":"ElementComparator.java"},"incompressible":true},{"element":{"name":"FileBreakpointOrganizer.java"},"incompressible":true},{"element":{"name":"ProjectBreakpointOrganizer.java"},"incompressible":true},{"element":{"name":"WorkingSetBreakpointOrganizer.java"},"incompressible":true},{"element":{"name":"WorkingSetCategory.java"},"incompressible":true}]},{"element":{"name":"console"},"children":[{"element":{"name":"ConsoleLineNotifier.java"},"incompressible":true},{"element":{"name":"ConsoleMessages.java"},"incompressible":true},{"element":{"name":"ConsoleMessages.properties"},"incompressible":true},{"element":{"name":"ConsoleRemoveAllTerminatedAction.java"},"incompressible":true},{"element":{"name":"ConsoleRemoveLaunchAction.java"},"incompressible":true},{"element":{"name":"ConsoleShowPreferencesAction.java"},"incompressible":true},{"element":{"name":"ConsoleTerminateAction.java"},"incompressible":true},{"element":{"name":"ProcessConsole.java"},"incompressible":true},{"element":{"name":"ProcessConsoleManager.java"},"incompressible":true},{"element":{"name":"ProcessConsolePageParticipant.java"},"incompressible":true},{"element":{"name":"ProcessTypePropertyTester.java"},"incompressible":true},{"element":{"name":"ShowStandardErrorAction.java"},"incompressible":true},{"element":{"name":"ShowStandardOutAction.java"},"incompressible":true},{"element":{"name":"ShowWhenContentChangesAction.java"},"incompressible":true}]},{"element":{"name":"expression"},"children":[{"element":{"name":"ExpressionDropAdapter.java"},"incompressible":true},{"element":{"name":"ExpressionView.java"},"incompressible":true}]},{"element":{"name":"launch"},"children":[{"element":{"name":"BreadcrumbDropDownAutoExpandAction.java"},"incompressible":true},{"element":{"name":"BreadcrumbWorkbenchPart.java"},"incompressible":true},{"element":{"name":"DebugElementAdapterFactory.java"},"incompressible":true},{"element":{"name":"DebugElementHelper.java"},"incompressible":true},{"element":{"name":"DebugToolBarAction.java"},"incompressible":true},{"element":{"name":"DebugViewModeAction.java"},"incompressible":true},{"element":{"name":"Decoration.java"},"incompressible":true},{"element":{"name":"DecorationManager.java"},"incompressible":true},{"element":{"name":"ImageImageDescriptor.java"},"incompressible":true},{"element":{"name":"LaunchView.java"},"incompressible":true},{"element":{"name":"LaunchViewBreadcrumb.java"},"incompressible":true},{"element":{"name":"LaunchViewCopyToClipboardActionDelegate.java"},"incompressible":true},{"element":{"name":"LaunchViewMessages.java"},"incompressible":true},{"element":{"name":"LaunchViewMessages.properties"},"incompressible":true},{"element":{"name":"SourceNotFoundEditor.java"},"incompressible":true},{"element":{"name":"SourceNotFoundEditorInput.java"},"incompressible":true},{"element":{"name":"StandardDecoration.java"},"incompressible":true},{"element":{"name":"TerminateAndRemoveHandler.java"},"incompressible":true}]},{"element":{"name":"memory"},"children":[{"element":{"name":"AbstractMemoryViewPane.java"},"incompressible":true},{"element":{"name":"AddMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"AddMemoryRenderingAction.java"},"incompressible":true},{"element":{"name":"AddMemoryRenderingContextAction.java"},"incompressible":true},{"element":{"name":"AddMemoryRenderingDialog.java"},"incompressible":true},{"element":{"name":"CodePagesPreferencePage.java"},"incompressible":true},{"element":{"name":"IMemoryView.java"},"incompressible":true},{"element":{"name":"IMemoryViewPane.java"},"incompressible":true},{"element":{"name":"IMemoryViewTab.java"},"incompressible":true},{"element":{"name":"LinkRenderingPanesAction.java"},"incompressible":true},{"element":{"name":"MemoryBlocksTreeViewPane.java"},"incompressible":true},{"element":{"name":"MemoryView.java"},"incompressible":true},{"element":{"name":"MemoryViewIdRegistry.java"},"incompressible":true},{"element":{"name":"MemoryViewPrefAction.java"},"incompressible":true},{"element":{"name":"MemoryViewSynchronizationService.java"},"incompressible":true},{"element":{"name":"MemoryViewTab.java"},"incompressible":true},{"element":{"name":"MemoryViewTreeModelContentProvider.java"},"incompressible":true},{"element":{"name":"MemoryViewTreeViewer.java"},"incompressible":true},{"element":{"name":"MemoryViewUtil.java"},"incompressible":true},{"element":{"name":"MonitorMemoryBlockDialog.java"},"incompressible":true},{"element":{"name":"NewMemoryViewAction.java"},"incompressible":true},{"element":{"name":"PinMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"PropertyChangeNotifier.java"},"incompressible":true},{"element":{"name":"RemoveMemoryRenderingAction.java"},"incompressible":true},{"element":{"name":"RemoveRenderingContextAction.java"},"incompressible":true},{"element":{"name":"RenderingViewPane.java"},"incompressible":true},{"element":{"name":"ResetMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"ResetMemoryBlockPreferencePage.java"},"incompressible":true},{"element":{"name":"RetargetAddMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"SetPaddedStringPreferencePage.java"},"incompressible":true},{"element":{"name":"SwitchMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"SynchronizeInfo.java"},"incompressible":true},{"element":{"name":"ToggleMemoryMonitorsAction.java"},"incompressible":true},{"element":{"name":"ToggleSplitPaneAction.java"},"incompressible":true},{"element":{"name":"ToggleViewPaneAction.java"},"incompressible":true},{"element":{"name":"ViewPaneOrientationAction.java"},"incompressible":true},{"element":{"name":"ViewPaneRenderingMgr.java"},"incompressible":true},{"element":{"name":"ViewPaneSelectionProvider.java"},"incompressible":true},{"element":{"name":"ViewTabEnablementManager.java"},"incompressible":true},{"element":{"name":"renderings"},"children":[{"element":{"name":"ASCIIRendering.java"},"incompressible":true},{"element":{"name":"ASCIIRenderingTypeDelegate.java"},"incompressible":true},{"element":{"name":"AbstractBaseTableRendering.java"},"incompressible":true},{"element":{"name":"AbstractIntegerRendering.java"},"incompressible":true},{"element":{"name":"AbstractTableRenderingLabelProvider.java"},"incompressible":true},{"element":{"name":"AbstractVirtualContentTableModel.java"},"incompressible":true},{"element":{"name":"AsyncCopyTableRenderingAction.java"},"incompressible":true},{"element":{"name":"AsyncPrintTableRenderingAction.java"},"incompressible":true},{"element":{"name":"AsyncTableRenderingCellModifier.java"},"incompressible":true},{"element":{"name":"AsyncTableRenderingUpdatePolicy.java"},"incompressible":true},{"element":{"name":"AsyncTableRenderingViewer.java"},"incompressible":true},{"element":{"name":"AsyncVirtualContentTableViewer.java"},"incompressible":true},{"element":{"name":"BasicDebugViewContentProvider.java"},"incompressible":true},{"element":{"name":"BigEndianAction.java"},"incompressible":true},{"element":{"name":"CopyTableRenderingToClipboardAction.java"},"incompressible":true},{"element":{"name":"CreateRendering.java"},"incompressible":true},{"element":{"name":"DefaultEndianessAction.java"},"incompressible":true},{"element":{"name":"ErrorRendering.java"},"incompressible":true},{"element":{"name":"FormatTableRenderingAction.java"},"incompressible":true},{"element":{"name":"FormatTableRenderingDialog.java"},"incompressible":true},{"element":{"name":"GoToAddressAction.java"},"incompressible":true},{"element":{"name":"GoToAddressComposite.java"},"incompressible":true},{"element":{"name":"GoToAddressDialog.java"},"incompressible":true},{"element":{"name":"HexIntegerRendering.java"},"incompressible":true},{"element":{"name":"HexIntegerRenderingDelegate.java"},"incompressible":true},{"element":{"name":"HexRendering.java"},"incompressible":true},{"element":{"name":"HexRenderingTypeDelegate.java"},"incompressible":true},{"element":{"name":"IContentChangeComputer.java"},"incompressible":true},{"element":{"name":"IPresentationErrorListener.java"},"incompressible":true},{"element":{"name":"IVirtualContentListener.java"},"incompressible":true},{"element":{"name":"LittleEndianAction.java"},"incompressible":true},{"element":{"name":"MemorySegment.java"},"incompressible":true},{"element":{"name":"PendingPropertyChanges.java"},"incompressible":true},{"element":{"name":"PrintTableRenderingAction.java"},"incompressible":true},{"element":{"name":"ReformatAction.java"},"incompressible":true},{"element":{"name":"RenderingsUtil.java"},"incompressible":true},{"element":{"name":"ResetToBaseAddressAction.java"},"incompressible":true},{"element":{"name":"SignedIntegerRendering.java"},"incompressible":true},{"element":{"name":"SignedIntegerRenderingTypeDelegate.java"},"incompressible":true},{"element":{"name":"TableRenderingCellModifier.java"},"incompressible":true},{"element":{"name":"TableRenderingContentDescriptor.java"},"incompressible":true},{"element":{"name":"TableRenderingContentInput.java"},"incompressible":true},{"element":{"name":"TableRenderingContentProvider.java"},"incompressible":true},{"element":{"name":"TableRenderingLabelProvider.java"},"incompressible":true},{"element":{"name":"TableRenderingLabelProviderEx.java"},"incompressible":true},{"element":{"name":"TableRenderingLine.java"},"incompressible":true},{"element":{"name":"TableRenderingModel.java"},"incompressible":true},{"element":{"name":"TableRenderingPrefAction.java"},"incompressible":true},{"element":{"name":"TableRenderingPreferencePage.java"},"incompressible":true},{"element":{"name":"TableRenderingPropertiesPage.java"},"incompressible":true},{"element":{"name":"UnsignedIntegerRendering.java"},"incompressible":true},{"element":{"name":"UnsignedIntegerRenderingTypeDelegate.java"},"incompressible":true}]}]},{"element":{"name":"modules"},"children":[{"element":{"name":"IHelpContextIdProvider.java"},"incompressible":true},{"element":{"name":"ModulesView.java"},"incompressible":true},{"element":{"name":"ModulesViewMessages.java"},"incompressible":true},{"element":{"name":"ModulesViewMessages.properties"},"incompressible":true}]},{"element":{"name":"registers"},"children":[{"element":{"name":"RegistersView.java"},"incompressible":true},{"element":{"name":"RegistersViewMessages.java"},"incompressible":true},{"element":{"name":"RegistersViewMessages.properties"},"incompressible":true}]},{"element":{"name":"variables"},"children":[{"element":{"name":"AvailableLogicalStructuresAction.java"},"incompressible":true},{"element":{"name":"EditVariableLogicalStructureAction.java"},"incompressible":true},{"element":{"name":"IndexedValuePartition.java"},"incompressible":true},{"element":{"name":"IndexedVariablePartition.java"},"incompressible":true},{"element":{"name":"LogicalStructureCache.java"},"incompressible":true},{"element":{"name":"SelectLogicalStructureAction.java"},"incompressible":true},{"element":{"name":"SelectionDragAdapter.java"},"incompressible":true},{"element":{"name":"ToggleLogicalStructureAction.java"},"incompressible":true},{"element":{"name":"ToggleShowColumnsAction.java"},"incompressible":true},{"element":{"name":"VariableViewToggleAction.java"},"incompressible":true},{"element":{"name":"VariablesView.java"},"incompressible":true},{"element":{"name":"VariablesViewMessages.java"},"incompressible":true},{"element":{"name":"VariablesViewMessages.properties"},"incompressible":true},{"element":{"name":"VariablesViewResourceBundleMessages.properties"},"incompressible":true},{"element":{"name":"details"},"children":[{"element":{"name":"AbstractDetailPane.java"},"incompressible":true},{"element":{"name":"AvailableDetailPanesAction.java"},"incompressible":true},{"element":{"name":"DefaultDetailPane.java"},"incompressible":true},{"element":{"name":"DefaultDetailPaneFactory.java"},"incompressible":true},{"element":{"name":"DetailMessages.java"},"incompressible":true},{"element":{"name":"DetailMessages.properties"},"incompressible":true},{"element":{"name":"DetailPaneManager.java"},"incompressible":true},{"element":{"name":"DetailPaneProxy.java"},"incompressible":true},{"element":{"name":"IDetailPaneContainer.java"},"incompressible":true},{"element":{"name":"IDetailPaneContainer2.java"},"incompressible":true},{"element":{"name":"MessageDetailPane.java"},"incompressible":true}]}]}]}]}]},{"element":{"name":"ui"},"children":[{"element":{"name":"AbstractBreakpointOrganizerDelegate.java"},"incompressible":true},{"element":{"name":"AbstractDebugView.java"},"incompressible":true},{"element":{"name":"AbstractLaunchConfigurationTab.java"},"incompressible":true},{"element":{"name":"AbstractLaunchConfigurationTabGroup.java"},"incompressible":true},{"element":{"name":"BreakpointTypeCategory.java"},"incompressible":true},{"element":{"name":"CommonTab.java"},"incompressible":true},{"element":{"name":"DebugElementWorkbenchAdapter.java"},"incompressible":true},{"element":{"name":"DebugPopup.java"},"incompressible":true},{"element":{"name":"DebugUITools.java"},"incompressible":true},{"element":{"name":"DeferredDebugElementWorkbenchAdapter.java"},"incompressible":true},{"element":{"name":"EnvironmentTab.java"},"incompressible":true},{"element":{"name":"IBreakpointOrganizerDelegate.java"},"incompressible":true},{"element":{"name":"IBreakpointOrganizerDelegateExtension.java"},"incompressible":true},{"element":{"name":"IBreakpointTypeCategory.java"},"incompressible":true},{"element":{"name":"IDebugEditorPresentation.java"},"incompressible":true},{"element":{"name":"IDebugModelPresentation.java"},"incompressible":true},{"element":{"name":"IDebugModelPresentationExtension.java"},"incompressible":true},{"element":{"name":"IDebugUIConstants.java"},"incompressible":true},{"element":{"name":"IDebugView.java"},"incompressible":true},{"element":{"name":"IDetailPane.java"},"incompressible":true},{"element":{"name":"IDetailPane2.java"},"incompressible":true},{"element":{"name":"IDetailPane3.java"},"incompressible":true},{"element":{"name":"IDetailPaneFactory.java"},"incompressible":true},{"element":{"name":"IInstructionPointerPresentation.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationDialog.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationTab.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationTab2.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationTabGroup.java"},"incompressible":true},{"element":{"name":"ILaunchGroup.java"},"incompressible":true},{"element":{"name":"ILaunchShortcut.java"},"incompressible":true},{"element":{"name":"ILaunchShortcut2.java"},"incompressible":true},{"element":{"name":"ISourcePresentation.java"},"incompressible":true},{"element":{"name":"IValueDetailListener.java"},"incompressible":true},{"element":{"name":"InspectPopupDialog.java"},"incompressible":true},{"element":{"name":"PrototypeDecorator.java"},"incompressible":true},{"element":{"name":"PrototypeTab.java"},"incompressible":true},{"element":{"name":"RefreshTab.java"},"incompressible":true},{"element":{"name":"StringVariableSelectionDialog.java"},"incompressible":true},{"element":{"name":"WorkingDirectoryBlock.java"},"incompressible":true},{"element":{"name":"actions"},"children":[{"element":{"name":"AbstractLaunchHistoryAction.java"},"incompressible":true},{"element":{"name":"AbstractLaunchToolbarAction.java"},"incompressible":true},{"element":{"name":"AddMemoryRenderingActionDelegate.java"},"incompressible":true},{"element":{"name":"BreakpointTypesContribution.java"},"incompressible":true},{"element":{"name":"ContextualLaunchAction.java"},"incompressible":true},{"element":{"name":"DebugAction.java"},"incompressible":true},{"element":{"name":"DebugCommandAction.java"},"incompressible":true},{"element":{"name":"DebugCommandHandler.java"},"incompressible":true},{"element":{"name":"ExportBreakpointsOperation.java"},"incompressible":true},{"element":{"name":"IAddMemoryBlocksTarget.java"},"incompressible":true},{"element":{"name":"IAddMemoryRenderingsTarget.java"},"incompressible":true},{"element":{"name":"ILaunchable.java"},"incompressible":true},{"element":{"name":"IRunToLineTarget.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTarget.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTargetExtension.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTargetExtension2.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTargetFactory.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTargetManager.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTargetManagerListener.java"},"incompressible":true},{"element":{"name":"IVariableValueEditor.java"},"incompressible":true},{"element":{"name":"IWatchExpressionFactoryAdapter.java"},"incompressible":true},{"element":{"name":"IWatchExpressionFactoryAdapter2.java"},"incompressible":true},{"element":{"name":"IWatchExpressionFactoryAdapterExtension.java"},"incompressible":true},{"element":{"name":"ImportBreakpointsOperation.java"},"incompressible":true},{"element":{"name":"LaunchAction.java"},"incompressible":true},{"element":{"name":"LaunchAsAction.java"},"incompressible":true},{"element":{"name":"LaunchShortcutsAction.java"},"incompressible":true},{"element":{"name":"OpenLaunchDialogAction.java"},"incompressible":true},{"element":{"name":"RelaunchLastAction.java"},"incompressible":true},{"element":{"name":"RulerBreakpointAction.java"},"incompressible":true},{"element":{"name":"RulerBreakpointTypesActionDelegate.java"},"incompressible":true},{"element":{"name":"RulerEnableDisableBreakpointActionDelegate.java"},"incompressible":true},{"element":{"name":"RulerRunToLineActionDelegate.java"},"incompressible":true},{"element":{"name":"RulerToggleBreakpointActionDelegate.java"},"incompressible":true},{"element":{"name":"RunAction.java"},"incompressible":true},{"element":{"name":"RunToLineAction.java"},"incompressible":true},{"element":{"name":"RunToLineActionDelegate.java"},"incompressible":true},{"element":{"name":"RunToLineHandler.java"},"incompressible":true},{"element":{"name":"ToggleBreakpointAction.java"},"incompressible":true},{"element":{"name":"ToggleMethodBreakpointActionDelegate.java"},"incompressible":true},{"element":{"name":"ToggleWatchpointActionDelegate.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"console"},"children":[{"element":{"name":"ConsoleColorProvider.java"},"incompressible":true},{"element":{"name":"FileLink.java"},"incompressible":true},{"element":{"name":"IConsole.java"},"incompressible":true},{"element":{"name":"IConsoleColorProvider.java"},"incompressible":true},{"element":{"name":"IConsoleHyperlink.java"},"incompressible":true},{"element":{"name":"IConsoleLineTracker.java"},"incompressible":true},{"element":{"name":"IConsoleLineTrackerExtension.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"contexts"},"children":[{"element":{"name":"AbstractDebugContextProvider.java"},"incompressible":true},{"element":{"name":"DebugContextEvent.java"},"incompressible":true},{"element":{"name":"IDebugContextListener.java"},"incompressible":true},{"element":{"name":"IDebugContextManager.java"},"incompressible":true},{"element":{"name":"IDebugContextProvider.java"},"incompressible":true},{"element":{"name":"IDebugContextProvider2.java"},"incompressible":true},{"element":{"name":"IDebugContextService.java"},"incompressible":true},{"element":{"name":"ISuspendTrigger.java"},"incompressible":true},{"element":{"name":"ISuspendTriggerListener.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"memory"},"children":[{"element":{"name":"AbstractMemoryRendering.java"},"incompressible":true},{"element":{"name":"AbstractMemoryRenderingBindingsProvider.java"},"incompressible":true},{"element":{"name":"AbstractTableRendering.java"},"incompressible":true},{"element":{"name":"AbstractTextRendering.java"},"incompressible":true},{"element":{"name":"IMemoryBlockTablePresentation.java"},"incompressible":true},{"element":{"name":"IMemoryRendering.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingBindingsListener.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingBindingsProvider.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingContainer.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingManager.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingSite.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingSite2.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingSynchronizationService.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingType.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingTypeDelegate.java"},"incompressible":true},{"element":{"name":"IRepositionableMemoryRendering.java"},"incompressible":true},{"element":{"name":"IResettableMemoryRendering.java"},"incompressible":true},{"element":{"name":"MemoryRenderingElement.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"package.html"},"incompressible":true},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"AbstractSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"CommonSourceNotFoundEditor.java"},"incompressible":true},{"element":{"name":"CommonSourceNotFoundEditorInput.java"},"incompressible":true},{"element":{"name":"ISourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"ISourceDisplay.java"},"incompressible":true},{"element":{"name":"ISourceLookupResult.java"},"incompressible":true},{"element":{"name":"SourceLookupDialog.java"},"incompressible":true},{"element":{"name":"SourceLookupTab.java"},"incompressible":true},{"element":{"name":"WorkingSetSourceContainer.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"stringsubstitution"},"children":[{"element":{"name":"IArgumentSelector.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.ui.console"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"full"},"children":[{"element":{"name":"clcl16"},"children":[{"element":{"name":"clear_co.png"},"incompressible":true},{"element":{"name":"clear_co@2x.png"},"incompressible":true},{"element":{"name":"lock_co.png"},"incompressible":true},{"element":{"name":"lock_co@2x.png"},"incompressible":true},{"element":{"name":"pin.png"},"incompressible":true},{"element":{"name":"pin@2x.png"},"incompressible":true},{"element":{"name":"wordwrap.png"},"incompressible":true}]},{"element":{"name":"cview16"},"children":[{"element":{"name":"console_view.gif"},"incompressible":true},{"element":{"name":"console_view.png"},"incompressible":true},{"element":{"name":"console_view@2x.png"},"incompressible":true}]},{"element":{"name":"dlcl16"},"children":[{"element":{"name":"clear_co.png"},"incompressible":true},{"element":{"name":"clear_co@2x.png"},"incompressible":true},{"element":{"name":"lock_co.png"},"incompressible":true},{"element":{"name":"lock_co@2x.png"},"incompressible":true},{"element":{"name":"new_con.png"},"incompressible":true},{"element":{"name":"new_con@2x.png"},"incompressible":true},{"element":{"name":"pin.png"},"incompressible":true},{"element":{"name":"pin@2x.png"},"incompressible":true},{"element":{"name":"rem_co.png"},"incompressible":true},{"element":{"name":"rem_co@2x.png"},"incompressible":true},{"element":{"name":"wordwrap.png"},"incompressible":true},{"element":{"name":"wordwrap@2x.png"},"incompressible":true}]},{"element":{"name":"dview16"},"children":[{"element":{"name":"console_view.png"},"incompressible":true},{"element":{"name":"console_view@2x.png"},"incompressible":true}]},{"element":{"name":"elcl16"},"children":[{"element":{"name":"clear_co.png"},"incompressible":true},{"element":{"name":"clear_co@2x.png"},"incompressible":true},{"element":{"name":"lock_co.png"},"incompressible":true},{"element":{"name":"lock_co@2x.png"},"incompressible":true},{"element":{"name":"new_con.png"},"incompressible":true},{"element":{"name":"new_con@2x.png"},"incompressible":true},{"element":{"name":"pin.png"},"incompressible":true},{"element":{"name":"pin@2x.png"},"incompressible":true},{"element":{"name":"rem_co.png"},"incompressible":true},{"element":{"name":"rem_co@2x.png"},"incompressible":true},{"element":{"name":"wordwrap.png"},"incompressible":true},{"element":{"name":"wordwrap@2x.png"},"incompressible":true}]},{"element":{"name":"eview16"},"children":[{"element":{"name":"console_view.gif"},"incompressible":true},{"element":{"name":"console_view.png"},"incompressible":true},{"element":{"name":"console_view@2x.png"},"incompressible":true}]}]}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"schema"},"children":[{"element":{"name":"consoleFactories.exsd"},"incompressible":true},{"element":{"name":"consolePageParticipants.exsd"},"incompressible":true},{"element":{"name":"consolePatternMatchListeners.exsd"},"incompressible":true}]},{"element":{"name":"scripts"},"children":[{"element":{"name":"exportplugin.xml"},"incompressible":true}]},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"ui"},"children":[{"element":{"name":"console"},"children":[{"element":{"name":"AbstractConsole.java"},"incompressible":true},{"element":{"name":"ConsolePlugin.java"},"incompressible":true},{"element":{"name":"IConsole.java"},"incompressible":true},{"element":{"name":"IConsoleConstants.java"},"incompressible":true},{"element":{"name":"IConsoleDocumentPartitioner.java"},"incompressible":true},{"element":{"name":"IConsoleFactory.java"},"incompressible":true},{"element":{"name":"IConsoleListener.java"},"incompressible":true},{"element":{"name":"IConsoleManager.java"},"incompressible":true},{"element":{"name":"IConsolePageParticipant.java"},"incompressible":true},{"element":{"name":"IConsoleView.java"},"incompressible":true},{"element":{"name":"IHyperlink.java"},"incompressible":true},{"element":{"name":"IHyperlink2.java"},"incompressible":true},{"element":{"name":"IOConsole.java"},"incompressible":true},{"element":{"name":"IOConsoleInputStream.java"},"incompressible":true},{"element":{"name":"IOConsoleOutputStream.java"},"incompressible":true},{"element":{"name":"IPatternMatchListener.java"},"incompressible":true},{"element":{"name":"IPatternMatchListenerDelegate.java"},"incompressible":true},{"element":{"name":"IScrollLockStateProvider.java"},"incompressible":true},{"element":{"name":"MessageConsole.java"},"incompressible":true},{"element":{"name":"MessageConsoleStream.java"},"incompressible":true},{"element":{"name":"PatternMatchEvent.java"},"incompressible":true},{"element":{"name":"TextConsole.java"},"incompressible":true},{"element":{"name":"TextConsolePage.java"},"incompressible":true},{"element":{"name":"TextConsoleViewer.java"},"incompressible":true},{"element":{"name":"actions"},"children":[{"element":{"name":"ClearOutputAction.java"},"incompressible":true},{"element":{"name":"CloseConsoleAction.java"},"incompressible":true},{"element":{"name":"TextViewerAction.java"},"incompressible":true},{"element":{"name":"TextViewerGotoLineAction.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"internal"},"children":[{"element":{"name":"console"},"children":[{"element":{"name":"ConsoleDocument.java"},"incompressible":true},{"element":{"name":"ConsoleDocumentAdapter.java"},"incompressible":true},{"element":{"name":"ConsoleDropDownAction.java"},"incompressible":true},{"element":{"name":"ConsoleFactoryExtension.java"},"incompressible":true},{"element":{"name":"ConsoleHyperlinkPosition.java"},"incompressible":true},{"element":{"name":"ConsoleManager.java"},"incompressible":true},{"element":{"name":"ConsoleMessages.java"},"incompressible":true},{"element":{"name":"ConsoleMessages.properties"},"incompressible":true},{"element":{"name":"ConsolePageParticipantExtension.java"},"incompressible":true},{"element":{"name":"ConsolePatternMatcher.java"},"incompressible":true},{"element":{"name":"ConsolePluginImages.java"},"incompressible":true},{"element":{"name":"ConsoleResourceBundleMessages.java"},"incompressible":true},{"element":{"name":"ConsoleResourceBundleMessages.properties"},"incompressible":true},{"element":{"name":"ConsoleTypePropertyTester.java"},"incompressible":true},{"element":{"name":"ConsoleUIPreferenceInitializer.java"},"incompressible":true},{"element":{"name":"ConsoleView.java"},"incompressible":true},{"element":{"name":"ConsoleViewConsoleFactory.java"},"incompressible":true},{"element":{"name":"ConsoleWorkbenchPart.java"},"incompressible":true},{"element":{"name":"FollowHyperlinkAction.java"},"incompressible":true},{"element":{"name":"HyperlinkUpdater.java"},"incompressible":true},{"element":{"name":"IConsoleHelpContextIds.java"},"incompressible":true},{"element":{"name":"IInternalConsoleConstants.java"},"incompressible":true},{"element":{"name":"IOConsolePage.java"},"incompressible":true},{"element":{"name":"IOConsolePartition.java"},"incompressible":true},{"element":{"name":"IOConsolePartitioner.java"},"incompressible":true},{"element":{"name":"IOConsoleViewer.java"},"incompressible":true},{"element":{"name":"OpenConsoleAction.java"},"incompressible":true},{"element":{"name":"PatternMatchListener.java"},"incompressible":true},{"element":{"name":"PatternMatchListenerExtension.java"},"incompressible":true},{"element":{"name":"PinConsoleAction.java"},"incompressible":true},{"element":{"name":"ScrollLockAction.java"},"incompressible":true},{"element":{"name":"ShowConsoleAction.java"},"incompressible":true},{"element":{"name":"StreamDecoder.java"},"incompressible":true},{"element":{"name":"WordWrapAction.java"},"incompressible":true}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.ui.externaltools"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".gitignore"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":".api_filters"},"incompressible":true},{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"External Tools Base"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"ui"},"children":[{"element":{"name":"externaltools"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"launchConfigurations"},"children":[{"element":{"name":"ExternalToolsBuildTab.java"},"incompressible":true},{"element":{"name":"ExternalToolsBuilderTab.java"},"incompressible":true},{"element":{"name":"ExternalToolsLaunchConfigurationMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsLaunchConfigurationMessages.properties"},"incompressible":true},{"element":{"name":"ExternalToolsMainTab.java"},"incompressible":true},{"element":{"name":"ExternalToolsUtil.java"},"incompressible":true},{"element":{"name":"IgnoreWhiteSpaceComparator.java"},"incompressible":true},{"element":{"name":"WorkingSetComparator.java"},"incompressible":true}]},{"element":{"name":"menu"},"children":[{"element":{"name":"ExternalToolMenuDelegate.java"},"incompressible":true},{"element":{"name":"OpenExternalToolsConfigurations.java"},"incompressible":true}]},{"element":{"name":"model"},"children":[{"element":{"name":"BuilderUtils.java"},"incompressible":true},{"element":{"name":"ExternalToolsImages.java"},"incompressible":true},{"element":{"name":"ExternalToolsModelMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsModelMessages.properties"},"incompressible":true},{"element":{"name":"ExternalToolsPlugin.java"},"incompressible":true},{"element":{"name":"ExternalToolsPreferenceInitializer.java"},"incompressible":true},{"element":{"name":"IExternalToolConstants.java"},"incompressible":true},{"element":{"name":"IExternalToolsHelpContextIds.java"},"incompressible":true},{"element":{"name":"IPreferenceConstants.java"},"incompressible":true},{"element":{"name":"ImageDescriptorRegistry.java"},"incompressible":true}]},{"element":{"name":"ui"},"children":[{"element":{"name":"BuilderLabelProvider.java"},"incompressible":true},{"element":{"name":"BuilderPropertyPage.java"},"incompressible":true},{"element":{"name":"EditCommandDialog.java"},"incompressible":true},{"element":{"name":"ExternalToolsPreferencePage.java"},"incompressible":true},{"element":{"name":"ExternalToolsUIMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsUIMessages.properties"},"incompressible":true},{"element":{"name":"FileSelectionDialog.java"},"incompressible":true},{"element":{"name":"TreeAndListGroup.java"},"incompressible":true}]},{"element":{"name":"variables"},"children":[{"element":{"name":"BuildFilesResolver.java"},"incompressible":true},{"element":{"name":"BuildProjectResolver.java"},"incompressible":true},{"element":{"name":"BuildTypeResolver.java"},"incompressible":true},{"element":{"name":"SystemPathResolver.java"},"incompressible":true},{"element":{"name":"VariableMessages.java"},"incompressible":true},{"element":{"name":"VariableMessages.properties"},"incompressible":true}]}]}]}]}]}]}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"Program Tools Support"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"ui"},"children":[{"element":{"name":"externaltools"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"program"},"children":[{"element":{"name":"launchConfigurations"},"children":[{"element":{"name":"ExternalToolsProgramMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsProgramMessages.properties"},"incompressible":true},{"element":{"name":"ProgramBuilderTabGroup.java"},"incompressible":true},{"element":{"name":"ProgramMainTab.java"},"incompressible":true},{"element":{"name":"ProgramTabGroup.java"},"incompressible":true}]}]}]}]}]}]}]}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"full"},"children":[{"element":{"name":"dtool16"},"children":[{"element":{"name":"external_tools.png"},"incompressible":true},{"element":{"name":"external_tools@2x.png"},"incompressible":true}]},{"element":{"name":"etool16"},"children":[{"element":{"name":"external_tools.png"},"incompressible":true},{"element":{"name":"external_tools@2x.png"},"incompressible":true}]},{"element":{"name":"obj16"},"children":[{"element":{"name":"build_tab.png"},"incompressible":true},{"element":{"name":"build_tab@2x.png"},"incompressible":true},{"element":{"name":"builder.png"},"incompressible":true},{"element":{"name":"builder@2x.png"},"incompressible":true},{"element":{"name":"classpath.png"},"incompressible":true},{"element":{"name":"classpath@2x.png"},"incompressible":true},{"element":{"name":"external_tools.png"},"incompressible":true},{"element":{"name":"external_tools@2x.png"},"incompressible":true},{"element":{"name":"invalid_build_tool.png"},"incompressible":true},{"element":{"name":"invalid_build_tool@2x.png"},"incompressible":true},{"element":{"name":"main_tab.png"},"incompressible":true},{"element":{"name":"main_tab@2x.png"},"incompressible":true}]},{"element":{"name":"wizban"},"children":[{"element":{"name":"ext_tools_wiz.png"},"incompressible":true}]}]}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"schema"},"children":[{"element":{"name":"configurationDuplicationMaps.exsd"},"incompressible":true}]}]},{"element":{"name":"pom.xml"},"incompressible":true}]}]); break; } diff --git a/test/tree/tree.js b/test/tree/tree.js index 01a30a92242..4d5a9b5f271 100644 --- a/test/tree/tree.js +++ b/test/tree/tree.js @@ -7,11 +7,11 @@ const path = require('path'); const fs = require('fs'); function collect(location) { - const element = path.basename(location); + const element = { name: path.basename(location) }; const stat = fs.statSync(location); if (!stat.isDirectory()) { - return { element }; + return { element, incompressible: true }; } const children = fs.readdirSync(location) From 99ffd06bd43ac0392fd516064548b7563019f392 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 23 Jul 2019 11:29:21 +0200 Subject: [PATCH 502/710] :lipstick: --- test/tree/public/compressed.json | 15620 +++++++++++++++++++++++++++++ test/tree/public/index.html | 9 +- 2 files changed, 15628 insertions(+), 1 deletion(-) create mode 100644 test/tree/public/compressed.json diff --git a/test/tree/public/compressed.json b/test/tree/public/compressed.json new file mode 100644 index 00000000000..c0b5d4d7161 --- /dev/null +++ b/test/tree/public/compressed.json @@ -0,0 +1,15620 @@ +[ + { + "element": { + "name": "eclipse.platform.debug" + }, + "children": [ + { + "element": { + "name": ".git" + }, + "children": [ + { + "element": { + "name": "HEAD" + }, + "incompressible": true + }, + { + "element": { + "name": "branches" + }, + "children": [] + }, + { + "element": { + "name": "config" + }, + "incompressible": true + }, + { + "element": { + "name": "description" + }, + "incompressible": true + }, + { + "element": { + "name": "hooks" + }, + "children": [ + { + "element": { + "name": "applypatch-msg.sample" + }, + "incompressible": true + }, + { + "element": { + "name": "commit-msg.sample" + }, + "incompressible": true + }, + { + "element": { + "name": "fsmonitor-watchman.sample" + }, + "incompressible": true + }, + { + "element": { + "name": "post-update.sample" + }, + "incompressible": true + }, + { + "element": { + "name": "pre-applypatch.sample" + }, + "incompressible": true + }, + { + "element": { + "name": "pre-commit.sample" + }, + "incompressible": true + }, + { + "element": { + "name": "pre-push.sample" + }, + "incompressible": true + }, + { + "element": { + "name": "pre-rebase.sample" + }, + "incompressible": true + }, + { + "element": { + "name": "pre-receive.sample" + }, + "incompressible": true + }, + { + "element": { + "name": "prepare-commit-msg.sample" + }, + "incompressible": true + }, + { + "element": { + "name": "update.sample" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "index" + }, + "incompressible": true + }, + { + "element": { + "name": "info" + }, + "children": [ + { + "element": { + "name": "exclude" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "logs" + }, + "children": [ + { + "element": { + "name": "HEAD" + }, + "incompressible": true + }, + { + "element": { + "name": "refs" + }, + "children": [ + { + "element": { + "name": "heads" + }, + "children": [ + { + "element": { + "name": "master" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "remotes" + }, + "children": [ + { + "element": { + "name": "origin" + }, + "children": [ + { + "element": { + "name": "HEAD" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "objects" + }, + "children": [ + { + "element": { + "name": "info" + }, + "children": [] + }, + { + "element": { + "name": "pack" + }, + "children": [ + { + "element": { + "name": "pack-2b1503bd0b85396d8596e9e99d956bfc3fbe497b.idx" + }, + "incompressible": true + }, + { + "element": { + "name": "pack-2b1503bd0b85396d8596e9e99d956bfc3fbe497b.pack" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "packed-refs" + }, + "incompressible": true + }, + { + "element": { + "name": "refs" + }, + "children": [ + { + "element": { + "name": "heads" + }, + "children": [ + { + "element": { + "name": "master" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "remotes" + }, + "children": [ + { + "element": { + "name": "origin" + }, + "children": [ + { + "element": { + "name": "HEAD" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "tags" + }, + "children": [ + { + "element": { + "name": "I20190722-1800" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "shallow" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": ".gitignore" + }, + "incompressible": true + }, + { + "element": { + "name": "CONTRIBUTING" + }, + "incompressible": true + }, + { + "element": { + "name": "LICENSE" + }, + "incompressible": true + }, + { + "element": { + "name": "NOTICE" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.externaltools" + }, + "children": [ + { + "element": { + "name": ".classpath" + }, + "incompressible": true + }, + { + "element": { + "name": ".project" + }, + "incompressible": true + }, + { + "element": { + "name": ".settings" + }, + "children": [ + { + "element": { + "name": "org.eclipse.core.resources.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.runtime.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.core.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.ui.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.api.tools.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.prefs" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "META-INF" + }, + "children": [ + { + "element": { + "name": "MANIFEST.MF" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "about.html" + }, + "incompressible": true + }, + { + "element": { + "name": "build.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "plugin.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "plugin.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "src" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "core" + }, + "children": [ + { + "element": { + "name": "externaltools" + }, + "children": [ + { + "element": { + "name": "internal" + }, + "children": [ + { + "element": { + "name": "ExternalToolsCore.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IExternalToolConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "launchConfigurations" + }, + "children": [ + { + "element": { + "name": "BackgroundResourceRefresher.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsCoreUtil.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsProgramMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsProgramMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "ProgramLaunchDelegate.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "model" + }, + "children": [ + { + "element": { + "name": "BuilderCoreUtils.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolBuilder.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsModelMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsModelMessages.properties" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "registry" + }, + "children": [ + { + "element": { + "name": "ExternalToolMigration.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsMigrationMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsMigrationMessages.properties" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "org.eclipse.core.variables" + }, + "children": [ + { + "element": { + "name": ".classpath" + }, + "incompressible": true + }, + { + "element": { + "name": ".project" + }, + "incompressible": true + }, + { + "element": { + "name": ".settings" + }, + "children": [ + { + "element": { + "name": "org.eclipse.core.resources.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.runtime.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.core.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.ui.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.api.tools.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.prefs" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "META-INF" + }, + "children": [ + { + "element": { + "name": "MANIFEST.MF" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "about.html" + }, + "incompressible": true + }, + { + "element": { + "name": "build.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "plugin.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "plugin.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "schema" + }, + "children": [ + { + "element": { + "name": "dynamicVariables.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "valueVariables.exsd" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "src" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "core" + }, + "children": [ + { + "element": { + "name": "internal" + }, + "children": [ + { + "element": { + "name": "variables" + }, + "children": [ + { + "element": { + "name": "ContributedValueVariable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DynamicVariable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EclipseHomeVariableResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StringSubstitutionEngine.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StringVariable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StringVariableManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ValueVariable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariablesMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariablesMessages.properties" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "variables" + }, + "children": [ + { + "element": { + "name": "IDynamicVariable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDynamicVariableResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStringVariable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStringVariableManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IValueVariable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IValueVariableInitializer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IValueVariableListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariablesPlugin.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "org.eclipse.debug.core" + }, + "children": [ + { + "element": { + "name": ".classpath" + }, + "incompressible": true + }, + { + "element": { + "name": ".options" + }, + "incompressible": true + }, + { + "element": { + "name": ".project" + }, + "incompressible": true + }, + { + "element": { + "name": ".settings" + }, + "children": [ + { + "element": { + "name": "org.eclipse.core.resources.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.runtime.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.core.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.ui.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.api.tools.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.prefs" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "META-INF" + }, + "children": [ + { + "element": { + "name": "MANIFEST.MF" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "about.html" + }, + "incompressible": true + }, + { + "element": { + "name": "build.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "core" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "debug" + }, + "children": [ + { + "element": { + "name": "core" + }, + "children": [ + { + "element": { + "name": "DebugEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugException.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugPlugin.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreakpointListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreakpointManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreakpointManagerListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreakpointsListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugEventFilter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugEventSetListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IExpressionListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IExpressionManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IExpressionsListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunch.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchConfiguration.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchConfigurationListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchConfigurationMigrationDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchConfigurationType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchConfigurationWorkingCopy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchMode.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchesListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchesListener2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILogicalStructureProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILogicalStructureType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryBlockListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryBlockManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IProcessFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IPrototypeAttributesLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IRequest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStatusHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStreamListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Launch.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RefreshUtil.java" + }, + "incompressible": true + }, + { + "element": { + "name": "commands" + }, + "children": [ + { + "element": { + "name": "AbstractDebugCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugCommandRequest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDisconnectHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDropToFrameHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IEnabledStateRequest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IRestartHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IResumeHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStepFiltersHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStepIntoHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStepOverHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStepReturnHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISuspendHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ITerminateHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "model" + }, + "children": [ + { + "element": { + "name": "Breakpoint.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugElement.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreakpoint.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreakpointImportParticipant.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugElement.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugModelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugTarget.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDisconnect.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDropToFrame.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IErrorReportingExpression.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IExpression.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IFilteredStep.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IFlushableStreamMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IIndexedValue.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchConfigurationDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchConfigurationDelegate2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILineBreakpoint.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILogicalStructureTypeDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILogicalStructureTypeDelegate2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryBlock.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryBlockExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryBlockRetrieval.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryBlockRetrievalExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IPersistableSourceLocator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IProcess.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IRegister.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IRegisterGroup.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourceLocator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStackFrame.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStep.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStepFilter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStepFilters.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStreamMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStreamsProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStreamsProxy2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISuspendResume.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ITerminate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IThread.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ITriggerPoint.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IValue.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IValueModification.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IVariable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IWatchExpression.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IWatchExpressionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IWatchExpressionListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IWatchExpressionResult.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IWatchpoint.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LineBreakpoint.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryByte.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RuntimeProcess.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + }, + { + "element": { + "name": "sourcelookup" + }, + "children": [ + { + "element": { + "name": "AbstractSourceLookupDirector.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractSourceLookupParticipant.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IPersistableSourceLocator2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourceContainerType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourceContainerTypeDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourceLookupDirector.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourceLookupParticipant.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourcePathComputer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourcePathComputerDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "containers" + }, + "children": [ + { + "element": { + "name": "AbstractSourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractSourceContainerTypeDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ArchiveSourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CompositeSourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ContainerSourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultSourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DirectorySourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalArchiveSourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FolderSourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LocalFileStorage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProjectSourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkspaceSourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ZipEntryStorage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "internal" + }, + "children": [ + { + "element": { + "name": "core" + }, + "children": [ + { + "element": { + "name": "BreakpointImportParticipantDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugCoreMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugCoreMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugOptions.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugPreferenceInitializer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EnvironmentVariableResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExpressionManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConfigurationElementConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IExpressionsListener2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IInternalDebugCoreConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMementoConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "InputStreamMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfiguration.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationComparator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationInfo.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationWorkingCopy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchMode.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchablePropertyTester.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LogicalStructureManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LogicalStructureProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LogicalStructureType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlockManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "NullStreamsProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "OutputStreamMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Preferences.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PreferredDelegateModifyListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RefreshScopeComparator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResourceFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepFilter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepFilterManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StreamsProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SystemPropertyResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SystemVariableResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WatchExpression.java" + }, + "incompressible": true + }, + { + "element": { + "name": "XMLMemento.java" + }, + "incompressible": true + }, + { + "element": { + "name": "commands" + }, + "children": [ + { + "element": { + "name": "CommandAdapterFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugCommandRequest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DisconnectCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DropToFrameCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ForEachCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Request.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResumeCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepFiltersCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepIntoCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepOverCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepReturnCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SuspendCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TerminateCommand.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "groups" + }, + "children": [ + { + "element": { + "name": "GroupLaunch.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GroupLaunchConfigurationDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GroupLaunchElement.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GroupMemberChangeListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "observer" + }, + "children": [ + { + "element": { + "name": "ProcessObserver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StreamObserver.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "sourcelookup" + }, + "children": [ + { + "element": { + "name": "SourceContainerType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLocatorMementoComparator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupUtils.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourcePathComputer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "containers" + }, + "children": [ + { + "element": { + "name": "ArchiveSourceContainerType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultSourceContainerType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DirectorySourceContainerType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalArchiveSourceContainerType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FolderSourceContainerType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProjectSourceContainerType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkspaceSourceContainerType.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "variables" + }, + "children": [ + { + "element": { + "name": "ContainerResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DateTimeResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Messages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Messages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "ProjectResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResourceResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkspaceResolver.java" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "plugin.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "plugin.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "schema" + }, + "children": [ + { + "element": { + "name": "breakpointImportParticipants.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "breakpoints.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "launchConfigurationComparators.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "launchConfigurationTypes.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "launchDelegates.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "launchModes.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "launchers.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "logicalStructureProviders.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "logicalStructureTypes.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "processFactories.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "sourceContainerTypes.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "sourceLocators.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "sourcePathComputers.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "statusHandlers.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "stepFilters.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "watchExpressionDelegates.exsd" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "scripts" + }, + "children": [ + { + "element": { + "name": "exportplugin.xml" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "org.eclipse.debug.examples.core" + }, + "children": [ + { + "element": { + "name": ".classpath" + }, + "incompressible": true + }, + { + "element": { + "name": ".project" + }, + "incompressible": true + }, + { + "element": { + "name": ".settings" + }, + "children": [ + { + "element": { + "name": "org.eclipse.core.resources.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.runtime.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.core.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.ui.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.api.tools.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.prefs" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "META-INF" + }, + "children": [ + { + "element": { + "name": "MANIFEST.MF" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "OSGI-INF" + }, + "children": [ + { + "element": { + "name": "l10n" + }, + "children": [ + { + "element": { + "name": "bundle.properties" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "about.html" + }, + "incompressible": true + }, + { + "element": { + "name": "build.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "forceQualifierUpdate.txt" + }, + "incompressible": true + }, + { + "element": { + "name": "pdavm" + }, + "children": [ + { + "element": { + "name": "src" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "debug" + }, + "children": [ + { + "element": { + "name": "examples" + }, + "children": [ + { + "element": { + "name": "pdavm" + }, + "children": [ + { + "element": { + "name": "PDAVirtualMachine.java" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "tests" + }, + "children": [ + { + "element": { + "name": "vmtest10.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "vmtest2.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "vmtest3.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "vmtest6.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "vmtest8.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "vmtest9.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "vmtest_children.pda" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "plugin.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "readme.html" + }, + "incompressible": true + }, + { + "element": { + "name": "samples" + }, + "children": [ + { + "element": { + "name": "counter.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "drop.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "example.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "fibonacci.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "registers.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "stack.pda" + }, + "incompressible": true + }, + { + "element": { + "name": "structures.pda" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "scripts" + }, + "children": [ + { + "element": { + "name": "build.xml" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "src" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "debug" + }, + "children": [ + { + "element": { + "name": "examples" + }, + "children": [ + { + "element": { + "name": "core" + }, + "children": [ + { + "element": { + "name": "midi" + }, + "children": [ + { + "element": { + "name": "launcher" + }, + "children": [ + { + "element": { + "name": "ClockControl.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LengthControl.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MidiLaunch.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MidiLaunchDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SequencerControl.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TempoControl.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TimeControl.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "pda" + }, + "children": [ + { + "element": { + "name": "DebugCorePlugin.java" + }, + "incompressible": true + }, + { + "element": { + "name": "breakpoints" + }, + "children": [ + { + "element": { + "name": "PDALineBreakpoint.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDARunToLineBreakpoint.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAWatchpoint.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "launcher" + }, + "children": [ + { + "element": { + "name": "PDALaunchDelegate.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "model" + }, + "children": [ + { + "element": { + "name": "IPDAEventListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAArray.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAArrayEntry.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDADebugElement.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDADebugTarget.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAMemoryBlock.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAStackFrame.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAStackValue.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAThread.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAValue.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAVariable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WordStructureDelegate.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "protocol" + }, + "children": [ + { + "element": { + "name": "PDABitFieldData.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAChildrenCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAClearBreakpointCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDACommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDACommandResult.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDADataCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDADropFrameCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAEvalCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAEvalResultEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAEventStopCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAExitedEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAFrameCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAFrameCommandResult.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAFrameData.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAGroupsCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAListResult.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDANoSuchLabelEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAPopDataCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAPushDataCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDARegisterData.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDARegistersCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDARegistersCommandResult.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDARegistersEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDARestartCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAResumeCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAResumedEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDARunControlEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDASetBreakpointCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDASetDataCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDASetVarCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAStackCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAStackCommandResult.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAStackDepthCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAStackDepthCommandResult.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAStartedEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAStepCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAStepReturnCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDASuspendCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDASuspendedEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDATerminateCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDATerminatedEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAUnimplementedInstructionEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAVMResumeCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAVMResumedEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAVMStartedEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAVMSuspendCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAVMSuspendedEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAVMTerminatedEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAVarCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAWatchCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "sourcelookup" + }, + "children": [ + { + "element": { + "name": "PDASourceLookupDirector.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDASourceLookupParticipant.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDASourcePathComputerDelegate.java" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "src_ant" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "debug" + }, + "children": [ + { + "element": { + "name": "examples" + }, + "children": [ + { + "element": { + "name": "ant" + }, + "children": [ + { + "element": { + "name": "tasks" + }, + "children": [ + { + "element": { + "name": "PreProcessor.java" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "org.eclipse.debug.examples.memory" + }, + "children": [ + { + "element": { + "name": ".classpath" + }, + "incompressible": true + }, + { + "element": { + "name": ".project" + }, + "incompressible": true + }, + { + "element": { + "name": ".settings" + }, + "children": [ + { + "element": { + "name": "org.eclipse.core.resources.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.runtime.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.core.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.ui.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.api.tools.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.prefs" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "META-INF" + }, + "children": [ + { + "element": { + "name": "MANIFEST.MF" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "build.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "icons" + }, + "children": [ + { + "element": { + "name": "full" + }, + "children": [ + { + "element": { + "name": "obj16" + }, + "children": [ + { + "element": { + "name": "hex_tree.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "launch.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "memory_segment.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "memory_unit.gif" + }, + "incompressible": true + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "plugin.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "plugin.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "src" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "debug" + }, + "children": [ + { + "element": { + "name": "examples" + }, + "children": [ + { + "element": { + "name": "internal" + }, + "children": [ + { + "element": { + "name": "memory" + }, + "children": [ + { + "element": { + "name": "MemoryViewSamplePlugin.java" + }, + "incompressible": true + }, + { + "element": { + "name": "core" + }, + "children": [ + { + "element": { + "name": "Messages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SampleDebugTarget.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SampleMemoryBlock.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SampleRegister.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SampleRegisterGroup.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SampleStackFrame.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SampleThread.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SampleValue.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SampleVariable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "messages.properties" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "engine" + }, + "children": [ + { + "element": { + "name": "SampleEngine.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SampleMemoryUnit.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "launchconfig" + }, + "children": [ + { + "element": { + "name": "SampleLaunchConfigurationDelegateEx.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SampleLaunchTabGroup.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SampleModelPresentation.java" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "org.eclipse.debug.examples.mixedmode" + }, + "children": [ + { + "element": { + "name": ".classpath" + }, + "incompressible": true + }, + { + "element": { + "name": ".project" + }, + "incompressible": true + }, + { + "element": { + "name": ".settings" + }, + "children": [ + { + "element": { + "name": "org.eclipse.core.resources.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.runtime.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.core.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.ui.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.api.tools.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.prefs" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "META-INF" + }, + "children": [ + { + "element": { + "name": "MANIFEST.MF" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "OSGI-INF" + }, + "children": [ + { + "element": { + "name": "l10n" + }, + "children": [ + { + "element": { + "name": "bundle.properties" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "about.html" + }, + "incompressible": true + }, + { + "element": { + "name": "build.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "plugin.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "src" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "debug" + }, + "children": [ + { + "element": { + "name": "internal" + }, + "children": [ + { + "element": { + "name": "examples" + }, + "children": [ + { + "element": { + "name": "mixedmode" + }, + "children": [ + { + "element": { + "name": "Activator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AntExtraTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ClearPreferredDelegatesHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DoNothingLaunchConfigurationDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DoNothingMainTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Messages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "messages.properties" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "org.eclipse.debug.examples.ui" + }, + "children": [ + { + "element": { + "name": ".classpath" + }, + "incompressible": true + }, + { + "element": { + "name": ".project" + }, + "incompressible": true + }, + { + "element": { + "name": ".settings" + }, + "children": [ + { + "element": { + "name": "org.eclipse.core.resources.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.runtime.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.core.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.ui.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.api.tools.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.prefs" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "META-INF" + }, + "children": [ + { + "element": { + "name": "MANIFEST.MF" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "OSGI-INF" + }, + "children": [ + { + "element": { + "name": "l10n" + }, + "children": [ + { + "element": { + "name": "bundle.properties" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "about.html" + }, + "incompressible": true + }, + { + "element": { + "name": "build.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "icons" + }, + "children": [ + { + "element": { + "name": "full" + }, + "children": [ + { + "element": { + "name": "dlcl16" + }, + "children": [ + { + "element": { + "name": "pop.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "push.gif" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "elcl16" + }, + "children": [ + { + "element": { + "name": "pop.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "push.gif" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "obj16" + }, + "children": [ + { + "element": { + "name": "clef.png" + }, + "incompressible": true + }, + { + "element": { + "name": "note.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "pda.gif" + }, + "incompressible": true + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "plugin.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "src" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "debug" + }, + "children": [ + { + "element": { + "name": "examples" + }, + "children": [ + { + "element": { + "name": "ui" + }, + "children": [ + { + "element": { + "name": "midi" + }, + "children": [ + { + "element": { + "name": "adapters" + }, + "children": [ + { + "element": { + "name": "CheckboxModelProxyFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ControlCellModifier.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ControlEditor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ControlEventHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ControlLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ControlsMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MidiAdapterFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MidiEventLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MidiEventModelProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MidiStepOverHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SequencerColumnFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SequencerColumnPresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SequencerContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SequencerControlsModelProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SequencerModelProxyFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TrackColumnFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TrackColumnPresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TrackContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TrackLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TrackModelProxy.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "detailpanes" + }, + "children": [ + { + "element": { + "name": "ClockSliderDetailPane.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ControlDetailPaneFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TempoSliderDetailPane.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "launcher" + }, + "children": [ + { + "element": { + "name": "ExampleLaunchStatusHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MidiLaunchShortcut.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MidiMainTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MidiTabGroup.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "pda" + }, + "children": [ + { + "element": { + "name": "DebugUIPlugin.java" + }, + "incompressible": true + }, + { + "element": { + "name": "adapters" + }, + "children": [ + { + "element": { + "name": "AdapterFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AddPDAMemoryBlockAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CommandAdapterFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ModelProxyFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDADebugTargetContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDADebugTargetProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDARestartDebugCommand.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAThreadEventHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAViewActionProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAVirtualFindAction.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "breakpoints" + }, + "children": [ + { + "element": { + "name": "PDABreakpointAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAEditorAdapterFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDARunToLineAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAToggleWatchpointsTarget.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAToggleWatchpointsTargetFactory.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "editor" + }, + "children": [ + { + "element": { + "name": "AnnotationHover.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAContentAssistProcessor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAContentAssistant.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAEditor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAEditorMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAScanner.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDASourceViewerConfiguration.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PopFrameActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TextHover.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WordFinder.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "launcher" + }, + "children": [ + { + "element": { + "name": "PDALaunchShortcut.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDAMainTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PDATabGroup.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "presentation" + }, + "children": [ + { + "element": { + "name": "PDAModelPresentation.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "views" + }, + "children": [ + { + "element": { + "name": "AbstractDataStackViewHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CanPushTester.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CheckboxView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DataStackView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PopHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PushHandler.java" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "org.eclipse.debug.tests" + }, + "children": [ + { + "element": { + "name": ".classpath" + }, + "incompressible": true + }, + { + "element": { + "name": ".project" + }, + "incompressible": true + }, + { + "element": { + "name": ".settings" + }, + "children": [ + { + "element": { + "name": "org.eclipse.core.resources.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.runtime.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.core.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.ui.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.prefs" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "META-INF" + }, + "children": [ + { + "element": { + "name": "MANIFEST.MF" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "Platform Debug Test Suite.launch" + }, + "incompressible": true + }, + { + "element": { + "name": "about.html" + }, + "incompressible": true + }, + { + "element": { + "name": "build.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "forceQualifierUpdate.txt" + }, + "incompressible": true + }, + { + "element": { + "name": "icons" + }, + "children": [ + { + "element": { + "name": "image1.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "image2.gif" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "plugin.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "plugin.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "src" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "debug" + }, + "children": [ + { + "element": { + "name": "tests" + }, + "children": [ + { + "element": { + "name": "AbstractDebugTest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AutomatedSuite.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LocalSuite.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PerformanceSuite.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TestUtil.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TestsPlugin.java" + }, + "incompressible": true + }, + { + "element": { + "name": "breakpoint" + }, + "children": [ + { + "element": { + "name": "BreakpointOrderingTests.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "console" + }, + "children": [ + { + "element": { + "name": "ConsoleDocumentAdapterTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleManagerTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IOConsoleTestUtil.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IOConsoleTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MockProcess.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProcessConsoleManagerTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProcessConsoleTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StreamsProxyTests.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "expressions" + }, + "children": [ + { + "element": { + "name": "ExpressionManagerTests.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "launching" + }, + "children": [ + { + "element": { + "name": "AbstractLaunchTest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AcceleratorSubstitutionTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ArgumentParsingTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ArgumentsPrinter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CancellingLaunchDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugFileStore.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugFileSystem.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchFavoriteTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchGroupTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchHistoryTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchManagerTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RefreshTabTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TestLaunchDelegate.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "sourcelookup" + }, + "children": [ + { + "element": { + "name": "SourceLookupFacilityTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TestLaunch.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TestSourceDirector.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TestSourceLocator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TestStackFrame.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "statushandlers" + }, + "children": [ + { + "element": { + "name": "StatusHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StatusHandlerTests.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "stepfilters" + }, + "children": [ + { + "element": { + "name": "StepFiltersTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TestStepFilter.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "view" + }, + "children": [ + { + "element": { + "name": "memory" + }, + "children": [ + { + "element": { + "name": "DynamicRenderingBindings.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlock.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlockDynamic.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlockOne.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlockThree.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlockTwo.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryRenderingTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RenderingTypeDelegate.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "viewer" + }, + "children": [ + { + "element": { + "name": "model" + }, + "children": [ + { + "element": { + "name": "AbstractViewerModelTest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CheckTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ChildrenUpdateTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ColumnPresentationTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ContentTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DeltaTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FilterTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FilterTransformTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ITestModelUpdatesListenerConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "JFaceViewerCheckTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "JFaceViewerContentTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "JFaceViewerDeltaTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "JFaceViewerFilterTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "JFaceViewerLazyTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "JFaceViewerPerformanceTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "JFaceViewerPopupTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "JFaceViewerSelectionTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "JFaceViewerStateTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "JFaceViewerTopIndexTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "JFaceViewerUpdateTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LazyTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PerformanceTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PopupTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PresentationContextTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectionTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StateTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TestModel.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TestModelUpdatesListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TreeModelViewerAutopopulateAgent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TreePathWrapper.java" + }, + "incompressible": true + }, + { + "element": { + "name": "UpdateTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualViewerContentTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualViewerDeltaTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualViewerFilterTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualViewerLazyModeTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualViewerPerformanceTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualViewerPopupTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualViewerSelectionTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualViewerStateTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualViewerUpdateTests.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VisibleVirtualItemValidator.java" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "test-import" + }, + "children": [ + { + "element": { + "name": "Import1.launch" + }, + "incompressible": true + }, + { + "element": { + "name": "Import2.launch" + }, + "incompressible": true + }, + { + "element": { + "name": "Import3.launch" + }, + "incompressible": true + }, + { + "element": { + "name": "Import4.launch" + }, + "incompressible": true + }, + { + "element": { + "name": "Import5.launch" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "test.xml" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "org.eclipse.debug.ui" + }, + "children": [ + { + "element": { + "name": ".classpath" + }, + "incompressible": true + }, + { + "element": { + "name": ".options" + }, + "incompressible": true + }, + { + "element": { + "name": ".project" + }, + "incompressible": true + }, + { + "element": { + "name": ".settings" + }, + "children": [ + { + "element": { + "name": ".api_filters" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.resources.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.runtime.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.core.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.ui.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.api.tools.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.prefs" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "META-INF" + }, + "children": [ + { + "element": { + "name": "MANIFEST.MF" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "about.html" + }, + "incompressible": true + }, + { + "element": { + "name": "build.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "css" + }, + "children": [ + { + "element": { + "name": "e4-dark_debug_prefstyle.css" + }, + "incompressible": true + }, + { + "element": { + "name": "e4-light_debug_prefstyle.css" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "forceQualifierUpdate.txt" + }, + "incompressible": true + }, + { + "element": { + "name": "icons" + }, + "children": [ + { + "element": { + "name": "full" + }, + "children": [ + { + "element": { + "name": "dlcl16" + }, + "children": [ + { + "element": { + "name": "changevariablevalue_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "changevariablevalue_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "clear_co.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "collapseall.png" + }, + "incompressible": true + }, + { + "element": { + "name": "collapseall@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "copy_edit_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "copy_edit_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "copyviewtoclipboard_tsk.png" + }, + "incompressible": true + }, + { + "element": { + "name": "copyviewtoclipboard_tsk@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_auto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_auto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_compact.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_compact@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_tree.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_tree@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debuglast_co.gif.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debuglast_co.gif@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debuglast_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debuglast_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "delete_config.png" + }, + "incompressible": true + }, + { + "element": { + "name": "delete_config@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_auto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_auto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_hide.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_hide@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_right.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_right@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_under.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_under@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "disabled_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "disabled_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "disconnect_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "disconnect_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "display_selected_mb.png" + }, + "incompressible": true + }, + { + "element": { + "name": "display_selected_mb@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "dissolve_group.png" + }, + "incompressible": true + }, + { + "element": { + "name": "dissolve_group@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "drop_to_frame.png" + }, + "incompressible": true + }, + { + "element": { + "name": "drop_to_frame@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "edtsrclkup_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "edtsrclkup_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "enabled_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "enabled_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "expandall.png" + }, + "incompressible": true + }, + { + "element": { + "name": "expandall@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_brkpts.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_brkpts@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_config.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_config@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "filter_ps.png" + }, + "incompressible": true + }, + { + "element": { + "name": "filter_ps@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "hierarchicalLayout.png" + }, + "incompressible": true + }, + { + "element": { + "name": "hierarchicalLayout@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "import_brkpts.png" + }, + "incompressible": true + }, + { + "element": { + "name": "import_brkpts@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "link_proto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "link_proto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lock_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lock_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memoryreset_tsk.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memoryreset_tsk@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "metharg_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "metharg_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "monitorexpression_tsk.png" + }, + "incompressible": true + }, + { + "element": { + "name": "monitorexpression_tsk@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_con.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_con@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_proto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_proto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "next_thread_nav.png" + }, + "incompressible": true + }, + { + "element": { + "name": "next_thread_nav@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "pin.png" + }, + "incompressible": true + }, + { + "element": { + "name": "pin@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prev_thread_nav.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prev_thread_nav@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "printview_tsk.png" + }, + "incompressible": true + }, + { + "element": { + "name": "printview_tsk@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prop_ps.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prop_ps@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_all_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_all_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_all_triggers.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "removememory_tsk.png" + }, + "incompressible": true + }, + { + "element": { + "name": "removememory_tsk@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "reset_proto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "reset_proto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "restart_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "restart_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "resume_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "resume_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "runlast_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "runlast_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "runtoline_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "runtoline_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "skip_brkp.png" + }, + "incompressible": true + }, + { + "element": { + "name": "skip_brkp@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepbystep_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepbystep_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepinto_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepinto_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepover_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepover_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepreturn_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepreturn_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "suspend_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "suspend_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "synced.png" + }, + "incompressible": true + }, + { + "element": { + "name": "synced@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_all_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_all_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_rem_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_rem_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "tnames_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "tnames_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "toggledetailpane_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "toggledetailpane_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "unlink_proto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "unlink_proto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "var_cntnt_prvdr.png" + }, + "incompressible": true + }, + { + "element": { + "name": "var_cntnt_prvdr@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "writeerr_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "writeerr_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "writeout_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "writeout_co@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "dtool16" + }, + "children": [ + { + "element": { + "name": "debug_exc.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_exc@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "environment_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "environment_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "profile_exc.png" + }, + "incompressible": true + }, + { + "element": { + "name": "profile_exc@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "run_exc.png" + }, + "incompressible": true + }, + { + "element": { + "name": "run_exc@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "term_restart.png" + }, + "incompressible": true + }, + { + "element": { + "name": "term_restart@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "watch_exp.png" + }, + "incompressible": true + }, + { + "element": { + "name": "watch_exp@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "dview16" + }, + "children": [ + { + "element": { + "name": "breakpoint_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "breakpoint_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_persp.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_persp@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "details_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "details_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memory_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memory_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "module_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "module_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "register_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "register_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "variable_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "variable_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "watchlist_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "watchlist_view@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "elcl16" + }, + "children": [ + { + "element": { + "name": "changevariablevalue_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "changevariablevalue_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "collapseall.png" + }, + "incompressible": true + }, + { + "element": { + "name": "collapseall@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "copy_edit_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "copy_edit_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "copyviewtoclipboard_tsk.png" + }, + "incompressible": true + }, + { + "element": { + "name": "copyviewtoclipboard_tsk@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_auto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_auto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_compact.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_compact@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_tree.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view_tree@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debuglast_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debuglast_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "delete_config.png" + }, + "incompressible": true + }, + { + "element": { + "name": "delete_config@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_auto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_auto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_hide.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_hide@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_right.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_right@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_under.png" + }, + "incompressible": true + }, + { + "element": { + "name": "det_pane_under@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "disabled_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "disabled_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "disconnect_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "disconnect_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "display_selected_mb.png" + }, + "incompressible": true + }, + { + "element": { + "name": "display_selected_mb@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "dissolve_group.png" + }, + "incompressible": true + }, + { + "element": { + "name": "dissolve_group@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "drop_to_frame.png" + }, + "incompressible": true + }, + { + "element": { + "name": "drop_to_frame@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "edtsrclkup_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "edtsrclkup_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "enabled_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "enabled_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "expandall.png" + }, + "incompressible": true + }, + { + "element": { + "name": "expandall@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_brkpts.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_brkpts@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_config.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_config@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "filter_ps.png" + }, + "incompressible": true + }, + { + "element": { + "name": "filter_ps@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "hierarchicalLayout.png" + }, + "incompressible": true + }, + { + "element": { + "name": "hierarchicalLayout@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "import_brkpts.png" + }, + "incompressible": true + }, + { + "element": { + "name": "import_brkpts@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "link_proto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "link_proto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lock_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lock_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memoryreset_tsk.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memoryreset_tsk@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "metharg_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "metharg_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "monitorexpression_tsk.png" + }, + "incompressible": true + }, + { + "element": { + "name": "monitorexpression_tsk@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_con.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_con@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_proto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_proto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "next_thread_nav.png" + }, + "incompressible": true + }, + { + "element": { + "name": "next_thread_nav@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "pin.png" + }, + "incompressible": true + }, + { + "element": { + "name": "pin@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prev_thread_nav.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prev_thread_nav@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "printview_tsk.png" + }, + "incompressible": true + }, + { + "element": { + "name": "printview_tsk@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prop_ps.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prop_ps@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_all_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_all_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_all_triggers.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "removememory_tsk.png" + }, + "incompressible": true + }, + { + "element": { + "name": "removememory_tsk@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "reset_proto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "reset_proto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "restart_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "restart_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "resume_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "resume_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "runlast_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "runlast_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "runtoline_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "runtoline_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "skip_brkp.png" + }, + "incompressible": true + }, + { + "element": { + "name": "skip_brkp@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepbystep_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepbystep_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepinto_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepinto_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepover_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepover_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepreturn_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stepreturn_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "suspend_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "suspend_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "synced.png" + }, + "incompressible": true + }, + { + "element": { + "name": "synced@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_all_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_all_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_rem_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminate_rem_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "tnames_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "tnames_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "toggledetailpane_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "toggledetailpane_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "unlink_proto.png" + }, + "incompressible": true + }, + { + "element": { + "name": "unlink_proto@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "var_cntnt_prvdr.png" + }, + "incompressible": true + }, + { + "element": { + "name": "var_cntnt_prvdr@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "writeerr_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "writeerr_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "writeout_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "writeout_co@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "etool16" + }, + "children": [ + { + "element": { + "name": "debug_exc.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_exc@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "environment_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "environment_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "profile_exc.png" + }, + "incompressible": true + }, + { + "element": { + "name": "profile_exc@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "run_exc.png" + }, + "incompressible": true + }, + { + "element": { + "name": "run_exc@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "term_restart.png" + }, + "incompressible": true + }, + { + "element": { + "name": "term_restart@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "watch_exp.png" + }, + "incompressible": true + }, + { + "element": { + "name": "watch_exp@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "eview16" + }, + "children": [ + { + "element": { + "name": "breakpoint_view.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "breakpoint_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "breakpoint_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_persp.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_persp.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_persp@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "details_view.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "details_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "details_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memory_view.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "memory_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memory_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "module_view.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "module_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "module_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "register_view.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "register_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "register_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "variable_view.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "variable_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "variable_view@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "watchlist_view.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "watchlist_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "watchlist_view@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "obj16" + }, + "children": [ + { + "element": { + "name": "arraypartition_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "arraypartition_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "brkp_grp.png" + }, + "incompressible": true + }, + { + "element": { + "name": "brkp_grp@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "brkp_grp_disabled.png" + }, + "incompressible": true + }, + { + "element": { + "name": "brkp_grp_disabled@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "brkp_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "brkp_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "brkp_type.png" + }, + "incompressible": true + }, + { + "element": { + "name": "brkp_type@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "brkpd_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "brkpd_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "check.png" + }, + "incompressible": true + }, + { + "element": { + "name": "check@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "common_tab.png" + }, + "incompressible": true + }, + { + "element": { + "name": "common_tab@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debugt_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debugt_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debugts_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debugts_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debugtt_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debugtt_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "environment_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "environment_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "envvar_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "envvar_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_config_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_config_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "expression_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "expression_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "file_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "file_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "fldr_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "fldr_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "genericreggroup_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "genericreggroup_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "genericregister_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "genericregister_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "genericvariable_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "genericvariable_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "import_config_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "import_config_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "inst_ptr.png" + }, + "incompressible": true + }, + { + "element": { + "name": "inst_ptr@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "inst_ptr_top.png" + }, + "incompressible": true + }, + { + "element": { + "name": "inst_ptr_top@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "jar_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "jar_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "ldebug_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "ldebug_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lgroup_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lgroup_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lrun_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lrun_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memory_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memory_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memorychanged_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "memorychanged_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "osprc_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "osprc_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "osprct_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "osprct_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "persp_tab.png" + }, + "incompressible": true + }, + { + "element": { + "name": "persp_tab@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prj_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prj_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "proto_tab.png" + }, + "incompressible": true + }, + { + "element": { + "name": "proto_tab@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "read_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "read_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "read_obj_disabled.png" + }, + "incompressible": true + }, + { + "element": { + "name": "read_obj_disabled@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "readwrite_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "readwrite_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "readwrite_obj_disabled.png" + }, + "incompressible": true + }, + { + "element": { + "name": "readwrite_obj_disabled@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "refresh_tab.png" + }, + "incompressible": true + }, + { + "element": { + "name": "refresh_tab@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rundebug.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rundebug@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stckframe_obj.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "stckframe_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stckframe_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stckframe_running_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stckframe_running_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminatedlaunch_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "terminatedlaunch_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "thread_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "thread_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "threads_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "threads_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "threadt_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "threadt_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "uncheck.png" + }, + "incompressible": true + }, + { + "element": { + "name": "uncheck@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "workset.png" + }, + "incompressible": true + }, + { + "element": { + "name": "workset@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "write_obj.png" + }, + "incompressible": true + }, + { + "element": { + "name": "write_obj@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "write_obj_disabled.png" + }, + "incompressible": true + }, + { + "element": { + "name": "write_obj_disabled@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "ovr16" + }, + "children": [ + { + "element": { + "name": "error.png" + }, + "incompressible": true + }, + { + "element": { + "name": "error@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prototype.png" + }, + "incompressible": true + }, + { + "element": { + "name": "prototype@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "skip_breakpoint_ov.png" + }, + "incompressible": true + }, + { + "element": { + "name": "skip_breakpoint_ov@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stcksync_ov.png" + }, + "incompressible": true + }, + { + "element": { + "name": "stcksync_ov@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "transparent.png" + }, + "incompressible": true + }, + { + "element": { + "name": "transparent@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "var_cntnt_prvdr_ov.png" + }, + "incompressible": true + }, + { + "element": { + "name": "var_cntnt_prvdr_ov@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "wizban" + }, + "children": [ + { + "element": { + "name": "adddir_wiz.png" + }, + "incompressible": true + }, + { + "element": { + "name": "addsrcloc_wiz.png" + }, + "incompressible": true + }, + { + "element": { + "name": "debug_wiz.png" + }, + "incompressible": true + }, + { + "element": { + "name": "editdir_wiz.png" + }, + "incompressible": true + }, + { + "element": { + "name": "edtsrclkup_wiz.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_brkpts_wizban.png" + }, + "incompressible": true + }, + { + "element": { + "name": "export_config_wizban.png" + }, + "incompressible": true + }, + { + "element": { + "name": "import_brkpts_wizban.png" + }, + "incompressible": true + }, + { + "element": { + "name": "import_config_wizban.png" + }, + "incompressible": true + }, + { + "element": { + "name": "profile_wiz.png" + }, + "incompressible": true + }, + { + "element": { + "name": "run_wiz.png" + }, + "incompressible": true + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "plugin.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "plugin.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "schema" + }, + "children": [ + { + "element": { + "name": "breakpointOrganizers.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "consoleColorProviders.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "consoleLineTrackers.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "contextViewBindings.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "debugModelContextBindings.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "debugModelPresentations.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "detailPaneFactories.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "launchConfigurationTabGroups.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "launchConfigurationTabs.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "launchConfigurationTypeImages.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "launchGroups.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "launchShortcuts.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "memoryRenderings.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "sourceContainerPresentations.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "stringVariablePresentations.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "toggleBreakpointsTargetFactories.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "variableValueEditors.exsd" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "scripts" + }, + "children": [ + { + "element": { + "name": "exportplugin.xml" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "ui" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "debug" + }, + "children": [ + { + "element": { + "name": "internal" + }, + "children": [ + { + "element": { + "name": "ui" + }, + "children": [ + { + "element": { + "name": "AbstractDebugCheckboxSelectionDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractDebugListSelectionDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractDebugSelectionDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointImageProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BuildBeforeLaunchStatusHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ColorManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CompositeDebugImageDescriptor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugModelPropertyTester.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugPerspectiveFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugPluginImages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugUIAdapterFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugUIMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugUIMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugUIPlugin.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugUIPreferenceInitializer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DelegatingModelPresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DynamicInstructionPointerAnnotation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugHelpContextIds.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IInternalDebugUIConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchHistoryChangedListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchLabelChangedListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ImageDescriptorRegistry.java" + }, + "incompressible": true + }, + { + "element": { + "name": "InstructionPointerAnnotation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "InstructionPointerContext.java" + }, + "incompressible": true + }, + { + "element": { + "name": "InstructionPointerImageProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "InstructionPointerManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationTabExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LazyModelPresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MultipleInputDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Pair.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResourceExtender.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SWTFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TerminateToggleValue.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TextGetSetEditingSupport.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariableValueEditorManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariablesViewModelPresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkingDirectoryStatusHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "actions" + }, + "children": [ + { + "element": { + "name": "AbstractDebugActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractRemoveAllActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractSelectionActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ActionMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ActionMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "AddToFavoritesAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CollapseAllAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConfigureColumnsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugAsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugContextualLaunchAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugHistoryMenuAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugLastAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugToolbarAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EditLaunchConfigurationAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExecutionAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchShortcutAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchablePropertyTester.java" + }, + "incompressible": true + }, + { + "element": { + "name": "OpenDebugConfigurations.java" + }, + "incompressible": true + }, + { + "element": { + "name": "OpenProfileConfigurations.java" + }, + "incompressible": true + }, + { + "element": { + "name": "OpenRunConfigurations.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProfileAsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProfileContextualLaunchAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProfileHistoryMenuAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProfileLastAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProfileToolbarAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RelaunchActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RelaunchLastAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RemoveAllTerminatedAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RetargetAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RetargetRunToLineAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RunAsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RunContextualLaunchAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RunHistoryMenuAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RunLastAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RunToolbarAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectAllAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StatusInfo.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleBreakpointsTargetManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleFilterAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewManagementAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "breakpointGroups" + }, + "children": [ + { + "element": { + "name": "AbstractBreakpointsViewAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AdvancedGroupBreakpointsByAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointGroupMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointGroupMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointSelectionAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointWorkingSetAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ClearDefaultBreakpointGroupAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CopyBreakpointsActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EditBreakpointGroupAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GroupBreakpointsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GroupBreakpointsByAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GroupBreakpointsByDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PasteBreakpointsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RemoveFromWorkingSetAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectBreakpointWorkingsetDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SetDefaultBreakpointGroupAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleDefaultGroupAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkingSetsAction.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "breakpointSortBy" + }, + "children": [ + { + "element": { + "name": "Messages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Messages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "SortBreakpointsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SortBreakpointsByAction.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "breakpoints" + }, + "children": [ + { + "element": { + "name": "AccessWatchpointToggleAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointsCollapseAllAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointsExpandAllAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DeleteWorkingsetsMessageDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DisableBreakpointsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EnableBreakpointsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LinkBreakpointsWithDebugViewAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Messages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Messages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "ModificationWatchpointToggleAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ModifyWatchpointAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "OpenBreakpointMarkerAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RemoveAllBreakpointsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RemoveAllTriggerPointsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RemoveBreakpointAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RetargetBreakpointAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RetargetMethodBreakpointAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RetargetToggleBreakpointAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RetargetToggleLineBreakpointAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RetargetWatchpointAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RulerEnableDisableBreakpointAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectAllBreakpointsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ShowSupportedBreakpointsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ShowTargetBreakpointsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SkipAllBreakpointsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleBreakpointObjectActionDelegate.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "expressions" + }, + "children": [ + { + "element": { + "name": "AddWatchExpressionAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConvertToWatchExpressionAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CopyExpressionsToClipboardActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DisableWatchExpressionAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EditWatchExpressinInPlaceAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EditWatchExpressionAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EnableWatchExpressionAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PasteWatchExpressionsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ReevaluateWatchExpressionAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RemoveAllExpressionsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RemoveExpressionAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectAllExpressionsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WatchExpressionAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WatchExpressionDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WatchExpressionFactoryTester.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WatchHandler.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "variables" + }, + "children": [ + { + "element": { + "name": "ChangeVariableValueAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ChangeVariableValueInputDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectAllVariablesAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ShowTypesAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleDetailPaneAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "details" + }, + "children": [ + { + "element": { + "name": "DetailPaneAssignValueAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DetailPaneMaxLengthAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DetailPaneMaxLengthDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DetailPaneWordWrapAction.java" + }, + "incompressible": true + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "breakpoints" + }, + "children": [ + { + "element": { + "name": "provisional" + }, + "children": [ + { + "element": { + "name": "IBreakpointContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreakpointOrganizer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreakpointUIConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "OtherBreakpointCategory.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "commands" + }, + "children": [ + { + "element": { + "name": "actions" + }, + "children": [ + { + "element": { + "name": "AbstractRequestMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ActionsUpdater.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugActionHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugCommandActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugCommandService.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DisconnectCommandAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DisconnectCommandActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DisconnectCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DropToFrameCommandAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DropToFrameCommandActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DropToFrameCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExecuteActionRequest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ICommandParticipant.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IEnabledTarget.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RestartCommandAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RestartCommandActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RestartCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResumeCommandAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResumeCommandActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResumeCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepIntoCommandAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepIntoCommandActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepIntoCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepOverCommandAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepOverCommandActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepOverCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepReturnCommandAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepReturnCommandActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StepReturnCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SuspendCommandAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SuspendCommandActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SuspendCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TerminateAllAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TerminateAllActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TerminateAndRelaunchAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TerminateAndRelaunchHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TerminateAndRemoveAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TerminateCommandAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TerminateCommandActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TerminateCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleStepFiltersAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleStepFiltersCommandActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleStepFiltersCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "UpdateActionsRequest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "UpdateHandlerRequest.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "contextlaunching" + }, + "children": [ + { + "element": { + "name": "ContextMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ContextMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "ContextRunner.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchingResourceManager.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "contexts" + }, + "children": [ + { + "element": { + "name": "DebugContextManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugContextSourceProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugModelContextBindingManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugWindowContextService.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchSuspendTrigger.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SuspendTriggerAdapterFactory.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "elements" + }, + "children": [ + { + "element": { + "name": "adapters" + }, + "children": [ + { + "element": { + "name": "AsynchronousDebugLabelAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultBreakpointsViewInput.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultVariableCellModifier.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultViewerInputProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlockContentAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlockLabelAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryRetrievalContentAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemorySegmentLabelAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Messages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Messages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "RegisterGroupProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StackFrameSourceDisplayAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StackFrameViewerInputProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariableColumnFactoryAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariableColumnPresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WatchExpressionCellModifier.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "groups" + }, + "children": [ + { + "element": { + "name": "CommonTabLite.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GroupCycleHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GroupElementLaunchedHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GroupLaunchConfigurationSelectionDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GroupLaunchConfigurationTabGroup.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GroupLaunchHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "UnsupportedModeHandler.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "hover" + }, + "children": [ + { + "element": { + "name": "DebugTextHover.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExpressionInformationControlCreator.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "importexport" + }, + "children": [ + { + "element": { + "name": "breakpoints" + }, + "children": [ + { + "element": { + "name": "BreakpointImportExport.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointsPathDecorator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EmbeddedBreakpointsViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExportBreakpoints.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IImportExportConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ImportBreakpoints.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ImportExportMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WizardExportBreakpoints.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WizardExportBreakpointsPage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WizardImportBreakpoints.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WizardImportBreakpointsPage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WizardImportBreakpointsSelectionPage.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "launchconfigurations" + }, + "children": [ + { + "element": { + "name": "ExportLaunchConfigurationsWizard.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExportLaunchConfigurationsWizardPage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ImportLaunchConfigurationsWizard.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ImportLaunchConfigurationsWizardPage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WizardMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WizardMessages.properties" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "launchConfigurations" + }, + "children": [ + { + "element": { + "name": "AbstractLaunchConfigurationAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ClosedProjectFilter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CollapseAllLaunchConfigurationAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CompileErrorProjectPromptStatusHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CompileErrorPromptStatusHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CreateLaunchConfigurationAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CreateLaunchConfigurationPrototypeAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugModePromptStatusHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DeleteLaunchConfigurationAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DeletedProjectFilter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DuplicateLaunchConfigurationAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DuplicateLaunchDelegatesStatusHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EnvironmentVariable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExportLaunchConfigurationAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FavoritesDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FilterDropDownMenuCreator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FilterLaunchConfigurationAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchCategoryFilter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationComparator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationEditDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationFilteredTree.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationPresentationManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationPropertiesDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationSelectionDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationTabGroupExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationTabGroupViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationTabGroupWrapper.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationTabImageDescriptor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationTreeContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationTypeContribution.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationTypeFilter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationsDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationsMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationsMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchDelegateContribution.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchDelegateNotAvailableHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchGroupExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchGroupFilter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchHistory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchShortcutExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchShortcutSelectionDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchTabContribution.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LinkPrototypeAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "OrganizeFavoritesAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PerspectiveManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResetWithPrototypeValuesAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SaveScopeResourcesHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectFavoritesDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectLaunchModesDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectLaunchersDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ShowCommandLineDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "UnlinkPrototypeAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkingSetComparator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkingSetsFilter.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "memory" + }, + "children": [ + { + "element": { + "name": "IMemoryBlockConnection.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryRenderingUpdater.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IPersistableDebugElement.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryRenderingManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryRenderingType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RenderingBindings.java" + }, + "incompressible": true + }, + { + "element": { + "name": "provisional" + }, + "children": [ + { + "element": { + "name": "AbstractAsyncTableRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractAsyncTextRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryViewPresentationContext.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "model" + }, + "children": [ + { + "element": { + "name": "elements" + }, + "children": [ + { + "element": { + "name": "BreakpointContainerLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointContainerMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointManagerContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointManagerInputMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugElementLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugElementMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugTargetContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ElementContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ElementLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ElementMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExpressionContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExpressionLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExpressionManagerContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExpressionManagerMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExpressionMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchManagerContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlockContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlockLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryRetrievalContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryViewElementMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProcessContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RegisterGroupContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RegisterGroupLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RegisterGroupMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StackFrameContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StackFrameMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ThreadContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariableContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariableEditor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariableLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariableMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewerInputProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WatchExpressionEditor.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "preferences" + }, + "children": [ + { + "element": { + "name": "BooleanFieldEditor2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsolePreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugPreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugPreferencesMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugPreferencesMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugPreferenceConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchConfigurationsPreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchPerspectivePreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchersPreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchingPreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProcessPropertyPage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RunDebugPropertiesPage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StringVariablePreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewManagementPreferencePage.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "quickaccess" + }, + "children": [ + { + "element": { + "name": "AbstractLaunchQuickAccessComputer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugQuickAccessComputer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchQuickAccessElement.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProfileQuickAccessComputer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RunQuickAccessComputer.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "sourcelookup" + }, + "children": [ + { + "element": { + "name": "AddContainerAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AddSourceContainerDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BasicContainerContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DownAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EditContainerAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EditSourceLookupPathAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LookupSourceAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Prompter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RemoveAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResolveDuplicatesHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RestoreDefaultAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceContainerAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceContainerAdapterFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceContainerLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceContainerViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceContainerWorkbenchAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceElementAdapterFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceElementLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceElementWorkbenchAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupFacility.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupPanel.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupResult.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupService.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupUIMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupUIMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupUIUtils.java" + }, + "incompressible": true + }, + { + "element": { + "name": "UpAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkingSetSourceContainerType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "browsers" + }, + "children": [ + { + "element": { + "name": "ArchiveFilter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ArchiveSourceContainerBrowser.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DirectorySourceContainerBrowser.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DirectorySourceContainerDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalArchiveSourceContainerBrowser.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FolderSourceContainerBrowser.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FolderSourceContainerDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProjectSourceContainerBrowser.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProjectSourceContainerDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkingSetSourceContainerBrowser.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkspaceSourceContainerBrowser.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "stringsubstitution" + }, + "children": [ + { + "element": { + "name": "FilePrompt.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FolderPrompt.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IArgumentSelector.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PasswordPrompt.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PromptingResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResourceSelector.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectedResourceManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectedResourceResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectedTextResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StringPrompt.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StringSubstitutionMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StringSubstitutionMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "StringVariableLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StringVariablePresentationManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SystemPropertyArgumentSelector.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "viewers" + }, + "children": [ + { + "element": { + "name": "AbstractUpdatePolicy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsynchronousModel.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsynchronousRequestMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsynchronousSchedulingRuleFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsynchronousTableModel.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsynchronousTableViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsynchronousViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ChildrenRequestMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FindElementDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILabelResult.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LabelRequestMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LabelResult.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ModelNode.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PartPresentationContext.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableAddRequestMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableEditorImpl.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableInsertRequestMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRemoveRequestMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableReplaceRequestMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableUpdatePolicy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "breadcrumb" + }, + "children": [ + { + "element": { + "name": "AbstractBreadcrumb.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreadcrumbItem.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreadcrumbItemDetails.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreadcrumbItemDropDown.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreadcrumbMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreadcrumbMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "BreadcrumbViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreadcrumbDropDownSite.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TreeViewerDropDown.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "model" + }, + "children": [ + { + "element": { + "name": "ChildrenCountUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ChildrenUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ElementCompareRequest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ElementMementoRequest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FilterTransform.java" + }, + "incompressible": true + }, + { + "element": { + "name": "HasChildrenUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IInternalTreeModelViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILabelUpdateListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ITreeModelContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ITreeModelLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ITreeModelViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "InternalTreeModelViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "InternalVirtualTreeModelViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LabelUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MementoUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SubTreeModelViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TimeTriggeredProgressMonitorDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TreeModelContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TreeModelLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewerAdapterService.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewerInputUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewerStateTracker.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewerUpdateMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualCopyToClipboardActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualFindAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "provisional" + }, + "children": [ + { + "element": { + "name": "ICheckUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ICheckboxModelProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IChildrenCountUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IChildrenUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IColumnPresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IColumnPresentation2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IColumnPresentationFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IElementCompareRequest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IElementContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IElementEditor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IElementLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IElementMementoProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IElementMementoRequest.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IHasChildrenUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILabelUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IModelChangedListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IModelDelta.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IModelDeltaVisitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IModelProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IModelProxy2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IModelProxyFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IModelProxyFactory2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IModelSelectionPolicy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IModelSelectionPolicyFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IPresentationContext.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStateUpdateListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IStatusMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ITreeModelViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IViewActionProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IViewerInputProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IViewerInputRequestor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IViewerInputUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IViewerUpdate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IViewerUpdateListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IVirtualItemListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IVirtualItemValidator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ModelDelta.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PresentationContext.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TreeModelViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TreeModelViewerFilter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewerInputService.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualItem.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualTree.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VirtualTreeModelViewer.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "provisional" + }, + "children": [ + { + "element": { + "name": "AbstractColumnPresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractModelProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsynchronousContentAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsynchronousLabelAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IAsynchronousContentAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IAsynchronousLabelAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IChildrenRequestMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IContainerRequestMonitor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILabelRequestMonitor.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "update" + }, + "children": [ + { + "element": { + "name": "BreakpointContainerProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointManagerProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugEventHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugTargetEventHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugTargetProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultExpressionModelProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultModelProxyFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultModelSelectionPolicyFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultSelectionPolicy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultVariableViewModelProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultWatchExpressionModelProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EventHandlerModelProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExpressionEventHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExpressionManagerModelProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchManagerProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlockProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryRetrievalProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProcessProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StackFrameEventHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ThreadEventHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariablesViewEventHandler.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "views" + }, + "children": [ + { + "element": { + "name": "DebugModelPresentationContext.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugUIViewsMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugUIViewsMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugExceptionHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewContextManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewContextService.java" + }, + "incompressible": true + }, + { + "element": { + "name": "breakpoints" + }, + "children": [ + { + "element": { + "name": "BreakpointContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointContainerWorkbenchAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointOrganizerExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointOrganizerManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointPersistableElementAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointSetOrganizer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointTypeOrganizer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointWorkingSetCache.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointWorkingSetElementAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointWorkingSetPage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointsComparator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointsContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointsDragAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointsDropAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointsLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointsView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointsViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ElementComparator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FileBreakpointOrganizer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProjectBreakpointOrganizer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkingSetBreakpointOrganizer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkingSetCategory.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "console" + }, + "children": [ + { + "element": { + "name": "ConsoleLineNotifier.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleRemoveAllTerminatedAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleRemoveLaunchAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleShowPreferencesAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleTerminateAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProcessConsole.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProcessConsoleManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProcessConsolePageParticipant.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProcessTypePropertyTester.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ShowStandardErrorAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ShowStandardOutAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ShowWhenContentChangesAction.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "expression" + }, + "children": [ + { + "element": { + "name": "ExpressionDropAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExpressionView.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "launch" + }, + "children": [ + { + "element": { + "name": "BreadcrumbDropDownAutoExpandAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreadcrumbWorkbenchPart.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugElementAdapterFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugElementHelper.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugToolBarAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugViewModeAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "Decoration.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DecorationManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ImageImageDescriptor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchViewBreadcrumb.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchViewCopyToClipboardActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchViewMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchViewMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceNotFoundEditor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceNotFoundEditorInput.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StandardDecoration.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TerminateAndRemoveHandler.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "memory" + }, + "children": [ + { + "element": { + "name": "AbstractMemoryViewPane.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AddMemoryBlockAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AddMemoryRenderingAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AddMemoryRenderingContextAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AddMemoryRenderingDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CodePagesPreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryViewPane.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryViewTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LinkRenderingPanesAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryBlocksTreeViewPane.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryViewIdRegistry.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryViewPrefAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryViewSynchronizationService.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryViewTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryViewTreeModelContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryViewTreeViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryViewUtil.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MonitorMemoryBlockDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "NewMemoryViewAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PinMemoryBlockAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PropertyChangeNotifier.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RemoveMemoryRenderingAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RemoveRenderingContextAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RenderingViewPane.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResetMemoryBlockAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResetMemoryBlockPreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RetargetAddMemoryBlockAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SetPaddedStringPreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SwitchMemoryBlockAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SynchronizeInfo.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleMemoryMonitorsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleSplitPaneAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleViewPaneAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewPaneOrientationAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewPaneRenderingMgr.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewPaneSelectionProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ViewTabEnablementManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "renderings" + }, + "children": [ + { + "element": { + "name": "ASCIIRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ASCIIRenderingTypeDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractBaseTableRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractIntegerRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractTableRenderingLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractVirtualContentTableModel.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsyncCopyTableRenderingAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsyncPrintTableRenderingAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsyncTableRenderingCellModifier.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsyncTableRenderingUpdatePolicy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsyncTableRenderingViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AsyncVirtualContentTableViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BasicDebugViewContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BigEndianAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CopyTableRenderingToClipboardAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CreateRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultEndianessAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ErrorRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FormatTableRenderingAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FormatTableRenderingDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GoToAddressAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GoToAddressComposite.java" + }, + "incompressible": true + }, + { + "element": { + "name": "GoToAddressDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "HexIntegerRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "HexIntegerRenderingDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "HexRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "HexRenderingTypeDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IContentChangeComputer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IPresentationErrorListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IVirtualContentListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LittleEndianAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemorySegment.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PendingPropertyChanges.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PrintTableRenderingAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ReformatAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RenderingsUtil.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ResetToBaseAddressAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SignedIntegerRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SignedIntegerRenderingTypeDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRenderingCellModifier.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRenderingContentDescriptor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRenderingContentInput.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRenderingContentProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRenderingLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRenderingLabelProviderEx.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRenderingLine.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRenderingModel.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRenderingPrefAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRenderingPreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TableRenderingPropertiesPage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "UnsignedIntegerRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "UnsignedIntegerRenderingTypeDelegate.java" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "modules" + }, + "children": [ + { + "element": { + "name": "IHelpContextIdProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ModulesView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ModulesViewMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ModulesViewMessages.properties" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "registers" + }, + "children": [ + { + "element": { + "name": "RegistersView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RegistersViewMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RegistersViewMessages.properties" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "variables" + }, + "children": [ + { + "element": { + "name": "AvailableLogicalStructuresAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EditVariableLogicalStructureAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IndexedValuePartition.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IndexedVariablePartition.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LogicalStructureCache.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectLogicalStructureAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SelectionDragAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleLogicalStructureAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleShowColumnsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariableViewToggleAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariablesView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariablesViewMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariablesViewMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "VariablesViewResourceBundleMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "details" + }, + "children": [ + { + "element": { + "name": "AbstractDetailPane.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AvailableDetailPanesAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultDetailPane.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DefaultDetailPaneFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DetailMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DetailMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "DetailPaneManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DetailPaneProxy.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDetailPaneContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDetailPaneContainer2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MessageDetailPane.java" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "ui" + }, + "children": [ + { + "element": { + "name": "AbstractBreakpointOrganizerDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractDebugView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractLaunchConfigurationTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractLaunchConfigurationTabGroup.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointTypeCategory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CommonTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugElementWorkbenchAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugPopup.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugUITools.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DeferredDebugElementWorkbenchAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EnvironmentTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreakpointOrganizerDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreakpointOrganizerDelegateExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IBreakpointTypeCategory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugEditorPresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugModelPresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugModelPresentationExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugUIConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDetailPane.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDetailPane2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDetailPane3.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDetailPaneFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IInstructionPointerPresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchConfigurationDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchConfigurationTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchConfigurationTab2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchConfigurationTabGroup.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchGroup.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchShortcut.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchShortcut2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourcePresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IValueDetailListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "InspectPopupDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PrototypeDecorator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PrototypeTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RefreshTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StringVariableSelectionDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkingDirectoryBlock.java" + }, + "incompressible": true + }, + { + "element": { + "name": "actions" + }, + "children": [ + { + "element": { + "name": "AbstractLaunchHistoryAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractLaunchToolbarAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AddMemoryRenderingActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BreakpointTypesContribution.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ContextualLaunchAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugCommandAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugCommandHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExportBreakpointsOperation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IAddMemoryBlocksTarget.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IAddMemoryRenderingsTarget.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ILaunchable.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IRunToLineTarget.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IToggleBreakpointsTarget.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IToggleBreakpointsTargetExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IToggleBreakpointsTargetExtension2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IToggleBreakpointsTargetFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IToggleBreakpointsTargetManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IToggleBreakpointsTargetManagerListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IVariableValueEditor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IWatchExpressionFactoryAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IWatchExpressionFactoryAdapter2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IWatchExpressionFactoryAdapterExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ImportBreakpointsOperation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchAsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "LaunchShortcutsAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "OpenLaunchDialogAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RelaunchLastAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RulerBreakpointAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RulerBreakpointTypesActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RulerEnableDisableBreakpointActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RulerRunToLineActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RulerToggleBreakpointActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RunAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RunToLineAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RunToLineActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "RunToLineHandler.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleBreakpointAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleMethodBreakpointActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ToggleWatchpointActionDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "console" + }, + "children": [ + { + "element": { + "name": "ConsoleColorProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FileLink.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsole.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsoleColorProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsoleHyperlink.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsoleLineTracker.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsoleLineTrackerExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "contexts" + }, + "children": [ + { + "element": { + "name": "AbstractDebugContextProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "DebugContextEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugContextListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugContextManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugContextProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugContextProvider2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IDebugContextService.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISuspendTrigger.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISuspendTriggerListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "memory" + }, + "children": [ + { + "element": { + "name": "AbstractMemoryRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractMemoryRenderingBindingsProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractTableRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "AbstractTextRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryBlockTablePresentation.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryRenderingBindingsListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryRenderingBindingsProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryRenderingContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryRenderingManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryRenderingSite.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryRenderingSite2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryRenderingSynchronizationService.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryRenderingType.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IMemoryRenderingTypeDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IRepositionableMemoryRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IResettableMemoryRendering.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MemoryRenderingElement.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + }, + { + "element": { + "name": "sourcelookup" + }, + "children": [ + { + "element": { + "name": "AbstractSourceContainerBrowser.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CommonSourceNotFoundEditor.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CommonSourceNotFoundEditorInput.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourceContainerBrowser.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourceDisplay.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ISourceLookupResult.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SourceLookupTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkingSetSourceContainer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "stringsubstitution" + }, + "children": [ + { + "element": { + "name": "IArgumentSelector.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "org.eclipse.ui.console" + }, + "children": [ + { + "element": { + "name": ".classpath" + }, + "incompressible": true + }, + { + "element": { + "name": ".project" + }, + "incompressible": true + }, + { + "element": { + "name": ".settings" + }, + "children": [ + { + "element": { + "name": "org.eclipse.core.resources.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.runtime.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.core.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.ui.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.api.tools.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.prefs" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "META-INF" + }, + "children": [ + { + "element": { + "name": "MANIFEST.MF" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "about.html" + }, + "incompressible": true + }, + { + "element": { + "name": "build.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "icons" + }, + "children": [ + { + "element": { + "name": "full" + }, + "children": [ + { + "element": { + "name": "clcl16" + }, + "children": [ + { + "element": { + "name": "clear_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "clear_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lock_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lock_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "pin.png" + }, + "incompressible": true + }, + { + "element": { + "name": "pin@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "wordwrap.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "cview16" + }, + "children": [ + { + "element": { + "name": "console_view.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "console_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "console_view@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "dlcl16" + }, + "children": [ + { + "element": { + "name": "clear_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "clear_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lock_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lock_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_con.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_con@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "pin.png" + }, + "incompressible": true + }, + { + "element": { + "name": "pin@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "wordwrap.png" + }, + "incompressible": true + }, + { + "element": { + "name": "wordwrap@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "dview16" + }, + "children": [ + { + "element": { + "name": "console_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "console_view@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "elcl16" + }, + "children": [ + { + "element": { + "name": "clear_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "clear_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lock_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "lock_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_con.png" + }, + "incompressible": true + }, + { + "element": { + "name": "new_con@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "pin.png" + }, + "incompressible": true + }, + { + "element": { + "name": "pin@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_co.png" + }, + "incompressible": true + }, + { + "element": { + "name": "rem_co@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "wordwrap.png" + }, + "incompressible": true + }, + { + "element": { + "name": "wordwrap@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "eview16" + }, + "children": [ + { + "element": { + "name": "console_view.gif" + }, + "incompressible": true + }, + { + "element": { + "name": "console_view.png" + }, + "incompressible": true + }, + { + "element": { + "name": "console_view@2x.png" + }, + "incompressible": true + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "plugin.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "plugin.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "schema" + }, + "children": [ + { + "element": { + "name": "consoleFactories.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "consolePageParticipants.exsd" + }, + "incompressible": true + }, + { + "element": { + "name": "consolePatternMatchListeners.exsd" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "scripts" + }, + "children": [ + { + "element": { + "name": "exportplugin.xml" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "src" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "ui" + }, + "children": [ + { + "element": { + "name": "console" + }, + "children": [ + { + "element": { + "name": "AbstractConsole.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsolePlugin.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsole.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsoleConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsoleDocumentPartitioner.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsoleFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsoleListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsoleManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsolePageParticipant.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsoleView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IHyperlink.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IHyperlink2.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IOConsole.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IOConsoleInputStream.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IOConsoleOutputStream.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IPatternMatchListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IPatternMatchListenerDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IScrollLockStateProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MessageConsole.java" + }, + "incompressible": true + }, + { + "element": { + "name": "MessageConsoleStream.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PatternMatchEvent.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TextConsole.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TextConsolePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TextConsoleViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "actions" + }, + "children": [ + { + "element": { + "name": "ClearOutputAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "CloseConsoleAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TextViewerAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TextViewerGotoLineAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "package.html" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "internal" + }, + "children": [ + { + "element": { + "name": "console" + }, + "children": [ + { + "element": { + "name": "ConsoleDocument.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleDocumentAdapter.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleDropDownAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleFactoryExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleHyperlinkPosition.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleManager.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsolePageParticipantExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsolePatternMatcher.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsolePluginImages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleResourceBundleMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleResourceBundleMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleTypePropertyTester.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleUIPreferenceInitializer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleView.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleViewConsoleFactory.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ConsoleWorkbenchPart.java" + }, + "incompressible": true + }, + { + "element": { + "name": "FollowHyperlinkAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "HyperlinkUpdater.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IConsoleHelpContextIds.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IInternalConsoleConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IOConsolePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IOConsolePartition.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IOConsolePartitioner.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IOConsoleViewer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "OpenConsoleAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PatternMatchListener.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PatternMatchListenerExtension.java" + }, + "incompressible": true + }, + { + "element": { + "name": "PinConsoleAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ScrollLockAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ShowConsoleAction.java" + }, + "incompressible": true + }, + { + "element": { + "name": "StreamDecoder.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WordWrapAction.java" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "org.eclipse.ui.externaltools" + }, + "children": [ + { + "element": { + "name": ".classpath" + }, + "incompressible": true + }, + { + "element": { + "name": ".gitignore" + }, + "incompressible": true + }, + { + "element": { + "name": ".project" + }, + "incompressible": true + }, + { + "element": { + "name": ".settings" + }, + "children": [ + { + "element": { + "name": ".api_filters" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.resources.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.core.runtime.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.core.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.jdt.ui.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.api.tools.prefs" + }, + "incompressible": true + }, + { + "element": { + "name": "org.eclipse.pde.prefs" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "External Tools Base" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "ui" + }, + "children": [ + { + "element": { + "name": "externaltools" + }, + "children": [ + { + "element": { + "name": "internal" + }, + "children": [ + { + "element": { + "name": "launchConfigurations" + }, + "children": [ + { + "element": { + "name": "ExternalToolsBuildTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsBuilderTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsLaunchConfigurationMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsLaunchConfigurationMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsMainTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsUtil.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IgnoreWhiteSpaceComparator.java" + }, + "incompressible": true + }, + { + "element": { + "name": "WorkingSetComparator.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "menu" + }, + "children": [ + { + "element": { + "name": "ExternalToolMenuDelegate.java" + }, + "incompressible": true + }, + { + "element": { + "name": "OpenExternalToolsConfigurations.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "model" + }, + "children": [ + { + "element": { + "name": "BuilderUtils.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsImages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsModelMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsModelMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsPlugin.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsPreferenceInitializer.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IExternalToolConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IExternalToolsHelpContextIds.java" + }, + "incompressible": true + }, + { + "element": { + "name": "IPreferenceConstants.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ImageDescriptorRegistry.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "ui" + }, + "children": [ + { + "element": { + "name": "BuilderLabelProvider.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BuilderPropertyPage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "EditCommandDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsPreferencePage.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsUIMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsUIMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "FileSelectionDialog.java" + }, + "incompressible": true + }, + { + "element": { + "name": "TreeAndListGroup.java" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "variables" + }, + "children": [ + { + "element": { + "name": "BuildFilesResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BuildProjectResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "BuildTypeResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "SystemPathResolver.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariableMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "VariableMessages.properties" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "META-INF" + }, + "children": [ + { + "element": { + "name": "MANIFEST.MF" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "Program Tools Support" + }, + "children": [ + { + "element": { + "name": "org" + }, + "children": [ + { + "element": { + "name": "eclipse" + }, + "children": [ + { + "element": { + "name": "ui" + }, + "children": [ + { + "element": { + "name": "externaltools" + }, + "children": [ + { + "element": { + "name": "internal" + }, + "children": [ + { + "element": { + "name": "program" + }, + "children": [ + { + "element": { + "name": "launchConfigurations" + }, + "children": [ + { + "element": { + "name": "ExternalToolsProgramMessages.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ExternalToolsProgramMessages.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "ProgramBuilderTabGroup.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProgramMainTab.java" + }, + "incompressible": true + }, + { + "element": { + "name": "ProgramTabGroup.java" + }, + "incompressible": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "about.html" + }, + "incompressible": true + }, + { + "element": { + "name": "build.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "icons" + }, + "children": [ + { + "element": { + "name": "full" + }, + "children": [ + { + "element": { + "name": "dtool16" + }, + "children": [ + { + "element": { + "name": "external_tools.png" + }, + "incompressible": true + }, + { + "element": { + "name": "external_tools@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "etool16" + }, + "children": [ + { + "element": { + "name": "external_tools.png" + }, + "incompressible": true + }, + { + "element": { + "name": "external_tools@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "obj16" + }, + "children": [ + { + "element": { + "name": "build_tab.png" + }, + "incompressible": true + }, + { + "element": { + "name": "build_tab@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "builder.png" + }, + "incompressible": true + }, + { + "element": { + "name": "builder@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "classpath.png" + }, + "incompressible": true + }, + { + "element": { + "name": "classpath@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "external_tools.png" + }, + "incompressible": true + }, + { + "element": { + "name": "external_tools@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "invalid_build_tool.png" + }, + "incompressible": true + }, + { + "element": { + "name": "invalid_build_tool@2x.png" + }, + "incompressible": true + }, + { + "element": { + "name": "main_tab.png" + }, + "incompressible": true + }, + { + "element": { + "name": "main_tab@2x.png" + }, + "incompressible": true + } + ] + }, + { + "element": { + "name": "wizban" + }, + "children": [ + { + "element": { + "name": "ext_tools_wiz.png" + }, + "incompressible": true + } + ] + } + ] + } + ] + }, + { + "element": { + "name": "plugin.properties" + }, + "incompressible": true + }, + { + "element": { + "name": "plugin.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + }, + { + "element": { + "name": "schema" + }, + "children": [ + { + "element": { + "name": "configurationDuplicationMaps.exsd" + }, + "incompressible": true + } + ] + } + ] + }, + { + "element": { + "name": "pom.xml" + }, + "incompressible": true + } + ] + } +] \ No newline at end of file diff --git a/test/tree/public/index.html b/test/tree/public/index.html index 4bc5ae931b9..5810dba9547 100644 --- a/test/tree/public/index.html +++ b/test/tree/public/index.html @@ -346,7 +346,14 @@ expandall.onclick = () => perf('expand all', () => tree.expandAll()); collapseall.onclick = () => perf('collapse all', () => tree.collapseAll()); - tree.setChildren(null, [{"element":{"name":"eclipse.platform.debug"},"children":[{"element":{"name":".git"},"children":[{"element":{"name":"HEAD"},"incompressible":true},{"element":{"name":"branches"},"children":[]},{"element":{"name":"config"},"incompressible":true},{"element":{"name":"description"},"incompressible":true},{"element":{"name":"hooks"},"children":[{"element":{"name":"applypatch-msg.sample"},"incompressible":true},{"element":{"name":"commit-msg.sample"},"incompressible":true},{"element":{"name":"fsmonitor-watchman.sample"},"incompressible":true},{"element":{"name":"post-update.sample"},"incompressible":true},{"element":{"name":"pre-applypatch.sample"},"incompressible":true},{"element":{"name":"pre-commit.sample"},"incompressible":true},{"element":{"name":"pre-push.sample"},"incompressible":true},{"element":{"name":"pre-rebase.sample"},"incompressible":true},{"element":{"name":"pre-receive.sample"},"incompressible":true},{"element":{"name":"prepare-commit-msg.sample"},"incompressible":true},{"element":{"name":"update.sample"},"incompressible":true}]},{"element":{"name":"index"},"incompressible":true},{"element":{"name":"info"},"children":[{"element":{"name":"exclude"},"incompressible":true}]},{"element":{"name":"logs"},"children":[{"element":{"name":"HEAD"},"incompressible":true},{"element":{"name":"refs"},"children":[{"element":{"name":"heads"},"children":[{"element":{"name":"master"},"incompressible":true}]},{"element":{"name":"remotes"},"children":[{"element":{"name":"origin"},"children":[{"element":{"name":"HEAD"},"incompressible":true}]}]}]}]},{"element":{"name":"objects"},"children":[{"element":{"name":"info"},"children":[]},{"element":{"name":"pack"},"children":[{"element":{"name":"pack-2b1503bd0b85396d8596e9e99d956bfc3fbe497b.idx"},"incompressible":true},{"element":{"name":"pack-2b1503bd0b85396d8596e9e99d956bfc3fbe497b.pack"},"incompressible":true}]}]},{"element":{"name":"packed-refs"},"incompressible":true},{"element":{"name":"refs"},"children":[{"element":{"name":"heads"},"children":[{"element":{"name":"master"},"incompressible":true}]},{"element":{"name":"remotes"},"children":[{"element":{"name":"origin"},"children":[{"element":{"name":"HEAD"},"incompressible":true}]}]},{"element":{"name":"tags"},"children":[{"element":{"name":"I20190722-1800"},"incompressible":true}]}]},{"element":{"name":"shallow"},"incompressible":true}]},{"element":{"name":".gitignore"},"incompressible":true},{"element":{"name":"CONTRIBUTING"},"incompressible":true},{"element":{"name":"LICENSE"},"incompressible":true},{"element":{"name":"NOTICE"},"incompressible":true},{"element":{"name":"org.eclipse.core.externaltools"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"core"},"children":[{"element":{"name":"externaltools"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"ExternalToolsCore.java"},"incompressible":true},{"element":{"name":"IExternalToolConstants.java"},"incompressible":true},{"element":{"name":"launchConfigurations"},"children":[{"element":{"name":"BackgroundResourceRefresher.java"},"incompressible":true},{"element":{"name":"ExternalToolsCoreUtil.java"},"incompressible":true},{"element":{"name":"ExternalToolsProgramMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsProgramMessages.properties"},"incompressible":true},{"element":{"name":"ProgramLaunchDelegate.java"},"incompressible":true}]},{"element":{"name":"model"},"children":[{"element":{"name":"BuilderCoreUtils.java"},"incompressible":true},{"element":{"name":"ExternalToolBuilder.java"},"incompressible":true},{"element":{"name":"ExternalToolsModelMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsModelMessages.properties"},"incompressible":true}]},{"element":{"name":"registry"},"children":[{"element":{"name":"ExternalToolMigration.java"},"incompressible":true},{"element":{"name":"ExternalToolsMigrationMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsMigrationMessages.properties"},"incompressible":true}]}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.core.variables"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"schema"},"children":[{"element":{"name":"dynamicVariables.exsd"},"incompressible":true},{"element":{"name":"valueVariables.exsd"},"incompressible":true}]},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"core"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"variables"},"children":[{"element":{"name":"ContributedValueVariable.java"},"incompressible":true},{"element":{"name":"DynamicVariable.java"},"incompressible":true},{"element":{"name":"EclipseHomeVariableResolver.java"},"incompressible":true},{"element":{"name":"StringSubstitutionEngine.java"},"incompressible":true},{"element":{"name":"StringVariable.java"},"incompressible":true},{"element":{"name":"StringVariableManager.java"},"incompressible":true},{"element":{"name":"ValueVariable.java"},"incompressible":true},{"element":{"name":"VariablesMessages.java"},"incompressible":true},{"element":{"name":"VariablesMessages.properties"},"incompressible":true}]}]},{"element":{"name":"variables"},"children":[{"element":{"name":"IDynamicVariable.java"},"incompressible":true},{"element":{"name":"IDynamicVariableResolver.java"},"incompressible":true},{"element":{"name":"IStringVariable.java"},"incompressible":true},{"element":{"name":"IStringVariableManager.java"},"incompressible":true},{"element":{"name":"IValueVariable.java"},"incompressible":true},{"element":{"name":"IValueVariableInitializer.java"},"incompressible":true},{"element":{"name":"IValueVariableListener.java"},"incompressible":true},{"element":{"name":"VariablesPlugin.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]}]}]}]}]}]},{"element":{"name":"org.eclipse.debug.core"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".options"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"core"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"core"},"children":[{"element":{"name":"DebugEvent.java"},"incompressible":true},{"element":{"name":"DebugException.java"},"incompressible":true},{"element":{"name":"DebugPlugin.java"},"incompressible":true},{"element":{"name":"IBreakpointListener.java"},"incompressible":true},{"element":{"name":"IBreakpointManager.java"},"incompressible":true},{"element":{"name":"IBreakpointManagerListener.java"},"incompressible":true},{"element":{"name":"IBreakpointsListener.java"},"incompressible":true},{"element":{"name":"IDebugEventFilter.java"},"incompressible":true},{"element":{"name":"IDebugEventSetListener.java"},"incompressible":true},{"element":{"name":"IExpressionListener.java"},"incompressible":true},{"element":{"name":"IExpressionManager.java"},"incompressible":true},{"element":{"name":"IExpressionsListener.java"},"incompressible":true},{"element":{"name":"ILaunch.java"},"incompressible":true},{"element":{"name":"ILaunchConfiguration.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationListener.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationMigrationDelegate.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationType.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationWorkingCopy.java"},"incompressible":true},{"element":{"name":"ILaunchDelegate.java"},"incompressible":true},{"element":{"name":"ILaunchListener.java"},"incompressible":true},{"element":{"name":"ILaunchManager.java"},"incompressible":true},{"element":{"name":"ILaunchMode.java"},"incompressible":true},{"element":{"name":"ILaunchesListener.java"},"incompressible":true},{"element":{"name":"ILaunchesListener2.java"},"incompressible":true},{"element":{"name":"ILogicalStructureProvider.java"},"incompressible":true},{"element":{"name":"ILogicalStructureType.java"},"incompressible":true},{"element":{"name":"IMemoryBlockListener.java"},"incompressible":true},{"element":{"name":"IMemoryBlockManager.java"},"incompressible":true},{"element":{"name":"IProcessFactory.java"},"incompressible":true},{"element":{"name":"IPrototypeAttributesLabelProvider.java"},"incompressible":true},{"element":{"name":"IRequest.java"},"incompressible":true},{"element":{"name":"IStatusHandler.java"},"incompressible":true},{"element":{"name":"IStreamListener.java"},"incompressible":true},{"element":{"name":"Launch.java"},"incompressible":true},{"element":{"name":"RefreshUtil.java"},"incompressible":true},{"element":{"name":"commands"},"children":[{"element":{"name":"AbstractDebugCommand.java"},"incompressible":true},{"element":{"name":"IDebugCommandHandler.java"},"incompressible":true},{"element":{"name":"IDebugCommandRequest.java"},"incompressible":true},{"element":{"name":"IDisconnectHandler.java"},"incompressible":true},{"element":{"name":"IDropToFrameHandler.java"},"incompressible":true},{"element":{"name":"IEnabledStateRequest.java"},"incompressible":true},{"element":{"name":"IRestartHandler.java"},"incompressible":true},{"element":{"name":"IResumeHandler.java"},"incompressible":true},{"element":{"name":"IStepFiltersHandler.java"},"incompressible":true},{"element":{"name":"IStepIntoHandler.java"},"incompressible":true},{"element":{"name":"IStepOverHandler.java"},"incompressible":true},{"element":{"name":"IStepReturnHandler.java"},"incompressible":true},{"element":{"name":"ISuspendHandler.java"},"incompressible":true},{"element":{"name":"ITerminateHandler.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"model"},"children":[{"element":{"name":"Breakpoint.java"},"incompressible":true},{"element":{"name":"DebugElement.java"},"incompressible":true},{"element":{"name":"IBreakpoint.java"},"incompressible":true},{"element":{"name":"IBreakpointImportParticipant.java"},"incompressible":true},{"element":{"name":"IDebugElement.java"},"incompressible":true},{"element":{"name":"IDebugModelProvider.java"},"incompressible":true},{"element":{"name":"IDebugTarget.java"},"incompressible":true},{"element":{"name":"IDisconnect.java"},"incompressible":true},{"element":{"name":"IDropToFrame.java"},"incompressible":true},{"element":{"name":"IErrorReportingExpression.java"},"incompressible":true},{"element":{"name":"IExpression.java"},"incompressible":true},{"element":{"name":"IFilteredStep.java"},"incompressible":true},{"element":{"name":"IFlushableStreamMonitor.java"},"incompressible":true},{"element":{"name":"IIndexedValue.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationDelegate.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationDelegate2.java"},"incompressible":true},{"element":{"name":"ILineBreakpoint.java"},"incompressible":true},{"element":{"name":"ILogicalStructureTypeDelegate.java"},"incompressible":true},{"element":{"name":"ILogicalStructureTypeDelegate2.java"},"incompressible":true},{"element":{"name":"IMemoryBlock.java"},"incompressible":true},{"element":{"name":"IMemoryBlockExtension.java"},"incompressible":true},{"element":{"name":"IMemoryBlockRetrieval.java"},"incompressible":true},{"element":{"name":"IMemoryBlockRetrievalExtension.java"},"incompressible":true},{"element":{"name":"IPersistableSourceLocator.java"},"incompressible":true},{"element":{"name":"IProcess.java"},"incompressible":true},{"element":{"name":"IRegister.java"},"incompressible":true},{"element":{"name":"IRegisterGroup.java"},"incompressible":true},{"element":{"name":"ISourceLocator.java"},"incompressible":true},{"element":{"name":"IStackFrame.java"},"incompressible":true},{"element":{"name":"IStep.java"},"incompressible":true},{"element":{"name":"IStepFilter.java"},"incompressible":true},{"element":{"name":"IStepFilters.java"},"incompressible":true},{"element":{"name":"IStreamMonitor.java"},"incompressible":true},{"element":{"name":"IStreamsProxy.java"},"incompressible":true},{"element":{"name":"IStreamsProxy2.java"},"incompressible":true},{"element":{"name":"ISuspendResume.java"},"incompressible":true},{"element":{"name":"ITerminate.java"},"incompressible":true},{"element":{"name":"IThread.java"},"incompressible":true},{"element":{"name":"ITriggerPoint.java"},"incompressible":true},{"element":{"name":"IValue.java"},"incompressible":true},{"element":{"name":"IValueModification.java"},"incompressible":true},{"element":{"name":"IVariable.java"},"incompressible":true},{"element":{"name":"IWatchExpression.java"},"incompressible":true},{"element":{"name":"IWatchExpressionDelegate.java"},"incompressible":true},{"element":{"name":"IWatchExpressionListener.java"},"incompressible":true},{"element":{"name":"IWatchExpressionResult.java"},"incompressible":true},{"element":{"name":"IWatchpoint.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationDelegate.java"},"incompressible":true},{"element":{"name":"LineBreakpoint.java"},"incompressible":true},{"element":{"name":"MemoryByte.java"},"incompressible":true},{"element":{"name":"RuntimeProcess.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"package.html"},"incompressible":true},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"AbstractSourceLookupDirector.java"},"incompressible":true},{"element":{"name":"AbstractSourceLookupParticipant.java"},"incompressible":true},{"element":{"name":"IPersistableSourceLocator2.java"},"incompressible":true},{"element":{"name":"ISourceContainer.java"},"incompressible":true},{"element":{"name":"ISourceContainerType.java"},"incompressible":true},{"element":{"name":"ISourceContainerTypeDelegate.java"},"incompressible":true},{"element":{"name":"ISourceLookupDirector.java"},"incompressible":true},{"element":{"name":"ISourceLookupParticipant.java"},"incompressible":true},{"element":{"name":"ISourcePathComputer.java"},"incompressible":true},{"element":{"name":"ISourcePathComputerDelegate.java"},"incompressible":true},{"element":{"name":"containers"},"children":[{"element":{"name":"AbstractSourceContainer.java"},"incompressible":true},{"element":{"name":"AbstractSourceContainerTypeDelegate.java"},"incompressible":true},{"element":{"name":"ArchiveSourceContainer.java"},"incompressible":true},{"element":{"name":"CompositeSourceContainer.java"},"incompressible":true},{"element":{"name":"ContainerSourceContainer.java"},"incompressible":true},{"element":{"name":"DefaultSourceContainer.java"},"incompressible":true},{"element":{"name":"DirectorySourceContainer.java"},"incompressible":true},{"element":{"name":"ExternalArchiveSourceContainer.java"},"incompressible":true},{"element":{"name":"FolderSourceContainer.java"},"incompressible":true},{"element":{"name":"LocalFileStorage.java"},"incompressible":true},{"element":{"name":"ProjectSourceContainer.java"},"incompressible":true},{"element":{"name":"WorkspaceSourceContainer.java"},"incompressible":true},{"element":{"name":"ZipEntryStorage.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"package.html"},"incompressible":true}]}]},{"element":{"name":"internal"},"children":[{"element":{"name":"core"},"children":[{"element":{"name":"BreakpointImportParticipantDelegate.java"},"incompressible":true},{"element":{"name":"BreakpointManager.java"},"incompressible":true},{"element":{"name":"DebugCoreMessages.java"},"incompressible":true},{"element":{"name":"DebugCoreMessages.properties"},"incompressible":true},{"element":{"name":"DebugOptions.java"},"incompressible":true},{"element":{"name":"DebugPreferenceInitializer.java"},"incompressible":true},{"element":{"name":"EnvironmentVariableResolver.java"},"incompressible":true},{"element":{"name":"ExpressionManager.java"},"incompressible":true},{"element":{"name":"IConfigurationElementConstants.java"},"incompressible":true},{"element":{"name":"IExpressionsListener2.java"},"incompressible":true},{"element":{"name":"IInternalDebugCoreConstants.java"},"incompressible":true},{"element":{"name":"IMementoConstants.java"},"incompressible":true},{"element":{"name":"InputStreamMonitor.java"},"incompressible":true},{"element":{"name":"LaunchConfiguration.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationComparator.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationInfo.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationType.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationWorkingCopy.java"},"incompressible":true},{"element":{"name":"LaunchDelegate.java"},"incompressible":true},{"element":{"name":"LaunchManager.java"},"incompressible":true},{"element":{"name":"LaunchMode.java"},"incompressible":true},{"element":{"name":"LaunchablePropertyTester.java"},"incompressible":true},{"element":{"name":"LogicalStructureManager.java"},"incompressible":true},{"element":{"name":"LogicalStructureProvider.java"},"incompressible":true},{"element":{"name":"LogicalStructureType.java"},"incompressible":true},{"element":{"name":"MemoryBlockManager.java"},"incompressible":true},{"element":{"name":"NullStreamsProxy.java"},"incompressible":true},{"element":{"name":"OutputStreamMonitor.java"},"incompressible":true},{"element":{"name":"Preferences.java"},"incompressible":true},{"element":{"name":"PreferredDelegateModifyListener.java"},"incompressible":true},{"element":{"name":"RefreshScopeComparator.java"},"incompressible":true},{"element":{"name":"ResourceFactory.java"},"incompressible":true},{"element":{"name":"StepFilter.java"},"incompressible":true},{"element":{"name":"StepFilterManager.java"},"incompressible":true},{"element":{"name":"StreamsProxy.java"},"incompressible":true},{"element":{"name":"SystemPropertyResolver.java"},"incompressible":true},{"element":{"name":"SystemVariableResolver.java"},"incompressible":true},{"element":{"name":"WatchExpression.java"},"incompressible":true},{"element":{"name":"XMLMemento.java"},"incompressible":true},{"element":{"name":"commands"},"children":[{"element":{"name":"CommandAdapterFactory.java"},"incompressible":true},{"element":{"name":"DebugCommandRequest.java"},"incompressible":true},{"element":{"name":"DisconnectCommand.java"},"incompressible":true},{"element":{"name":"DropToFrameCommand.java"},"incompressible":true},{"element":{"name":"ForEachCommand.java"},"incompressible":true},{"element":{"name":"Request.java"},"incompressible":true},{"element":{"name":"ResumeCommand.java"},"incompressible":true},{"element":{"name":"StepCommand.java"},"incompressible":true},{"element":{"name":"StepFiltersCommand.java"},"incompressible":true},{"element":{"name":"StepIntoCommand.java"},"incompressible":true},{"element":{"name":"StepOverCommand.java"},"incompressible":true},{"element":{"name":"StepReturnCommand.java"},"incompressible":true},{"element":{"name":"SuspendCommand.java"},"incompressible":true},{"element":{"name":"TerminateCommand.java"},"incompressible":true}]},{"element":{"name":"groups"},"children":[{"element":{"name":"GroupLaunch.java"},"incompressible":true},{"element":{"name":"GroupLaunchConfigurationDelegate.java"},"incompressible":true},{"element":{"name":"GroupLaunchElement.java"},"incompressible":true},{"element":{"name":"GroupMemberChangeListener.java"},"incompressible":true},{"element":{"name":"observer"},"children":[{"element":{"name":"ProcessObserver.java"},"incompressible":true},{"element":{"name":"StreamObserver.java"},"incompressible":true}]}]},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"SourceContainerType.java"},"incompressible":true},{"element":{"name":"SourceLocatorMementoComparator.java"},"incompressible":true},{"element":{"name":"SourceLookupMessages.java"},"incompressible":true},{"element":{"name":"SourceLookupMessages.properties"},"incompressible":true},{"element":{"name":"SourceLookupUtils.java"},"incompressible":true},{"element":{"name":"SourcePathComputer.java"},"incompressible":true},{"element":{"name":"containers"},"children":[{"element":{"name":"ArchiveSourceContainerType.java"},"incompressible":true},{"element":{"name":"DefaultSourceContainerType.java"},"incompressible":true},{"element":{"name":"DirectorySourceContainerType.java"},"incompressible":true},{"element":{"name":"ExternalArchiveSourceContainerType.java"},"incompressible":true},{"element":{"name":"FolderSourceContainerType.java"},"incompressible":true},{"element":{"name":"ProjectSourceContainerType.java"},"incompressible":true},{"element":{"name":"WorkspaceSourceContainerType.java"},"incompressible":true}]}]},{"element":{"name":"variables"},"children":[{"element":{"name":"ContainerResolver.java"},"incompressible":true},{"element":{"name":"DateTimeResolver.java"},"incompressible":true},{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"Messages.properties"},"incompressible":true},{"element":{"name":"ProjectResolver.java"},"incompressible":true},{"element":{"name":"ResourceResolver.java"},"incompressible":true},{"element":{"name":"WorkspaceResolver.java"},"incompressible":true}]}]}]}]}]}]}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"schema"},"children":[{"element":{"name":"breakpointImportParticipants.exsd"},"incompressible":true},{"element":{"name":"breakpoints.exsd"},"incompressible":true},{"element":{"name":"launchConfigurationComparators.exsd"},"incompressible":true},{"element":{"name":"launchConfigurationTypes.exsd"},"incompressible":true},{"element":{"name":"launchDelegates.exsd"},"incompressible":true},{"element":{"name":"launchModes.exsd"},"incompressible":true},{"element":{"name":"launchers.exsd"},"incompressible":true},{"element":{"name":"logicalStructureProviders.exsd"},"incompressible":true},{"element":{"name":"logicalStructureTypes.exsd"},"incompressible":true},{"element":{"name":"processFactories.exsd"},"incompressible":true},{"element":{"name":"sourceContainerTypes.exsd"},"incompressible":true},{"element":{"name":"sourceLocators.exsd"},"incompressible":true},{"element":{"name":"sourcePathComputers.exsd"},"incompressible":true},{"element":{"name":"statusHandlers.exsd"},"incompressible":true},{"element":{"name":"stepFilters.exsd"},"incompressible":true},{"element":{"name":"watchExpressionDelegates.exsd"},"incompressible":true}]},{"element":{"name":"scripts"},"children":[{"element":{"name":"exportplugin.xml"},"incompressible":true}]}]},{"element":{"name":"org.eclipse.debug.examples.core"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"OSGI-INF"},"children":[{"element":{"name":"l10n"},"children":[{"element":{"name":"bundle.properties"},"incompressible":true}]}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"forceQualifierUpdate.txt"},"incompressible":true},{"element":{"name":"pdavm"},"children":[{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"pdavm"},"children":[{"element":{"name":"PDAVirtualMachine.java"},"incompressible":true}]}]}]}]}]}]},{"element":{"name":"tests"},"children":[{"element":{"name":"vmtest10.pda"},"incompressible":true},{"element":{"name":"vmtest2.pda"},"incompressible":true},{"element":{"name":"vmtest3.pda"},"incompressible":true},{"element":{"name":"vmtest6.pda"},"incompressible":true},{"element":{"name":"vmtest8.pda"},"incompressible":true},{"element":{"name":"vmtest9.pda"},"incompressible":true},{"element":{"name":"vmtest_children.pda"},"incompressible":true}]}]},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"readme.html"},"incompressible":true},{"element":{"name":"samples"},"children":[{"element":{"name":"counter.pda"},"incompressible":true},{"element":{"name":"drop.pda"},"incompressible":true},{"element":{"name":"example.pda"},"incompressible":true},{"element":{"name":"fibonacci.pda"},"incompressible":true},{"element":{"name":"registers.pda"},"incompressible":true},{"element":{"name":"stack.pda"},"incompressible":true},{"element":{"name":"structures.pda"},"incompressible":true}]},{"element":{"name":"scripts"},"children":[{"element":{"name":"build.xml"},"incompressible":true}]},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"core"},"children":[{"element":{"name":"midi"},"children":[{"element":{"name":"launcher"},"children":[{"element":{"name":"ClockControl.java"},"incompressible":true},{"element":{"name":"LengthControl.java"},"incompressible":true},{"element":{"name":"MidiLaunch.java"},"incompressible":true},{"element":{"name":"MidiLaunchDelegate.java"},"incompressible":true},{"element":{"name":"SequencerControl.java"},"incompressible":true},{"element":{"name":"TempoControl.java"},"incompressible":true},{"element":{"name":"TimeControl.java"},"incompressible":true}]}]},{"element":{"name":"pda"},"children":[{"element":{"name":"DebugCorePlugin.java"},"incompressible":true},{"element":{"name":"breakpoints"},"children":[{"element":{"name":"PDALineBreakpoint.java"},"incompressible":true},{"element":{"name":"PDARunToLineBreakpoint.java"},"incompressible":true},{"element":{"name":"PDAWatchpoint.java"},"incompressible":true}]},{"element":{"name":"launcher"},"children":[{"element":{"name":"PDALaunchDelegate.java"},"incompressible":true}]},{"element":{"name":"model"},"children":[{"element":{"name":"IPDAEventListener.java"},"incompressible":true},{"element":{"name":"PDAArray.java"},"incompressible":true},{"element":{"name":"PDAArrayEntry.java"},"incompressible":true},{"element":{"name":"PDADebugElement.java"},"incompressible":true},{"element":{"name":"PDADebugTarget.java"},"incompressible":true},{"element":{"name":"PDAMemoryBlock.java"},"incompressible":true},{"element":{"name":"PDAStackFrame.java"},"incompressible":true},{"element":{"name":"PDAStackValue.java"},"incompressible":true},{"element":{"name":"PDAThread.java"},"incompressible":true},{"element":{"name":"PDAValue.java"},"incompressible":true},{"element":{"name":"PDAVariable.java"},"incompressible":true},{"element":{"name":"WordStructureDelegate.java"},"incompressible":true}]},{"element":{"name":"protocol"},"children":[{"element":{"name":"PDABitFieldData.java"},"incompressible":true},{"element":{"name":"PDAChildrenCommand.java"},"incompressible":true},{"element":{"name":"PDAClearBreakpointCommand.java"},"incompressible":true},{"element":{"name":"PDACommand.java"},"incompressible":true},{"element":{"name":"PDACommandResult.java"},"incompressible":true},{"element":{"name":"PDADataCommand.java"},"incompressible":true},{"element":{"name":"PDADropFrameCommand.java"},"incompressible":true},{"element":{"name":"PDAEvalCommand.java"},"incompressible":true},{"element":{"name":"PDAEvalResultEvent.java"},"incompressible":true},{"element":{"name":"PDAEvent.java"},"incompressible":true},{"element":{"name":"PDAEventStopCommand.java"},"incompressible":true},{"element":{"name":"PDAExitedEvent.java"},"incompressible":true},{"element":{"name":"PDAFrameCommand.java"},"incompressible":true},{"element":{"name":"PDAFrameCommandResult.java"},"incompressible":true},{"element":{"name":"PDAFrameData.java"},"incompressible":true},{"element":{"name":"PDAGroupsCommand.java"},"incompressible":true},{"element":{"name":"PDAListResult.java"},"incompressible":true},{"element":{"name":"PDANoSuchLabelEvent.java"},"incompressible":true},{"element":{"name":"PDAPopDataCommand.java"},"incompressible":true},{"element":{"name":"PDAPushDataCommand.java"},"incompressible":true},{"element":{"name":"PDARegisterData.java"},"incompressible":true},{"element":{"name":"PDARegistersCommand.java"},"incompressible":true},{"element":{"name":"PDARegistersCommandResult.java"},"incompressible":true},{"element":{"name":"PDARegistersEvent.java"},"incompressible":true},{"element":{"name":"PDARestartCommand.java"},"incompressible":true},{"element":{"name":"PDAResumeCommand.java"},"incompressible":true},{"element":{"name":"PDAResumedEvent.java"},"incompressible":true},{"element":{"name":"PDARunControlEvent.java"},"incompressible":true},{"element":{"name":"PDASetBreakpointCommand.java"},"incompressible":true},{"element":{"name":"PDASetDataCommand.java"},"incompressible":true},{"element":{"name":"PDASetVarCommand.java"},"incompressible":true},{"element":{"name":"PDAStackCommand.java"},"incompressible":true},{"element":{"name":"PDAStackCommandResult.java"},"incompressible":true},{"element":{"name":"PDAStackDepthCommand.java"},"incompressible":true},{"element":{"name":"PDAStackDepthCommandResult.java"},"incompressible":true},{"element":{"name":"PDAStartedEvent.java"},"incompressible":true},{"element":{"name":"PDAStepCommand.java"},"incompressible":true},{"element":{"name":"PDAStepReturnCommand.java"},"incompressible":true},{"element":{"name":"PDASuspendCommand.java"},"incompressible":true},{"element":{"name":"PDASuspendedEvent.java"},"incompressible":true},{"element":{"name":"PDATerminateCommand.java"},"incompressible":true},{"element":{"name":"PDATerminatedEvent.java"},"incompressible":true},{"element":{"name":"PDAUnimplementedInstructionEvent.java"},"incompressible":true},{"element":{"name":"PDAVMResumeCommand.java"},"incompressible":true},{"element":{"name":"PDAVMResumedEvent.java"},"incompressible":true},{"element":{"name":"PDAVMStartedEvent.java"},"incompressible":true},{"element":{"name":"PDAVMSuspendCommand.java"},"incompressible":true},{"element":{"name":"PDAVMSuspendedEvent.java"},"incompressible":true},{"element":{"name":"PDAVMTerminatedEvent.java"},"incompressible":true},{"element":{"name":"PDAVarCommand.java"},"incompressible":true},{"element":{"name":"PDAWatchCommand.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"PDASourceLookupDirector.java"},"incompressible":true},{"element":{"name":"PDASourceLookupParticipant.java"},"incompressible":true},{"element":{"name":"PDASourcePathComputerDelegate.java"},"incompressible":true}]}]}]}]}]}]}]}]},{"element":{"name":"src_ant"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"ant"},"children":[{"element":{"name":"tasks"},"children":[{"element":{"name":"PreProcessor.java"},"incompressible":true}]}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.debug.examples.memory"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"full"},"children":[{"element":{"name":"obj16"},"children":[{"element":{"name":"hex_tree.gif"},"incompressible":true},{"element":{"name":"launch.gif"},"incompressible":true},{"element":{"name":"memory_segment.gif"},"incompressible":true},{"element":{"name":"memory_unit.gif"},"incompressible":true}]}]}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"memory"},"children":[{"element":{"name":"MemoryViewSamplePlugin.java"},"incompressible":true},{"element":{"name":"core"},"children":[{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"SampleDebugTarget.java"},"incompressible":true},{"element":{"name":"SampleMemoryBlock.java"},"incompressible":true},{"element":{"name":"SampleRegister.java"},"incompressible":true},{"element":{"name":"SampleRegisterGroup.java"},"incompressible":true},{"element":{"name":"SampleStackFrame.java"},"incompressible":true},{"element":{"name":"SampleThread.java"},"incompressible":true},{"element":{"name":"SampleValue.java"},"incompressible":true},{"element":{"name":"SampleVariable.java"},"incompressible":true},{"element":{"name":"messages.properties"},"incompressible":true}]},{"element":{"name":"engine"},"children":[{"element":{"name":"SampleEngine.java"},"incompressible":true},{"element":{"name":"SampleMemoryUnit.java"},"incompressible":true}]},{"element":{"name":"launchconfig"},"children":[{"element":{"name":"SampleLaunchConfigurationDelegateEx.java"},"incompressible":true},{"element":{"name":"SampleLaunchTabGroup.java"},"incompressible":true},{"element":{"name":"SampleModelPresentation.java"},"incompressible":true}]}]}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.debug.examples.mixedmode"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"OSGI-INF"},"children":[{"element":{"name":"l10n"},"children":[{"element":{"name":"bundle.properties"},"incompressible":true}]}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"mixedmode"},"children":[{"element":{"name":"Activator.java"},"incompressible":true},{"element":{"name":"AntExtraTab.java"},"incompressible":true},{"element":{"name":"ClearPreferredDelegatesHandler.java"},"incompressible":true},{"element":{"name":"DoNothingLaunchConfigurationDelegate.java"},"incompressible":true},{"element":{"name":"DoNothingMainTab.java"},"incompressible":true},{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"messages.properties"},"incompressible":true}]}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.debug.examples.ui"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"OSGI-INF"},"children":[{"element":{"name":"l10n"},"children":[{"element":{"name":"bundle.properties"},"incompressible":true}]}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"full"},"children":[{"element":{"name":"dlcl16"},"children":[{"element":{"name":"pop.gif"},"incompressible":true},{"element":{"name":"push.gif"},"incompressible":true}]},{"element":{"name":"elcl16"},"children":[{"element":{"name":"pop.gif"},"incompressible":true},{"element":{"name":"push.gif"},"incompressible":true}]},{"element":{"name":"obj16"},"children":[{"element":{"name":"clef.png"},"incompressible":true},{"element":{"name":"note.gif"},"incompressible":true},{"element":{"name":"pda.gif"},"incompressible":true}]}]}]},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"examples"},"children":[{"element":{"name":"ui"},"children":[{"element":{"name":"midi"},"children":[{"element":{"name":"adapters"},"children":[{"element":{"name":"CheckboxModelProxyFactory.java"},"incompressible":true},{"element":{"name":"ControlCellModifier.java"},"incompressible":true},{"element":{"name":"ControlEditor.java"},"incompressible":true},{"element":{"name":"ControlEventHandler.java"},"incompressible":true},{"element":{"name":"ControlLabelProvider.java"},"incompressible":true},{"element":{"name":"ControlsMementoProvider.java"},"incompressible":true},{"element":{"name":"MidiAdapterFactory.java"},"incompressible":true},{"element":{"name":"MidiEventLabelProvider.java"},"incompressible":true},{"element":{"name":"MidiEventModelProxy.java"},"incompressible":true},{"element":{"name":"MidiStepOverHandler.java"},"incompressible":true},{"element":{"name":"SequencerColumnFactory.java"},"incompressible":true},{"element":{"name":"SequencerColumnPresentation.java"},"incompressible":true},{"element":{"name":"SequencerContentProvider.java"},"incompressible":true},{"element":{"name":"SequencerControlsModelProxy.java"},"incompressible":true},{"element":{"name":"SequencerModelProxyFactory.java"},"incompressible":true},{"element":{"name":"TrackColumnFactory.java"},"incompressible":true},{"element":{"name":"TrackColumnPresentation.java"},"incompressible":true},{"element":{"name":"TrackContentProvider.java"},"incompressible":true},{"element":{"name":"TrackLabelProvider.java"},"incompressible":true},{"element":{"name":"TrackModelProxy.java"},"incompressible":true}]},{"element":{"name":"detailpanes"},"children":[{"element":{"name":"ClockSliderDetailPane.java"},"incompressible":true},{"element":{"name":"ControlDetailPaneFactory.java"},"incompressible":true},{"element":{"name":"TempoSliderDetailPane.java"},"incompressible":true}]},{"element":{"name":"launcher"},"children":[{"element":{"name":"ExampleLaunchStatusHandler.java"},"incompressible":true},{"element":{"name":"MidiLaunchShortcut.java"},"incompressible":true},{"element":{"name":"MidiMainTab.java"},"incompressible":true},{"element":{"name":"MidiTabGroup.java"},"incompressible":true}]}]},{"element":{"name":"pda"},"children":[{"element":{"name":"DebugUIPlugin.java"},"incompressible":true},{"element":{"name":"adapters"},"children":[{"element":{"name":"AdapterFactory.java"},"incompressible":true},{"element":{"name":"AddPDAMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"CommandAdapterFactory.java"},"incompressible":true},{"element":{"name":"ModelProxyFactory.java"},"incompressible":true},{"element":{"name":"PDADebugTargetContentProvider.java"},"incompressible":true},{"element":{"name":"PDADebugTargetProxy.java"},"incompressible":true},{"element":{"name":"PDARestartDebugCommand.java"},"incompressible":true},{"element":{"name":"PDAThreadEventHandler.java"},"incompressible":true},{"element":{"name":"PDAViewActionProvider.java"},"incompressible":true},{"element":{"name":"PDAVirtualFindAction.java"},"incompressible":true}]},{"element":{"name":"breakpoints"},"children":[{"element":{"name":"PDABreakpointAdapter.java"},"incompressible":true},{"element":{"name":"PDAEditorAdapterFactory.java"},"incompressible":true},{"element":{"name":"PDARunToLineAdapter.java"},"incompressible":true},{"element":{"name":"PDAToggleWatchpointsTarget.java"},"incompressible":true},{"element":{"name":"PDAToggleWatchpointsTargetFactory.java"},"incompressible":true}]},{"element":{"name":"editor"},"children":[{"element":{"name":"AnnotationHover.java"},"incompressible":true},{"element":{"name":"PDAContentAssistProcessor.java"},"incompressible":true},{"element":{"name":"PDAContentAssistant.java"},"incompressible":true},{"element":{"name":"PDAEditor.java"},"incompressible":true},{"element":{"name":"PDAEditorMessages.properties"},"incompressible":true},{"element":{"name":"PDAScanner.java"},"incompressible":true},{"element":{"name":"PDASourceViewerConfiguration.java"},"incompressible":true},{"element":{"name":"PopFrameActionDelegate.java"},"incompressible":true},{"element":{"name":"TextHover.java"},"incompressible":true},{"element":{"name":"WordFinder.java"},"incompressible":true}]},{"element":{"name":"launcher"},"children":[{"element":{"name":"PDALaunchShortcut.java"},"incompressible":true},{"element":{"name":"PDAMainTab.java"},"incompressible":true},{"element":{"name":"PDATabGroup.java"},"incompressible":true}]},{"element":{"name":"presentation"},"children":[{"element":{"name":"PDAModelPresentation.java"},"incompressible":true}]},{"element":{"name":"views"},"children":[{"element":{"name":"AbstractDataStackViewHandler.java"},"incompressible":true},{"element":{"name":"CanPushTester.java"},"incompressible":true},{"element":{"name":"CheckboxView.java"},"incompressible":true},{"element":{"name":"DataStackView.java"},"incompressible":true},{"element":{"name":"PopHandler.java"},"incompressible":true},{"element":{"name":"PushHandler.java"},"incompressible":true}]}]}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.debug.tests"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"Platform Debug Test Suite.launch"},"incompressible":true},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"forceQualifierUpdate.txt"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"image1.gif"},"incompressible":true},{"element":{"name":"image2.gif"},"incompressible":true}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"tests"},"children":[{"element":{"name":"AbstractDebugTest.java"},"incompressible":true},{"element":{"name":"AutomatedSuite.java"},"incompressible":true},{"element":{"name":"LocalSuite.java"},"incompressible":true},{"element":{"name":"PerformanceSuite.java"},"incompressible":true},{"element":{"name":"TestUtil.java"},"incompressible":true},{"element":{"name":"TestsPlugin.java"},"incompressible":true},{"element":{"name":"breakpoint"},"children":[{"element":{"name":"BreakpointOrderingTests.java"},"incompressible":true}]},{"element":{"name":"console"},"children":[{"element":{"name":"ConsoleDocumentAdapterTests.java"},"incompressible":true},{"element":{"name":"ConsoleManagerTests.java"},"incompressible":true},{"element":{"name":"ConsoleTests.java"},"incompressible":true},{"element":{"name":"IOConsoleTestUtil.java"},"incompressible":true},{"element":{"name":"IOConsoleTests.java"},"incompressible":true},{"element":{"name":"MockProcess.java"},"incompressible":true},{"element":{"name":"ProcessConsoleManagerTests.java"},"incompressible":true},{"element":{"name":"ProcessConsoleTests.java"},"incompressible":true},{"element":{"name":"StreamsProxyTests.java"},"incompressible":true}]},{"element":{"name":"expressions"},"children":[{"element":{"name":"ExpressionManagerTests.java"},"incompressible":true}]},{"element":{"name":"launching"},"children":[{"element":{"name":"AbstractLaunchTest.java"},"incompressible":true},{"element":{"name":"AcceleratorSubstitutionTests.java"},"incompressible":true},{"element":{"name":"ArgumentParsingTests.java"},"incompressible":true},{"element":{"name":"ArgumentsPrinter.java"},"incompressible":true},{"element":{"name":"CancellingLaunchDelegate.java"},"incompressible":true},{"element":{"name":"DebugFileStore.java"},"incompressible":true},{"element":{"name":"DebugFileSystem.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTests.java"},"incompressible":true},{"element":{"name":"LaunchFavoriteTests.java"},"incompressible":true},{"element":{"name":"LaunchGroupTests.java"},"incompressible":true},{"element":{"name":"LaunchHistoryTests.java"},"incompressible":true},{"element":{"name":"LaunchManagerTests.java"},"incompressible":true},{"element":{"name":"LaunchTests.java"},"incompressible":true},{"element":{"name":"RefreshTabTests.java"},"incompressible":true},{"element":{"name":"TestLaunchDelegate.java"},"incompressible":true}]},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"SourceLookupFacilityTests.java"},"incompressible":true},{"element":{"name":"TestLaunch.java"},"incompressible":true},{"element":{"name":"TestSourceDirector.java"},"incompressible":true},{"element":{"name":"TestSourceLocator.java"},"incompressible":true},{"element":{"name":"TestStackFrame.java"},"incompressible":true}]},{"element":{"name":"statushandlers"},"children":[{"element":{"name":"StatusHandler.java"},"incompressible":true},{"element":{"name":"StatusHandlerTests.java"},"incompressible":true}]},{"element":{"name":"stepfilters"},"children":[{"element":{"name":"StepFiltersTests.java"},"incompressible":true},{"element":{"name":"TestStepFilter.java"},"incompressible":true}]},{"element":{"name":"view"},"children":[{"element":{"name":"memory"},"children":[{"element":{"name":"DynamicRenderingBindings.java"},"incompressible":true},{"element":{"name":"MemoryBlock.java"},"incompressible":true},{"element":{"name":"MemoryBlockDynamic.java"},"incompressible":true},{"element":{"name":"MemoryBlockOne.java"},"incompressible":true},{"element":{"name":"MemoryBlockThree.java"},"incompressible":true},{"element":{"name":"MemoryBlockTwo.java"},"incompressible":true},{"element":{"name":"MemoryRenderingTests.java"},"incompressible":true},{"element":{"name":"RenderingTypeDelegate.java"},"incompressible":true}]}]},{"element":{"name":"viewer"},"children":[{"element":{"name":"model"},"children":[{"element":{"name":"AbstractViewerModelTest.java"},"incompressible":true},{"element":{"name":"CheckTests.java"},"incompressible":true},{"element":{"name":"ChildrenUpdateTests.java"},"incompressible":true},{"element":{"name":"ColumnPresentationTests.java"},"incompressible":true},{"element":{"name":"ContentTests.java"},"incompressible":true},{"element":{"name":"DeltaTests.java"},"incompressible":true},{"element":{"name":"FilterTests.java"},"incompressible":true},{"element":{"name":"FilterTransformTests.java"},"incompressible":true},{"element":{"name":"ITestModelUpdatesListenerConstants.java"},"incompressible":true},{"element":{"name":"JFaceViewerCheckTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerContentTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerDeltaTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerFilterTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerLazyTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerPerformanceTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerPopupTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerSelectionTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerStateTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerTopIndexTests.java"},"incompressible":true},{"element":{"name":"JFaceViewerUpdateTests.java"},"incompressible":true},{"element":{"name":"LazyTests.java"},"incompressible":true},{"element":{"name":"PerformanceTests.java"},"incompressible":true},{"element":{"name":"PopupTests.java"},"incompressible":true},{"element":{"name":"PresentationContextTests.java"},"incompressible":true},{"element":{"name":"SelectionTests.java"},"incompressible":true},{"element":{"name":"StateTests.java"},"incompressible":true},{"element":{"name":"TestModel.java"},"incompressible":true},{"element":{"name":"TestModelUpdatesListener.java"},"incompressible":true},{"element":{"name":"TreeModelViewerAutopopulateAgent.java"},"incompressible":true},{"element":{"name":"TreePathWrapper.java"},"incompressible":true},{"element":{"name":"UpdateTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerContentTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerDeltaTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerFilterTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerLazyModeTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerPerformanceTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerPopupTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerSelectionTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerStateTests.java"},"incompressible":true},{"element":{"name":"VirtualViewerUpdateTests.java"},"incompressible":true},{"element":{"name":"VisibleVirtualItemValidator.java"},"incompressible":true}]}]}]}]}]}]}]},{"element":{"name":"test-import"},"children":[{"element":{"name":"Import1.launch"},"incompressible":true},{"element":{"name":"Import2.launch"},"incompressible":true},{"element":{"name":"Import3.launch"},"incompressible":true},{"element":{"name":"Import4.launch"},"incompressible":true},{"element":{"name":"Import5.launch"},"incompressible":true}]},{"element":{"name":"test.xml"},"incompressible":true}]},{"element":{"name":"org.eclipse.debug.ui"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".options"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":".api_filters"},"incompressible":true},{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"css"},"children":[{"element":{"name":"e4-dark_debug_prefstyle.css"},"incompressible":true},{"element":{"name":"e4-light_debug_prefstyle.css"},"incompressible":true}]},{"element":{"name":"forceQualifierUpdate.txt"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"full"},"children":[{"element":{"name":"dlcl16"},"children":[{"element":{"name":"changevariablevalue_co.png"},"incompressible":true},{"element":{"name":"changevariablevalue_co@2x.png"},"incompressible":true},{"element":{"name":"clear_co.gif"},"incompressible":true},{"element":{"name":"collapseall.png"},"incompressible":true},{"element":{"name":"collapseall@2x.png"},"incompressible":true},{"element":{"name":"copy_edit_co.png"},"incompressible":true},{"element":{"name":"copy_edit_co@2x.png"},"incompressible":true},{"element":{"name":"copyviewtoclipboard_tsk.png"},"incompressible":true},{"element":{"name":"copyviewtoclipboard_tsk@2x.png"},"incompressible":true},{"element":{"name":"debug_view_auto.png"},"incompressible":true},{"element":{"name":"debug_view_auto@2x.png"},"incompressible":true},{"element":{"name":"debug_view_compact.png"},"incompressible":true},{"element":{"name":"debug_view_compact@2x.png"},"incompressible":true},{"element":{"name":"debug_view_tree.png"},"incompressible":true},{"element":{"name":"debug_view_tree@2x.png"},"incompressible":true},{"element":{"name":"debuglast_co.gif.png"},"incompressible":true},{"element":{"name":"debuglast_co.gif@2x.png"},"incompressible":true},{"element":{"name":"debuglast_co.png"},"incompressible":true},{"element":{"name":"debuglast_co@2x.png"},"incompressible":true},{"element":{"name":"delete_config.png"},"incompressible":true},{"element":{"name":"delete_config@2x.png"},"incompressible":true},{"element":{"name":"det_pane_auto.png"},"incompressible":true},{"element":{"name":"det_pane_auto@2x.png"},"incompressible":true},{"element":{"name":"det_pane_hide.png"},"incompressible":true},{"element":{"name":"det_pane_hide@2x.png"},"incompressible":true},{"element":{"name":"det_pane_right.png"},"incompressible":true},{"element":{"name":"det_pane_right@2x.png"},"incompressible":true},{"element":{"name":"det_pane_under.png"},"incompressible":true},{"element":{"name":"det_pane_under@2x.png"},"incompressible":true},{"element":{"name":"disabled_co.png"},"incompressible":true},{"element":{"name":"disabled_co@2x.png"},"incompressible":true},{"element":{"name":"disconnect_co.png"},"incompressible":true},{"element":{"name":"disconnect_co@2x.png"},"incompressible":true},{"element":{"name":"display_selected_mb.png"},"incompressible":true},{"element":{"name":"display_selected_mb@2x.png"},"incompressible":true},{"element":{"name":"dissolve_group.png"},"incompressible":true},{"element":{"name":"dissolve_group@2x.png"},"incompressible":true},{"element":{"name":"drop_to_frame.png"},"incompressible":true},{"element":{"name":"drop_to_frame@2x.png"},"incompressible":true},{"element":{"name":"edtsrclkup_co.png"},"incompressible":true},{"element":{"name":"edtsrclkup_co@2x.png"},"incompressible":true},{"element":{"name":"enabled_co.png"},"incompressible":true},{"element":{"name":"enabled_co@2x.png"},"incompressible":true},{"element":{"name":"expandall.png"},"incompressible":true},{"element":{"name":"expandall@2x.png"},"incompressible":true},{"element":{"name":"export_brkpts.png"},"incompressible":true},{"element":{"name":"export_brkpts@2x.png"},"incompressible":true},{"element":{"name":"export_config.png"},"incompressible":true},{"element":{"name":"export_config@2x.png"},"incompressible":true},{"element":{"name":"filter_ps.png"},"incompressible":true},{"element":{"name":"filter_ps@2x.png"},"incompressible":true},{"element":{"name":"hierarchicalLayout.png"},"incompressible":true},{"element":{"name":"hierarchicalLayout@2x.png"},"incompressible":true},{"element":{"name":"import_brkpts.png"},"incompressible":true},{"element":{"name":"import_brkpts@2x.png"},"incompressible":true},{"element":{"name":"link_proto.png"},"incompressible":true},{"element":{"name":"link_proto@2x.png"},"incompressible":true},{"element":{"name":"lock_co.png"},"incompressible":true},{"element":{"name":"lock_co@2x.png"},"incompressible":true},{"element":{"name":"memoryreset_tsk.png"},"incompressible":true},{"element":{"name":"memoryreset_tsk@2x.png"},"incompressible":true},{"element":{"name":"metharg_obj.png"},"incompressible":true},{"element":{"name":"metharg_obj@2x.png"},"incompressible":true},{"element":{"name":"monitorexpression_tsk.png"},"incompressible":true},{"element":{"name":"monitorexpression_tsk@2x.png"},"incompressible":true},{"element":{"name":"new_con.png"},"incompressible":true},{"element":{"name":"new_con@2x.png"},"incompressible":true},{"element":{"name":"new_proto.png"},"incompressible":true},{"element":{"name":"new_proto@2x.png"},"incompressible":true},{"element":{"name":"next_thread_nav.png"},"incompressible":true},{"element":{"name":"next_thread_nav@2x.png"},"incompressible":true},{"element":{"name":"pin.png"},"incompressible":true},{"element":{"name":"pin@2x.png"},"incompressible":true},{"element":{"name":"prev_thread_nav.png"},"incompressible":true},{"element":{"name":"prev_thread_nav@2x.png"},"incompressible":true},{"element":{"name":"printview_tsk.png"},"incompressible":true},{"element":{"name":"printview_tsk@2x.png"},"incompressible":true},{"element":{"name":"prop_ps.png"},"incompressible":true},{"element":{"name":"prop_ps@2x.png"},"incompressible":true},{"element":{"name":"rem_all_co.png"},"incompressible":true},{"element":{"name":"rem_all_co@2x.png"},"incompressible":true},{"element":{"name":"rem_all_triggers.png"},"incompressible":true},{"element":{"name":"rem_co.png"},"incompressible":true},{"element":{"name":"rem_co@2x.png"},"incompressible":true},{"element":{"name":"removememory_tsk.png"},"incompressible":true},{"element":{"name":"removememory_tsk@2x.png"},"incompressible":true},{"element":{"name":"reset_proto.png"},"incompressible":true},{"element":{"name":"reset_proto@2x.png"},"incompressible":true},{"element":{"name":"restart_co.png"},"incompressible":true},{"element":{"name":"restart_co@2x.png"},"incompressible":true},{"element":{"name":"resume_co.png"},"incompressible":true},{"element":{"name":"resume_co@2x.png"},"incompressible":true},{"element":{"name":"runlast_co.png"},"incompressible":true},{"element":{"name":"runlast_co@2x.png"},"incompressible":true},{"element":{"name":"runtoline_co.png"},"incompressible":true},{"element":{"name":"runtoline_co@2x.png"},"incompressible":true},{"element":{"name":"skip_brkp.png"},"incompressible":true},{"element":{"name":"skip_brkp@2x.png"},"incompressible":true},{"element":{"name":"stepbystep_co.png"},"incompressible":true},{"element":{"name":"stepbystep_co@2x.png"},"incompressible":true},{"element":{"name":"stepinto_co.png"},"incompressible":true},{"element":{"name":"stepinto_co@2x.png"},"incompressible":true},{"element":{"name":"stepover_co.png"},"incompressible":true},{"element":{"name":"stepover_co@2x.png"},"incompressible":true},{"element":{"name":"stepreturn_co.png"},"incompressible":true},{"element":{"name":"stepreturn_co@2x.png"},"incompressible":true},{"element":{"name":"suspend_co.png"},"incompressible":true},{"element":{"name":"suspend_co@2x.png"},"incompressible":true},{"element":{"name":"synced.png"},"incompressible":true},{"element":{"name":"synced@2x.png"},"incompressible":true},{"element":{"name":"terminate_all_co.png"},"incompressible":true},{"element":{"name":"terminate_all_co@2x.png"},"incompressible":true},{"element":{"name":"terminate_co.png"},"incompressible":true},{"element":{"name":"terminate_co@2x.png"},"incompressible":true},{"element":{"name":"terminate_rem_co.png"},"incompressible":true},{"element":{"name":"terminate_rem_co@2x.png"},"incompressible":true},{"element":{"name":"tnames_co.png"},"incompressible":true},{"element":{"name":"tnames_co@2x.png"},"incompressible":true},{"element":{"name":"toggledetailpane_co.png"},"incompressible":true},{"element":{"name":"toggledetailpane_co@2x.png"},"incompressible":true},{"element":{"name":"unlink_proto.png"},"incompressible":true},{"element":{"name":"unlink_proto@2x.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr@2x.png"},"incompressible":true},{"element":{"name":"writeerr_co.png"},"incompressible":true},{"element":{"name":"writeerr_co@2x.png"},"incompressible":true},{"element":{"name":"writeout_co.png"},"incompressible":true},{"element":{"name":"writeout_co@2x.png"},"incompressible":true}]},{"element":{"name":"dtool16"},"children":[{"element":{"name":"debug_exc.png"},"incompressible":true},{"element":{"name":"debug_exc@2x.png"},"incompressible":true},{"element":{"name":"environment_co.png"},"incompressible":true},{"element":{"name":"environment_co@2x.png"},"incompressible":true},{"element":{"name":"profile_exc.png"},"incompressible":true},{"element":{"name":"profile_exc@2x.png"},"incompressible":true},{"element":{"name":"run_exc.png"},"incompressible":true},{"element":{"name":"run_exc@2x.png"},"incompressible":true},{"element":{"name":"term_restart.png"},"incompressible":true},{"element":{"name":"term_restart@2x.png"},"incompressible":true},{"element":{"name":"watch_exp.png"},"incompressible":true},{"element":{"name":"watch_exp@2x.png"},"incompressible":true}]},{"element":{"name":"dview16"},"children":[{"element":{"name":"breakpoint_view.png"},"incompressible":true},{"element":{"name":"breakpoint_view@2x.png"},"incompressible":true},{"element":{"name":"debug_persp.png"},"incompressible":true},{"element":{"name":"debug_persp@2x.png"},"incompressible":true},{"element":{"name":"debug_view.png"},"incompressible":true},{"element":{"name":"debug_view@2x.png"},"incompressible":true},{"element":{"name":"details_view.png"},"incompressible":true},{"element":{"name":"details_view@2x.png"},"incompressible":true},{"element":{"name":"memory_view.png"},"incompressible":true},{"element":{"name":"memory_view@2x.png"},"incompressible":true},{"element":{"name":"module_view.png"},"incompressible":true},{"element":{"name":"module_view@2x.png"},"incompressible":true},{"element":{"name":"register_view.png"},"incompressible":true},{"element":{"name":"register_view@2x.png"},"incompressible":true},{"element":{"name":"variable_view.png"},"incompressible":true},{"element":{"name":"variable_view@2x.png"},"incompressible":true},{"element":{"name":"watchlist_view.png"},"incompressible":true},{"element":{"name":"watchlist_view@2x.png"},"incompressible":true}]},{"element":{"name":"elcl16"},"children":[{"element":{"name":"changevariablevalue_co.png"},"incompressible":true},{"element":{"name":"changevariablevalue_co@2x.png"},"incompressible":true},{"element":{"name":"collapseall.png"},"incompressible":true},{"element":{"name":"collapseall@2x.png"},"incompressible":true},{"element":{"name":"copy_edit_co.png"},"incompressible":true},{"element":{"name":"copy_edit_co@2x.png"},"incompressible":true},{"element":{"name":"copyviewtoclipboard_tsk.png"},"incompressible":true},{"element":{"name":"copyviewtoclipboard_tsk@2x.png"},"incompressible":true},{"element":{"name":"debug_view_auto.png"},"incompressible":true},{"element":{"name":"debug_view_auto@2x.png"},"incompressible":true},{"element":{"name":"debug_view_compact.png"},"incompressible":true},{"element":{"name":"debug_view_compact@2x.png"},"incompressible":true},{"element":{"name":"debug_view_tree.png"},"incompressible":true},{"element":{"name":"debug_view_tree@2x.png"},"incompressible":true},{"element":{"name":"debuglast_co.png"},"incompressible":true},{"element":{"name":"debuglast_co@2x.png"},"incompressible":true},{"element":{"name":"delete_config.png"},"incompressible":true},{"element":{"name":"delete_config@2x.png"},"incompressible":true},{"element":{"name":"det_pane_auto.png"},"incompressible":true},{"element":{"name":"det_pane_auto@2x.png"},"incompressible":true},{"element":{"name":"det_pane_hide.png"},"incompressible":true},{"element":{"name":"det_pane_hide@2x.png"},"incompressible":true},{"element":{"name":"det_pane_right.png"},"incompressible":true},{"element":{"name":"det_pane_right@2x.png"},"incompressible":true},{"element":{"name":"det_pane_under.png"},"incompressible":true},{"element":{"name":"det_pane_under@2x.png"},"incompressible":true},{"element":{"name":"disabled_co.png"},"incompressible":true},{"element":{"name":"disabled_co@2x.png"},"incompressible":true},{"element":{"name":"disconnect_co.png"},"incompressible":true},{"element":{"name":"disconnect_co@2x.png"},"incompressible":true},{"element":{"name":"display_selected_mb.png"},"incompressible":true},{"element":{"name":"display_selected_mb@2x.png"},"incompressible":true},{"element":{"name":"dissolve_group.png"},"incompressible":true},{"element":{"name":"dissolve_group@2x.png"},"incompressible":true},{"element":{"name":"drop_to_frame.png"},"incompressible":true},{"element":{"name":"drop_to_frame@2x.png"},"incompressible":true},{"element":{"name":"edtsrclkup_co.png"},"incompressible":true},{"element":{"name":"edtsrclkup_co@2x.png"},"incompressible":true},{"element":{"name":"enabled_co.png"},"incompressible":true},{"element":{"name":"enabled_co@2x.png"},"incompressible":true},{"element":{"name":"expandall.png"},"incompressible":true},{"element":{"name":"expandall@2x.png"},"incompressible":true},{"element":{"name":"export_brkpts.png"},"incompressible":true},{"element":{"name":"export_brkpts@2x.png"},"incompressible":true},{"element":{"name":"export_config.png"},"incompressible":true},{"element":{"name":"export_config@2x.png"},"incompressible":true},{"element":{"name":"filter_ps.png"},"incompressible":true},{"element":{"name":"filter_ps@2x.png"},"incompressible":true},{"element":{"name":"hierarchicalLayout.png"},"incompressible":true},{"element":{"name":"hierarchicalLayout@2x.png"},"incompressible":true},{"element":{"name":"import_brkpts.png"},"incompressible":true},{"element":{"name":"import_brkpts@2x.png"},"incompressible":true},{"element":{"name":"link_proto.png"},"incompressible":true},{"element":{"name":"link_proto@2x.png"},"incompressible":true},{"element":{"name":"lock_co.png"},"incompressible":true},{"element":{"name":"lock_co@2x.png"},"incompressible":true},{"element":{"name":"memoryreset_tsk.png"},"incompressible":true},{"element":{"name":"memoryreset_tsk@2x.png"},"incompressible":true},{"element":{"name":"metharg_obj.png"},"incompressible":true},{"element":{"name":"metharg_obj@2x.png"},"incompressible":true},{"element":{"name":"monitorexpression_tsk.png"},"incompressible":true},{"element":{"name":"monitorexpression_tsk@2x.png"},"incompressible":true},{"element":{"name":"new_con.png"},"incompressible":true},{"element":{"name":"new_con@2x.png"},"incompressible":true},{"element":{"name":"new_proto.png"},"incompressible":true},{"element":{"name":"new_proto@2x.png"},"incompressible":true},{"element":{"name":"next_thread_nav.png"},"incompressible":true},{"element":{"name":"next_thread_nav@2x.png"},"incompressible":true},{"element":{"name":"pin.png"},"incompressible":true},{"element":{"name":"pin@2x.png"},"incompressible":true},{"element":{"name":"prev_thread_nav.png"},"incompressible":true},{"element":{"name":"prev_thread_nav@2x.png"},"incompressible":true},{"element":{"name":"printview_tsk.png"},"incompressible":true},{"element":{"name":"printview_tsk@2x.png"},"incompressible":true},{"element":{"name":"prop_ps.png"},"incompressible":true},{"element":{"name":"prop_ps@2x.png"},"incompressible":true},{"element":{"name":"rem_all_co.png"},"incompressible":true},{"element":{"name":"rem_all_co@2x.png"},"incompressible":true},{"element":{"name":"rem_all_triggers.png"},"incompressible":true},{"element":{"name":"rem_co.png"},"incompressible":true},{"element":{"name":"rem_co@2x.png"},"incompressible":true},{"element":{"name":"removememory_tsk.png"},"incompressible":true},{"element":{"name":"removememory_tsk@2x.png"},"incompressible":true},{"element":{"name":"reset_proto.png"},"incompressible":true},{"element":{"name":"reset_proto@2x.png"},"incompressible":true},{"element":{"name":"restart_co.png"},"incompressible":true},{"element":{"name":"restart_co@2x.png"},"incompressible":true},{"element":{"name":"resume_co.png"},"incompressible":true},{"element":{"name":"resume_co@2x.png"},"incompressible":true},{"element":{"name":"runlast_co.png"},"incompressible":true},{"element":{"name":"runlast_co@2x.png"},"incompressible":true},{"element":{"name":"runtoline_co.png"},"incompressible":true},{"element":{"name":"runtoline_co@2x.png"},"incompressible":true},{"element":{"name":"skip_brkp.png"},"incompressible":true},{"element":{"name":"skip_brkp@2x.png"},"incompressible":true},{"element":{"name":"stepbystep_co.png"},"incompressible":true},{"element":{"name":"stepbystep_co@2x.png"},"incompressible":true},{"element":{"name":"stepinto_co.png"},"incompressible":true},{"element":{"name":"stepinto_co@2x.png"},"incompressible":true},{"element":{"name":"stepover_co.png"},"incompressible":true},{"element":{"name":"stepover_co@2x.png"},"incompressible":true},{"element":{"name":"stepreturn_co.png"},"incompressible":true},{"element":{"name":"stepreturn_co@2x.png"},"incompressible":true},{"element":{"name":"suspend_co.png"},"incompressible":true},{"element":{"name":"suspend_co@2x.png"},"incompressible":true},{"element":{"name":"synced.png"},"incompressible":true},{"element":{"name":"synced@2x.png"},"incompressible":true},{"element":{"name":"terminate_all_co.png"},"incompressible":true},{"element":{"name":"terminate_all_co@2x.png"},"incompressible":true},{"element":{"name":"terminate_co.png"},"incompressible":true},{"element":{"name":"terminate_co@2x.png"},"incompressible":true},{"element":{"name":"terminate_rem_co.png"},"incompressible":true},{"element":{"name":"terminate_rem_co@2x.png"},"incompressible":true},{"element":{"name":"tnames_co.png"},"incompressible":true},{"element":{"name":"tnames_co@2x.png"},"incompressible":true},{"element":{"name":"toggledetailpane_co.png"},"incompressible":true},{"element":{"name":"toggledetailpane_co@2x.png"},"incompressible":true},{"element":{"name":"unlink_proto.png"},"incompressible":true},{"element":{"name":"unlink_proto@2x.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr@2x.png"},"incompressible":true},{"element":{"name":"writeerr_co.png"},"incompressible":true},{"element":{"name":"writeerr_co@2x.png"},"incompressible":true},{"element":{"name":"writeout_co.png"},"incompressible":true},{"element":{"name":"writeout_co@2x.png"},"incompressible":true}]},{"element":{"name":"etool16"},"children":[{"element":{"name":"debug_exc.png"},"incompressible":true},{"element":{"name":"debug_exc@2x.png"},"incompressible":true},{"element":{"name":"environment_co.png"},"incompressible":true},{"element":{"name":"environment_co@2x.png"},"incompressible":true},{"element":{"name":"profile_exc.png"},"incompressible":true},{"element":{"name":"profile_exc@2x.png"},"incompressible":true},{"element":{"name":"run_exc.png"},"incompressible":true},{"element":{"name":"run_exc@2x.png"},"incompressible":true},{"element":{"name":"term_restart.png"},"incompressible":true},{"element":{"name":"term_restart@2x.png"},"incompressible":true},{"element":{"name":"watch_exp.png"},"incompressible":true},{"element":{"name":"watch_exp@2x.png"},"incompressible":true}]},{"element":{"name":"eview16"},"children":[{"element":{"name":"breakpoint_view.gif"},"incompressible":true},{"element":{"name":"breakpoint_view.png"},"incompressible":true},{"element":{"name":"breakpoint_view@2x.png"},"incompressible":true},{"element":{"name":"debug_persp.gif"},"incompressible":true},{"element":{"name":"debug_persp.png"},"incompressible":true},{"element":{"name":"debug_persp@2x.png"},"incompressible":true},{"element":{"name":"debug_view.gif"},"incompressible":true},{"element":{"name":"debug_view.png"},"incompressible":true},{"element":{"name":"debug_view@2x.png"},"incompressible":true},{"element":{"name":"details_view.gif"},"incompressible":true},{"element":{"name":"details_view.png"},"incompressible":true},{"element":{"name":"details_view@2x.png"},"incompressible":true},{"element":{"name":"memory_view.gif"},"incompressible":true},{"element":{"name":"memory_view.png"},"incompressible":true},{"element":{"name":"memory_view@2x.png"},"incompressible":true},{"element":{"name":"module_view.gif"},"incompressible":true},{"element":{"name":"module_view.png"},"incompressible":true},{"element":{"name":"module_view@2x.png"},"incompressible":true},{"element":{"name":"register_view.gif"},"incompressible":true},{"element":{"name":"register_view.png"},"incompressible":true},{"element":{"name":"register_view@2x.png"},"incompressible":true},{"element":{"name":"variable_view.gif"},"incompressible":true},{"element":{"name":"variable_view.png"},"incompressible":true},{"element":{"name":"variable_view@2x.png"},"incompressible":true},{"element":{"name":"watchlist_view.gif"},"incompressible":true},{"element":{"name":"watchlist_view.png"},"incompressible":true},{"element":{"name":"watchlist_view@2x.png"},"incompressible":true}]},{"element":{"name":"obj16"},"children":[{"element":{"name":"arraypartition_obj.png"},"incompressible":true},{"element":{"name":"arraypartition_obj@2x.png"},"incompressible":true},{"element":{"name":"brkp_grp.png"},"incompressible":true},{"element":{"name":"brkp_grp@2x.png"},"incompressible":true},{"element":{"name":"brkp_grp_disabled.png"},"incompressible":true},{"element":{"name":"brkp_grp_disabled@2x.png"},"incompressible":true},{"element":{"name":"brkp_obj.png"},"incompressible":true},{"element":{"name":"brkp_obj@2x.png"},"incompressible":true},{"element":{"name":"brkp_type.png"},"incompressible":true},{"element":{"name":"brkp_type@2x.png"},"incompressible":true},{"element":{"name":"brkpd_obj.png"},"incompressible":true},{"element":{"name":"brkpd_obj@2x.png"},"incompressible":true},{"element":{"name":"check.png"},"incompressible":true},{"element":{"name":"check@2x.png"},"incompressible":true},{"element":{"name":"common_tab.png"},"incompressible":true},{"element":{"name":"common_tab@2x.png"},"incompressible":true},{"element":{"name":"debugt_obj.png"},"incompressible":true},{"element":{"name":"debugt_obj@2x.png"},"incompressible":true},{"element":{"name":"debugts_obj.png"},"incompressible":true},{"element":{"name":"debugts_obj@2x.png"},"incompressible":true},{"element":{"name":"debugtt_obj.png"},"incompressible":true},{"element":{"name":"debugtt_obj@2x.png"},"incompressible":true},{"element":{"name":"environment_obj.png"},"incompressible":true},{"element":{"name":"environment_obj@2x.png"},"incompressible":true},{"element":{"name":"envvar_obj.png"},"incompressible":true},{"element":{"name":"envvar_obj@2x.png"},"incompressible":true},{"element":{"name":"export_config_obj.png"},"incompressible":true},{"element":{"name":"export_config_obj@2x.png"},"incompressible":true},{"element":{"name":"expression_obj.png"},"incompressible":true},{"element":{"name":"expression_obj@2x.png"},"incompressible":true},{"element":{"name":"file_obj.png"},"incompressible":true},{"element":{"name":"file_obj@2x.png"},"incompressible":true},{"element":{"name":"fldr_obj.png"},"incompressible":true},{"element":{"name":"fldr_obj@2x.png"},"incompressible":true},{"element":{"name":"genericreggroup_obj.png"},"incompressible":true},{"element":{"name":"genericreggroup_obj@2x.png"},"incompressible":true},{"element":{"name":"genericregister_obj.png"},"incompressible":true},{"element":{"name":"genericregister_obj@2x.png"},"incompressible":true},{"element":{"name":"genericvariable_obj.png"},"incompressible":true},{"element":{"name":"genericvariable_obj@2x.png"},"incompressible":true},{"element":{"name":"import_config_obj.png"},"incompressible":true},{"element":{"name":"import_config_obj@2x.png"},"incompressible":true},{"element":{"name":"inst_ptr.png"},"incompressible":true},{"element":{"name":"inst_ptr@2x.png"},"incompressible":true},{"element":{"name":"inst_ptr_top.png"},"incompressible":true},{"element":{"name":"inst_ptr_top@2x.png"},"incompressible":true},{"element":{"name":"jar_obj.png"},"incompressible":true},{"element":{"name":"jar_obj@2x.png"},"incompressible":true},{"element":{"name":"ldebug_obj.png"},"incompressible":true},{"element":{"name":"ldebug_obj@2x.png"},"incompressible":true},{"element":{"name":"lgroup_obj.png"},"incompressible":true},{"element":{"name":"lgroup_obj@2x.png"},"incompressible":true},{"element":{"name":"lrun_obj.png"},"incompressible":true},{"element":{"name":"lrun_obj@2x.png"},"incompressible":true},{"element":{"name":"memory_obj.png"},"incompressible":true},{"element":{"name":"memory_obj@2x.png"},"incompressible":true},{"element":{"name":"memorychanged_obj.png"},"incompressible":true},{"element":{"name":"memorychanged_obj@2x.png"},"incompressible":true},{"element":{"name":"osprc_obj.png"},"incompressible":true},{"element":{"name":"osprc_obj@2x.png"},"incompressible":true},{"element":{"name":"osprct_obj.png"},"incompressible":true},{"element":{"name":"osprct_obj@2x.png"},"incompressible":true},{"element":{"name":"persp_tab.png"},"incompressible":true},{"element":{"name":"persp_tab@2x.png"},"incompressible":true},{"element":{"name":"prj_obj.png"},"incompressible":true},{"element":{"name":"prj_obj@2x.png"},"incompressible":true},{"element":{"name":"proto_tab.png"},"incompressible":true},{"element":{"name":"proto_tab@2x.png"},"incompressible":true},{"element":{"name":"read_obj.png"},"incompressible":true},{"element":{"name":"read_obj@2x.png"},"incompressible":true},{"element":{"name":"read_obj_disabled.png"},"incompressible":true},{"element":{"name":"read_obj_disabled@2x.png"},"incompressible":true},{"element":{"name":"readwrite_obj.png"},"incompressible":true},{"element":{"name":"readwrite_obj@2x.png"},"incompressible":true},{"element":{"name":"readwrite_obj_disabled.png"},"incompressible":true},{"element":{"name":"readwrite_obj_disabled@2x.png"},"incompressible":true},{"element":{"name":"refresh_tab.png"},"incompressible":true},{"element":{"name":"refresh_tab@2x.png"},"incompressible":true},{"element":{"name":"rundebug.png"},"incompressible":true},{"element":{"name":"rundebug@2x.png"},"incompressible":true},{"element":{"name":"stckframe_obj.gif"},"incompressible":true},{"element":{"name":"stckframe_obj.png"},"incompressible":true},{"element":{"name":"stckframe_obj@2x.png"},"incompressible":true},{"element":{"name":"stckframe_running_obj.png"},"incompressible":true},{"element":{"name":"stckframe_running_obj@2x.png"},"incompressible":true},{"element":{"name":"terminatedlaunch_obj.png"},"incompressible":true},{"element":{"name":"terminatedlaunch_obj@2x.png"},"incompressible":true},{"element":{"name":"thread_obj.png"},"incompressible":true},{"element":{"name":"thread_obj@2x.png"},"incompressible":true},{"element":{"name":"threads_obj.png"},"incompressible":true},{"element":{"name":"threads_obj@2x.png"},"incompressible":true},{"element":{"name":"threadt_obj.png"},"incompressible":true},{"element":{"name":"threadt_obj@2x.png"},"incompressible":true},{"element":{"name":"uncheck.png"},"incompressible":true},{"element":{"name":"uncheck@2x.png"},"incompressible":true},{"element":{"name":"workset.png"},"incompressible":true},{"element":{"name":"workset@2x.png"},"incompressible":true},{"element":{"name":"write_obj.png"},"incompressible":true},{"element":{"name":"write_obj@2x.png"},"incompressible":true},{"element":{"name":"write_obj_disabled.png"},"incompressible":true},{"element":{"name":"write_obj_disabled@2x.png"},"incompressible":true}]},{"element":{"name":"ovr16"},"children":[{"element":{"name":"error.png"},"incompressible":true},{"element":{"name":"error@2x.png"},"incompressible":true},{"element":{"name":"prototype.png"},"incompressible":true},{"element":{"name":"prototype@2x.png"},"incompressible":true},{"element":{"name":"skip_breakpoint_ov.png"},"incompressible":true},{"element":{"name":"skip_breakpoint_ov@2x.png"},"incompressible":true},{"element":{"name":"stcksync_ov.png"},"incompressible":true},{"element":{"name":"stcksync_ov@2x.png"},"incompressible":true},{"element":{"name":"transparent.png"},"incompressible":true},{"element":{"name":"transparent@2x.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr_ov.png"},"incompressible":true},{"element":{"name":"var_cntnt_prvdr_ov@2x.png"},"incompressible":true}]},{"element":{"name":"wizban"},"children":[{"element":{"name":"adddir_wiz.png"},"incompressible":true},{"element":{"name":"addsrcloc_wiz.png"},"incompressible":true},{"element":{"name":"debug_wiz.png"},"incompressible":true},{"element":{"name":"editdir_wiz.png"},"incompressible":true},{"element":{"name":"edtsrclkup_wiz.png"},"incompressible":true},{"element":{"name":"export_brkpts_wizban.png"},"incompressible":true},{"element":{"name":"export_config_wizban.png"},"incompressible":true},{"element":{"name":"import_brkpts_wizban.png"},"incompressible":true},{"element":{"name":"import_config_wizban.png"},"incompressible":true},{"element":{"name":"profile_wiz.png"},"incompressible":true},{"element":{"name":"run_wiz.png"},"incompressible":true}]}]}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"schema"},"children":[{"element":{"name":"breakpointOrganizers.exsd"},"incompressible":true},{"element":{"name":"consoleColorProviders.exsd"},"incompressible":true},{"element":{"name":"consoleLineTrackers.exsd"},"incompressible":true},{"element":{"name":"contextViewBindings.exsd"},"incompressible":true},{"element":{"name":"debugModelContextBindings.exsd"},"incompressible":true},{"element":{"name":"debugModelPresentations.exsd"},"incompressible":true},{"element":{"name":"detailPaneFactories.exsd"},"incompressible":true},{"element":{"name":"launchConfigurationTabGroups.exsd"},"incompressible":true},{"element":{"name":"launchConfigurationTabs.exsd"},"incompressible":true},{"element":{"name":"launchConfigurationTypeImages.exsd"},"incompressible":true},{"element":{"name":"launchGroups.exsd"},"incompressible":true},{"element":{"name":"launchShortcuts.exsd"},"incompressible":true},{"element":{"name":"memoryRenderings.exsd"},"incompressible":true},{"element":{"name":"sourceContainerPresentations.exsd"},"incompressible":true},{"element":{"name":"stringVariablePresentations.exsd"},"incompressible":true},{"element":{"name":"toggleBreakpointsTargetFactories.exsd"},"incompressible":true},{"element":{"name":"variableValueEditors.exsd"},"incompressible":true}]},{"element":{"name":"scripts"},"children":[{"element":{"name":"exportplugin.xml"},"incompressible":true}]},{"element":{"name":"ui"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"debug"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"ui"},"children":[{"element":{"name":"AbstractDebugCheckboxSelectionDialog.java"},"incompressible":true},{"element":{"name":"AbstractDebugListSelectionDialog.java"},"incompressible":true},{"element":{"name":"AbstractDebugSelectionDialog.java"},"incompressible":true},{"element":{"name":"BreakpointImageProvider.java"},"incompressible":true},{"element":{"name":"BuildBeforeLaunchStatusHandler.java"},"incompressible":true},{"element":{"name":"ColorManager.java"},"incompressible":true},{"element":{"name":"CompositeDebugImageDescriptor.java"},"incompressible":true},{"element":{"name":"DebugModelPropertyTester.java"},"incompressible":true},{"element":{"name":"DebugPerspectiveFactory.java"},"incompressible":true},{"element":{"name":"DebugPluginImages.java"},"incompressible":true},{"element":{"name":"DebugUIAdapterFactory.java"},"incompressible":true},{"element":{"name":"DebugUIMessages.java"},"incompressible":true},{"element":{"name":"DebugUIMessages.properties"},"incompressible":true},{"element":{"name":"DebugUIPlugin.java"},"incompressible":true},{"element":{"name":"DebugUIPreferenceInitializer.java"},"incompressible":true},{"element":{"name":"DefaultLabelProvider.java"},"incompressible":true},{"element":{"name":"DelegatingModelPresentation.java"},"incompressible":true},{"element":{"name":"DynamicInstructionPointerAnnotation.java"},"incompressible":true},{"element":{"name":"IDebugHelpContextIds.java"},"incompressible":true},{"element":{"name":"IInternalDebugUIConstants.java"},"incompressible":true},{"element":{"name":"ILaunchHistoryChangedListener.java"},"incompressible":true},{"element":{"name":"ILaunchLabelChangedListener.java"},"incompressible":true},{"element":{"name":"ImageDescriptorRegistry.java"},"incompressible":true},{"element":{"name":"InstructionPointerAnnotation.java"},"incompressible":true},{"element":{"name":"InstructionPointerContext.java"},"incompressible":true},{"element":{"name":"InstructionPointerImageProvider.java"},"incompressible":true},{"element":{"name":"InstructionPointerManager.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTabExtension.java"},"incompressible":true},{"element":{"name":"LazyModelPresentation.java"},"incompressible":true},{"element":{"name":"MultipleInputDialog.java"},"incompressible":true},{"element":{"name":"Pair.java"},"incompressible":true},{"element":{"name":"ResourceExtender.java"},"incompressible":true},{"element":{"name":"SWTFactory.java"},"incompressible":true},{"element":{"name":"TerminateToggleValue.java"},"incompressible":true},{"element":{"name":"TextGetSetEditingSupport.java"},"incompressible":true},{"element":{"name":"VariableValueEditorManager.java"},"incompressible":true},{"element":{"name":"VariablesViewModelPresentation.java"},"incompressible":true},{"element":{"name":"WorkingDirectoryStatusHandler.java"},"incompressible":true},{"element":{"name":"actions"},"children":[{"element":{"name":"AbstractDebugActionDelegate.java"},"incompressible":true},{"element":{"name":"AbstractRemoveAllActionDelegate.java"},"incompressible":true},{"element":{"name":"AbstractSelectionActionDelegate.java"},"incompressible":true},{"element":{"name":"ActionMessages.java"},"incompressible":true},{"element":{"name":"ActionMessages.properties"},"incompressible":true},{"element":{"name":"AddToFavoritesAction.java"},"incompressible":true},{"element":{"name":"CollapseAllAction.java"},"incompressible":true},{"element":{"name":"ConfigureColumnsAction.java"},"incompressible":true},{"element":{"name":"DebugAsAction.java"},"incompressible":true},{"element":{"name":"DebugContextualLaunchAction.java"},"incompressible":true},{"element":{"name":"DebugHistoryMenuAction.java"},"incompressible":true},{"element":{"name":"DebugLastAction.java"},"incompressible":true},{"element":{"name":"DebugToolbarAction.java"},"incompressible":true},{"element":{"name":"EditLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"ExecutionAction.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"LaunchShortcutAction.java"},"incompressible":true},{"element":{"name":"LaunchablePropertyTester.java"},"incompressible":true},{"element":{"name":"OpenDebugConfigurations.java"},"incompressible":true},{"element":{"name":"OpenProfileConfigurations.java"},"incompressible":true},{"element":{"name":"OpenRunConfigurations.java"},"incompressible":true},{"element":{"name":"ProfileAsAction.java"},"incompressible":true},{"element":{"name":"ProfileContextualLaunchAction.java"},"incompressible":true},{"element":{"name":"ProfileHistoryMenuAction.java"},"incompressible":true},{"element":{"name":"ProfileLastAction.java"},"incompressible":true},{"element":{"name":"ProfileToolbarAction.java"},"incompressible":true},{"element":{"name":"RelaunchActionDelegate.java"},"incompressible":true},{"element":{"name":"RelaunchLastAction.java"},"incompressible":true},{"element":{"name":"RemoveAllTerminatedAction.java"},"incompressible":true},{"element":{"name":"RetargetAction.java"},"incompressible":true},{"element":{"name":"RetargetRunToLineAction.java"},"incompressible":true},{"element":{"name":"RunAsAction.java"},"incompressible":true},{"element":{"name":"RunContextualLaunchAction.java"},"incompressible":true},{"element":{"name":"RunHistoryMenuAction.java"},"incompressible":true},{"element":{"name":"RunLastAction.java"},"incompressible":true},{"element":{"name":"RunToolbarAction.java"},"incompressible":true},{"element":{"name":"SelectAllAction.java"},"incompressible":true},{"element":{"name":"StatusInfo.java"},"incompressible":true},{"element":{"name":"ToggleBreakpointsTargetManager.java"},"incompressible":true},{"element":{"name":"ToggleFilterAction.java"},"incompressible":true},{"element":{"name":"ViewManagementAction.java"},"incompressible":true},{"element":{"name":"breakpointGroups"},"children":[{"element":{"name":"AbstractBreakpointsViewAction.java"},"incompressible":true},{"element":{"name":"AdvancedGroupBreakpointsByAction.java"},"incompressible":true},{"element":{"name":"BreakpointGroupMessages.java"},"incompressible":true},{"element":{"name":"BreakpointGroupMessages.properties"},"incompressible":true},{"element":{"name":"BreakpointSelectionAction.java"},"incompressible":true},{"element":{"name":"BreakpointWorkingSetAction.java"},"incompressible":true},{"element":{"name":"ClearDefaultBreakpointGroupAction.java"},"incompressible":true},{"element":{"name":"CopyBreakpointsActionDelegate.java"},"incompressible":true},{"element":{"name":"EditBreakpointGroupAction.java"},"incompressible":true},{"element":{"name":"GroupBreakpointsAction.java"},"incompressible":true},{"element":{"name":"GroupBreakpointsByAction.java"},"incompressible":true},{"element":{"name":"GroupBreakpointsByDialog.java"},"incompressible":true},{"element":{"name":"PasteBreakpointsAction.java"},"incompressible":true},{"element":{"name":"RemoveFromWorkingSetAction.java"},"incompressible":true},{"element":{"name":"SelectBreakpointWorkingsetDialog.java"},"incompressible":true},{"element":{"name":"SetDefaultBreakpointGroupAction.java"},"incompressible":true},{"element":{"name":"ToggleDefaultGroupAction.java"},"incompressible":true},{"element":{"name":"WorkingSetsAction.java"},"incompressible":true}]},{"element":{"name":"breakpointSortBy"},"children":[{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"Messages.properties"},"incompressible":true},{"element":{"name":"SortBreakpointsAction.java"},"incompressible":true},{"element":{"name":"SortBreakpointsByAction.java"},"incompressible":true}]},{"element":{"name":"breakpoints"},"children":[{"element":{"name":"AccessWatchpointToggleAction.java"},"incompressible":true},{"element":{"name":"BreakpointsCollapseAllAction.java"},"incompressible":true},{"element":{"name":"BreakpointsExpandAllAction.java"},"incompressible":true},{"element":{"name":"DeleteWorkingsetsMessageDialog.java"},"incompressible":true},{"element":{"name":"DisableBreakpointsAction.java"},"incompressible":true},{"element":{"name":"EnableBreakpointsAction.java"},"incompressible":true},{"element":{"name":"LinkBreakpointsWithDebugViewAction.java"},"incompressible":true},{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"Messages.properties"},"incompressible":true},{"element":{"name":"ModificationWatchpointToggleAction.java"},"incompressible":true},{"element":{"name":"ModifyWatchpointAction.java"},"incompressible":true},{"element":{"name":"OpenBreakpointMarkerAction.java"},"incompressible":true},{"element":{"name":"RemoveAllBreakpointsAction.java"},"incompressible":true},{"element":{"name":"RemoveAllTriggerPointsAction.java"},"incompressible":true},{"element":{"name":"RemoveBreakpointAction.java"},"incompressible":true},{"element":{"name":"RetargetBreakpointAction.java"},"incompressible":true},{"element":{"name":"RetargetMethodBreakpointAction.java"},"incompressible":true},{"element":{"name":"RetargetToggleBreakpointAction.java"},"incompressible":true},{"element":{"name":"RetargetToggleLineBreakpointAction.java"},"incompressible":true},{"element":{"name":"RetargetWatchpointAction.java"},"incompressible":true},{"element":{"name":"RulerEnableDisableBreakpointAction.java"},"incompressible":true},{"element":{"name":"SelectAllBreakpointsAction.java"},"incompressible":true},{"element":{"name":"ShowSupportedBreakpointsAction.java"},"incompressible":true},{"element":{"name":"ShowTargetBreakpointsAction.java"},"incompressible":true},{"element":{"name":"SkipAllBreakpointsAction.java"},"incompressible":true},{"element":{"name":"ToggleBreakpointObjectActionDelegate.java"},"incompressible":true}]},{"element":{"name":"expressions"},"children":[{"element":{"name":"AddWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"ConvertToWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"CopyExpressionsToClipboardActionDelegate.java"},"incompressible":true},{"element":{"name":"DisableWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"EditWatchExpressinInPlaceAction.java"},"incompressible":true},{"element":{"name":"EditWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"EnableWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"PasteWatchExpressionsAction.java"},"incompressible":true},{"element":{"name":"ReevaluateWatchExpressionAction.java"},"incompressible":true},{"element":{"name":"RemoveAllExpressionsAction.java"},"incompressible":true},{"element":{"name":"RemoveExpressionAction.java"},"incompressible":true},{"element":{"name":"SelectAllExpressionsAction.java"},"incompressible":true},{"element":{"name":"WatchExpressionAction.java"},"incompressible":true},{"element":{"name":"WatchExpressionDialog.java"},"incompressible":true},{"element":{"name":"WatchExpressionFactoryTester.java"},"incompressible":true},{"element":{"name":"WatchHandler.java"},"incompressible":true}]},{"element":{"name":"variables"},"children":[{"element":{"name":"ChangeVariableValueAction.java"},"incompressible":true},{"element":{"name":"ChangeVariableValueInputDialog.java"},"incompressible":true},{"element":{"name":"SelectAllVariablesAction.java"},"incompressible":true},{"element":{"name":"ShowTypesAction.java"},"incompressible":true},{"element":{"name":"ToggleDetailPaneAction.java"},"incompressible":true},{"element":{"name":"details"},"children":[{"element":{"name":"DetailPaneAssignValueAction.java"},"incompressible":true},{"element":{"name":"DetailPaneMaxLengthAction.java"},"incompressible":true},{"element":{"name":"DetailPaneMaxLengthDialog.java"},"incompressible":true},{"element":{"name":"DetailPaneWordWrapAction.java"},"incompressible":true}]}]}]},{"element":{"name":"breakpoints"},"children":[{"element":{"name":"provisional"},"children":[{"element":{"name":"IBreakpointContainer.java"},"incompressible":true},{"element":{"name":"IBreakpointOrganizer.java"},"incompressible":true},{"element":{"name":"IBreakpointUIConstants.java"},"incompressible":true},{"element":{"name":"OtherBreakpointCategory.java"},"incompressible":true}]}]},{"element":{"name":"commands"},"children":[{"element":{"name":"actions"},"children":[{"element":{"name":"AbstractRequestMonitor.java"},"incompressible":true},{"element":{"name":"ActionsUpdater.java"},"incompressible":true},{"element":{"name":"DebugActionHandler.java"},"incompressible":true},{"element":{"name":"DebugCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"DebugCommandService.java"},"incompressible":true},{"element":{"name":"DisconnectCommandAction.java"},"incompressible":true},{"element":{"name":"DisconnectCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"DisconnectCommandHandler.java"},"incompressible":true},{"element":{"name":"DropToFrameCommandAction.java"},"incompressible":true},{"element":{"name":"DropToFrameCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"DropToFrameCommandHandler.java"},"incompressible":true},{"element":{"name":"ExecuteActionRequest.java"},"incompressible":true},{"element":{"name":"ICommandParticipant.java"},"incompressible":true},{"element":{"name":"IEnabledTarget.java"},"incompressible":true},{"element":{"name":"RestartCommandAction.java"},"incompressible":true},{"element":{"name":"RestartCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"RestartCommandHandler.java"},"incompressible":true},{"element":{"name":"ResumeCommandAction.java"},"incompressible":true},{"element":{"name":"ResumeCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"ResumeCommandHandler.java"},"incompressible":true},{"element":{"name":"StepIntoCommandAction.java"},"incompressible":true},{"element":{"name":"StepIntoCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"StepIntoCommandHandler.java"},"incompressible":true},{"element":{"name":"StepOverCommandAction.java"},"incompressible":true},{"element":{"name":"StepOverCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"StepOverCommandHandler.java"},"incompressible":true},{"element":{"name":"StepReturnCommandAction.java"},"incompressible":true},{"element":{"name":"StepReturnCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"StepReturnCommandHandler.java"},"incompressible":true},{"element":{"name":"SuspendCommandAction.java"},"incompressible":true},{"element":{"name":"SuspendCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"SuspendCommandHandler.java"},"incompressible":true},{"element":{"name":"TerminateAllAction.java"},"incompressible":true},{"element":{"name":"TerminateAllActionDelegate.java"},"incompressible":true},{"element":{"name":"TerminateAndRelaunchAction.java"},"incompressible":true},{"element":{"name":"TerminateAndRelaunchHandler.java"},"incompressible":true},{"element":{"name":"TerminateAndRemoveAction.java"},"incompressible":true},{"element":{"name":"TerminateCommandAction.java"},"incompressible":true},{"element":{"name":"TerminateCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"TerminateCommandHandler.java"},"incompressible":true},{"element":{"name":"ToggleStepFiltersAction.java"},"incompressible":true},{"element":{"name":"ToggleStepFiltersCommandActionDelegate.java"},"incompressible":true},{"element":{"name":"ToggleStepFiltersCommandHandler.java"},"incompressible":true},{"element":{"name":"UpdateActionsRequest.java"},"incompressible":true},{"element":{"name":"UpdateHandlerRequest.java"},"incompressible":true}]}]},{"element":{"name":"contextlaunching"},"children":[{"element":{"name":"ContextMessages.java"},"incompressible":true},{"element":{"name":"ContextMessages.properties"},"incompressible":true},{"element":{"name":"ContextRunner.java"},"incompressible":true},{"element":{"name":"LaunchingResourceManager.java"},"incompressible":true}]},{"element":{"name":"contexts"},"children":[{"element":{"name":"DebugContextManager.java"},"incompressible":true},{"element":{"name":"DebugContextSourceProvider.java"},"incompressible":true},{"element":{"name":"DebugModelContextBindingManager.java"},"incompressible":true},{"element":{"name":"DebugWindowContextService.java"},"incompressible":true},{"element":{"name":"LaunchSuspendTrigger.java"},"incompressible":true},{"element":{"name":"SuspendTriggerAdapterFactory.java"},"incompressible":true}]},{"element":{"name":"elements"},"children":[{"element":{"name":"adapters"},"children":[{"element":{"name":"AsynchronousDebugLabelAdapter.java"},"incompressible":true},{"element":{"name":"DefaultBreakpointsViewInput.java"},"incompressible":true},{"element":{"name":"DefaultVariableCellModifier.java"},"incompressible":true},{"element":{"name":"DefaultViewerInputProvider.java"},"incompressible":true},{"element":{"name":"MemoryBlockContentAdapter.java"},"incompressible":true},{"element":{"name":"MemoryBlockLabelAdapter.java"},"incompressible":true},{"element":{"name":"MemoryRetrievalContentAdapter.java"},"incompressible":true},{"element":{"name":"MemorySegmentLabelAdapter.java"},"incompressible":true},{"element":{"name":"Messages.java"},"incompressible":true},{"element":{"name":"Messages.properties"},"incompressible":true},{"element":{"name":"RegisterGroupProxy.java"},"incompressible":true},{"element":{"name":"StackFrameSourceDisplayAdapter.java"},"incompressible":true},{"element":{"name":"StackFrameViewerInputProvider.java"},"incompressible":true},{"element":{"name":"VariableColumnFactoryAdapter.java"},"incompressible":true},{"element":{"name":"VariableColumnPresentation.java"},"incompressible":true},{"element":{"name":"WatchExpressionCellModifier.java"},"incompressible":true}]}]},{"element":{"name":"groups"},"children":[{"element":{"name":"CommonTabLite.java"},"incompressible":true},{"element":{"name":"GroupCycleHandler.java"},"incompressible":true},{"element":{"name":"GroupElementLaunchedHandler.java"},"incompressible":true},{"element":{"name":"GroupLaunchConfigurationSelectionDialog.java"},"incompressible":true},{"element":{"name":"GroupLaunchConfigurationTabGroup.java"},"incompressible":true},{"element":{"name":"GroupLaunchHandler.java"},"incompressible":true},{"element":{"name":"UnsupportedModeHandler.java"},"incompressible":true}]},{"element":{"name":"hover"},"children":[{"element":{"name":"DebugTextHover.java"},"incompressible":true},{"element":{"name":"ExpressionInformationControlCreator.java"},"incompressible":true}]},{"element":{"name":"importexport"},"children":[{"element":{"name":"breakpoints"},"children":[{"element":{"name":"BreakpointImportExport.properties"},"incompressible":true},{"element":{"name":"BreakpointsPathDecorator.java"},"incompressible":true},{"element":{"name":"EmbeddedBreakpointsViewer.java"},"incompressible":true},{"element":{"name":"ExportBreakpoints.java"},"incompressible":true},{"element":{"name":"IImportExportConstants.java"},"incompressible":true},{"element":{"name":"ImportBreakpoints.java"},"incompressible":true},{"element":{"name":"ImportExportMessages.java"},"incompressible":true},{"element":{"name":"WizardExportBreakpoints.java"},"incompressible":true},{"element":{"name":"WizardExportBreakpointsPage.java"},"incompressible":true},{"element":{"name":"WizardImportBreakpoints.java"},"incompressible":true},{"element":{"name":"WizardImportBreakpointsPage.java"},"incompressible":true},{"element":{"name":"WizardImportBreakpointsSelectionPage.java"},"incompressible":true}]},{"element":{"name":"launchconfigurations"},"children":[{"element":{"name":"ExportLaunchConfigurationsWizard.java"},"incompressible":true},{"element":{"name":"ExportLaunchConfigurationsWizardPage.java"},"incompressible":true},{"element":{"name":"ImportLaunchConfigurationsWizard.java"},"incompressible":true},{"element":{"name":"ImportLaunchConfigurationsWizardPage.java"},"incompressible":true},{"element":{"name":"WizardMessages.java"},"incompressible":true},{"element":{"name":"WizardMessages.properties"},"incompressible":true}]}]},{"element":{"name":"launchConfigurations"},"children":[{"element":{"name":"AbstractLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"ClosedProjectFilter.java"},"incompressible":true},{"element":{"name":"CollapseAllLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"CompileErrorProjectPromptStatusHandler.java"},"incompressible":true},{"element":{"name":"CompileErrorPromptStatusHandler.java"},"incompressible":true},{"element":{"name":"CreateLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"CreateLaunchConfigurationPrototypeAction.java"},"incompressible":true},{"element":{"name":"DebugModePromptStatusHandler.java"},"incompressible":true},{"element":{"name":"DeleteLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"DeletedProjectFilter.java"},"incompressible":true},{"element":{"name":"DuplicateLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"DuplicateLaunchDelegatesStatusHandler.java"},"incompressible":true},{"element":{"name":"EnvironmentVariable.java"},"incompressible":true},{"element":{"name":"ExportLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"FavoritesDialog.java"},"incompressible":true},{"element":{"name":"FilterDropDownMenuCreator.java"},"incompressible":true},{"element":{"name":"FilterLaunchConfigurationAction.java"},"incompressible":true},{"element":{"name":"LaunchCategoryFilter.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationComparator.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationDialog.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationEditDialog.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationFilteredTree.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationManager.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationPresentationManager.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationPropertiesDialog.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationSelectionDialog.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTabGroupExtension.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTabGroupViewer.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTabGroupWrapper.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTabImageDescriptor.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTreeContentProvider.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTypeContribution.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationTypeFilter.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationView.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationViewer.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationsDialog.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationsMessages.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationsMessages.properties"},"incompressible":true},{"element":{"name":"LaunchDelegateContribution.java"},"incompressible":true},{"element":{"name":"LaunchDelegateNotAvailableHandler.java"},"incompressible":true},{"element":{"name":"LaunchGroupExtension.java"},"incompressible":true},{"element":{"name":"LaunchGroupFilter.java"},"incompressible":true},{"element":{"name":"LaunchHistory.java"},"incompressible":true},{"element":{"name":"LaunchShortcutExtension.java"},"incompressible":true},{"element":{"name":"LaunchShortcutSelectionDialog.java"},"incompressible":true},{"element":{"name":"LaunchTabContribution.java"},"incompressible":true},{"element":{"name":"LinkPrototypeAction.java"},"incompressible":true},{"element":{"name":"OrganizeFavoritesAction.java"},"incompressible":true},{"element":{"name":"PerspectiveManager.java"},"incompressible":true},{"element":{"name":"ResetWithPrototypeValuesAction.java"},"incompressible":true},{"element":{"name":"SaveScopeResourcesHandler.java"},"incompressible":true},{"element":{"name":"SelectFavoritesDialog.java"},"incompressible":true},{"element":{"name":"SelectLaunchModesDialog.java"},"incompressible":true},{"element":{"name":"SelectLaunchersDialog.java"},"incompressible":true},{"element":{"name":"ShowCommandLineDialog.java"},"incompressible":true},{"element":{"name":"UnlinkPrototypeAction.java"},"incompressible":true},{"element":{"name":"WorkingSetComparator.java"},"incompressible":true},{"element":{"name":"WorkingSetsFilter.java"},"incompressible":true}]},{"element":{"name":"memory"},"children":[{"element":{"name":"IMemoryBlockConnection.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingUpdater.java"},"incompressible":true},{"element":{"name":"IPersistableDebugElement.java"},"incompressible":true},{"element":{"name":"MemoryRenderingManager.java"},"incompressible":true},{"element":{"name":"MemoryRenderingType.java"},"incompressible":true},{"element":{"name":"RenderingBindings.java"},"incompressible":true},{"element":{"name":"provisional"},"children":[{"element":{"name":"AbstractAsyncTableRendering.java"},"incompressible":true},{"element":{"name":"AbstractAsyncTextRendering.java"},"incompressible":true},{"element":{"name":"MemoryViewPresentationContext.java"},"incompressible":true}]}]},{"element":{"name":"model"},"children":[{"element":{"name":"elements"},"children":[{"element":{"name":"BreakpointContainerLabelProvider.java"},"incompressible":true},{"element":{"name":"BreakpointContainerMementoProvider.java"},"incompressible":true},{"element":{"name":"BreakpointContentProvider.java"},"incompressible":true},{"element":{"name":"BreakpointLabelProvider.java"},"incompressible":true},{"element":{"name":"BreakpointManagerContentProvider.java"},"incompressible":true},{"element":{"name":"BreakpointManagerInputMementoProvider.java"},"incompressible":true},{"element":{"name":"BreakpointMementoProvider.java"},"incompressible":true},{"element":{"name":"DebugElementLabelProvider.java"},"incompressible":true},{"element":{"name":"DebugElementMementoProvider.java"},"incompressible":true},{"element":{"name":"DebugTargetContentProvider.java"},"incompressible":true},{"element":{"name":"ElementContentProvider.java"},"incompressible":true},{"element":{"name":"ElementLabelProvider.java"},"incompressible":true},{"element":{"name":"ElementMementoProvider.java"},"incompressible":true},{"element":{"name":"ExpressionContentProvider.java"},"incompressible":true},{"element":{"name":"ExpressionLabelProvider.java"},"incompressible":true},{"element":{"name":"ExpressionManagerContentProvider.java"},"incompressible":true},{"element":{"name":"ExpressionManagerMementoProvider.java"},"incompressible":true},{"element":{"name":"ExpressionMementoProvider.java"},"incompressible":true},{"element":{"name":"LaunchContentProvider.java"},"incompressible":true},{"element":{"name":"LaunchManagerContentProvider.java"},"incompressible":true},{"element":{"name":"MemoryBlockContentProvider.java"},"incompressible":true},{"element":{"name":"MemoryBlockLabelProvider.java"},"incompressible":true},{"element":{"name":"MemoryRetrievalContentProvider.java"},"incompressible":true},{"element":{"name":"MemoryViewElementMementoProvider.java"},"incompressible":true},{"element":{"name":"ProcessContentProvider.java"},"incompressible":true},{"element":{"name":"RegisterGroupContentProvider.java"},"incompressible":true},{"element":{"name":"RegisterGroupLabelProvider.java"},"incompressible":true},{"element":{"name":"RegisterGroupMementoProvider.java"},"incompressible":true},{"element":{"name":"StackFrameContentProvider.java"},"incompressible":true},{"element":{"name":"StackFrameMementoProvider.java"},"incompressible":true},{"element":{"name":"ThreadContentProvider.java"},"incompressible":true},{"element":{"name":"VariableContentProvider.java"},"incompressible":true},{"element":{"name":"VariableEditor.java"},"incompressible":true},{"element":{"name":"VariableLabelProvider.java"},"incompressible":true},{"element":{"name":"VariableMementoProvider.java"},"incompressible":true},{"element":{"name":"ViewerInputProvider.java"},"incompressible":true},{"element":{"name":"WatchExpressionEditor.java"},"incompressible":true}]}]},{"element":{"name":"preferences"},"children":[{"element":{"name":"BooleanFieldEditor2.java"},"incompressible":true},{"element":{"name":"ConsolePreferencePage.java"},"incompressible":true},{"element":{"name":"DebugPreferencePage.java"},"incompressible":true},{"element":{"name":"DebugPreferencesMessages.java"},"incompressible":true},{"element":{"name":"DebugPreferencesMessages.properties"},"incompressible":true},{"element":{"name":"IDebugPreferenceConstants.java"},"incompressible":true},{"element":{"name":"LaunchConfigurationsPreferencePage.java"},"incompressible":true},{"element":{"name":"LaunchPerspectivePreferencePage.java"},"incompressible":true},{"element":{"name":"LaunchersPreferencePage.java"},"incompressible":true},{"element":{"name":"LaunchingPreferencePage.java"},"incompressible":true},{"element":{"name":"ProcessPropertyPage.java"},"incompressible":true},{"element":{"name":"RunDebugPropertiesPage.java"},"incompressible":true},{"element":{"name":"StringVariablePreferencePage.java"},"incompressible":true},{"element":{"name":"ViewManagementPreferencePage.java"},"incompressible":true}]},{"element":{"name":"quickaccess"},"children":[{"element":{"name":"AbstractLaunchQuickAccessComputer.java"},"incompressible":true},{"element":{"name":"DebugQuickAccessComputer.java"},"incompressible":true},{"element":{"name":"LaunchQuickAccessElement.java"},"incompressible":true},{"element":{"name":"ProfileQuickAccessComputer.java"},"incompressible":true},{"element":{"name":"RunQuickAccessComputer.java"},"incompressible":true}]},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"AddContainerAction.java"},"incompressible":true},{"element":{"name":"AddSourceContainerDialog.java"},"incompressible":true},{"element":{"name":"BasicContainerContentProvider.java"},"incompressible":true},{"element":{"name":"DownAction.java"},"incompressible":true},{"element":{"name":"EditContainerAction.java"},"incompressible":true},{"element":{"name":"EditSourceLookupPathAction.java"},"incompressible":true},{"element":{"name":"LookupSourceAction.java"},"incompressible":true},{"element":{"name":"Prompter.java"},"incompressible":true},{"element":{"name":"RemoveAction.java"},"incompressible":true},{"element":{"name":"ResolveDuplicatesHandler.java"},"incompressible":true},{"element":{"name":"RestoreDefaultAction.java"},"incompressible":true},{"element":{"name":"SourceContainerAction.java"},"incompressible":true},{"element":{"name":"SourceContainerAdapterFactory.java"},"incompressible":true},{"element":{"name":"SourceContainerLabelProvider.java"},"incompressible":true},{"element":{"name":"SourceContainerViewer.java"},"incompressible":true},{"element":{"name":"SourceContainerWorkbenchAdapter.java"},"incompressible":true},{"element":{"name":"SourceElementAdapterFactory.java"},"incompressible":true},{"element":{"name":"SourceElementLabelProvider.java"},"incompressible":true},{"element":{"name":"SourceElementWorkbenchAdapter.java"},"incompressible":true},{"element":{"name":"SourceLookupFacility.java"},"incompressible":true},{"element":{"name":"SourceLookupManager.java"},"incompressible":true},{"element":{"name":"SourceLookupPanel.java"},"incompressible":true},{"element":{"name":"SourceLookupResult.java"},"incompressible":true},{"element":{"name":"SourceLookupService.java"},"incompressible":true},{"element":{"name":"SourceLookupUIMessages.java"},"incompressible":true},{"element":{"name":"SourceLookupUIMessages.properties"},"incompressible":true},{"element":{"name":"SourceLookupUIUtils.java"},"incompressible":true},{"element":{"name":"UpAction.java"},"incompressible":true},{"element":{"name":"WorkingSetSourceContainerType.java"},"incompressible":true},{"element":{"name":"browsers"},"children":[{"element":{"name":"ArchiveFilter.java"},"incompressible":true},{"element":{"name":"ArchiveSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"DirectorySourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"DirectorySourceContainerDialog.java"},"incompressible":true},{"element":{"name":"ExternalArchiveSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"FolderSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"FolderSourceContainerDialog.java"},"incompressible":true},{"element":{"name":"ProjectSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"ProjectSourceContainerDialog.java"},"incompressible":true},{"element":{"name":"WorkingSetSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"WorkspaceSourceContainerBrowser.java"},"incompressible":true}]}]},{"element":{"name":"stringsubstitution"},"children":[{"element":{"name":"FilePrompt.java"},"incompressible":true},{"element":{"name":"FolderPrompt.java"},"incompressible":true},{"element":{"name":"IArgumentSelector.java"},"incompressible":true},{"element":{"name":"PasswordPrompt.java"},"incompressible":true},{"element":{"name":"PromptingResolver.java"},"incompressible":true},{"element":{"name":"ResourceSelector.java"},"incompressible":true},{"element":{"name":"SelectedResourceManager.java"},"incompressible":true},{"element":{"name":"SelectedResourceResolver.java"},"incompressible":true},{"element":{"name":"SelectedTextResolver.java"},"incompressible":true},{"element":{"name":"StringPrompt.java"},"incompressible":true},{"element":{"name":"StringSubstitutionMessages.java"},"incompressible":true},{"element":{"name":"StringSubstitutionMessages.properties"},"incompressible":true},{"element":{"name":"StringVariableLabelProvider.java"},"incompressible":true},{"element":{"name":"StringVariablePresentationManager.java"},"incompressible":true},{"element":{"name":"SystemPropertyArgumentSelector.java"},"incompressible":true}]},{"element":{"name":"viewers"},"children":[{"element":{"name":"AbstractUpdatePolicy.java"},"incompressible":true},{"element":{"name":"AsynchronousModel.java"},"incompressible":true},{"element":{"name":"AsynchronousRequestMonitor.java"},"incompressible":true},{"element":{"name":"AsynchronousSchedulingRuleFactory.java"},"incompressible":true},{"element":{"name":"AsynchronousTableModel.java"},"incompressible":true},{"element":{"name":"AsynchronousTableViewer.java"},"incompressible":true},{"element":{"name":"AsynchronousViewer.java"},"incompressible":true},{"element":{"name":"ChildrenRequestMonitor.java"},"incompressible":true},{"element":{"name":"FindElementDialog.java"},"incompressible":true},{"element":{"name":"ILabelResult.java"},"incompressible":true},{"element":{"name":"LabelRequestMonitor.java"},"incompressible":true},{"element":{"name":"LabelResult.java"},"incompressible":true},{"element":{"name":"ModelNode.java"},"incompressible":true},{"element":{"name":"PartPresentationContext.java"},"incompressible":true},{"element":{"name":"TableAddRequestMonitor.java"},"incompressible":true},{"element":{"name":"TableEditorImpl.java"},"incompressible":true},{"element":{"name":"TableInsertRequestMonitor.java"},"incompressible":true},{"element":{"name":"TableRemoveRequestMonitor.java"},"incompressible":true},{"element":{"name":"TableReplaceRequestMonitor.java"},"incompressible":true},{"element":{"name":"TableUpdatePolicy.java"},"incompressible":true},{"element":{"name":"breadcrumb"},"children":[{"element":{"name":"AbstractBreadcrumb.java"},"incompressible":true},{"element":{"name":"BreadcrumbItem.java"},"incompressible":true},{"element":{"name":"BreadcrumbItemDetails.java"},"incompressible":true},{"element":{"name":"BreadcrumbItemDropDown.java"},"incompressible":true},{"element":{"name":"BreadcrumbMessages.java"},"incompressible":true},{"element":{"name":"BreadcrumbMessages.properties"},"incompressible":true},{"element":{"name":"BreadcrumbViewer.java"},"incompressible":true},{"element":{"name":"IBreadcrumbDropDownSite.java"},"incompressible":true},{"element":{"name":"TreeViewerDropDown.java"},"incompressible":true}]},{"element":{"name":"model"},"children":[{"element":{"name":"ChildrenCountUpdate.java"},"incompressible":true},{"element":{"name":"ChildrenUpdate.java"},"incompressible":true},{"element":{"name":"ElementCompareRequest.java"},"incompressible":true},{"element":{"name":"ElementMementoRequest.java"},"incompressible":true},{"element":{"name":"FilterTransform.java"},"incompressible":true},{"element":{"name":"HasChildrenUpdate.java"},"incompressible":true},{"element":{"name":"IInternalTreeModelViewer.java"},"incompressible":true},{"element":{"name":"ILabelUpdateListener.java"},"incompressible":true},{"element":{"name":"ITreeModelContentProvider.java"},"incompressible":true},{"element":{"name":"ITreeModelLabelProvider.java"},"incompressible":true},{"element":{"name":"ITreeModelViewer.java"},"incompressible":true},{"element":{"name":"InternalTreeModelViewer.java"},"incompressible":true},{"element":{"name":"InternalVirtualTreeModelViewer.java"},"incompressible":true},{"element":{"name":"LabelUpdate.java"},"incompressible":true},{"element":{"name":"MementoUpdate.java"},"incompressible":true},{"element":{"name":"SubTreeModelViewer.java"},"incompressible":true},{"element":{"name":"TimeTriggeredProgressMonitorDialog.java"},"incompressible":true},{"element":{"name":"TreeModelContentProvider.java"},"incompressible":true},{"element":{"name":"TreeModelLabelProvider.java"},"incompressible":true},{"element":{"name":"ViewerAdapterService.java"},"incompressible":true},{"element":{"name":"ViewerInputUpdate.java"},"incompressible":true},{"element":{"name":"ViewerStateTracker.java"},"incompressible":true},{"element":{"name":"ViewerUpdateMonitor.java"},"incompressible":true},{"element":{"name":"VirtualCopyToClipboardActionDelegate.java"},"incompressible":true},{"element":{"name":"VirtualFindAction.java"},"incompressible":true},{"element":{"name":"provisional"},"children":[{"element":{"name":"ICheckUpdate.java"},"incompressible":true},{"element":{"name":"ICheckboxModelProxy.java"},"incompressible":true},{"element":{"name":"IChildrenCountUpdate.java"},"incompressible":true},{"element":{"name":"IChildrenUpdate.java"},"incompressible":true},{"element":{"name":"IColumnPresentation.java"},"incompressible":true},{"element":{"name":"IColumnPresentation2.java"},"incompressible":true},{"element":{"name":"IColumnPresentationFactory.java"},"incompressible":true},{"element":{"name":"IElementCompareRequest.java"},"incompressible":true},{"element":{"name":"IElementContentProvider.java"},"incompressible":true},{"element":{"name":"IElementEditor.java"},"incompressible":true},{"element":{"name":"IElementLabelProvider.java"},"incompressible":true},{"element":{"name":"IElementMementoProvider.java"},"incompressible":true},{"element":{"name":"IElementMementoRequest.java"},"incompressible":true},{"element":{"name":"IHasChildrenUpdate.java"},"incompressible":true},{"element":{"name":"ILabelUpdate.java"},"incompressible":true},{"element":{"name":"IModelChangedListener.java"},"incompressible":true},{"element":{"name":"IModelDelta.java"},"incompressible":true},{"element":{"name":"IModelDeltaVisitor.java"},"incompressible":true},{"element":{"name":"IModelProxy.java"},"incompressible":true},{"element":{"name":"IModelProxy2.java"},"incompressible":true},{"element":{"name":"IModelProxyFactory.java"},"incompressible":true},{"element":{"name":"IModelProxyFactory2.java"},"incompressible":true},{"element":{"name":"IModelSelectionPolicy.java"},"incompressible":true},{"element":{"name":"IModelSelectionPolicyFactory.java"},"incompressible":true},{"element":{"name":"IPresentationContext.java"},"incompressible":true},{"element":{"name":"IStateUpdateListener.java"},"incompressible":true},{"element":{"name":"IStatusMonitor.java"},"incompressible":true},{"element":{"name":"ITreeModelViewer.java"},"incompressible":true},{"element":{"name":"IViewActionProvider.java"},"incompressible":true},{"element":{"name":"IViewerInputProvider.java"},"incompressible":true},{"element":{"name":"IViewerInputRequestor.java"},"incompressible":true},{"element":{"name":"IViewerInputUpdate.java"},"incompressible":true},{"element":{"name":"IViewerUpdate.java"},"incompressible":true},{"element":{"name":"IViewerUpdateListener.java"},"incompressible":true},{"element":{"name":"IVirtualItemListener.java"},"incompressible":true},{"element":{"name":"IVirtualItemValidator.java"},"incompressible":true},{"element":{"name":"ModelDelta.java"},"incompressible":true},{"element":{"name":"PresentationContext.java"},"incompressible":true},{"element":{"name":"TreeModelViewer.java"},"incompressible":true},{"element":{"name":"TreeModelViewerFilter.java"},"incompressible":true},{"element":{"name":"ViewerInputService.java"},"incompressible":true},{"element":{"name":"VirtualItem.java"},"incompressible":true},{"element":{"name":"VirtualTree.java"},"incompressible":true},{"element":{"name":"VirtualTreeModelViewer.java"},"incompressible":true}]}]},{"element":{"name":"provisional"},"children":[{"element":{"name":"AbstractColumnPresentation.java"},"incompressible":true},{"element":{"name":"AbstractModelProxy.java"},"incompressible":true},{"element":{"name":"AsynchronousContentAdapter.java"},"incompressible":true},{"element":{"name":"AsynchronousLabelAdapter.java"},"incompressible":true},{"element":{"name":"IAsynchronousContentAdapter.java"},"incompressible":true},{"element":{"name":"IAsynchronousLabelAdapter.java"},"incompressible":true},{"element":{"name":"IChildrenRequestMonitor.java"},"incompressible":true},{"element":{"name":"IContainerRequestMonitor.java"},"incompressible":true},{"element":{"name":"ILabelRequestMonitor.java"},"incompressible":true}]},{"element":{"name":"update"},"children":[{"element":{"name":"BreakpointContainerProxy.java"},"incompressible":true},{"element":{"name":"BreakpointManagerProxy.java"},"incompressible":true},{"element":{"name":"BreakpointProxy.java"},"incompressible":true},{"element":{"name":"DebugEventHandler.java"},"incompressible":true},{"element":{"name":"DebugTargetEventHandler.java"},"incompressible":true},{"element":{"name":"DebugTargetProxy.java"},"incompressible":true},{"element":{"name":"DefaultExpressionModelProxy.java"},"incompressible":true},{"element":{"name":"DefaultModelProxyFactory.java"},"incompressible":true},{"element":{"name":"DefaultModelSelectionPolicyFactory.java"},"incompressible":true},{"element":{"name":"DefaultSelectionPolicy.java"},"incompressible":true},{"element":{"name":"DefaultVariableViewModelProxy.java"},"incompressible":true},{"element":{"name":"DefaultWatchExpressionModelProxy.java"},"incompressible":true},{"element":{"name":"EventHandlerModelProxy.java"},"incompressible":true},{"element":{"name":"ExpressionEventHandler.java"},"incompressible":true},{"element":{"name":"ExpressionManagerModelProxy.java"},"incompressible":true},{"element":{"name":"LaunchManagerProxy.java"},"incompressible":true},{"element":{"name":"LaunchProxy.java"},"incompressible":true},{"element":{"name":"MemoryBlockProxy.java"},"incompressible":true},{"element":{"name":"MemoryRetrievalProxy.java"},"incompressible":true},{"element":{"name":"ProcessProxy.java"},"incompressible":true},{"element":{"name":"StackFrameEventHandler.java"},"incompressible":true},{"element":{"name":"ThreadEventHandler.java"},"incompressible":true},{"element":{"name":"VariablesViewEventHandler.java"},"incompressible":true}]}]},{"element":{"name":"views"},"children":[{"element":{"name":"DebugModelPresentationContext.java"},"incompressible":true},{"element":{"name":"DebugUIViewsMessages.java"},"incompressible":true},{"element":{"name":"DebugUIViewsMessages.properties"},"incompressible":true},{"element":{"name":"IDebugExceptionHandler.java"},"incompressible":true},{"element":{"name":"ViewContextManager.java"},"incompressible":true},{"element":{"name":"ViewContextService.java"},"incompressible":true},{"element":{"name":"breakpoints"},"children":[{"element":{"name":"BreakpointContainer.java"},"incompressible":true},{"element":{"name":"BreakpointContainerWorkbenchAdapter.java"},"incompressible":true},{"element":{"name":"BreakpointFactory.java"},"incompressible":true},{"element":{"name":"BreakpointOrganizerExtension.java"},"incompressible":true},{"element":{"name":"BreakpointOrganizerManager.java"},"incompressible":true},{"element":{"name":"BreakpointPersistableElementAdapter.java"},"incompressible":true},{"element":{"name":"BreakpointSetOrganizer.java"},"incompressible":true},{"element":{"name":"BreakpointTypeOrganizer.java"},"incompressible":true},{"element":{"name":"BreakpointWorkingSetCache.java"},"incompressible":true},{"element":{"name":"BreakpointWorkingSetElementAdapter.java"},"incompressible":true},{"element":{"name":"BreakpointWorkingSetPage.java"},"incompressible":true},{"element":{"name":"BreakpointsComparator.java"},"incompressible":true},{"element":{"name":"BreakpointsContentProvider.java"},"incompressible":true},{"element":{"name":"BreakpointsDragAdapter.java"},"incompressible":true},{"element":{"name":"BreakpointsDropAdapter.java"},"incompressible":true},{"element":{"name":"BreakpointsLabelProvider.java"},"incompressible":true},{"element":{"name":"BreakpointsView.java"},"incompressible":true},{"element":{"name":"BreakpointsViewer.java"},"incompressible":true},{"element":{"name":"ElementComparator.java"},"incompressible":true},{"element":{"name":"FileBreakpointOrganizer.java"},"incompressible":true},{"element":{"name":"ProjectBreakpointOrganizer.java"},"incompressible":true},{"element":{"name":"WorkingSetBreakpointOrganizer.java"},"incompressible":true},{"element":{"name":"WorkingSetCategory.java"},"incompressible":true}]},{"element":{"name":"console"},"children":[{"element":{"name":"ConsoleLineNotifier.java"},"incompressible":true},{"element":{"name":"ConsoleMessages.java"},"incompressible":true},{"element":{"name":"ConsoleMessages.properties"},"incompressible":true},{"element":{"name":"ConsoleRemoveAllTerminatedAction.java"},"incompressible":true},{"element":{"name":"ConsoleRemoveLaunchAction.java"},"incompressible":true},{"element":{"name":"ConsoleShowPreferencesAction.java"},"incompressible":true},{"element":{"name":"ConsoleTerminateAction.java"},"incompressible":true},{"element":{"name":"ProcessConsole.java"},"incompressible":true},{"element":{"name":"ProcessConsoleManager.java"},"incompressible":true},{"element":{"name":"ProcessConsolePageParticipant.java"},"incompressible":true},{"element":{"name":"ProcessTypePropertyTester.java"},"incompressible":true},{"element":{"name":"ShowStandardErrorAction.java"},"incompressible":true},{"element":{"name":"ShowStandardOutAction.java"},"incompressible":true},{"element":{"name":"ShowWhenContentChangesAction.java"},"incompressible":true}]},{"element":{"name":"expression"},"children":[{"element":{"name":"ExpressionDropAdapter.java"},"incompressible":true},{"element":{"name":"ExpressionView.java"},"incompressible":true}]},{"element":{"name":"launch"},"children":[{"element":{"name":"BreadcrumbDropDownAutoExpandAction.java"},"incompressible":true},{"element":{"name":"BreadcrumbWorkbenchPart.java"},"incompressible":true},{"element":{"name":"DebugElementAdapterFactory.java"},"incompressible":true},{"element":{"name":"DebugElementHelper.java"},"incompressible":true},{"element":{"name":"DebugToolBarAction.java"},"incompressible":true},{"element":{"name":"DebugViewModeAction.java"},"incompressible":true},{"element":{"name":"Decoration.java"},"incompressible":true},{"element":{"name":"DecorationManager.java"},"incompressible":true},{"element":{"name":"ImageImageDescriptor.java"},"incompressible":true},{"element":{"name":"LaunchView.java"},"incompressible":true},{"element":{"name":"LaunchViewBreadcrumb.java"},"incompressible":true},{"element":{"name":"LaunchViewCopyToClipboardActionDelegate.java"},"incompressible":true},{"element":{"name":"LaunchViewMessages.java"},"incompressible":true},{"element":{"name":"LaunchViewMessages.properties"},"incompressible":true},{"element":{"name":"SourceNotFoundEditor.java"},"incompressible":true},{"element":{"name":"SourceNotFoundEditorInput.java"},"incompressible":true},{"element":{"name":"StandardDecoration.java"},"incompressible":true},{"element":{"name":"TerminateAndRemoveHandler.java"},"incompressible":true}]},{"element":{"name":"memory"},"children":[{"element":{"name":"AbstractMemoryViewPane.java"},"incompressible":true},{"element":{"name":"AddMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"AddMemoryRenderingAction.java"},"incompressible":true},{"element":{"name":"AddMemoryRenderingContextAction.java"},"incompressible":true},{"element":{"name":"AddMemoryRenderingDialog.java"},"incompressible":true},{"element":{"name":"CodePagesPreferencePage.java"},"incompressible":true},{"element":{"name":"IMemoryView.java"},"incompressible":true},{"element":{"name":"IMemoryViewPane.java"},"incompressible":true},{"element":{"name":"IMemoryViewTab.java"},"incompressible":true},{"element":{"name":"LinkRenderingPanesAction.java"},"incompressible":true},{"element":{"name":"MemoryBlocksTreeViewPane.java"},"incompressible":true},{"element":{"name":"MemoryView.java"},"incompressible":true},{"element":{"name":"MemoryViewIdRegistry.java"},"incompressible":true},{"element":{"name":"MemoryViewPrefAction.java"},"incompressible":true},{"element":{"name":"MemoryViewSynchronizationService.java"},"incompressible":true},{"element":{"name":"MemoryViewTab.java"},"incompressible":true},{"element":{"name":"MemoryViewTreeModelContentProvider.java"},"incompressible":true},{"element":{"name":"MemoryViewTreeViewer.java"},"incompressible":true},{"element":{"name":"MemoryViewUtil.java"},"incompressible":true},{"element":{"name":"MonitorMemoryBlockDialog.java"},"incompressible":true},{"element":{"name":"NewMemoryViewAction.java"},"incompressible":true},{"element":{"name":"PinMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"PropertyChangeNotifier.java"},"incompressible":true},{"element":{"name":"RemoveMemoryRenderingAction.java"},"incompressible":true},{"element":{"name":"RemoveRenderingContextAction.java"},"incompressible":true},{"element":{"name":"RenderingViewPane.java"},"incompressible":true},{"element":{"name":"ResetMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"ResetMemoryBlockPreferencePage.java"},"incompressible":true},{"element":{"name":"RetargetAddMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"SetPaddedStringPreferencePage.java"},"incompressible":true},{"element":{"name":"SwitchMemoryBlockAction.java"},"incompressible":true},{"element":{"name":"SynchronizeInfo.java"},"incompressible":true},{"element":{"name":"ToggleMemoryMonitorsAction.java"},"incompressible":true},{"element":{"name":"ToggleSplitPaneAction.java"},"incompressible":true},{"element":{"name":"ToggleViewPaneAction.java"},"incompressible":true},{"element":{"name":"ViewPaneOrientationAction.java"},"incompressible":true},{"element":{"name":"ViewPaneRenderingMgr.java"},"incompressible":true},{"element":{"name":"ViewPaneSelectionProvider.java"},"incompressible":true},{"element":{"name":"ViewTabEnablementManager.java"},"incompressible":true},{"element":{"name":"renderings"},"children":[{"element":{"name":"ASCIIRendering.java"},"incompressible":true},{"element":{"name":"ASCIIRenderingTypeDelegate.java"},"incompressible":true},{"element":{"name":"AbstractBaseTableRendering.java"},"incompressible":true},{"element":{"name":"AbstractIntegerRendering.java"},"incompressible":true},{"element":{"name":"AbstractTableRenderingLabelProvider.java"},"incompressible":true},{"element":{"name":"AbstractVirtualContentTableModel.java"},"incompressible":true},{"element":{"name":"AsyncCopyTableRenderingAction.java"},"incompressible":true},{"element":{"name":"AsyncPrintTableRenderingAction.java"},"incompressible":true},{"element":{"name":"AsyncTableRenderingCellModifier.java"},"incompressible":true},{"element":{"name":"AsyncTableRenderingUpdatePolicy.java"},"incompressible":true},{"element":{"name":"AsyncTableRenderingViewer.java"},"incompressible":true},{"element":{"name":"AsyncVirtualContentTableViewer.java"},"incompressible":true},{"element":{"name":"BasicDebugViewContentProvider.java"},"incompressible":true},{"element":{"name":"BigEndianAction.java"},"incompressible":true},{"element":{"name":"CopyTableRenderingToClipboardAction.java"},"incompressible":true},{"element":{"name":"CreateRendering.java"},"incompressible":true},{"element":{"name":"DefaultEndianessAction.java"},"incompressible":true},{"element":{"name":"ErrorRendering.java"},"incompressible":true},{"element":{"name":"FormatTableRenderingAction.java"},"incompressible":true},{"element":{"name":"FormatTableRenderingDialog.java"},"incompressible":true},{"element":{"name":"GoToAddressAction.java"},"incompressible":true},{"element":{"name":"GoToAddressComposite.java"},"incompressible":true},{"element":{"name":"GoToAddressDialog.java"},"incompressible":true},{"element":{"name":"HexIntegerRendering.java"},"incompressible":true},{"element":{"name":"HexIntegerRenderingDelegate.java"},"incompressible":true},{"element":{"name":"HexRendering.java"},"incompressible":true},{"element":{"name":"HexRenderingTypeDelegate.java"},"incompressible":true},{"element":{"name":"IContentChangeComputer.java"},"incompressible":true},{"element":{"name":"IPresentationErrorListener.java"},"incompressible":true},{"element":{"name":"IVirtualContentListener.java"},"incompressible":true},{"element":{"name":"LittleEndianAction.java"},"incompressible":true},{"element":{"name":"MemorySegment.java"},"incompressible":true},{"element":{"name":"PendingPropertyChanges.java"},"incompressible":true},{"element":{"name":"PrintTableRenderingAction.java"},"incompressible":true},{"element":{"name":"ReformatAction.java"},"incompressible":true},{"element":{"name":"RenderingsUtil.java"},"incompressible":true},{"element":{"name":"ResetToBaseAddressAction.java"},"incompressible":true},{"element":{"name":"SignedIntegerRendering.java"},"incompressible":true},{"element":{"name":"SignedIntegerRenderingTypeDelegate.java"},"incompressible":true},{"element":{"name":"TableRenderingCellModifier.java"},"incompressible":true},{"element":{"name":"TableRenderingContentDescriptor.java"},"incompressible":true},{"element":{"name":"TableRenderingContentInput.java"},"incompressible":true},{"element":{"name":"TableRenderingContentProvider.java"},"incompressible":true},{"element":{"name":"TableRenderingLabelProvider.java"},"incompressible":true},{"element":{"name":"TableRenderingLabelProviderEx.java"},"incompressible":true},{"element":{"name":"TableRenderingLine.java"},"incompressible":true},{"element":{"name":"TableRenderingModel.java"},"incompressible":true},{"element":{"name":"TableRenderingPrefAction.java"},"incompressible":true},{"element":{"name":"TableRenderingPreferencePage.java"},"incompressible":true},{"element":{"name":"TableRenderingPropertiesPage.java"},"incompressible":true},{"element":{"name":"UnsignedIntegerRendering.java"},"incompressible":true},{"element":{"name":"UnsignedIntegerRenderingTypeDelegate.java"},"incompressible":true}]}]},{"element":{"name":"modules"},"children":[{"element":{"name":"IHelpContextIdProvider.java"},"incompressible":true},{"element":{"name":"ModulesView.java"},"incompressible":true},{"element":{"name":"ModulesViewMessages.java"},"incompressible":true},{"element":{"name":"ModulesViewMessages.properties"},"incompressible":true}]},{"element":{"name":"registers"},"children":[{"element":{"name":"RegistersView.java"},"incompressible":true},{"element":{"name":"RegistersViewMessages.java"},"incompressible":true},{"element":{"name":"RegistersViewMessages.properties"},"incompressible":true}]},{"element":{"name":"variables"},"children":[{"element":{"name":"AvailableLogicalStructuresAction.java"},"incompressible":true},{"element":{"name":"EditVariableLogicalStructureAction.java"},"incompressible":true},{"element":{"name":"IndexedValuePartition.java"},"incompressible":true},{"element":{"name":"IndexedVariablePartition.java"},"incompressible":true},{"element":{"name":"LogicalStructureCache.java"},"incompressible":true},{"element":{"name":"SelectLogicalStructureAction.java"},"incompressible":true},{"element":{"name":"SelectionDragAdapter.java"},"incompressible":true},{"element":{"name":"ToggleLogicalStructureAction.java"},"incompressible":true},{"element":{"name":"ToggleShowColumnsAction.java"},"incompressible":true},{"element":{"name":"VariableViewToggleAction.java"},"incompressible":true},{"element":{"name":"VariablesView.java"},"incompressible":true},{"element":{"name":"VariablesViewMessages.java"},"incompressible":true},{"element":{"name":"VariablesViewMessages.properties"},"incompressible":true},{"element":{"name":"VariablesViewResourceBundleMessages.properties"},"incompressible":true},{"element":{"name":"details"},"children":[{"element":{"name":"AbstractDetailPane.java"},"incompressible":true},{"element":{"name":"AvailableDetailPanesAction.java"},"incompressible":true},{"element":{"name":"DefaultDetailPane.java"},"incompressible":true},{"element":{"name":"DefaultDetailPaneFactory.java"},"incompressible":true},{"element":{"name":"DetailMessages.java"},"incompressible":true},{"element":{"name":"DetailMessages.properties"},"incompressible":true},{"element":{"name":"DetailPaneManager.java"},"incompressible":true},{"element":{"name":"DetailPaneProxy.java"},"incompressible":true},{"element":{"name":"IDetailPaneContainer.java"},"incompressible":true},{"element":{"name":"IDetailPaneContainer2.java"},"incompressible":true},{"element":{"name":"MessageDetailPane.java"},"incompressible":true}]}]}]}]}]},{"element":{"name":"ui"},"children":[{"element":{"name":"AbstractBreakpointOrganizerDelegate.java"},"incompressible":true},{"element":{"name":"AbstractDebugView.java"},"incompressible":true},{"element":{"name":"AbstractLaunchConfigurationTab.java"},"incompressible":true},{"element":{"name":"AbstractLaunchConfigurationTabGroup.java"},"incompressible":true},{"element":{"name":"BreakpointTypeCategory.java"},"incompressible":true},{"element":{"name":"CommonTab.java"},"incompressible":true},{"element":{"name":"DebugElementWorkbenchAdapter.java"},"incompressible":true},{"element":{"name":"DebugPopup.java"},"incompressible":true},{"element":{"name":"DebugUITools.java"},"incompressible":true},{"element":{"name":"DeferredDebugElementWorkbenchAdapter.java"},"incompressible":true},{"element":{"name":"EnvironmentTab.java"},"incompressible":true},{"element":{"name":"IBreakpointOrganizerDelegate.java"},"incompressible":true},{"element":{"name":"IBreakpointOrganizerDelegateExtension.java"},"incompressible":true},{"element":{"name":"IBreakpointTypeCategory.java"},"incompressible":true},{"element":{"name":"IDebugEditorPresentation.java"},"incompressible":true},{"element":{"name":"IDebugModelPresentation.java"},"incompressible":true},{"element":{"name":"IDebugModelPresentationExtension.java"},"incompressible":true},{"element":{"name":"IDebugUIConstants.java"},"incompressible":true},{"element":{"name":"IDebugView.java"},"incompressible":true},{"element":{"name":"IDetailPane.java"},"incompressible":true},{"element":{"name":"IDetailPane2.java"},"incompressible":true},{"element":{"name":"IDetailPane3.java"},"incompressible":true},{"element":{"name":"IDetailPaneFactory.java"},"incompressible":true},{"element":{"name":"IInstructionPointerPresentation.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationDialog.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationTab.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationTab2.java"},"incompressible":true},{"element":{"name":"ILaunchConfigurationTabGroup.java"},"incompressible":true},{"element":{"name":"ILaunchGroup.java"},"incompressible":true},{"element":{"name":"ILaunchShortcut.java"},"incompressible":true},{"element":{"name":"ILaunchShortcut2.java"},"incompressible":true},{"element":{"name":"ISourcePresentation.java"},"incompressible":true},{"element":{"name":"IValueDetailListener.java"},"incompressible":true},{"element":{"name":"InspectPopupDialog.java"},"incompressible":true},{"element":{"name":"PrototypeDecorator.java"},"incompressible":true},{"element":{"name":"PrototypeTab.java"},"incompressible":true},{"element":{"name":"RefreshTab.java"},"incompressible":true},{"element":{"name":"StringVariableSelectionDialog.java"},"incompressible":true},{"element":{"name":"WorkingDirectoryBlock.java"},"incompressible":true},{"element":{"name":"actions"},"children":[{"element":{"name":"AbstractLaunchHistoryAction.java"},"incompressible":true},{"element":{"name":"AbstractLaunchToolbarAction.java"},"incompressible":true},{"element":{"name":"AddMemoryRenderingActionDelegate.java"},"incompressible":true},{"element":{"name":"BreakpointTypesContribution.java"},"incompressible":true},{"element":{"name":"ContextualLaunchAction.java"},"incompressible":true},{"element":{"name":"DebugAction.java"},"incompressible":true},{"element":{"name":"DebugCommandAction.java"},"incompressible":true},{"element":{"name":"DebugCommandHandler.java"},"incompressible":true},{"element":{"name":"ExportBreakpointsOperation.java"},"incompressible":true},{"element":{"name":"IAddMemoryBlocksTarget.java"},"incompressible":true},{"element":{"name":"IAddMemoryRenderingsTarget.java"},"incompressible":true},{"element":{"name":"ILaunchable.java"},"incompressible":true},{"element":{"name":"IRunToLineTarget.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTarget.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTargetExtension.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTargetExtension2.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTargetFactory.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTargetManager.java"},"incompressible":true},{"element":{"name":"IToggleBreakpointsTargetManagerListener.java"},"incompressible":true},{"element":{"name":"IVariableValueEditor.java"},"incompressible":true},{"element":{"name":"IWatchExpressionFactoryAdapter.java"},"incompressible":true},{"element":{"name":"IWatchExpressionFactoryAdapter2.java"},"incompressible":true},{"element":{"name":"IWatchExpressionFactoryAdapterExtension.java"},"incompressible":true},{"element":{"name":"ImportBreakpointsOperation.java"},"incompressible":true},{"element":{"name":"LaunchAction.java"},"incompressible":true},{"element":{"name":"LaunchAsAction.java"},"incompressible":true},{"element":{"name":"LaunchShortcutsAction.java"},"incompressible":true},{"element":{"name":"OpenLaunchDialogAction.java"},"incompressible":true},{"element":{"name":"RelaunchLastAction.java"},"incompressible":true},{"element":{"name":"RulerBreakpointAction.java"},"incompressible":true},{"element":{"name":"RulerBreakpointTypesActionDelegate.java"},"incompressible":true},{"element":{"name":"RulerEnableDisableBreakpointActionDelegate.java"},"incompressible":true},{"element":{"name":"RulerRunToLineActionDelegate.java"},"incompressible":true},{"element":{"name":"RulerToggleBreakpointActionDelegate.java"},"incompressible":true},{"element":{"name":"RunAction.java"},"incompressible":true},{"element":{"name":"RunToLineAction.java"},"incompressible":true},{"element":{"name":"RunToLineActionDelegate.java"},"incompressible":true},{"element":{"name":"RunToLineHandler.java"},"incompressible":true},{"element":{"name":"ToggleBreakpointAction.java"},"incompressible":true},{"element":{"name":"ToggleMethodBreakpointActionDelegate.java"},"incompressible":true},{"element":{"name":"ToggleWatchpointActionDelegate.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"console"},"children":[{"element":{"name":"ConsoleColorProvider.java"},"incompressible":true},{"element":{"name":"FileLink.java"},"incompressible":true},{"element":{"name":"IConsole.java"},"incompressible":true},{"element":{"name":"IConsoleColorProvider.java"},"incompressible":true},{"element":{"name":"IConsoleHyperlink.java"},"incompressible":true},{"element":{"name":"IConsoleLineTracker.java"},"incompressible":true},{"element":{"name":"IConsoleLineTrackerExtension.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"contexts"},"children":[{"element":{"name":"AbstractDebugContextProvider.java"},"incompressible":true},{"element":{"name":"DebugContextEvent.java"},"incompressible":true},{"element":{"name":"IDebugContextListener.java"},"incompressible":true},{"element":{"name":"IDebugContextManager.java"},"incompressible":true},{"element":{"name":"IDebugContextProvider.java"},"incompressible":true},{"element":{"name":"IDebugContextProvider2.java"},"incompressible":true},{"element":{"name":"IDebugContextService.java"},"incompressible":true},{"element":{"name":"ISuspendTrigger.java"},"incompressible":true},{"element":{"name":"ISuspendTriggerListener.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"memory"},"children":[{"element":{"name":"AbstractMemoryRendering.java"},"incompressible":true},{"element":{"name":"AbstractMemoryRenderingBindingsProvider.java"},"incompressible":true},{"element":{"name":"AbstractTableRendering.java"},"incompressible":true},{"element":{"name":"AbstractTextRendering.java"},"incompressible":true},{"element":{"name":"IMemoryBlockTablePresentation.java"},"incompressible":true},{"element":{"name":"IMemoryRendering.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingBindingsListener.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingBindingsProvider.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingContainer.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingManager.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingSite.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingSite2.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingSynchronizationService.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingType.java"},"incompressible":true},{"element":{"name":"IMemoryRenderingTypeDelegate.java"},"incompressible":true},{"element":{"name":"IRepositionableMemoryRendering.java"},"incompressible":true},{"element":{"name":"IResettableMemoryRendering.java"},"incompressible":true},{"element":{"name":"MemoryRenderingElement.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"package.html"},"incompressible":true},{"element":{"name":"sourcelookup"},"children":[{"element":{"name":"AbstractSourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"CommonSourceNotFoundEditor.java"},"incompressible":true},{"element":{"name":"CommonSourceNotFoundEditorInput.java"},"incompressible":true},{"element":{"name":"ISourceContainerBrowser.java"},"incompressible":true},{"element":{"name":"ISourceDisplay.java"},"incompressible":true},{"element":{"name":"ISourceLookupResult.java"},"incompressible":true},{"element":{"name":"SourceLookupDialog.java"},"incompressible":true},{"element":{"name":"SourceLookupTab.java"},"incompressible":true},{"element":{"name":"WorkingSetSourceContainer.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"stringsubstitution"},"children":[{"element":{"name":"IArgumentSelector.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.ui.console"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"full"},"children":[{"element":{"name":"clcl16"},"children":[{"element":{"name":"clear_co.png"},"incompressible":true},{"element":{"name":"clear_co@2x.png"},"incompressible":true},{"element":{"name":"lock_co.png"},"incompressible":true},{"element":{"name":"lock_co@2x.png"},"incompressible":true},{"element":{"name":"pin.png"},"incompressible":true},{"element":{"name":"pin@2x.png"},"incompressible":true},{"element":{"name":"wordwrap.png"},"incompressible":true}]},{"element":{"name":"cview16"},"children":[{"element":{"name":"console_view.gif"},"incompressible":true},{"element":{"name":"console_view.png"},"incompressible":true},{"element":{"name":"console_view@2x.png"},"incompressible":true}]},{"element":{"name":"dlcl16"},"children":[{"element":{"name":"clear_co.png"},"incompressible":true},{"element":{"name":"clear_co@2x.png"},"incompressible":true},{"element":{"name":"lock_co.png"},"incompressible":true},{"element":{"name":"lock_co@2x.png"},"incompressible":true},{"element":{"name":"new_con.png"},"incompressible":true},{"element":{"name":"new_con@2x.png"},"incompressible":true},{"element":{"name":"pin.png"},"incompressible":true},{"element":{"name":"pin@2x.png"},"incompressible":true},{"element":{"name":"rem_co.png"},"incompressible":true},{"element":{"name":"rem_co@2x.png"},"incompressible":true},{"element":{"name":"wordwrap.png"},"incompressible":true},{"element":{"name":"wordwrap@2x.png"},"incompressible":true}]},{"element":{"name":"dview16"},"children":[{"element":{"name":"console_view.png"},"incompressible":true},{"element":{"name":"console_view@2x.png"},"incompressible":true}]},{"element":{"name":"elcl16"},"children":[{"element":{"name":"clear_co.png"},"incompressible":true},{"element":{"name":"clear_co@2x.png"},"incompressible":true},{"element":{"name":"lock_co.png"},"incompressible":true},{"element":{"name":"lock_co@2x.png"},"incompressible":true},{"element":{"name":"new_con.png"},"incompressible":true},{"element":{"name":"new_con@2x.png"},"incompressible":true},{"element":{"name":"pin.png"},"incompressible":true},{"element":{"name":"pin@2x.png"},"incompressible":true},{"element":{"name":"rem_co.png"},"incompressible":true},{"element":{"name":"rem_co@2x.png"},"incompressible":true},{"element":{"name":"wordwrap.png"},"incompressible":true},{"element":{"name":"wordwrap@2x.png"},"incompressible":true}]},{"element":{"name":"eview16"},"children":[{"element":{"name":"console_view.gif"},"incompressible":true},{"element":{"name":"console_view.png"},"incompressible":true},{"element":{"name":"console_view@2x.png"},"incompressible":true}]}]}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"schema"},"children":[{"element":{"name":"consoleFactories.exsd"},"incompressible":true},{"element":{"name":"consolePageParticipants.exsd"},"incompressible":true},{"element":{"name":"consolePatternMatchListeners.exsd"},"incompressible":true}]},{"element":{"name":"scripts"},"children":[{"element":{"name":"exportplugin.xml"},"incompressible":true}]},{"element":{"name":"src"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"ui"},"children":[{"element":{"name":"console"},"children":[{"element":{"name":"AbstractConsole.java"},"incompressible":true},{"element":{"name":"ConsolePlugin.java"},"incompressible":true},{"element":{"name":"IConsole.java"},"incompressible":true},{"element":{"name":"IConsoleConstants.java"},"incompressible":true},{"element":{"name":"IConsoleDocumentPartitioner.java"},"incompressible":true},{"element":{"name":"IConsoleFactory.java"},"incompressible":true},{"element":{"name":"IConsoleListener.java"},"incompressible":true},{"element":{"name":"IConsoleManager.java"},"incompressible":true},{"element":{"name":"IConsolePageParticipant.java"},"incompressible":true},{"element":{"name":"IConsoleView.java"},"incompressible":true},{"element":{"name":"IHyperlink.java"},"incompressible":true},{"element":{"name":"IHyperlink2.java"},"incompressible":true},{"element":{"name":"IOConsole.java"},"incompressible":true},{"element":{"name":"IOConsoleInputStream.java"},"incompressible":true},{"element":{"name":"IOConsoleOutputStream.java"},"incompressible":true},{"element":{"name":"IPatternMatchListener.java"},"incompressible":true},{"element":{"name":"IPatternMatchListenerDelegate.java"},"incompressible":true},{"element":{"name":"IScrollLockStateProvider.java"},"incompressible":true},{"element":{"name":"MessageConsole.java"},"incompressible":true},{"element":{"name":"MessageConsoleStream.java"},"incompressible":true},{"element":{"name":"PatternMatchEvent.java"},"incompressible":true},{"element":{"name":"TextConsole.java"},"incompressible":true},{"element":{"name":"TextConsolePage.java"},"incompressible":true},{"element":{"name":"TextConsoleViewer.java"},"incompressible":true},{"element":{"name":"actions"},"children":[{"element":{"name":"ClearOutputAction.java"},"incompressible":true},{"element":{"name":"CloseConsoleAction.java"},"incompressible":true},{"element":{"name":"TextViewerAction.java"},"incompressible":true},{"element":{"name":"TextViewerGotoLineAction.java"},"incompressible":true},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"package.html"},"incompressible":true}]},{"element":{"name":"internal"},"children":[{"element":{"name":"console"},"children":[{"element":{"name":"ConsoleDocument.java"},"incompressible":true},{"element":{"name":"ConsoleDocumentAdapter.java"},"incompressible":true},{"element":{"name":"ConsoleDropDownAction.java"},"incompressible":true},{"element":{"name":"ConsoleFactoryExtension.java"},"incompressible":true},{"element":{"name":"ConsoleHyperlinkPosition.java"},"incompressible":true},{"element":{"name":"ConsoleManager.java"},"incompressible":true},{"element":{"name":"ConsoleMessages.java"},"incompressible":true},{"element":{"name":"ConsoleMessages.properties"},"incompressible":true},{"element":{"name":"ConsolePageParticipantExtension.java"},"incompressible":true},{"element":{"name":"ConsolePatternMatcher.java"},"incompressible":true},{"element":{"name":"ConsolePluginImages.java"},"incompressible":true},{"element":{"name":"ConsoleResourceBundleMessages.java"},"incompressible":true},{"element":{"name":"ConsoleResourceBundleMessages.properties"},"incompressible":true},{"element":{"name":"ConsoleTypePropertyTester.java"},"incompressible":true},{"element":{"name":"ConsoleUIPreferenceInitializer.java"},"incompressible":true},{"element":{"name":"ConsoleView.java"},"incompressible":true},{"element":{"name":"ConsoleViewConsoleFactory.java"},"incompressible":true},{"element":{"name":"ConsoleWorkbenchPart.java"},"incompressible":true},{"element":{"name":"FollowHyperlinkAction.java"},"incompressible":true},{"element":{"name":"HyperlinkUpdater.java"},"incompressible":true},{"element":{"name":"IConsoleHelpContextIds.java"},"incompressible":true},{"element":{"name":"IInternalConsoleConstants.java"},"incompressible":true},{"element":{"name":"IOConsolePage.java"},"incompressible":true},{"element":{"name":"IOConsolePartition.java"},"incompressible":true},{"element":{"name":"IOConsolePartitioner.java"},"incompressible":true},{"element":{"name":"IOConsoleViewer.java"},"incompressible":true},{"element":{"name":"OpenConsoleAction.java"},"incompressible":true},{"element":{"name":"PatternMatchListener.java"},"incompressible":true},{"element":{"name":"PatternMatchListenerExtension.java"},"incompressible":true},{"element":{"name":"PinConsoleAction.java"},"incompressible":true},{"element":{"name":"ScrollLockAction.java"},"incompressible":true},{"element":{"name":"ShowConsoleAction.java"},"incompressible":true},{"element":{"name":"StreamDecoder.java"},"incompressible":true},{"element":{"name":"WordWrapAction.java"},"incompressible":true}]}]}]}]}]}]}]},{"element":{"name":"org.eclipse.ui.externaltools"},"children":[{"element":{"name":".classpath"},"incompressible":true},{"element":{"name":".gitignore"},"incompressible":true},{"element":{"name":".project"},"incompressible":true},{"element":{"name":".settings"},"children":[{"element":{"name":".api_filters"},"incompressible":true},{"element":{"name":"org.eclipse.core.resources.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.core.runtime.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.core.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.jdt.ui.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.api.tools.prefs"},"incompressible":true},{"element":{"name":"org.eclipse.pde.prefs"},"incompressible":true}]},{"element":{"name":"External Tools Base"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"ui"},"children":[{"element":{"name":"externaltools"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"launchConfigurations"},"children":[{"element":{"name":"ExternalToolsBuildTab.java"},"incompressible":true},{"element":{"name":"ExternalToolsBuilderTab.java"},"incompressible":true},{"element":{"name":"ExternalToolsLaunchConfigurationMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsLaunchConfigurationMessages.properties"},"incompressible":true},{"element":{"name":"ExternalToolsMainTab.java"},"incompressible":true},{"element":{"name":"ExternalToolsUtil.java"},"incompressible":true},{"element":{"name":"IgnoreWhiteSpaceComparator.java"},"incompressible":true},{"element":{"name":"WorkingSetComparator.java"},"incompressible":true}]},{"element":{"name":"menu"},"children":[{"element":{"name":"ExternalToolMenuDelegate.java"},"incompressible":true},{"element":{"name":"OpenExternalToolsConfigurations.java"},"incompressible":true}]},{"element":{"name":"model"},"children":[{"element":{"name":"BuilderUtils.java"},"incompressible":true},{"element":{"name":"ExternalToolsImages.java"},"incompressible":true},{"element":{"name":"ExternalToolsModelMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsModelMessages.properties"},"incompressible":true},{"element":{"name":"ExternalToolsPlugin.java"},"incompressible":true},{"element":{"name":"ExternalToolsPreferenceInitializer.java"},"incompressible":true},{"element":{"name":"IExternalToolConstants.java"},"incompressible":true},{"element":{"name":"IExternalToolsHelpContextIds.java"},"incompressible":true},{"element":{"name":"IPreferenceConstants.java"},"incompressible":true},{"element":{"name":"ImageDescriptorRegistry.java"},"incompressible":true}]},{"element":{"name":"ui"},"children":[{"element":{"name":"BuilderLabelProvider.java"},"incompressible":true},{"element":{"name":"BuilderPropertyPage.java"},"incompressible":true},{"element":{"name":"EditCommandDialog.java"},"incompressible":true},{"element":{"name":"ExternalToolsPreferencePage.java"},"incompressible":true},{"element":{"name":"ExternalToolsUIMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsUIMessages.properties"},"incompressible":true},{"element":{"name":"FileSelectionDialog.java"},"incompressible":true},{"element":{"name":"TreeAndListGroup.java"},"incompressible":true}]},{"element":{"name":"variables"},"children":[{"element":{"name":"BuildFilesResolver.java"},"incompressible":true},{"element":{"name":"BuildProjectResolver.java"},"incompressible":true},{"element":{"name":"BuildTypeResolver.java"},"incompressible":true},{"element":{"name":"SystemPathResolver.java"},"incompressible":true},{"element":{"name":"VariableMessages.java"},"incompressible":true},{"element":{"name":"VariableMessages.properties"},"incompressible":true}]}]}]}]}]}]}]},{"element":{"name":"META-INF"},"children":[{"element":{"name":"MANIFEST.MF"},"incompressible":true}]},{"element":{"name":"Program Tools Support"},"children":[{"element":{"name":"org"},"children":[{"element":{"name":"eclipse"},"children":[{"element":{"name":"ui"},"children":[{"element":{"name":"externaltools"},"children":[{"element":{"name":"internal"},"children":[{"element":{"name":"program"},"children":[{"element":{"name":"launchConfigurations"},"children":[{"element":{"name":"ExternalToolsProgramMessages.java"},"incompressible":true},{"element":{"name":"ExternalToolsProgramMessages.properties"},"incompressible":true},{"element":{"name":"ProgramBuilderTabGroup.java"},"incompressible":true},{"element":{"name":"ProgramMainTab.java"},"incompressible":true},{"element":{"name":"ProgramTabGroup.java"},"incompressible":true}]}]}]}]}]}]}]}]},{"element":{"name":"about.html"},"incompressible":true},{"element":{"name":"build.properties"},"incompressible":true},{"element":{"name":"icons"},"children":[{"element":{"name":"full"},"children":[{"element":{"name":"dtool16"},"children":[{"element":{"name":"external_tools.png"},"incompressible":true},{"element":{"name":"external_tools@2x.png"},"incompressible":true}]},{"element":{"name":"etool16"},"children":[{"element":{"name":"external_tools.png"},"incompressible":true},{"element":{"name":"external_tools@2x.png"},"incompressible":true}]},{"element":{"name":"obj16"},"children":[{"element":{"name":"build_tab.png"},"incompressible":true},{"element":{"name":"build_tab@2x.png"},"incompressible":true},{"element":{"name":"builder.png"},"incompressible":true},{"element":{"name":"builder@2x.png"},"incompressible":true},{"element":{"name":"classpath.png"},"incompressible":true},{"element":{"name":"classpath@2x.png"},"incompressible":true},{"element":{"name":"external_tools.png"},"incompressible":true},{"element":{"name":"external_tools@2x.png"},"incompressible":true},{"element":{"name":"invalid_build_tool.png"},"incompressible":true},{"element":{"name":"invalid_build_tool@2x.png"},"incompressible":true},{"element":{"name":"main_tab.png"},"incompressible":true},{"element":{"name":"main_tab@2x.png"},"incompressible":true}]},{"element":{"name":"wizban"},"children":[{"element":{"name":"ext_tools_wiz.png"},"incompressible":true}]}]}]},{"element":{"name":"plugin.properties"},"incompressible":true},{"element":{"name":"plugin.xml"},"incompressible":true},{"element":{"name":"pom.xml"},"incompressible":true},{"element":{"name":"schema"},"children":[{"element":{"name":"configurationDuplicationMaps.exsd"},"incompressible":true}]}]},{"element":{"name":"pom.xml"},"incompressible":true}]}]); + const xhr = new XMLHttpRequest(); + xhr.open('GET', '/compressed.json'); + xhr.send(); + xhr.onreadystatechange = function () { + if (this.readyState == 4 && this.status == 200) { + tree.setChildren(null, JSON.parse(this.responseText)); + } + }; break; } From dfa0033729a711de1a764eea003a19e38426da28 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 23 Jul 2019 11:28:59 +0200 Subject: [PATCH 503/710] Fix microsoft/vscode-remote-release/issues/1011 --- .../browser/parts/activitybar/activitybarActions.ts | 2 +- .../browser/parts/activitybar/activitybarPart.ts | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index 873dc45aadf..a95543fc0f4 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -165,7 +165,7 @@ export class GlobalActivityActionViewItem extends ActivityActionViewItem { export class PlaceHolderViewletActivityAction extends ViewletActivityAction { constructor( - id: string, iconUrl: URI, + id: string, name: string, iconUrl: URI, @IViewletService viewletService: IViewletService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService, @ITelemetryService telemetryService: ITelemetryService diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index 430a560f520..6b80f542aa2 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -37,6 +37,7 @@ import { Schemas } from 'vs/base/common/network'; interface ICachedViewlet { id: string; + name?: string; iconUrl?: UriComponents; pinned: boolean; order?: number; @@ -89,7 +90,9 @@ export class ActivitybarPart extends Part implements IActivityBarService { } } - this.compositeBar = this._register(this.instantiationService.createInstance(CompositeBar, this.cachedViewlets.map(v => ({ id: v.id, name: undefined, visible: v.visible, order: v.order, pinned: v.pinned })), { + const cachedItems = this.cachedViewlets + .map(v => ({ id: v.id, name: v.name, visible: v.visible, order: v.order, pinned: v.pinned })); + this.compositeBar = this._register(this.instantiationService.createInstance(CompositeBar, cachedItems, { icon: true, orientation: ActionsOrientation.VERTICAL, openComposite: (compositeId: string) => this.viewletService.openViewlet(compositeId, true), @@ -252,7 +255,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { } else { const cachedComposite = this.cachedViewlets.filter(c => c.id === compositeId)[0]; compositeActions = { - activityAction: this.instantiationService.createInstance(PlaceHolderViewletActivityAction, compositeId, cachedComposite && cachedComposite.iconUrl ? URI.revive(cachedComposite.iconUrl) : undefined), + activityAction: this.instantiationService.createInstance(PlaceHolderViewletActivityAction, compositeId, cachedComposite && cachedComposite.name ? cachedComposite.name : compositeId, cachedComposite && cachedComposite.iconUrl ? URI.revive(cachedComposite.iconUrl) : undefined), pinnedAction: new PlaceHolderToggleCompositePinnedAction(compositeId, this.compositeBar) }; } @@ -428,7 +431,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { } } } - state.push({ id: compositeItem.id, iconUrl: viewlet.iconUrl && viewlet.iconUrl.scheme === Schemas.file ? viewlet.iconUrl : undefined, views, pinned: compositeItem.pinned, order: compositeItem.order, visible: compositeItem.visible }); + state.push({ id: compositeItem.id, name: viewlet.name, iconUrl: viewlet.iconUrl && viewlet.iconUrl.scheme === Schemas.file ? viewlet.iconUrl : undefined, views, pinned: compositeItem.pinned, order: compositeItem.order, visible: compositeItem.visible }); } else { state.push({ id: compositeItem.id, pinned: compositeItem.pinned, order: compositeItem.order, visible: false }); } @@ -440,7 +443,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { private getCachedViewlets(): ICachedViewlet[] { const storedStates: Array = JSON.parse(this.cachedViewletsValue); const cachedViewlets = storedStates.map(c => { - const serialized: ICachedViewlet = typeof c === 'string' /* migration from pinned states to composites states */ ? { id: c, pinned: true, order: undefined, visible: true, iconUrl: undefined, views: undefined } : c; + const serialized: ICachedViewlet = typeof c === 'string' /* migration from pinned states to composites states */ ? { id: c, pinned: true, order: undefined, visible: true, name: undefined, iconUrl: undefined, views: undefined } : c; serialized.visible = isUndefinedOrNull(serialized.visible) ? true : serialized.visible; return serialized; }); @@ -448,6 +451,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { for (const old of this.loadOldCachedViewlets()) { const cachedViewlet = cachedViewlets.filter(cached => cached.id === old.id)[0]; if (cachedViewlet) { + cachedViewlet.name = old.name; cachedViewlet.iconUrl = old.iconUrl; cachedViewlet.views = old.views; } From d354141bbccb1bd028e44a050d06bd2261d04b25 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 23 Jul 2019 11:38:13 +0200 Subject: [PATCH 504/710] fix tests - dispose listener --- .../configuration/test/node/configurationService.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/configuration/test/node/configurationService.test.ts b/src/vs/platform/configuration/test/node/configurationService.test.ts index 22fdbb6c911..ae5e9a795fc 100644 --- a/src/vs/platform/configuration/test/node/configurationService.test.ts +++ b/src/vs/platform/configuration/test/node/configurationService.test.ts @@ -94,7 +94,8 @@ suite('ConfigurationService - Node', () => { const service = new ConfigurationService(URI.file(res.testFile)); await service.initialize(); return new Promise((c, e) => { - service.onDidChangeConfiguration(() => { + const disposable = service.onDidChangeConfiguration(() => { + disposable.dispose(); assert.equal(service.getValue('foo'), 'bar'); service.dispose(); c(); From 752e204839fbf0f57c125f58edae848c5d4f974d Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 23 Jul 2019 11:48:08 +0200 Subject: [PATCH 505/710] more disclaimers related to #76993 --- extensions/git/src/commands.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index a9b53103702..d75e6f9bc45 100755 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1115,7 +1115,7 @@ export class CommandCenter { if (scmResources.length === 1) { if (untrackedCount > 0) { - message = localize('confirm delete', "Are you sure you want to DELETE {0}?", path.basename(scmResources[0].resourceUri.fsPath)); + message = localize('confirm delete', "Are you sure you want to DELETE {0}?\nThis is IRREVERSIBLE!\nThis file will be FOREVER LOST.", path.basename(scmResources[0].resourceUri.fsPath)); yes = localize('delete file', "Delete file"); } else { if (scmResources[0].type === Status.DELETED) { @@ -1134,7 +1134,7 @@ export class CommandCenter { } if (untrackedCount > 0) { - message = `${message}\n\n${localize('warn untracked', "This will DELETE {0} untracked files!", untrackedCount)}`; + message = `${message}\n\n${localize('warn untracked', "This will DELETE {0} untracked files!\nThis is IRREVERSIBLE!\nThese files will be FOREVER LOST.", untrackedCount)}`; } } @@ -1175,7 +1175,7 @@ export class CommandCenter { await repository.clean(resources.map(r => r.resourceUri)); return; } else if (resources.length === 1) { - const message = localize('confirm delete', "Are you sure you want to DELETE {0}?", path.basename(resources[0].resourceUri.fsPath)); + const message = localize('confirm delete', "Are you sure you want to DELETE {0}?\nThis is IRREVERSIBLE!\nThis file will be FOREVER LOST.", path.basename(resources[0].resourceUri.fsPath)); const yes = localize('delete file', "Delete file"); const pick = await window.showWarningMessage(message, { modal: true }, yes); From 01c2f555539d9eeada4e4ef456f6bfbac11b0f26 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 23 Jul 2019 12:09:50 +0200 Subject: [PATCH 506/710] fixes #77583 --- .../contrib/update/electron-browser/update.ts | 61 +++++++++++-------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/src/vs/workbench/contrib/update/electron-browser/update.ts b/src/vs/workbench/contrib/update/electron-browser/update.ts index f21b80c1f21..ae89e3f4719 100644 --- a/src/vs/workbench/contrib/update/electron-browser/update.ts +++ b/src/vs/workbench/contrib/update/electron-browser/update.ts @@ -30,6 +30,7 @@ import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { FalseContext } from 'vs/platform/contextkey/common/contextkeys'; import { ShowCurrentReleaseNotesActionId } from 'vs/workbench/contrib/update/common/update'; +import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows'; const CONTEXT_UPDATE_STATE = new RawContextKey('updateState', StateType.Uninitialized); @@ -120,36 +121,44 @@ export class ProductContribution implements IWorkbenchContribution { @INotificationService notificationService: INotificationService, @IEnvironmentService environmentService: IEnvironmentService, @IOpenerService openerService: IOpenerService, - @IConfigurationService configurationService: IConfigurationService + @IConfigurationService configurationService: IConfigurationService, + @IWindowService windowService: IWindowService, + @IWindowsService windowsService: IWindowsService ) { - const lastVersion = storageService.get(ProductContribution.KEY, StorageScope.GLOBAL, ''); - const shouldShowReleaseNotes = configurationService.getValue('update.showReleaseNotes'); + windowsService.getActiveWindowId().then(async windowId => { + if (windowId !== windowService.windowId) { + return; + } - // was there an update? if so, open release notes - if (shouldShowReleaseNotes && !environmentService.skipReleaseNotes && product.releaseNotesUrl && lastVersion && pkg.version !== lastVersion) { - showReleaseNotes(instantiationService, pkg.version) - .then(undefined, () => { - notificationService.prompt( - severity.Info, - nls.localize('read the release notes', "Welcome to {0} v{1}! Would you like to read the Release Notes?", product.nameLong, pkg.version), - [{ - label: nls.localize('releaseNotes', "Release Notes"), - run: () => { - const uri = URI.parse(product.releaseNotesUrl); - openerService.open(uri); - } - }], - { sticky: true } - ); - }); - } + const lastVersion = storageService.get(ProductContribution.KEY, StorageScope.GLOBAL, ''); + const shouldShowReleaseNotes = configurationService.getValue('update.showReleaseNotes'); - // should we show the new license? - if (product.licenseUrl && lastVersion && semver.satisfies(lastVersion, '<1.0.0') && semver.satisfies(pkg.version, '>=1.0.0')) { - notificationService.info(nls.localize('licenseChanged', "Our license terms have changed, please click [here]({0}) to go through them.", product.licenseUrl)); - } + // was there an update? if so, open release notes + if (shouldShowReleaseNotes && !environmentService.skipReleaseNotes && product.releaseNotesUrl && lastVersion && pkg.version !== lastVersion) { + showReleaseNotes(instantiationService, pkg.version) + .then(undefined, () => { + notificationService.prompt( + severity.Info, + nls.localize('read the release notes', "Welcome to {0} v{1}! Would you like to read the Release Notes?", product.nameLong, pkg.version), + [{ + label: nls.localize('releaseNotes', "Release Notes"), + run: () => { + const uri = URI.parse(product.releaseNotesUrl); + openerService.open(uri); + } + }], + { sticky: true } + ); + }); + } - storageService.store(ProductContribution.KEY, pkg.version, StorageScope.GLOBAL); + // should we show the new license? + if (product.licenseUrl && lastVersion && semver.satisfies(lastVersion, '<1.0.0') && semver.satisfies(pkg.version, '>=1.0.0')) { + notificationService.info(nls.localize('licenseChanged', "Our license terms have changed, please click [here]({0}) to go through them.", product.licenseUrl)); + } + + storageService.store(ProductContribution.KEY, pkg.version, StorageScope.GLOBAL); + }); } } From 35ca4f2ae1b27a4dd641ed9806beeaf7bfb356a1 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 23 Jul 2019 12:25:51 +0200 Subject: [PATCH 507/710] Fix microsoft/vscode-remote-release/issues/833 --- .../browser/parts/activitybar/activitybarPart.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index 6b80f542aa2..c8ce2bc031f 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -34,6 +34,7 @@ import { isUndefinedOrNull } from 'vs/base/common/types'; import { IActivityBarService } from 'vs/workbench/services/activityBar/browser/activityBarService'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { Schemas } from 'vs/base/common/network'; +import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; interface ICachedViewlet { id: string; @@ -79,13 +80,16 @@ export class ActivitybarPart extends Part implements IActivityBarService { @IStorageService private readonly storageService: IStorageService, @IExtensionService private readonly extensionService: IExtensionService, @IViewsService private readonly viewsService: IViewsService, - @IContextKeyService private readonly contextKeyService: IContextKeyService + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IWorkbenchEnvironmentService workbenchEnvironmentService: IWorkbenchEnvironmentService, ) { super(Parts.ACTIVITYBAR_PART, { hasTitle: false }, themeService, storageService, layoutService); this.cachedViewlets = this.getCachedViewlets(); for (const cachedViewlet of this.cachedViewlets) { - if (this.shouldBeHidden(cachedViewlet.id, cachedViewlet)) { + if (workbenchEnvironmentService.configuration.remoteAuthority // In remote window, hide activity bar entries until registered. + || this.shouldBeHidden(cachedViewlet.id, cachedViewlet) + ) { cachedViewlet.visible = false; } } @@ -315,7 +319,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { } } - private shouldBeHidden(viewletId: string, cachedViewlet: ICachedViewlet): boolean { + private shouldBeHidden(viewletId: string, cachedViewlet?: ICachedViewlet): boolean { const viewContainer = this.getViewContainer(viewletId); if (!viewContainer || !viewContainer.hideIfEmpty) { return false; From 0a34756cae4fc67739e60c708b04637089f8bb0d Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 23 Jul 2019 12:59:05 +0200 Subject: [PATCH 508/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c323d9d29ac..05c9c32ddb0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "2971b0c2131f77e47314e59548e72b5b21088de3", + "distro": "8a361baa2374d6888ef7d6b15f5200fce59ad78d", "author": { "name": "Microsoft Corporation" }, From 3512f9e82c35c0ac6873e2d57f21b8aca42259e8 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 23 Jul 2019 13:55:11 +0200 Subject: [PATCH 509/710] demo --- test/tree/public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tree/public/index.html b/test/tree/public/index.html index 5810dba9547..17c88461c4b 100644 --- a/test/tree/public/index.html +++ b/test/tree/public/index.html @@ -146,7 +146,7 @@ } }; - const tree = new CompressedObjectTree(container, delegate, [renderer], { ...opts, filter: treeFilter, setRowLineHeight: false, collapseByDefault: true }); + const tree = new CompressedObjectTree(container, delegate, [renderer], { ...opts, filter: treeFilter, setRowLineHeight: false, collapseByDefault: true, setRowLineHeight: true }); return { tree, treeFilter }; } From f706130a5bfe3e4004c48198ca3db4800440356c Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Tue, 23 Jul 2019 09:08:56 -0500 Subject: [PATCH 510/710] Revert "Add DiagnosticTag case for MarkerTag.Deprecated" This reverts commit 36c9106350a290fb0d128f6a3f24cedcbb9fcf63. --- src/vs/workbench/api/common/extHostTypeConverters.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/vs/workbench/api/common/extHostTypeConverters.ts b/src/vs/workbench/api/common/extHostTypeConverters.ts index bc2951b6220..80fef1bdda0 100644 --- a/src/vs/workbench/api/common/extHostTypeConverters.ts +++ b/src/vs/workbench/api/common/extHostTypeConverters.ts @@ -108,8 +108,6 @@ export namespace DiagnosticTag { switch (value) { case types.DiagnosticTag.Unnecessary: return MarkerTag.Unnecessary; - case types.DiagnosticTag.Deprecated: - return MarkerTag.Deprecated; } return undefined; } From 64982b604fc74d841abb737bd0e2f196aea51df4 Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Tue, 23 Jul 2019 09:09:06 -0500 Subject: [PATCH 511/710] Revert "Add Deprecated to MarkerTag" This reverts commit 6b3ae43691a3729e4a988d1182abe6b7aba2f045. --- src/vs/editor/common/standalone/standaloneEnums.ts | 3 +-- src/vs/monaco.d.ts | 3 +-- src/vs/platform/markers/common/markers.ts | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/common/standalone/standaloneEnums.ts b/src/vs/editor/common/standalone/standaloneEnums.ts index 46d295d2398..df80861b2a8 100644 --- a/src/vs/editor/common/standalone/standaloneEnums.ts +++ b/src/vs/editor/common/standalone/standaloneEnums.ts @@ -7,8 +7,7 @@ export enum MarkerTag { - Unnecessary = 1, - Deprecated = 2 + Unnecessary = 1 } export enum MarkerSeverity { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 982a16b87ef..945d10d7e14 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -27,8 +27,7 @@ declare namespace monaco { export enum MarkerTag { - Unnecessary = 1, - Deprecated = 2 + Unnecessary = 1 } export enum MarkerSeverity { diff --git a/src/vs/platform/markers/common/markers.ts b/src/vs/platform/markers/common/markers.ts index 235c4b12f36..9461b506c21 100644 --- a/src/vs/platform/markers/common/markers.ts +++ b/src/vs/platform/markers/common/markers.ts @@ -39,7 +39,6 @@ export interface IRelatedInformation { export const enum MarkerTag { Unnecessary = 1, - Deprecated = 2 } export enum MarkerSeverity { From b4734e8524314fa5313d1a5abadd76421aa45cd3 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Tue, 23 Jul 2019 07:29:35 -0700 Subject: [PATCH 512/710] Filter extensions by category (#77306) * Revert commit change * Revert commit change * Revert commit change * Revert commit change * Revert commit change * Revert commit change * Provide option to filter by category * ignore casing * Remove unwanted build change --- resources/completions/zsh/_code | 1 + src/vs/code/node/cliProcessMain.ts | 15 ++++++++++++--- src/vs/platform/environment/common/environment.ts | 1 + src/vs/platform/environment/node/argv.ts | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/resources/completions/zsh/_code b/resources/completions/zsh/_code index 054ab351e91..265c199f62f 100644 --- a/resources/completions/zsh/_code +++ b/resources/completions/zsh/_code @@ -17,6 +17,7 @@ arguments=( '(- *)'{--telemetry}'[Shows all telemetry events which VS code collects.]' '--extensions-dir[set the root path for extensions]:root path:_directories' '--list-extensions[list the installed extensions]' + '--category[filters instaled extension list by category, when using --list-extension]' '--show-versions[show versions of installed extensions, when using --list-extension]' '--install-extension[install an extension]:id or path:_files -g "*.vsix(-.)"' '--uninstall-extension[uninstall an extension]:id or path:_files -g "*.vsix(-.)"' diff --git a/src/vs/code/node/cliProcessMain.ts b/src/vs/code/node/cliProcessMain.ts index 1f3aeb31063..cd4f1f85dc9 100644 --- a/src/vs/code/node/cliProcessMain.ts +++ b/src/vs/code/node/cliProcessMain.ts @@ -86,7 +86,7 @@ export class Main { await this.setInstallSource(argv['install-source']); } else if (argv['list-extensions']) { - await this.listExtensions(!!argv['show-versions']); + await this.listExtensions(!!argv['show-versions'], argv['category']); } else if (argv['install-extension']) { const arg = argv['install-extension']; @@ -110,8 +110,17 @@ export class Main { return writeFile(this.environmentService.installSourcePath, installSource.slice(0, 30)); } - private async listExtensions(showVersions: boolean): Promise { - const extensions = await this.extensionManagementService.getInstalled(ExtensionType.User); + private async listExtensions(showVersions: boolean, category?: string): Promise { + let extensions = await this.extensionManagementService.getInstalled(ExtensionType.User); + if (category) { + extensions = extensions.filter(e => { + if (e.manifest.categories) { + const lowerCaseCategories: string[] = e.manifest.categories.map(c => c.toLowerCase()); + return lowerCaseCategories.indexOf(category.toLowerCase()) > -1; + } + return false; + }); + } extensions.forEach(e => console.log(getId(e.manifest, showVersions))); } diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index 440b393833d..a6c9eb9d11c 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -47,6 +47,7 @@ export interface ParsedArgs { 'disable-extension'?: string | string[]; 'list-extensions'?: boolean; 'show-versions'?: boolean; + 'category'?: string; 'install-extension'?: string | string[]; 'uninstall-extension'?: string | string[]; 'locate-extension'?: string | string[]; diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index 71d6e6cc882..a1d33c98577 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -48,6 +48,7 @@ export const options: Option[] = [ { id: 'extensions-dir', type: 'string', deprecates: 'extensionHomePath', cat: 'e', args: 'dir', description: localize('extensionHomePath', "Set the root path for extensions.") }, { id: 'list-extensions', type: 'boolean', cat: 'e', description: localize('listExtensions', "List the installed extensions.") }, { id: 'show-versions', type: 'boolean', cat: 'e', description: localize('showVersions', "Show versions of installed extensions, when using --list-extension.") }, + { id: 'category', type: 'string', cat: 'e', description: localize('category', "Filters installed extensions by provided category, when using --list-extension.") }, { id: 'install-extension', type: 'string', cat: 'e', args: 'extension-id | path-to-vsix', description: localize('installExtension', "Installs or updates the extension. Use `--force` argument to avoid prompts.") }, { id: 'uninstall-extension', type: 'string', cat: 'e', args: 'extension-id', description: localize('uninstallExtension', "Uninstalls an extension.") }, { id: 'enable-proposed-api', type: 'string', cat: 'e', args: 'extension-id', description: localize('experimentalApis', "Enables proposed API features for extensions. Can receive one or more extension IDs to enable individually.") }, From e165b387a1cd4f5553ae3564cbadcd0f7fccb837 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 23 Jul 2019 17:12:42 +0200 Subject: [PATCH 513/710] add unit test for #77735 --- .../src/singlefolder-tests/workspace.test.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts index dc700abdf1b..55af5c4d5ed 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts @@ -796,4 +796,29 @@ suite('workspace-namespace', () => { we.deleteFile(docUri, { ignoreIfNotExists: true }); assert.ok(await vscode.workspace.applyEdit(we)); }); + + test('The api workspace.applyEdit drops the TextEdit if there is a RenameFile later #77735', async function () { + + let [f1, f2, f3] = await Promise.all([createRandomFile(), createRandomFile(), createRandomFile()]); + + let we = new vscode.WorkspaceEdit(); + we.insert(f1, new vscode.Position(0, 0), 'f1'); + we.insert(f2, new vscode.Position(0, 0), 'f2'); + we.insert(f3, new vscode.Position(0, 0), 'f3'); + + let f1_ = nameWithUnderscore(f1); + we.renameFile(f1, f1_); + + assert.ok(await vscode.workspace.applyEdit(we)); + + assert.equal((await vscode.workspace.openTextDocument(f3)).getText(), 'f3'); + assert.equal((await vscode.workspace.openTextDocument(f2)).getText(), 'f2'); + assert.equal((await vscode.workspace.openTextDocument(f1_)).getText(), 'f1'); + try { + await vscode.workspace.fs.stat(f1); + assert.ok(false); + } catch { + assert.ok(true); + } + }); }); From 71f7ab27eb5648ca6f40b7bbe0ef3bb3cbafe816 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Tue, 23 Jul 2019 08:19:43 -0700 Subject: [PATCH 514/710] Fix word wrap icons, add dark/light versions --- .../contrib/codeEditor/browser/toggleWordWrap.ts | 10 ++++++++-- .../contrib/codeEditor/browser/word-wrap-dark.svg | 3 +++ .../contrib/codeEditor/browser/word-wrap-light.svg | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 src/vs/workbench/contrib/codeEditor/browser/word-wrap-dark.svg create mode 100644 src/vs/workbench/contrib/codeEditor/browser/word-wrap-light.svg diff --git a/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts b/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts index 2daa66f371c..eb15bf10a1f 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts @@ -288,7 +288,10 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_WORD_WRAP_ID, title: nls.localize('unwrapMinified', "Disable wrapping for this file"), - iconLocation: { dark: URI.parse(require.toUrl('vs/workbench/contrib/codeEditor/browser/WordWrap_16x.svg')) } + iconLocation: { + dark: URI.parse(require.toUrl('vs/workbench/contrib/codeEditor/browser/word-wrap-dark.svg')), + light: URI.parse(require.toUrl('vs/workbench/contrib/codeEditor/browser/word-wrap-light.svg')) + } }, group: 'navigation', order: 1, @@ -302,7 +305,10 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_WORD_WRAP_ID, title: nls.localize('wrapMinified', "Enable wrapping for this file"), - iconLocation: { dark: URI.parse(require.toUrl('vs/workbench/contrib/codeEditor/browser/WordWrap_16x.svg')) } + iconLocation: { + dark: URI.parse(require.toUrl('vs/workbench/contrib/codeEditor/browser/word-wrap-dark.svg')), + light: URI.parse(require.toUrl('vs/workbench/contrib/codeEditor/browser/word-wrap-light.svg')) + } }, group: 'navigation', order: 1, diff --git a/src/vs/workbench/contrib/codeEditor/browser/word-wrap-dark.svg b/src/vs/workbench/contrib/codeEditor/browser/word-wrap-dark.svg new file mode 100644 index 00000000000..f54d621127f --- /dev/null +++ b/src/vs/workbench/contrib/codeEditor/browser/word-wrap-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/vs/workbench/contrib/codeEditor/browser/word-wrap-light.svg b/src/vs/workbench/contrib/codeEditor/browser/word-wrap-light.svg new file mode 100644 index 00000000000..6a8e3fdf933 --- /dev/null +++ b/src/vs/workbench/contrib/codeEditor/browser/word-wrap-light.svg @@ -0,0 +1,3 @@ + + + From b4edff8f5b01013600241d22536ba305100dfb1e Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Tue, 23 Jul 2019 10:23:46 -0500 Subject: [PATCH 515/710] Revert "Revert "Add Deprecated to MarkerTag"" This reverts commit 64982b604fc74d841abb737bd0e2f196aea51df4. --- src/vs/editor/common/standalone/standaloneEnums.ts | 3 ++- src/vs/monaco.d.ts | 3 ++- src/vs/platform/markers/common/markers.ts | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/standalone/standaloneEnums.ts b/src/vs/editor/common/standalone/standaloneEnums.ts index df80861b2a8..46d295d2398 100644 --- a/src/vs/editor/common/standalone/standaloneEnums.ts +++ b/src/vs/editor/common/standalone/standaloneEnums.ts @@ -7,7 +7,8 @@ export enum MarkerTag { - Unnecessary = 1 + Unnecessary = 1, + Deprecated = 2 } export enum MarkerSeverity { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 945d10d7e14..982a16b87ef 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -27,7 +27,8 @@ declare namespace monaco { export enum MarkerTag { - Unnecessary = 1 + Unnecessary = 1, + Deprecated = 2 } export enum MarkerSeverity { diff --git a/src/vs/platform/markers/common/markers.ts b/src/vs/platform/markers/common/markers.ts index 9461b506c21..235c4b12f36 100644 --- a/src/vs/platform/markers/common/markers.ts +++ b/src/vs/platform/markers/common/markers.ts @@ -39,6 +39,7 @@ export interface IRelatedInformation { export const enum MarkerTag { Unnecessary = 1, + Deprecated = 2 } export enum MarkerSeverity { From 1762f3f713a34e7ebc61e58188adc5917bb5d159 Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Tue, 23 Jul 2019 10:24:00 -0500 Subject: [PATCH 516/710] Revert "Revert "Add DiagnosticTag case for MarkerTag.Deprecated"" This reverts commit f706130a5bfe3e4004c48198ca3db4800440356c. --- src/vs/workbench/api/common/extHostTypeConverters.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/api/common/extHostTypeConverters.ts b/src/vs/workbench/api/common/extHostTypeConverters.ts index 80fef1bdda0..bc2951b6220 100644 --- a/src/vs/workbench/api/common/extHostTypeConverters.ts +++ b/src/vs/workbench/api/common/extHostTypeConverters.ts @@ -108,6 +108,8 @@ export namespace DiagnosticTag { switch (value) { case types.DiagnosticTag.Unnecessary: return MarkerTag.Unnecessary; + case types.DiagnosticTag.Deprecated: + return MarkerTag.Deprecated; } return undefined; } From 17e9023a4748b04af430a238dddc4bccfb41349e Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Tue, 23 Jul 2019 08:27:03 -0700 Subject: [PATCH 517/710] Make activity bar icons square --- .../files/browser/media/files-activity-bar.svg | 2 +- .../contrib/scm/browser/media/scm-activity-bar.svg | 11 +++++++++-- .../search/browser/media/search-activity-bar.svg | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/files/browser/media/files-activity-bar.svg b/src/vs/workbench/contrib/files/browser/media/files-activity-bar.svg index 09c943426e0..c109b13c3d2 100644 --- a/src/vs/workbench/contrib/files/browser/media/files-activity-bar.svg +++ b/src/vs/workbench/contrib/files/browser/media/files-activity-bar.svg @@ -1,3 +1,3 @@ - + diff --git a/src/vs/workbench/contrib/scm/browser/media/scm-activity-bar.svg b/src/vs/workbench/contrib/scm/browser/media/scm-activity-bar.svg index 9aa985bc979..5092b857329 100644 --- a/src/vs/workbench/contrib/scm/browser/media/scm-activity-bar.svg +++ b/src/vs/workbench/contrib/scm/browser/media/scm-activity-bar.svg @@ -1,3 +1,10 @@ - - + + + + + + + + + diff --git a/src/vs/workbench/contrib/search/browser/media/search-activity-bar.svg b/src/vs/workbench/contrib/search/browser/media/search-activity-bar.svg index b40063bef31..a7ea9ab29ab 100644 --- a/src/vs/workbench/contrib/search/browser/media/search-activity-bar.svg +++ b/src/vs/workbench/contrib/search/browser/media/search-activity-bar.svg @@ -1,3 +1,3 @@ - + From 4cb14a334f477f07a24ad9e21e6f07cabe9c0bf1 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Tue, 23 Jul 2019 08:50:01 -0700 Subject: [PATCH 518/710] Fix #77232, fix unsaved label and center it --- .../contrib/files/browser/media/explorerviewlet.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/files/browser/media/explorerviewlet.css b/src/vs/workbench/contrib/files/browser/media/explorerviewlet.css index 302453edb56..81b51b791f6 100644 --- a/src/vs/workbench/contrib/files/browser/media/explorerviewlet.css +++ b/src/vs/workbench/contrib/files/browser/media/explorerviewlet.css @@ -66,6 +66,8 @@ .explorer-viewlet .panel-header .count { min-width: fit-content; + display: flex; + align-items: center; } .explorer-viewlet .panel-header .monaco-count-badge.hidden { @@ -102,8 +104,9 @@ } .explorer-viewlet .monaco-count-badge { - padding: 1px 6px; + padding: 1px 6px 2px; margin-left: 6px; + min-height: auto; border-radius: 0; /* goes better when ellipsis shows up on narrow sidebar */ } From 3caba64433bc1869ac556736735847caf144d97b Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Tue, 23 Jul 2019 17:55:59 +0200 Subject: [PATCH 519/710] move handshake to eh --- .../workbench/api/node/extHostDebugService.ts | 49 ++++++++++++++++--- .../contrib/debug/browser/debugSession.ts | 4 +- .../contrib/debug/browser/rawDebugSession.ts | 15 ------ .../debug/test/browser/debugModel.test.ts | 4 +- 4 files changed, 44 insertions(+), 28 deletions(-) diff --git a/src/vs/workbench/api/node/extHostDebugService.ts b/src/vs/workbench/api/node/extHostDebugService.ts index 7683b5e9478..e5b2a445ec3 100644 --- a/src/vs/workbench/api/node/extHostDebugService.ts +++ b/src/vs/workbench/api/node/extHostDebugService.ts @@ -34,6 +34,8 @@ import { ExtHostCommands } from 'vs/workbench/api/common/extHostCommands'; import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/common/extensionDescriptionRegistry'; import { IProcessEnvironment } from 'vs/base/common/platform'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; +import { SignService } from 'vs/platform/sign/node/signService'; +import { ISignService } from 'vs/platform/sign/common/sign'; export class ExtHostDebugService implements ExtHostDebugServiceShape { @@ -81,6 +83,8 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { private _integratedTerminalInstance?: vscode.Terminal; private _terminalDisposedListener: IDisposable; + private _signService: ISignService; + constructor(mainContext: IMainContext, private _workspaceService: IExtHostWorkspaceProvider, @@ -421,16 +425,45 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { this._debugAdaptersTrackers.set(debugAdapterHandle, tracker); } - debugAdapter.onMessage(message => { + debugAdapter.onMessage(async message => { - if (tracker && tracker.onDidSendMessage) { - tracker.onDidSendMessage(message); + if (message.type === 'request' && (message).command === 'handshake') { + + const request = message; + + const response: DebugProtocol.Response = { + type: 'response', + seq: 0, + command: request.command, + request_seq: request.seq, + success: true + }; + + if (!this._signService) { + this._signService = new SignService(); + } + + try { + const signature = await this._signService.sign(request.arguments.value); + response.body = { + signature: signature + }; + debugAdapter.sendResponse(response); + } catch (e) { + response.success = false; + response.message = e.message; + debugAdapter.sendResponse(response); + } + } else { + if (tracker && tracker.onDidSendMessage) { + tracker.onDidSendMessage(message); + } + + // DA -> VS Code + message = convertToVSCPaths(message, true); + + mythis._debugServiceProxy.$acceptDAMessage(debugAdapterHandle, message); } - - // DA -> VS Code - message = convertToVSCPaths(message, true); - - mythis._debugServiceProxy.$acceptDAMessage(debugAdapterHandle, message); }); debugAdapter.onError(err => { if (tracker && tracker.onError) { diff --git a/src/vs/workbench/contrib/debug/browser/debugSession.ts b/src/vs/workbench/contrib/debug/browser/debugSession.ts index ca53f26dbf5..603797e9d04 100644 --- a/src/vs/workbench/contrib/debug/browser/debugSession.ts +++ b/src/vs/workbench/contrib/debug/browser/debugSession.ts @@ -31,7 +31,6 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { ReplModel } from 'vs/workbench/contrib/debug/common/replModel'; import { onUnexpectedError } from 'vs/base/common/errors'; import { INotificationService } from 'vs/platform/notification/common/notification'; -import { ISignService } from 'vs/platform/sign/common/sign'; export class DebugSession implements IDebugSession { @@ -66,7 +65,6 @@ export class DebugSession implements IDebugSession { @IViewletService private readonly viewletService: IViewletService, @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, @INotificationService private readonly notificationService: INotificationService, - @ISignService private readonly signService: ISignService, @IProductService private readonly productService: IProductService, @IWindowsService private readonly windowsService: IWindowsService ) { @@ -169,7 +167,7 @@ export class DebugSession implements IDebugSession { return dbgr.createDebugAdapter(this).then(debugAdapter => { - this.raw = new RawDebugSession(debugAdapter, dbgr, this.telemetryService, customTelemetryService, this.signService, this.windowsService); + this.raw = new RawDebugSession(debugAdapter, dbgr, this.telemetryService, customTelemetryService, this.windowsService); return this.raw!.start().then(() => { diff --git a/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts b/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts index 0550ddd64e9..b67785c3d98 100644 --- a/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts +++ b/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts @@ -12,7 +12,6 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { formatPII, isUri } from 'vs/workbench/contrib/debug/common/debugUtils'; import { IDebugAdapter, IConfig, AdapterEndEvent, IDebugger } from 'vs/workbench/contrib/debug/common/debug'; import { createErrorWithActions } from 'vs/base/common/errorsWithActions'; -import { ISignService } from 'vs/platform/sign/common/sign'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { URI } from 'vs/base/common/uri'; @@ -74,7 +73,6 @@ export class RawDebugSession { dbgr: IDebugger, private readonly telemetryService: ITelemetryService, public readonly customTelemetryService: ITelemetryService | undefined, - private readonly signService: ISignService, private readonly windowsService: IWindowsService ) { @@ -548,19 +546,6 @@ export class RawDebugSession { safeSendResponse(response); }); break; - case 'handshake': - try { - const signature = await this.signService.sign(request.arguments.value); - response.body = { - signature: signature - }; - safeSendResponse(response); - } catch (e) { - response.success = false; - response.message = e.message; - safeSendResponse(response); - } - break; default: response.success = false; response.message = `unknown request '${request.command}'`; diff --git a/src/vs/workbench/contrib/debug/test/browser/debugModel.test.ts b/src/vs/workbench/contrib/debug/test/browser/debugModel.test.ts index 7aafdc899f3..6b313596ca6 100644 --- a/src/vs/workbench/contrib/debug/test/browser/debugModel.test.ts +++ b/src/vs/workbench/contrib/debug/test/browser/debugModel.test.ts @@ -15,7 +15,7 @@ import { ReplModel } from 'vs/workbench/contrib/debug/common/replModel'; import { IBreakpointUpdateData } from 'vs/workbench/contrib/debug/common/debug'; function createMockSession(model: DebugModel, name = 'mockSession', parentSession?: DebugSession | undefined): DebugSession { - return new DebugSession({ resolved: { name, type: 'node', request: 'launch' }, unresolved: undefined }, undefined!, model, parentSession, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!); + return new DebugSession({ resolved: { name, type: 'node', request: 'launch' }, unresolved: undefined }, undefined!, model, parentSession, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!); } suite('Debug - Model', () => { @@ -427,7 +427,7 @@ suite('Debug - Model', () => { // Repl output test('repl output', () => { - const session = new DebugSession({ resolved: { name: 'mockSession', type: 'node', request: 'launch' }, unresolved: undefined }, undefined!, model, undefined, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!); + const session = new DebugSession({ resolved: { name: 'mockSession', type: 'node', request: 'launch' }, unresolved: undefined }, undefined!, model, undefined, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!, undefined!); const repl = new ReplModel(session); repl.appendToRepl('first line\n', severity.Error); repl.appendToRepl('second line ', severity.Error); From 105f843840f7dff139f7d54eb37e0c4ca663598e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 23 Jul 2019 17:10:58 +0200 Subject: [PATCH 520/710] :lipstick: remove unnecessary list/tree casts --- src/vs/base/browser/ui/tree/abstractTree.ts | 2 +- src/vs/base/browser/ui/tree/asyncDataTree.ts | 2 +- src/vs/base/browser/ui/tree/compressedObjectTree.ts | 2 +- src/vs/base/browser/ui/tree/dataTree.ts | 2 +- src/vs/base/browser/ui/tree/indexTree.ts | 2 +- src/vs/base/browser/ui/tree/objectTree.ts | 2 +- src/vs/platform/list/browser/listService.ts | 8 ++++---- .../parts/notifications/notificationsList.ts | 2 +- .../browser/parts/quickinput/quickInputList.ts | 2 +- src/vs/workbench/browser/parts/views/customView.ts | 2 +- .../contrib/debug/browser/breakpointsView.ts | 2 +- .../contrib/debug/browser/callStackView.ts | 2 +- .../workbench/contrib/debug/browser/debugHover.ts | 2 +- .../contrib/debug/browser/loadedScriptsView.ts | 2 +- .../contrib/debug/browser/variablesView.ts | 2 +- .../contrib/debug/browser/watchExpressionsView.ts | 2 +- .../electron-browser/runtimeExtensionsEditor.ts | 2 +- .../contrib/files/browser/views/explorerView.ts | 2 +- .../contrib/files/browser/views/openEditorsView.ts | 2 +- .../contrib/markers/browser/markersPanel.ts | 2 +- .../preferences/browser/keybindingsEditor.ts | 13 ++++++------- src/vs/workbench/contrib/scm/browser/scmViewlet.ts | 4 ++-- .../workbench/contrib/search/browser/searchView.ts | 2 +- 23 files changed, 32 insertions(+), 33 deletions(-) diff --git a/src/vs/base/browser/ui/tree/abstractTree.ts b/src/vs/base/browser/ui/tree/abstractTree.ts index a034736f2f5..7624d5b1fbe 100644 --- a/src/vs/base/browser/ui/tree/abstractTree.ts +++ b/src/vs/base/browser/ui/tree/abstractTree.ts @@ -1183,7 +1183,7 @@ export abstract class AbstractTree implements IDisposable constructor( container: HTMLElement, delegate: IListVirtualDelegate, - renderers: ITreeRenderer[], + renderers: ITreeRenderer[], private _options: IAbstractTreeOptions = {} ) { const treeDelegate = new ComposedTreeDelegate>(delegate); diff --git a/src/vs/base/browser/ui/tree/asyncDataTree.ts b/src/vs/base/browser/ui/tree/asyncDataTree.ts index f6b70591502..4421bce8de1 100644 --- a/src/vs/base/browser/ui/tree/asyncDataTree.ts +++ b/src/vs/base/browser/ui/tree/asyncDataTree.ts @@ -340,7 +340,7 @@ export class AsyncDataTree implements IDisposable constructor( container: HTMLElement, delegate: IListVirtualDelegate, - renderers: ITreeRenderer[], + renderers: ITreeRenderer[], private dataSource: IAsyncDataSource, options: IAsyncDataTreeOptions = {} ) { diff --git a/src/vs/base/browser/ui/tree/compressedObjectTree.ts b/src/vs/base/browser/ui/tree/compressedObjectTree.ts index b05f4045871..5d1b80462c5 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTree.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTree.ts @@ -24,7 +24,7 @@ export class CompressedObjectTree, TFilterData = void constructor( container: HTMLElement, delegate: IListVirtualDelegate>, - renderers: ITreeRenderer[], + renderers: ITreeRenderer, TFilterData, any>[], options: IObjectTreeOptions, TFilterData> = {} ) { super(container, delegate, renderers, options); diff --git a/src/vs/base/browser/ui/tree/dataTree.ts b/src/vs/base/browser/ui/tree/dataTree.ts index bb93ca31fad..9f51021a2e0 100644 --- a/src/vs/base/browser/ui/tree/dataTree.ts +++ b/src/vs/base/browser/ui/tree/dataTree.ts @@ -32,7 +32,7 @@ export class DataTree extends AbstractTree, - renderers: ITreeRenderer[], + renderers: ITreeRenderer[], private dataSource: IDataSource, options: IDataTreeOptions = {} ) { diff --git a/src/vs/base/browser/ui/tree/indexTree.ts b/src/vs/base/browser/ui/tree/indexTree.ts index 54eb0e103e6..4378ffd3e1a 100644 --- a/src/vs/base/browser/ui/tree/indexTree.ts +++ b/src/vs/base/browser/ui/tree/indexTree.ts @@ -20,7 +20,7 @@ export class IndexTree extends AbstractTree, - renderers: ITreeRenderer[], + renderers: ITreeRenderer[], private rootElement: T, options: IIndexTreeOptions = {} ) { diff --git a/src/vs/base/browser/ui/tree/objectTree.ts b/src/vs/base/browser/ui/tree/objectTree.ts index cdd1856bb09..51873462959 100644 --- a/src/vs/base/browser/ui/tree/objectTree.ts +++ b/src/vs/base/browser/ui/tree/objectTree.ts @@ -24,7 +24,7 @@ export class ObjectTree, TFilterData = void> extends constructor( container: HTMLElement, delegate: IListVirtualDelegate, - renderers: ITreeRenderer[], + renderers: ITreeRenderer[], options: IObjectTreeOptions = {} ) { super(container, delegate, renderers, options); diff --git a/src/vs/platform/list/browser/listService.ts b/src/vs/platform/list/browser/listService.ts index 6261e15b41d..0ef822bae84 100644 --- a/src/vs/platform/list/browser/listService.ts +++ b/src/vs/platform/list/browser/listService.ts @@ -247,7 +247,7 @@ export class WorkbenchList extends List { constructor( container: HTMLElement, delegate: IListVirtualDelegate, - renderers: IListRenderer[], + renderers: IListRenderer[], options: IListOptions, @IContextKeyService contextKeyService: IContextKeyService, @IListService listService: IListService, @@ -787,7 +787,7 @@ export class WorkbenchObjectTree, TFilterData = void> constructor( container: HTMLElement, delegate: IListVirtualDelegate, - renderers: ITreeRenderer[], + renderers: ITreeRenderer[], options: IObjectTreeOptions, @IContextKeyService contextKeyService: IContextKeyService, @IListService listService: IListService, @@ -813,7 +813,7 @@ export class WorkbenchDataTree extends DataTree, - renderers: ITreeRenderer[], + renderers: ITreeRenderer[], dataSource: IDataSource, options: IDataTreeOptions, @IContextKeyService contextKeyService: IContextKeyService, @@ -840,7 +840,7 @@ export class WorkbenchAsyncDataTree extends Async constructor( container: HTMLElement, delegate: IListVirtualDelegate, - renderers: ITreeRenderer[], + renderers: ITreeRenderer[], dataSource: IAsyncDataSource, options: IAsyncDataTreeOptions, @IContextKeyService contextKeyService: IContextKeyService, diff --git a/src/vs/workbench/browser/parts/notifications/notificationsList.ts b/src/vs/workbench/browser/parts/notifications/notificationsList.ts index ad21cda900c..03fd18b705d 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsList.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsList.ts @@ -70,7 +70,7 @@ export class NotificationsList extends Themable { const renderer = this.instantiationService.createInstance(NotificationRenderer, actionRunner); // List - this.list = this._register(>this.instantiationService.createInstance( + this.list = this._register(this.instantiationService.createInstance( WorkbenchList, this.listContainer, new NotificationsListDelegate(this.listContainer), diff --git a/src/vs/workbench/browser/parts/quickinput/quickInputList.ts b/src/vs/workbench/browser/parts/quickinput/quickInputList.ts index a1b09a2ea46..97bc546f7e8 100644 --- a/src/vs/workbench/browser/parts/quickinput/quickInputList.ts +++ b/src/vs/workbench/browser/parts/quickinput/quickInputList.ts @@ -252,7 +252,7 @@ export class QuickInputList { setRowLineHeight: false, multipleSelectionSupport: false, horizontalScrolling: false - } as IListOptions) as WorkbenchList; + } as IListOptions); this.list.getHTMLElement().id = id; this.disposables.push(this.list); this.disposables.push(this.list.onKeyDown(e => { diff --git a/src/vs/workbench/browser/parts/views/customView.ts b/src/vs/workbench/browser/parts/views/customView.ts index 485360d7b56..ab1ad41a50b 100644 --- a/src/vs/workbench/browser/parts/views/customView.ts +++ b/src/vs/workbench/browser/parts/views/customView.ts @@ -385,7 +385,7 @@ export class CustomTreeView extends Disposable implements ITreeView { collapseByDefault: (e: ITreeItem): boolean => { return e.collapsibleState !== TreeItemCollapsibleState.Expanded; } - }) as WorkbenchAsyncDataTree); + })); aligner.tree = this.tree; this.tree.contextKeyService.createKey(this.id, true); diff --git a/src/vs/workbench/contrib/debug/browser/breakpointsView.ts b/src/vs/workbench/contrib/debug/browser/breakpointsView.ts index e0fa0e6c9f3..9114575d433 100644 --- a/src/vs/workbench/contrib/debug/browser/breakpointsView.ts +++ b/src/vs/workbench/contrib/debug/browser/breakpointsView.ts @@ -83,7 +83,7 @@ export class BreakpointsView extends ViewletPanel { getRole: (breakpoint: IEnablement) => 'checkbox', isChecked: (breakpoint: IEnablement) => breakpoint.enabled } - }) as WorkbenchList; + }); CONTEXT_BREAKPOINTS_FOCUSED.bindTo(this.list.contextKeyService); diff --git a/src/vs/workbench/contrib/debug/browser/callStackView.ts b/src/vs/workbench/contrib/debug/browser/callStackView.ts index 6d94222b5b8..e8eac6f7d23 100644 --- a/src/vs/workbench/contrib/debug/browser/callStackView.ts +++ b/src/vs/workbench/contrib/debug/browser/callStackView.ts @@ -145,7 +145,7 @@ export class CallStackView extends ViewletPanel { return nls.localize('showMoreStackFrames2', "Show More Stack Frames"); } } - }) as WorkbenchAsyncDataTree; + }); this.tree.setInput(this.debugService.getModel()).then(undefined, onUnexpectedError); diff --git a/src/vs/workbench/contrib/debug/browser/debugHover.ts b/src/vs/workbench/contrib/debug/browser/debugHover.ts index ff64d75d22b..b198f1d9e15 100644 --- a/src/vs/workbench/contrib/debug/browser/debugHover.ts +++ b/src/vs/workbench/contrib/debug/browser/debugHover.ts @@ -80,7 +80,7 @@ export class DebugHoverWidget implements IContentWidget { accessibilityProvider: new DebugHoverAccessibilityProvider(), mouseSupport: false, horizontalScrolling: true - }) as any as AsyncDataTree; + }); this.valueContainer = $('.value'); this.valueContainer.tabIndex = 0; diff --git a/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts b/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts index 8d31338c44e..ef9f3cb5d37 100644 --- a/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts +++ b/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts @@ -433,7 +433,7 @@ export class LoadedScriptsView extends ViewletPanel { accessibilityProvider: new LoadedSciptsAccessibilityProvider(), ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'loadedScriptsAriaLabel' }, "Debug Loaded Scripts"), } - ) as WorkbenchAsyncDataTree; + ); this.tree.setInput(root); diff --git a/src/vs/workbench/contrib/debug/browser/variablesView.ts b/src/vs/workbench/contrib/debug/browser/variablesView.ts index 6b51044d076..581042b38cc 100644 --- a/src/vs/workbench/contrib/debug/browser/variablesView.ts +++ b/src/vs/workbench/contrib/debug/browser/variablesView.ts @@ -91,7 +91,7 @@ export class VariablesView extends ViewletPanel { accessibilityProvider: new VariablesAccessibilityProvider(), identityProvider: { getId: (element: IExpression | IScope) => element.getId() }, keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression | IScope) => e } - }) as WorkbenchAsyncDataTree; + }); this.tree.setInput(this.debugService.getViewModel()).then(null, onUnexpectedError); diff --git a/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts b/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts index 53549128538..970b8abfa7d 100644 --- a/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts +++ b/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts @@ -66,7 +66,7 @@ export class WatchExpressionsView extends ViewletPanel { identityProvider: { getId: (element: IExpression) => element.getId() }, keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression) => e }, dnd: new WatchExpressionsDragAndDrop(this.debugService), - }) as WorkbenchAsyncDataTree; + }); this.tree.setInput(this.debugService).then(undefined, onUnexpectedError); CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bindTo(this.tree.contextKeyService); diff --git a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts index 1366ea7ebd8..1cc01b85802 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts @@ -405,7 +405,7 @@ export class RuntimeExtensionsEditor extends BaseEditor { multipleSelectionSupport: false, setRowLineHeight: false, horizontalScrolling: false - }) as WorkbenchList; + }); this._list.splice(0, this._list.length, this._elements || undefined); diff --git a/src/vs/workbench/contrib/files/browser/views/explorerView.ts b/src/vs/workbench/contrib/files/browser/views/explorerView.ts index ed5d11edf80..fe6751e85db 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerView.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerView.ts @@ -302,7 +302,7 @@ export class ExplorerView extends ViewletPanel { sorter: this.instantiationService.createInstance(FileSorter), dnd: this.instantiationService.createInstance(FileDragAndDrop), autoExpandSingleChildren: true - }) as WorkbenchAsyncDataTree; + }); this._register(this.tree); // Bind context keys diff --git a/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts b/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts index 31a5963340f..5ed1a09eb84 100644 --- a/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts @@ -219,7 +219,7 @@ export class OpenEditorsView extends ViewletPanel { ], { identityProvider: { getId: (element: OpenEditor | IEditorGroup) => element instanceof OpenEditor ? element.getId() : element.id.toString() }, dnd: new OpenEditorsDragAndDrop(this.instantiationService, this.editorGroupService) - }) as WorkbenchList; + }); this._register(this.list); this._register(this.listLabels); diff --git a/src/vs/workbench/contrib/markers/browser/markersPanel.ts b/src/vs/workbench/contrib/markers/browser/markersPanel.ts index ad11ca74de9..71b13da1413 100644 --- a/src/vs/workbench/contrib/markers/browser/markersPanel.ts +++ b/src/vs/workbench/contrib/markers/browser/markersPanel.ts @@ -320,7 +320,7 @@ export class MarkersPanel extends Panel implements IMarkerFilterController { dnd: new ResourceDragAndDrop(this.instantiationService), expandOnlyOnTwistieClick: (e: TreeElement) => e instanceof Marker && e.relatedInformation.length > 0 } - ) as any as WorkbenchObjectTree; + ); onDidChangeRenderNodeCount.input = this.tree.onDidChangeRenderNodeCount; diff --git a/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts index c2d2c57df76..d83000eaaa4 100644 --- a/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts @@ -452,13 +452,12 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor private createList(parent: HTMLElement): void { this.keybindingsListContainer = DOM.append(parent, $('.keybindings-list-container')); - this.keybindingsList = this._register(this.instantiationService.createInstance(WorkbenchList, this.keybindingsListContainer, new Delegate(), [new KeybindingItemRenderer(this, this.instantiationService)], - { - identityProvider: { getId: (e: IListEntry) => e.id }, - ariaLabel: localize('keybindingsLabel', "Keybindings"), - setRowLineHeight: false, - horizontalScrolling: false - })) as WorkbenchList; + this.keybindingsList = this._register(this.instantiationService.createInstance(WorkbenchList, this.keybindingsListContainer, new Delegate(), [new KeybindingItemRenderer(this, this.instantiationService)], { + identityProvider: { getId: (e: IListEntry) => e.id }, + ariaLabel: localize('keybindingsLabel', "Keybindings"), + setRowLineHeight: false, + horizontalScrolling: false + })); this._register(this.keybindingsList.onContextMenu(e => this.onContextMenu(e))); this._register(this.keybindingsList.onFocusChange(e => this.onFocusChange(e))); this._register(this.keybindingsList.onDidFocus(() => { diff --git a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts index e56bd970377..e3d7a922c78 100644 --- a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts +++ b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts @@ -245,7 +245,7 @@ export class MainPanel extends ViewletPanel { this.list = this.instantiationService.createInstance(WorkbenchList, container, delegate, [renderer], { identityProvider, horizontalScrolling: false - }) as WorkbenchList; + }); this._register(renderer.onDidRenderElement(e => this.list.updateWidth(this.viewModel.repositories.indexOf(e)), null)); this._register(this.list.onSelectionChange(this.onListSelectionChange, this)); @@ -850,7 +850,7 @@ export class RepositoryPanel extends ViewletPanel { identityProvider: scmResourceIdentityProvider, keyboardNavigationLabelProvider: scmKeyboardNavigationLabelProvider, horizontalScrolling: false - }) as WorkbenchList; + }); this._register(Event.chain(this.list.onDidOpen) .map(e => e.elements[0]) diff --git a/src/vs/workbench/contrib/search/browser/searchView.ts b/src/vs/workbench/contrib/search/browser/searchView.ts index 51979d3ff21..c175024c0eb 100644 --- a/src/vs/workbench/contrib/search/browser/searchView.ts +++ b/src/vs/workbench/contrib/search/browser/searchView.ts @@ -633,7 +633,7 @@ export class SearchView extends ViewletPanel { }; this.treeLabels = this._register(this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility })); - this.tree = this._register(>this.instantiationService.createInstance(WorkbenchObjectTree, + this.tree = this._register(this.instantiationService.createInstance(WorkbenchObjectTree, this.resultsElement, delegate, [ From ed6c5c52590e23d11f305c5072792740ba966da4 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 23 Jul 2019 19:27:08 +0200 Subject: [PATCH 521/710] Implement microsoft/vscode-remote-release/issues/157 --- .../browser/extensions.contribution.ts | 2 + .../extensions/browser/extensionsActions.ts | 117 +++++++++++++++++- .../browser/remoteExtensionsInstaller.ts | 43 +++++++ .../common/extensionManagementService.ts | 6 +- 4 files changed, 164 insertions(+), 4 deletions(-) create mode 100644 src/vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller.ts diff --git a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts index f91906a7d35..39b348072b9 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts @@ -44,6 +44,7 @@ import { ExtensionDependencyChecker } from 'vs/workbench/contrib/extensions/brow import { CancellationToken } from 'vs/base/common/cancellation'; import { ExtensionType } from 'vs/platform/extensions/common/extensions'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; +import { RemoteExtensionsInstaller } from 'vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller'; // Singletons registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService); @@ -372,3 +373,4 @@ workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, LifecyclePhase workbenchRegistry.registerWorkbenchContribution(ExtensionsViewletViewsContribution, LifecyclePhase.Starting); workbenchRegistry.registerWorkbenchContribution(ExtensionActivationProgress, LifecyclePhase.Eventually); workbenchRegistry.registerWorkbenchContribution(ExtensionDependencyChecker, LifecyclePhase.Eventually); +workbenchRegistry.registerWorkbenchContribution(RemoteExtensionsInstaller, LifecyclePhase.Eventually); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index ea26aa79a2c..4ac602fc5fb 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -61,6 +61,7 @@ import { ITextFileService } from 'vs/workbench/services/textfile/common/textfile import { IProductService } from 'vs/platform/product/common/product'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs'; +import { IProgressService, ProgressLocation } from 'vs/platform/progress/common/progress'; export function toExtensionDescription(local: ILocalExtension): IExtensionDescription { return { @@ -324,7 +325,6 @@ export class InstallInOtherServerAction extends ExtensionAction { && (this.extension.enablementState === EnablementState.DisabledByExtensionKind || isLanguagePackExtension(this.extension.local.manifest)) // Not installed in other server and can install in other server && !this.extensionsWorkbenchService.installed.some(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server === this.server) - && this.extensionsWorkbenchService.canInstall(this.extension) ) { this.enabled = true; this.updateLabel(); @@ -338,8 +338,14 @@ export class InstallInOtherServerAction extends ExtensionAction { this.update(); this.extensionsWorkbenchService.open(this.extension); alert(localize('installExtensionStart', "Installing extension {0} started. An editor is now open with more details on this extension", this.extension.displayName)); - if (this.extension.gallery) { - await this.server.extensionManagementService.installFromGallery(this.extension.gallery); + try { + if (this.extension.gallery) { + await this.server.extensionManagementService.installFromGallery(this.extension.gallery); + } else { + const vsix = await this.extension.server!.extensionManagementService.zip(this.extension.local!); + await this.server.extensionManagementService.install(vsix); + } + } finally { this.installing = false; this.update(); } @@ -3017,6 +3023,111 @@ export class InstallSpecificVersionOfExtensionAction extends Action { } } +interface IExtensionPickItem extends IQuickPickItem { + extension?: IExtension; +} + +export class InstallLocalExtensionsOnRemoteAction extends Action { + + constructor( + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, + @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @INotificationService private readonly notificationService: INotificationService, + @IWindowService private readonly windowService: IWindowService, + @IProgressService private readonly progressService: IProgressService + ) { + super('workbench.extensions.actions.installLocalExtensionsOnRemote'); + this.enabled = !!this.extensionManagementServerService.localExtensionManagementServer && !!this.extensionManagementServerService.remoteExtensionManagementServer; + } + + async run(): Promise { + if (this.enabled) { + await this.selectAndInstallLocalExtensions(); + } + } + + private async getLocalExtensionsToInstall(): Promise { + const localExtensions = await this.extensionsWorkbenchService.queryLocal(this.extensionManagementServerService.localExtensionManagementServer!); + const remoteExtensions = await this.extensionsWorkbenchService.queryLocal(this.extensionManagementServerService.remoteExtensionManagementServer!); + const remoteExtensionsIds: Set = new Set(); + const remoteExtensionsUUIDs: Set = new Set(); + for (const extension of remoteExtensions) { + remoteExtensionsIds.add(extension.identifier.id.toLowerCase()); + if (extension.identifier.uuid) { + remoteExtensionsUUIDs.add(extension.identifier.uuid); + } + } + const localExtensionsToInstall: IExtension[] = []; + for (const localExtension of localExtensions) { + if (localExtension.type === ExtensionType.User + && (isLanguagePackExtension(localExtension.local!.manifest) || localExtension.enablementState === EnablementState.DisabledByExtensionKind)) { + if (!remoteExtensionsIds.has(localExtension.identifier.id.toLowerCase()) || (localExtension.identifier.uuid && !remoteExtensionsUUIDs.has(localExtension.identifier.uuid))) { + localExtensionsToInstall.push(localExtension); + } + } + } + return localExtensionsToInstall; + } + + private async selectAndInstallLocalExtensions(): Promise { + const result = await this.quickInputService.pick( + this.getLocalExtensionsToInstall() + .then(extensions => { + if (extensions.length) { + extensions = extensions.sort((e1, e2) => e1.displayName.localeCompare(e2.displayName)); + return extensions.map(extension => ({ extension, label: extension.displayName, description: extension.version })); + } + return [{ label: localize('no local extensions', "There are no extensions to install.") }]; + }), + { + canPickMany: true, + placeHolder: localize('select extensions to install', "Select extensions to install") + } + ); + if (result) { + const localExtensionsToInstall = result.filter(r => !!r.extension).map(r => r.extension!); + if (localExtensionsToInstall.length) { + this.progressService.withProgress( + { + location: ProgressLocation.Notification, + title: localize('installing extensions', "Installing Extensions...") + }, + () => this.installLocalExtensions(localExtensionsToInstall)); + } + } + } + + private async installLocalExtensions(localExtensionsToInstall: IExtension[]): Promise { + const galleryExtensions: IGalleryExtension[] = []; + const vsixs: URI[] = []; + await Promise.all(localExtensionsToInstall.map(async extension => { + if (this.extensionGalleryService.isEnabled()) { + const gallery = await this.extensionGalleryService.getCompatibleExtension(extension.identifier, extension.version); + if (gallery) { + galleryExtensions.push(gallery); + return; + } + } + const vsix = await this.extensionManagementServerService.localExtensionManagementServer!.extensionManagementService.zip(extension.local!); + vsixs.push(vsix); + })); + + await Promise.all(galleryExtensions.map(gallery => this.extensionManagementServerService.remoteExtensionManagementServer!.extensionManagementService.installFromGallery(gallery))); + await Promise.all(vsixs.map(vsix => this.extensionManagementServerService.remoteExtensionManagementServer!.extensionManagementService.install(vsix))); + + this.notificationService.notify({ + severity: Severity.Info, + message: localize('finished installing', "Completed installing the extensions. Please reload the window now."), + actions: { + primary: [new Action('realod', localize('reload', "Realod Window"), '', true, + () => this.windowService.reloadWindow())] + } + }); + } +} + CommandsRegistry.registerCommand('workbench.extensions.action.showExtensionsForLanguage', function (accessor: ServicesAccessor, fileExtension: string) { const viewletService = accessor.get(IViewletService); diff --git a/src/vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller.ts b/src/vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller.ts new file mode 100644 index 00000000000..afb0204f7d7 --- /dev/null +++ b/src/vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller.ts @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; +import { CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; +import { localize } from 'vs/nls'; +import { Disposable, toDisposable } from 'vs/base/common/lifecycle'; +import { IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; +import { ILabelService } from 'vs/platform/label/common/label'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { InstallLocalExtensionsOnRemoteAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; + +export class RemoteExtensionsInstaller extends Disposable implements IWorkbenchContribution { + + constructor( + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, + @ILabelService labelService: ILabelService, + @IInstantiationService instantiationService: IInstantiationService + ) { + super(); + if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { + CommandsRegistry.registerCommand('workbench.extensions.installLocalExtensions', () => instantiationService.createInstance(InstallLocalExtensionsOnRemoteAction).run()); + let disposable = Disposable.None; + const appendMenuItem = () => { + disposable.dispose(); + disposable = MenuRegistry.appendMenuItem(MenuId.CommandPalette, { + command: { + id: 'workbench.extensions.installLocalExtensions', + category: localize('extensions', "Extensions"), + title: localize('istall local extensions', "Install Local Extensions on {0}", this.extensionManagementServerService.remoteExtensionManagementServer!.label) + } + }); + }; + appendMenuItem(); + this._register(labelService.onDidChangeFormatters(e => appendMenuItem())); + this._register(toDisposable(() => disposable.dispose())); + } + } + +} \ No newline at end of file diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts index ff5534b4901..337f52b278a 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts @@ -130,7 +130,11 @@ export class ExtensionManagementService extends Disposable implements IExtension } zip(extension: ILocalExtension): Promise { - throw new Error('Not Supported'); + const server = this.getServer(extension); + if (server) { + return server.extensionManagementService.zip(extension); + } + return Promise.reject(`Invalid location ${extension.location.toString()}`); } unzip(zipLocation: URI, type: ExtensionType): Promise { From 73c6419c66de54799a36bc41b70dffdff973e25e Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 23 Jul 2019 19:34:38 +0200 Subject: [PATCH 522/710] fix tests --- .../test/electron-browser/extensionsActions.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index c13fb820c2a..f02f6d7c892 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -1731,7 +1731,7 @@ suite('ExtensionsActions Test', () => { assert.ok(!testObject.enabled); }); - test('Test remote install action is disabled for local workspace extension if it cannot be installed', async () => { + test('Test remote install action is enabled for local workspace extension if it has not gallery', async () => { // multi server setup const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceExtension])); @@ -1747,7 +1747,7 @@ suite('ExtensionsActions Test', () => { const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); testObject.extension = extensions[0]; assert.ok(testObject.extension); - assert.ok(!testObject.enabled); + assert.ok(testObject.enabled); }); test('Test remote install action is disabled for local ui extension if it is not installed in remote', async () => { @@ -2071,7 +2071,7 @@ suite('ExtensionsActions Test', () => { assert.ok(!testObject.enabled); }); - test('Test local install action is disabled for remote UI extension if it cannot be installed', async () => { + test('Test local install action is enabled for remote UI extension if it has gallery', async () => { // multi server setup const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService(), createExtensionManagementService([remoteUIExtension])); @@ -2087,7 +2087,7 @@ suite('ExtensionsActions Test', () => { const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); testObject.extension = extensions[0]; assert.ok(testObject.extension); - assert.ok(!testObject.enabled); + assert.ok(testObject.enabled); }); test('Test local install action is disabled for remote workspace extension if it is not installed in local', async () => { From 85d489558719ec9fc016587820705c883419b074 Mon Sep 17 00:00:00 2001 From: pi1024e Date: Sat, 20 Jul 2019 18:01:09 -0400 Subject: [PATCH 523/710] Refactored code to make "WhiteSpace" into "Whitespace" --- .../server/src/pathCompletion.ts | 43 +++++++++---------- .../server/src/modes/pathCompletion.ts | 11 +++-- .../common/config/commonEditorConfig.ts | 2 +- .../editor/contrib/hover/modesContentHover.ts | 2 +- 4 files changed, 27 insertions(+), 31 deletions(-) diff --git a/extensions/css-language-features/server/src/pathCompletion.ts b/extensions/css-language-features/server/src/pathCompletion.ts index 4d988a52da9..cd9f0792795 100644 --- a/extensions/css-language-features/server/src/pathCompletion.ts +++ b/extensions/css-language-features/server/src/pathCompletion.ts @@ -144,27 +144,23 @@ const isDir = (p: string) => { }; function pathToReplaceRange(valueBeforeCursor: string, fullValue: string, fullValueRange: Range) { - let replaceRange: Range; const lastIndexOfSlash = valueBeforeCursor.lastIndexOf('/'); if (lastIndexOfSlash === -1) { - replaceRange = fullValueRange; - } else { - // For cases where cursor is in the middle of attribute value, like XMLHttpRequest. */ requestHandler?: (requestOptions: IRequestOptions) => Promise; + + /** + * A factory for web sockets. + */ + webSocketFactory?: IWebSocketFactory; } /** From 1466e19d2669e5dcc608868bea7869c10a45bf2f Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 23 Jul 2019 22:22:03 +0200 Subject: [PATCH 547/710] fix wrong type --- src/vs/editor/contrib/documentSymbols/outlineTree.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/documentSymbols/outlineTree.ts b/src/vs/editor/contrib/documentSymbols/outlineTree.ts index 551ff4b4726..a77c8d1bd2e 100644 --- a/src/vs/editor/contrib/documentSymbols/outlineTree.ts +++ b/src/vs/editor/contrib/documentSymbols/outlineTree.ts @@ -13,7 +13,7 @@ import 'vs/css!./media/outlineTree'; import 'vs/css!./media/symbol-icons'; import { Range } from 'vs/editor/common/core/range'; import { SymbolKind, symbolKindToCssClass } from 'vs/editor/common/modes'; -import { OutlineElement, OutlineGroup, OutlineModel, TreeElement } from 'vs/editor/contrib/documentSymbols/outlineModel'; +import { OutlineElement, OutlineGroup, OutlineModel } from 'vs/editor/contrib/documentSymbols/outlineModel'; import { localize } from 'vs/nls'; import { IconLabel } from 'vs/base/browser/ui/iconLabel/iconLabel'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; @@ -38,7 +38,7 @@ export class OutlineNavigationLabelProvider implements IKeyboardNavigationLabelP export class OutlineIdentityProvider implements IIdentityProvider { - getId(element: TreeElement): { toString(): string; } { + getId(element: OutlineItem): { toString(): string; } { return element.id; } } From c939c015514a936dc0caa1bc668bc6aba6aba019 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 23 Jul 2019 22:24:58 +0200 Subject: [PATCH 548/710] :lipstick: remove more casts --- .../browser/parts/editor/breadcrumbsPicker.ts | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts b/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts index 365faea190f..42ca9e2d502 100644 --- a/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts +++ b/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts @@ -25,10 +25,9 @@ import { ResourceLabels, IResourceLabel, DEFAULT_LABELS_CONTAINER } from 'vs/wor import { BreadcrumbsConfig } from 'vs/workbench/browser/parts/editor/breadcrumbs'; import { BreadcrumbElement, FileElement } from 'vs/workbench/browser/parts/editor/breadcrumbsModel'; import { IFileIconTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; -import { IAsyncDataSource, ITreeRenderer, ITreeNode, ITreeFilter, TreeVisibility, ITreeSorter, IDataSource } from 'vs/base/browser/ui/tree/tree'; -import { OutlineVirtualDelegate, OutlineGroupRenderer, OutlineElementRenderer, OutlineItemComparator, OutlineIdentityProvider, OutlineNavigationLabelProvider, OutlineDataSource, OutlineSortOrder, OutlineItem } from 'vs/editor/contrib/documentSymbols/outlineTree'; +import { IAsyncDataSource, ITreeRenderer, ITreeNode, ITreeFilter, TreeVisibility, ITreeSorter } from 'vs/base/browser/ui/tree/tree'; +import { OutlineVirtualDelegate, OutlineGroupRenderer, OutlineElementRenderer, OutlineItemComparator, OutlineIdentityProvider, OutlineNavigationLabelProvider, OutlineDataSource, OutlineSortOrder } from 'vs/editor/contrib/documentSymbols/outlineTree'; import { IIdentityProvider, IListVirtualDelegate, IKeyboardNavigationLabelProvider } from 'vs/base/browser/ui/list/list'; -import { IDataTreeOptions } from 'vs/base/browser/ui/tree/dataTree'; export function createBreadcrumbsPicker(instantiationService: IInstantiationService, parent: HTMLElement, element: BreadcrumbElement): BreadcrumbsPicker { const ctor: IConstructorSignature1 = element instanceof FileElement @@ -381,7 +380,7 @@ export class BreadcrumbsFilePicker extends BreadcrumbsPicker { filter: this._instantiationService.createInstance(FileFilter), identityProvider: new FileIdentityProvider(), keyboardNavigationLabelProvider: new FileNavigationLabelProvider() - }) as WorkbenchAsyncDataTree; + }); } _setInput(element: BreadcrumbElement): Promise { @@ -439,14 +438,7 @@ export class BreadcrumbsOutlinePicker extends BreadcrumbsPicker { } protected _createTree(container: HTMLElement) { - return this._instantiationService.createInstance< - HTMLElement, - IListVirtualDelegate, - ITreeRenderer[], - IDataSource, - IDataTreeOptions, - WorkbenchDataTree - >( + return this._instantiationService.createInstance( WorkbenchDataTree, container, new OutlineVirtualDelegate(), @@ -459,7 +451,7 @@ export class BreadcrumbsOutlinePicker extends BreadcrumbsPicker { identityProvider: new OutlineIdentityProvider(), keyboardNavigationLabelProvider: new OutlineNavigationLabelProvider() } - ) as WorkbenchDataTree; + ); } dispose(): void { From b798ef9751b4359724dcc06d7721570209f18c69 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 23 Jul 2019 22:26:33 +0200 Subject: [PATCH 549/710] isolate and document casting awkwardness related to microsoft/TypeScript#32526 --- .../workbench/contrib/debug/browser/repl.ts | 21 ++++++++++++------- .../contrib/outline/browser/outlinePanel.ts | 3 ++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/contrib/debug/browser/repl.ts b/src/vs/workbench/contrib/debug/browser/repl.ts index c099ec691a9..922de4fe53a 100644 --- a/src/vs/workbench/contrib/debug/browser/repl.ts +++ b/src/vs/workbench/contrib/debug/browser/repl.ts @@ -378,12 +378,19 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati this.replDelegate = new ReplDelegate(this.configurationService); const wordWrap = this.configurationService.getValue('debug').console.wordWrap; dom.toggleClass(treeContainer, 'word-wrap', wordWrap); - this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, treeContainer, this.replDelegate, [ - this.instantiationService.createInstance(VariablesRenderer), - this.instantiationService.createInstance(ReplSimpleElementsRenderer), - new ReplExpressionsRenderer(), - new ReplRawObjectsRenderer() - ], new ReplDataSource(), { + this.tree = this.instantiationService.createInstance( + WorkbenchAsyncDataTree, + treeContainer, + this.replDelegate, + [ + this.instantiationService.createInstance(VariablesRenderer), + this.instantiationService.createInstance(ReplSimpleElementsRenderer), + new ReplExpressionsRenderer(), + new ReplRawObjectsRenderer() + ], + // https://github.com/microsoft/TypeScript/issues/32526 + new ReplDataSource() as IAsyncDataSource, + { ariaLabel: nls.localize('replAriaLabel', "Read Eval Print Loop Panel"), accessibilityProvider: new ReplAccessibilityProvider(), identityProvider: { getId: (element: IReplElement) => element.getId() }, @@ -392,7 +399,7 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati horizontalScrolling: !wordWrap, setRowLineHeight: false, supportDynamicHeights: wordWrap - }) as WorkbenchAsyncDataTree; + }); this._register(this.tree.onContextMenu(e => this.onContextMenu(e))); let lastSelectedString: string; this._register(this.tree.onMouseClick(() => { diff --git a/src/vs/workbench/contrib/outline/browser/outlinePanel.ts b/src/vs/workbench/contrib/outline/browser/outlinePanel.ts index 0facdb0c1ac..74c1efc7e98 100644 --- a/src/vs/workbench/contrib/outline/browser/outlinePanel.ts +++ b/src/vs/workbench/contrib/outline/browser/outlinePanel.ts @@ -319,6 +319,7 @@ export class OutlinePanel extends ViewletPanel { treeContainer, new OutlineVirtualDelegate(), [new OutlineGroupRenderer(), this._treeRenderer], + // https://github.com/microsoft/TypeScript/issues/32526 this._treeDataSource as IDataSource, { expandOnlyOnTwistieClick: true, @@ -328,7 +329,7 @@ export class OutlinePanel extends ViewletPanel { identityProvider: new OutlineIdentityProvider(), keyboardNavigationLabelProvider: new OutlineNavigationLabelProvider() } - ) as WorkbenchDataTree; + ); this._disposables.push(this._tree); this._disposables.push(this._outlineViewState.onDidChange(this._onDidChangeUserState, this)); From 65fdc745aec0d48a80c9d96d709a5e4697ab5afa Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 23 Jul 2019 15:39:03 -0700 Subject: [PATCH 550/710] Use null across EH boundary instead of undefined --- src/vs/workbench/api/browser/mainThreadWorkspace.ts | 9 +++++---- src/vs/workbench/api/common/extHost.protocol.ts | 2 +- src/vs/workbench/api/common/extHostWorkspace.ts | 9 ++++++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadWorkspace.ts b/src/vs/workbench/api/browser/mainThreadWorkspace.ts index 732a037641c..f0c9c62ec00 100644 --- a/src/vs/workbench/api/browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/browser/mainThreadWorkspace.ts @@ -24,6 +24,7 @@ import { ExtHostContext, ExtHostWorkspaceShape, IExtHostContext, MainContext, Ma import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { isEqualOrParent } from 'vs/base/common/resources'; import { INotificationService } from 'vs/platform/notification/common/notification'; +import { withNullAsUndefined } from 'vs/base/common/types'; @extHostNamedCustomer(MainContext.MainThreadWorkspace) export class MainThreadWorkspace implements MainThreadWorkspaceShape { @@ -122,21 +123,21 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape { // --- search --- - $startFileSearch(includePattern: string, _includeFolder: UriComponents | undefined, excludePatternOrDisregardExcludes: string | false | undefined, maxResults: number, token: CancellationToken): Promise { + $startFileSearch(includePattern: string | null, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false | null, maxResults: number | null, token: CancellationToken): Promise { const includeFolder = URI.revive(_includeFolder); const workspace = this._contextService.getWorkspace(); if (!workspace.folders.length) { - return Promise.resolve(undefined); + return Promise.resolve(null); } const query = this._queryBuilder.file( includeFolder ? [includeFolder] : workspace.folders.map(f => f.uri), { - maxResults, + maxResults: withNullAsUndefined(maxResults), disregardExcludeSettings: (excludePatternOrDisregardExcludes === false) || undefined, disregardSearchExcludeSettings: true, disregardIgnoreFiles: true, - includePattern, + includePattern: withNullAsUndefined(includePattern), excludePattern: typeof excludePatternOrDisregardExcludes === 'string' ? excludePatternOrDisregardExcludes : undefined, _reason: 'startFileSearch' }); diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 8fb612d3a7c..5235a582c87 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -579,7 +579,7 @@ export interface ITextSearchComplete { } export interface MainThreadWorkspaceShape extends IDisposable { - $startFileSearch(includePattern: string | undefined, includeFolder: UriComponents | undefined, excludePatternOrDisregardExcludes: string | false | undefined, maxResults: number | undefined, token: CancellationToken): Promise; + $startFileSearch(includePattern: string | null, includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false | null, maxResults: number | null, token: CancellationToken): Promise; $startTextSearch(query: search.IPatternInfo, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise; $checkExists(folders: UriComponents[], includes: string[], token: CancellationToken): Promise; $saveAll(includeUntitled?: boolean): Promise; diff --git a/src/vs/workbench/api/common/extHostWorkspace.ts b/src/vs/workbench/api/common/extHostWorkspace.ts index f6d9c59a1b6..5c81776820b 100644 --- a/src/vs/workbench/api/common/extHostWorkspace.ts +++ b/src/vs/workbench/api/common/extHostWorkspace.ts @@ -24,6 +24,7 @@ import { ExtHostWorkspaceShape, IWorkspaceData, MainThreadMessageServiceShape, M import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { Barrier } from 'vs/base/common/async'; import { Schemas } from 'vs/base/common/network'; +import { withUndefinedAsNull } from 'vs/base/common/types'; export interface IExtHostWorkspaceProvider { getWorkspaceFolder2(uri: vscode.Uri, resolveParent?: boolean): Promise; @@ -438,7 +439,13 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac return Promise.resolve([]); } - return this._proxy.$startFileSearch(includePattern, includeFolder, excludePatternOrDisregardExcludes, maxResults, token) + return this._proxy.$startFileSearch( + withUndefinedAsNull(includePattern), + withUndefinedAsNull(includeFolder), + withUndefinedAsNull(excludePatternOrDisregardExcludes), + withUndefinedAsNull(maxResults), + token + ) .then(data => Array.isArray(data) ? data.map(d => URI.revive(d)) : []); } From 36df690433d175a24488f1b5454652815546f925 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 00:41:56 +0200 Subject: [PATCH 551/710] Show install local extensions action in extensions viewlet --- .../extensions/browser/extensionsActions.ts | 98 ++++++++++--------- .../extensions/browser/extensionsViewlet.ts | 4 +- .../browser/remoteExtensionsInstaller.ts | 5 +- .../extensionsActions.test.ts | 38 +++++++ 4 files changed, 97 insertions(+), 48 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 4ac602fc5fb..2da7b470bba 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -320,7 +320,7 @@ export class InstallInOtherServerAction extends ExtensionAction { } if ( - this.extension && this.extension.local && this.server && this.extension.state === ExtensionState.Installed + this.extension && this.extension.local && this.server && this.extension.state === ExtensionState.Installed && this.extension.type === ExtensionType.User // disabled by extension kind or it is a language pack extension && (this.extension.enablementState === EnablementState.DisabledByExtensionKind || isLanguagePackExtension(this.extension.local.manifest)) // Not installed in other server and can install in other server @@ -3036,58 +3036,66 @@ export class InstallLocalExtensionsOnRemoteAction extends Action { @IQuickInputService private readonly quickInputService: IQuickInputService, @INotificationService private readonly notificationService: INotificationService, @IWindowService private readonly windowService: IWindowService, - @IProgressService private readonly progressService: IProgressService + @IProgressService private readonly progressService: IProgressService, + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super('workbench.extensions.actions.installLocalExtensionsOnRemote'); - this.enabled = !!this.extensionManagementServerService.localExtensionManagementServer && !!this.extensionManagementServerService.remoteExtensionManagementServer; + this.update(); + this._register(this.extensionsWorkbenchService.onChange(() => this.update())); + } + + get label(): string { + return this.extensionManagementServerService.remoteExtensionManagementServer ? + localize('install local extensions', "Install Local Extensions on {0}", this.extensionManagementServerService.remoteExtensionManagementServer.label) : ''; + } + + private update(): void { + this.enabled = this.getLocalExtensionsToInstall().length > 0; + } + + private getLocalExtensionsToInstall(): IExtension[] { + return this.extensionsWorkbenchService.local.filter(extension => { + const action = this.instantiationService.createInstance(RemoteInstallAction); + action.extension = extension; + return action.enabled; + }); } async run(): Promise { - if (this.enabled) { - await this.selectAndInstallLocalExtensions(); + this.selectAndInstallLocalExtensions(); + return Promise.resolve(); + } + + private selectAndInstallLocalExtensions(): void { + const quickPick = this.quickInputService.createQuickPick(); + quickPick.busy = true; + const disposable = quickPick.onDidAccept(() => { + disposable.dispose(); + quickPick.hide(); + quickPick.dispose(); + this.onDidAccept(quickPick.selectedItems); + }); + quickPick.show(); + const localExtensionsToInstall = this.getLocalExtensionsToInstall(); + quickPick.busy = false; + if (localExtensionsToInstall.length) { + quickPick.placeholder = localize('select extensions to install', "Select extensions to install"); + quickPick.canSelectMany = true; + localExtensionsToInstall.sort((e1, e2) => e1.displayName.localeCompare(e2.displayName)); + quickPick.items = localExtensionsToInstall.map(extension => ({ extension, label: extension.displayName, description: extension.version })); + } else { + quickPick.hide(); + quickPick.dispose(); + this.notificationService.notify({ + severity: Severity.Info, + message: localize('no local extensions', "There are no extensions to install.") + }); } } - private async getLocalExtensionsToInstall(): Promise { - const localExtensions = await this.extensionsWorkbenchService.queryLocal(this.extensionManagementServerService.localExtensionManagementServer!); - const remoteExtensions = await this.extensionsWorkbenchService.queryLocal(this.extensionManagementServerService.remoteExtensionManagementServer!); - const remoteExtensionsIds: Set = new Set(); - const remoteExtensionsUUIDs: Set = new Set(); - for (const extension of remoteExtensions) { - remoteExtensionsIds.add(extension.identifier.id.toLowerCase()); - if (extension.identifier.uuid) { - remoteExtensionsUUIDs.add(extension.identifier.uuid); - } - } - const localExtensionsToInstall: IExtension[] = []; - for (const localExtension of localExtensions) { - if (localExtension.type === ExtensionType.User - && (isLanguagePackExtension(localExtension.local!.manifest) || localExtension.enablementState === EnablementState.DisabledByExtensionKind)) { - if (!remoteExtensionsIds.has(localExtension.identifier.id.toLowerCase()) || (localExtension.identifier.uuid && !remoteExtensionsUUIDs.has(localExtension.identifier.uuid))) { - localExtensionsToInstall.push(localExtension); - } - } - } - return localExtensionsToInstall; - } - - private async selectAndInstallLocalExtensions(): Promise { - const result = await this.quickInputService.pick( - this.getLocalExtensionsToInstall() - .then(extensions => { - if (extensions.length) { - extensions = extensions.sort((e1, e2) => e1.displayName.localeCompare(e2.displayName)); - return extensions.map(extension => ({ extension, label: extension.displayName, description: extension.version })); - } - return [{ label: localize('no local extensions', "There are no extensions to install.") }]; - }), - { - canPickMany: true, - placeHolder: localize('select extensions to install', "Select extensions to install") - } - ); - if (result) { - const localExtensionsToInstall = result.filter(r => !!r.extension).map(r => r.extension!); + private onDidAccept(selectedItems: ReadonlyArray): void { + if (selectedItems.length) { + const localExtensionsToInstall = selectedItems.filter(r => !!r.extension).map(r => r.extension!); if (localExtensionsToInstall.length) { this.progressService.withProgress( { diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts index 9d24e8584de..f10d3079632 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts @@ -22,7 +22,7 @@ import { IExtensionsWorkbenchService, IExtensionsViewlet, VIEWLET_ID, ExtensionS import { ShowEnabledExtensionsAction, ShowInstalledExtensionsAction, ShowRecommendedExtensionsAction, ShowPopularExtensionsAction, ShowDisabledExtensionsAction, ShowOutdatedExtensionsAction, ClearExtensionsInputAction, ChangeSortAction, UpdateAllAction, CheckForUpdatesAction, DisableAllAction, EnableAllAction, - EnableAutoUpdateAction, DisableAutoUpdateAction, ShowBuiltInExtensionsAction, InstallVSIXAction + EnableAutoUpdateAction, DisableAutoUpdateAction, ShowBuiltInExtensionsAction, InstallVSIXAction, InstallLocalExtensionsOnRemoteAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IExtensionEnablementService, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; @@ -348,6 +348,7 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio @IInstantiationService instantiationService: IInstantiationService, @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, @INotificationService private readonly notificationService: INotificationService, @IViewletService private readonly viewletService: IViewletService, @IThemeService themeService: IThemeService, @@ -477,6 +478,7 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio this.instantiationService.createInstance(CheckForUpdatesAction, CheckForUpdatesAction.ID, CheckForUpdatesAction.LABEL), ...(this.configurationService.getValue(AutoUpdateConfigurationKey) ? [this.instantiationService.createInstance(DisableAutoUpdateAction, DisableAutoUpdateAction.ID, DisableAutoUpdateAction.LABEL)] : [this.instantiationService.createInstance(UpdateAllAction, UpdateAllAction.ID, UpdateAllAction.LABEL), this.instantiationService.createInstance(EnableAutoUpdateAction, EnableAutoUpdateAction.ID, EnableAutoUpdateAction.LABEL)]), this.instantiationService.createInstance(InstallVSIXAction, InstallVSIXAction.ID, InstallVSIXAction.LABEL), + ...(this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer ? [this.instantiationService.createInstance(InstallLocalExtensionsOnRemoteAction)] : []), new Separator(), this.instantiationService.createInstance(DisableAllAction, DisableAllAction.ID, DisableAllAction.LABEL), this.instantiationService.createInstance(EnableAllAction, EnableAllAction.ID, EnableAllAction.LABEL) diff --git a/src/vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller.ts b/src/vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller.ts index afb0204f7d7..19e4a47c99c 100644 --- a/src/vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller.ts +++ b/src/vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller.ts @@ -22,7 +22,8 @@ export class RemoteExtensionsInstaller extends Disposable implements IWorkbenchC ) { super(); if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) { - CommandsRegistry.registerCommand('workbench.extensions.installLocalExtensions', () => instantiationService.createInstance(InstallLocalExtensionsOnRemoteAction).run()); + const installLocalExtensionsOnRemoteAction = instantiationService.createInstance(InstallLocalExtensionsOnRemoteAction); + CommandsRegistry.registerCommand('workbench.extensions.installLocalExtensions', () => installLocalExtensionsOnRemoteAction.run()); let disposable = Disposable.None; const appendMenuItem = () => { disposable.dispose(); @@ -30,7 +31,7 @@ export class RemoteExtensionsInstaller extends Disposable implements IWorkbenchC command: { id: 'workbench.extensions.installLocalExtensions', category: localize('extensions', "Extensions"), - title: localize('istall local extensions', "Install Local Extensions on {0}", this.extensionManagementServerService.remoteExtensionManagementServer!.label) + title: installLocalExtensionsOnRemoteAction.label } }); }; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index f02f6d7c892..4d198ef08df 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -1750,6 +1750,25 @@ suite('ExtensionsActions Test', () => { assert.ok(testObject.enabled); }); + test('Test remote install action is disabled for local workspace system extension', async () => { + // multi server setup + const localWorkspaceSystemExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`), type: ExtensionType.System }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceSystemExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceSystemExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.localExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + test('Test remote install action is disabled for local ui extension if it is not installed in remote', async () => { // multi server setup const localUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }); @@ -2090,6 +2109,25 @@ suite('ExtensionsActions Test', () => { assert.ok(testObject.enabled); }); + test('Test local install action is disabled for remote UI system extension', async () => { + // multi server setup + const remoteUISystemExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }), type: ExtensionType.System }); + const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService(), createExtensionManagementService([remoteUISystemExtension])); + instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); + instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService)); + const workbenchService: IExtensionsWorkbenchService = instantiationService.createInstance(ExtensionsWorkbenchService); + instantiationService.set(IExtensionsWorkbenchService, workbenchService); + + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUISystemExtension.identifier }))); + const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); + instantiationService.createInstance(ExtensionContainers, [testObject]); + + const extensions = await workbenchService.queryLocal(extensionManagementServerService.remoteExtensionManagementServer!); + testObject.extension = extensions[0]; + assert.ok(testObject.extension); + assert.ok(!testObject.enabled); + }); + test('Test local install action is disabled for remote workspace extension if it is not installed in local', async () => { // multi server setup const remoteWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); From c467419e0e3023668b8f031d3be768b79eeb1eb7 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 23 Jul 2019 15:44:54 -0700 Subject: [PATCH 552/710] Clarify findFiles doc comment Fix #77813 --- src/vs/vscode.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 65892f8b976..8ef541e5eb9 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -7758,7 +7758,7 @@ declare module 'vscode' { * to restrict the search results to a [workspace folder](#WorkspaceFolder). * @param exclude A [glob pattern](#GlobPattern) that defines files and folders to exclude. The glob pattern * will be matched against the file paths of resulting matches relative to their workspace. When `undefined` only default excludes will - * apply, when `null` no excludes will apply. + * apply. When `null`, no search excludes will apply, but `files.exclude` will still apply. * @param maxResults An upper-bound for the result. * @param token A token that can be used to signal cancellation to the underlying search engine. * @return A thenable that resolves to an array of resource identifiers. Will return no results if no From ea6087a6326364edd4160a264d2b30bbab192b7e Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 23 Jul 2019 15:57:29 -0700 Subject: [PATCH 553/710] Fix tests --- .../api/extHostWorkspace.test.ts | 30 +++++++++---------- .../api/mainThreadWorkspace.test.ts | 8 ++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts index e1edb23fe4c..76040fc8eae 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts @@ -573,18 +573,18 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - $startFileSearch(includePattern: string, _includeFolder: UriComponents | undefined, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { + $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { mainThreadCalled = true; assert.equal(includePattern, 'foo'); - assert.equal(_includeFolder, undefined); - assert.equal(excludePatternOrDisregardExcludes, undefined); + assert.equal(_includeFolder, null); + assert.equal(excludePatternOrDisregardExcludes, null); assert.equal(maxResults, 10); - return Promise.resolve(undefined); + return Promise.resolve(null); } }); const ws = createExtHostWorkspace(rpcProtocol, { id: 'foo', folders: [aWorkspaceFolderData(URI.file(root), 0)], name: 'Test' }, new NullLogService(), new Counter()); - return ws.findFiles('foo', undefined!, 10, new ExtensionIdentifier('test')).then(() => { + return ws.findFiles('foo', undefined, 10, new ExtensionIdentifier('test')).then(() => { assert(mainThreadCalled, 'mainThreadCalled'); }); }); @@ -595,17 +595,17 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - $startFileSearch(includePattern: string, _includeFolder: UriComponents | undefined, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { + $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { mainThreadCalled = true; assert.equal(includePattern, 'glob/**'); assert.deepEqual(_includeFolder, URI.file('/other/folder').toJSON()); - assert.equal(excludePatternOrDisregardExcludes, undefined); - return Promise.resolve(undefined); + assert.equal(excludePatternOrDisregardExcludes, null); + return Promise.resolve(null); } }); const ws = createExtHostWorkspace(rpcProtocol, { id: 'foo', folders: [aWorkspaceFolderData(URI.file(root), 0)], name: 'Test' }, new NullLogService(), new Counter()); - return ws.findFiles(new RelativePattern('/other/folder', 'glob/**'), undefined!, 10, new ExtensionIdentifier('test')).then(() => { + return ws.findFiles(new RelativePattern('/other/folder', 'glob/**'), undefined, 10, new ExtensionIdentifier('test')).then(() => { assert(mainThreadCalled, 'mainThreadCalled'); }); }); @@ -616,12 +616,12 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - $startFileSearch(includePattern: string, _includeFolder: UriComponents | undefined, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { + $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { mainThreadCalled = true; assert.equal(includePattern, 'glob/**'); assert.deepEqual(_includeFolder, URI.file('/other/folder').toJSON()); assert.equal(excludePatternOrDisregardExcludes, false); - return Promise.resolve(undefined); + return Promise.resolve(null); } }); @@ -637,9 +637,9 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - $startFileSearch(includePattern: string, _includeFolder: UriComponents | undefined, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { + $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { mainThreadCalled = true; - return Promise.resolve(undefined); + return Promise.resolve(null); } }); @@ -657,10 +657,10 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - $startFileSearch(includePattern: string, _includeFolder: UriComponents | undefined, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { + $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { mainThreadCalled = true; assert(excludePatternOrDisregardExcludes, 'glob/**'); // Note that the base portion is ignored, see #52651 - return Promise.resolve(undefined); + return Promise.resolve(null); } }); diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadWorkspace.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadWorkspace.test.ts index 07ee0ca6290..50f8a7aa045 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadWorkspace.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadWorkspace.test.ts @@ -39,7 +39,7 @@ suite('MainThreadWorkspace', () => { }); const mtw: MainThreadWorkspace = instantiationService.createInstance(MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); - return mtw.$startFileSearch('foo', undefined, undefined, 10, new CancellationTokenSource().token); + return mtw.$startFileSearch('foo', null, null, 10, new CancellationTokenSource().token); }); test('exclude defaults', () => { @@ -61,7 +61,7 @@ suite('MainThreadWorkspace', () => { }); const mtw: MainThreadWorkspace = instantiationService.createInstance(MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); - return mtw.$startFileSearch('', undefined, undefined, 10, new CancellationTokenSource().token); + return mtw.$startFileSearch('', null, null, 10, new CancellationTokenSource().token); }); test('disregard excludes', () => { @@ -82,7 +82,7 @@ suite('MainThreadWorkspace', () => { }); const mtw: MainThreadWorkspace = instantiationService.createInstance(MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); - return mtw.$startFileSearch('', undefined, false, 10, new CancellationTokenSource().token); + return mtw.$startFileSearch('', null, false, 10, new CancellationTokenSource().token); }); test('exclude string', () => { @@ -96,6 +96,6 @@ suite('MainThreadWorkspace', () => { }); const mtw: MainThreadWorkspace = instantiationService.createInstance(MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); - return mtw.$startFileSearch('', undefined, 'exclude/**', 10, new CancellationTokenSource().token); + return mtw.$startFileSearch('', null, 'exclude/**', 10, new CancellationTokenSource().token); }); }); From df5d748fe539fbc1e8f4a033751c988098e18745 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 23 Jul 2019 16:23:02 -0700 Subject: [PATCH 554/710] Fix integration tests --- .../src/singlefolder-tests/terminal.test.ts | 8 ++++++-- .../api/browser/mainThreadTerminalService.ts | 17 +++++------------ .../contrib/terminal/common/terminalService.ts | 1 - 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts index c0e300439be..13b9666dbfe 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts @@ -271,7 +271,7 @@ suite('window namespace tests', () => { }); test('should fire Terminal.onData on write', (done) => { - const reg1 = window.onDidOpenTerminal(term => { + const reg1 = window.onDidOpenTerminal(async term => { equal(terminal, term); reg1.dispose(); const reg2 = terminal.onDidWriteData(data => { @@ -283,11 +283,15 @@ suite('window namespace tests', () => { }); terminal.dispose(); }); + await startPromise; writeEmitter.fire('bar'); }); + let startResolve: () => void; + const startPromise: Promise = new Promise(r => startResolve = r); const writeEmitter = new EventEmitter(); const virtualProcess: TerminalVirtualProcess = { - onDidWrite: writeEmitter.event + onDidWrite: writeEmitter.event, + start: () => startResolve() }; const terminal = window.createTerminal({ name: 'foo', virtualProcess }); }); diff --git a/src/vs/workbench/api/browser/mainThreadTerminalService.ts b/src/vs/workbench/api/browser/mainThreadTerminalService.ts index e00be6872bd..b15a69d24b7 100644 --- a/src/vs/workbench/api/browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/browser/mainThreadTerminalService.ts @@ -34,20 +34,13 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape // ITerminalService listeners this._toDispose.add(_terminalService.onInstanceCreated((instance) => { - if (instance.shellLaunchConfig.isVirtualProcess) { - // Fire events for virtual processes immediately as the extension host already knows - // about them + // Delay this message so the TerminalInstance constructor has a chance to finish and + // return the ID normally to the extension host. The ID that is passed here will be + // used to register non-extension API terminals in the extension host. + setTimeout(() => { this._onTerminalOpened(instance); this._onInstanceDimensionsChanged(instance); - } else { - // Delay this message so the TerminalInstance constructor has a chance to finish and - // return the ID normally to the extension host. The ID that is passed here will be - // used to register non-extension API terminals in the extension host. - setTimeout(() => { - this._onTerminalOpened(instance); - this._onInstanceDimensionsChanged(instance); - }, EXT_HOST_CREATION_DELAY); - } + }, EXT_HOST_CREATION_DELAY); })); this._toDispose.add(_terminalService.onInstanceDisposed(instance => this._onTerminalDisposed(instance))); diff --git a/src/vs/workbench/contrib/terminal/common/terminalService.ts b/src/vs/workbench/contrib/terminal/common/terminalService.ts index 281b93093e9..558be1e44ea 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalService.ts @@ -145,7 +145,6 @@ export abstract class TerminalService implements ITerminalService { } public requestVirtualProcess(proxy: ITerminalProcessExtHostProxy, cols: number, rows: number): void { - // Don't need to wait on extensions here as this can only be triggered by an extension this._onInstanceRequestVirtualProcess.fire({ proxy, cols, rows }); } From 4a8df0b23b96ebe217bd037cad36127f43bb8cf8 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 02:11:33 +0200 Subject: [PATCH 555/710] Fix installing --- .../extensions/browser/extensionsActions.ts | 71 +++++++--------- .../extensionsActions.test.ts | 82 +++++++++---------- 2 files changed, 67 insertions(+), 86 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 2da7b470bba..df4be0957a3 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -276,7 +276,7 @@ export class InstallAction extends ExtensionAction { } } -export class InstallInOtherServerAction extends ExtensionAction { +export abstract class InstallInOtherServerAction extends ExtensionAction { protected static INSTALL_LABEL = localize('install', "Install"); protected static INSTALLING_LABEL = localize('installing', "Installing"); @@ -285,7 +285,6 @@ export class InstallInOtherServerAction extends ExtensionAction { private static readonly InstallingClass = 'extension-action install installing'; updateWhenCounterExtensionChanges: boolean = true; - protected installing: boolean = false; constructor( id: string, @@ -293,75 +292,63 @@ export class InstallInOtherServerAction extends ExtensionAction { @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, ) { super(id, InstallInOtherServerAction.INSTALL_LABEL, InstallInOtherServerAction.Class, false); - this.updateLabel(); this.update(); } - private updateLabel(): void { - this.label = this.getLabel(); - this.tooltip = this.label; - } - - protected getLabel(): string { - return this.installing ? InstallInOtherServerAction.INSTALLING_LABEL : - this.server ? `${InstallInOtherServerAction.INSTALL_LABEL} on ${this.server.label}` - : InstallInOtherServerAction.INSTALL_LABEL; - - } - update(): void { this.enabled = false; this.class = InstallInOtherServerAction.Class; - if (this.installing) { - this.enabled = true; - this.class = InstallInOtherServerAction.InstallingClass; - this.updateLabel(); - return; - } if ( this.extension && this.extension.local && this.server && this.extension.state === ExtensionState.Installed && this.extension.type === ExtensionType.User // disabled by extension kind or it is a language pack extension && (this.extension.enablementState === EnablementState.DisabledByExtensionKind || isLanguagePackExtension(this.extension.local.manifest)) - // Not installed in other server and can install in other server - && !this.extensionsWorkbenchService.installed.some(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server === this.server) ) { - this.enabled = true; - this.updateLabel(); - return; + const extensionInOtherServer = this.extensionsWorkbenchService.installed.filter(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server === this.server)[0]; + if (extensionInOtherServer) { + // Getting installed in other server + if (extensionInOtherServer.state === ExtensionState.Installing && !extensionInOtherServer.local) { + this.enabled = true; + this.label = InstallInOtherServerAction.INSTALLING_LABEL; + this.class = InstallInOtherServerAction.InstallingClass; + } + } else { + // Not installed in other server + this.enabled = true; + this.label = this.getInstallLabel(); + } } } async run(): Promise { - if (this.server && !this.installing) { - this.installing = true; - this.update(); + if (this.server) { this.extensionsWorkbenchService.open(this.extension); alert(localize('installExtensionStart', "Installing extension {0} started. An editor is now open with more details on this extension", this.extension.displayName)); - try { - if (this.extension.gallery) { - await this.server.extensionManagementService.installFromGallery(this.extension.gallery); - } else { - const vsix = await this.extension.server!.extensionManagementService.zip(this.extension.local!); - await this.server.extensionManagementService.install(vsix); - } - } finally { - this.installing = false; - this.update(); + if (this.extension.gallery) { + await this.server.extensionManagementService.installFromGallery(this.extension.gallery); + } else { + const vsix = await this.extension.server!.extensionManagementService.zip(this.extension.local!); + await this.server.extensionManagementService.install(vsix); } } } + + protected abstract getInstallLabel(): string; } export class RemoteInstallAction extends InstallInOtherServerAction { constructor( @IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService ) { super(`extensions.remoteinstall`, extensionManagementServerService.remoteExtensionManagementServer, extensionsWorkbenchService); } + protected getInstallLabel(): string { + return this.extensionManagementServerService.remoteExtensionManagementServer ? localize('Install on Server', "Install on {0}", this.extensionManagementServerService.remoteExtensionManagementServer.label) : InstallInOtherServerAction.INSTALL_LABEL; + } + } export class LocalInstallAction extends InstallInOtherServerAction { @@ -373,8 +360,8 @@ export class LocalInstallAction extends InstallInOtherServerAction { super(`extensions.localinstall`, extensionManagementServerService.localExtensionManagementServer, extensionsWorkbenchService); } - protected getLabel(): string { - return this.installing ? InstallInOtherServerAction.INSTALLING_LABEL : localize('install locally', "Install Locally"); + protected getInstallLabel(): string { + return localize('install locally', "Install Locally"); } } diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index 4d198ef08df..195234ccb46 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -1519,9 +1519,11 @@ suite('ExtensionsActions Test', () => { assert.equal('extension-action prominent install', testObject.class); }); - test('Test remote install action when installing local workspace extension', async (done) => { + test('Test remote install action when installing local workspace extension', async () => { // multi server setup const remoteExtensionManagementService: IExtensionManagementService = createExtensionManagementService(); + const onInstallExtension = new Emitter(); + remoteExtensionManagementService.onInstallExtension = onInstallExtension.event; const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, createExtensionManagementService([localWorkspaceExtension]), remoteExtensionManagementService); instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); @@ -1530,7 +1532,8 @@ suite('ExtensionsActions Test', () => { instantiationService.stub(IExtensionsWorkbenchService, workbenchService, 'open', undefined); instantiationService.set(IExtensionsWorkbenchService, workbenchService); - instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const gallery = aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(gallery)); const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); instantiationService.createInstance(ExtensionContainers, [testObject]); @@ -1541,19 +1544,17 @@ suite('ExtensionsActions Test', () => { assert.equal('Install on remote', testObject.label); assert.equal('extension-action prominent install', testObject.class); - remoteExtensionManagementService.installFromGallery = () => new Promise(c => c(aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }))); - const disposable = testObject.onDidChange(() => { - if (testObject.label === 'Installing' && testObject.enabled) { - disposable.dispose(); - done(); - } - }); - testObject.run(); + onInstallExtension.fire({ identifier: localWorkspaceExtension.identifier, gallery }); + assert.ok(testObject.enabled); + assert.equal('Installing', testObject.label); + assert.equal('extension-action install installing', testObject.class); }); - test('Test remote install action when installing local workspace extension is finished', async (done) => { + test('Test remote install action when installing local workspace extension is finished', async () => { // multi server setup const remoteExtensionManagementService: IExtensionManagementService = createExtensionManagementService(); + const onInstallExtension = new Emitter(); + remoteExtensionManagementService.onInstallExtension = onInstallExtension.event; const onDidInstallEvent = new Emitter(); remoteExtensionManagementService.onDidInstallExtension = onDidInstallEvent.event; const localWorkspaceExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`) }); @@ -1564,7 +1565,8 @@ suite('ExtensionsActions Test', () => { instantiationService.stub(IExtensionsWorkbenchService, workbenchService, 'open', undefined); instantiationService.set(IExtensionsWorkbenchService, workbenchService); - instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }))); + const gallery = aGalleryExtension('a', { identifier: localWorkspaceExtension.identifier }); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(gallery)); const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.RemoteInstallAction); instantiationService.createInstance(ExtensionContainers, [testObject]); @@ -1575,19 +1577,14 @@ suite('ExtensionsActions Test', () => { assert.equal('Install on remote', testObject.label); assert.equal('extension-action prominent install', testObject.class); - const installedExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); - remoteExtensionManagementService.installFromGallery = () => new Promise(c => c(installedExtension)); - await testObject.run(); + onInstallExtension.fire({ identifier: localWorkspaceExtension.identifier, gallery }); assert.ok(testObject.enabled); - assert.equal('Install on remote', testObject.label); + assert.equal('Installing', testObject.label); + assert.equal('extension-action install installing', testObject.class); - const disposable = testObject.onDidChange(() => { - if (testObject.label === 'Install on remote' && !testObject.enabled) { - disposable.dispose(); - done(); - } - }); + const installedExtension = aLocalExtension('a', { extensionKind: 'workspace' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); onDidInstallEvent.fire({ identifier: installedExtension.identifier, local: installedExtension, operation: InstallOperation.Install }); + assert.ok(!testObject.enabled); }); test('Test remote install action is enabled for disabled local workspace extension', async () => { @@ -1875,9 +1872,11 @@ suite('ExtensionsActions Test', () => { assert.equal('extension-action prominent install', testObject.class); }); - test('Test local install action when installing remote ui extension', async (done) => { + test('Test local install action when installing remote ui extension', async () => { // multi server setup const localExtensionManagementService: IExtensionManagementService = createExtensionManagementService(); + const onInstallExtension = new Emitter(); + localExtensionManagementService.onInstallExtension = onInstallExtension.event; const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); const extensionManagementServerService = aMultiExtensionManagementServerService(instantiationService, localExtensionManagementService, createExtensionManagementService([remoteUIExtension])); instantiationService.stub(IExtensionManagementServerService, extensionManagementServerService); @@ -1886,7 +1885,8 @@ suite('ExtensionsActions Test', () => { instantiationService.stub(IExtensionsWorkbenchService, workbenchService, 'open', undefined); instantiationService.set(IExtensionsWorkbenchService, workbenchService); - instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUIExtension.identifier }))); + const gallery = aGalleryExtension('a', { identifier: remoteUIExtension.identifier }); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(gallery)); const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); instantiationService.createInstance(ExtensionContainers, [testObject]); @@ -1897,19 +1897,17 @@ suite('ExtensionsActions Test', () => { assert.equal('Install Locally', testObject.label); assert.equal('extension-action prominent install', testObject.class); - localExtensionManagementService.installFromGallery = () => new Promise(c => c(aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }))); - const disposable = testObject.onDidChange(() => { - if (testObject.label === 'Installing' && testObject.enabled) { - disposable.dispose(); - done(); - } - }); - testObject.run(); + onInstallExtension.fire({ identifier: remoteUIExtension.identifier, gallery }); + assert.ok(testObject.enabled); + assert.equal('Installing', testObject.label); + assert.equal('extension-action install installing', testObject.class); }); - test('Test local install action when installing remote ui extension is finished', async (done) => { + test('Test local install action when installing remote ui extension is finished', async () => { // multi server setup const localExtensionManagementService: IExtensionManagementService = createExtensionManagementService(); + const onInstallExtension = new Emitter(); + localExtensionManagementService.onInstallExtension = onInstallExtension.event; const onDidInstallEvent = new Emitter(); localExtensionManagementService.onDidInstallExtension = onDidInstallEvent.event; const remoteUIExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`).with({ scheme: Schemas.vscodeRemote }) }); @@ -1920,7 +1918,8 @@ suite('ExtensionsActions Test', () => { instantiationService.stub(IExtensionsWorkbenchService, workbenchService, 'open', undefined); instantiationService.set(IExtensionsWorkbenchService, workbenchService); - instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(aGalleryExtension('a', { identifier: remoteUIExtension.identifier }))); + const gallery = aGalleryExtension('a', { identifier: remoteUIExtension.identifier }); + instantiationService.stubPromise(IExtensionGalleryService, 'query', aPage(gallery)); const testObject: ExtensionsActions.InstallAction = instantiationService.createInstance(ExtensionsActions.LocalInstallAction); instantiationService.createInstance(ExtensionContainers, [testObject]); @@ -1931,19 +1930,14 @@ suite('ExtensionsActions Test', () => { assert.equal('Install Locally', testObject.label); assert.equal('extension-action prominent install', testObject.class); - const installedExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }); - localExtensionManagementService.installFromGallery = () => new Promise(c => c(installedExtension)); - await testObject.run(); + onInstallExtension.fire({ identifier: remoteUIExtension.identifier, gallery }); assert.ok(testObject.enabled); - assert.equal('Install Locally', testObject.label); + assert.equal('Installing', testObject.label); + assert.equal('extension-action install installing', testObject.class); - const disposable = testObject.onDidChange(() => { - if (testObject.label === 'Install Locally' && !testObject.enabled) { - disposable.dispose(); - done(); - } - }); + const installedExtension = aLocalExtension('a', { extensionKind: 'ui' }, { location: URI.file(`pub.a`) }); onDidInstallEvent.fire({ identifier: installedExtension.identifier, local: installedExtension, operation: InstallOperation.Install }); + assert.ok(!testObject.enabled); }); test('Test local install action is enabled for disabled remote ui extension', async () => { From a2af84394431aaa059c955c67cd6eab35914be3f Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 02:25:32 +0200 Subject: [PATCH 556/710] fix #75620 --- .../extensions/browser/extensionsViewlet.ts | 5 ----- .../browser/extensionsWorkbenchService.ts | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts index f10d3079632..b695e891cca 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts @@ -631,11 +631,6 @@ export class StatusUpdater extends Disposable implements IWorkbenchContribution private onServiceChange(): void { this.badgeHandle.clear(); - if (this.extensionsWorkbenchService.local.some(e => e.state === ExtensionState.Installing)) { - this.badgeHandle.value = this.activityService.showActivity(VIEWLET_ID, new ProgressBadge(() => localize('extensions', "Extensions")), 'extensions-badge progress-badge'); - return; - } - const outdated = this.extensionsWorkbenchService.outdated.reduce((r, e) => r + (this.extensionEnablementService.isEnabled(e.local!) ? 1 : 0), 0); if (outdated > 0) { const badge = new NumberBadge(outdated, n => localize('outdatedExtensions', '{0} Outdated Extensions', n)); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index 3b2e95c43d9..7ddf7c7fa70 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -536,6 +536,8 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension this.resetIgnoreAutoUpdateExtensions(); this.eventuallySyncWithGallery(true); }); + + this._register(this.onChange(() => this.updateActivity())); } get local(): IExtension[] { @@ -1025,6 +1027,21 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension return this._extensionAllowedBadgeProviders; } + private _activityCallBack: (() => void) | null = null; + private updateActivity(): void { + if ((this.localExtensions && this.localExtensions.local.some(e => e.state === ExtensionState.Installing || e.state === ExtensionState.Uninstalling)) + || (this.remoteExtensions && this.remoteExtensions.local.some(e => e.state === ExtensionState.Installing || e.state === ExtensionState.Uninstalling))) { + if (!this._activityCallBack) { + this.progressService.withProgress({ location: ProgressLocation.Extensions }, () => new Promise(c => this._activityCallBack = c)); + } + } else { + if (this._activityCallBack) { + this._activityCallBack(); + } + this._activityCallBack = null; + } + } + private onError(err: any): void { if (isPromiseCanceledError(err)) { return; From 6c79565406e686d176865a1af07b67cdc9cb2e65 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 02:34:56 +0200 Subject: [PATCH 557/710] fix tests --- .../extensions/test/electron-browser/extensionsActions.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index 195234ccb46..2334ecebeec 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -45,6 +45,8 @@ import { IProductService } from 'vs/platform/product/common/product'; import { Schemas } from 'vs/base/common/network'; import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; +import { IProgressService } from 'vs/platform/progress/common/progress'; +import { ProgressService } from 'vs/workbench/services/progress/browser/progressService'; suite('ExtensionsActions Test', () => { @@ -69,6 +71,7 @@ suite('ExtensionsActions Test', () => { instantiationService.stub(IWorkspaceContextService, new TestContextService()); instantiationService.stub(IConfigurationService, new TestConfigurationService()); + instantiationService.stub(IProgressService, ProgressService); instantiationService.stub(IExtensionGalleryService, ExtensionGalleryService); instantiationService.stub(ISharedProcessService, TestSharedProcessService); From 9d43802fd42f38036088a246c392d0296a52a05e Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 23 Jul 2019 17:35:11 -0700 Subject: [PATCH 558/710] Create CustomExecution2 test, make start fire after onDidOpenTerminal Part of #70978 --- .../workspace.tasks.test.ts | 63 +++++++++++++++++++ src/vs/workbench/api/node/extHostTask.ts | 2 +- .../api/node/extHostTerminalService.ts | 8 ++- 3 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts new file mode 100644 index 00000000000..67600f97cd6 --- /dev/null +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts @@ -0,0 +1,63 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; +import * as vscode from 'vscode'; + +suite.only('workspace-namespace', () => { + + suite('Tasks', () => { + + test('CustomExecution2 task should start and shutdown successfully', (done) => { + interface CustomTestingTaskDefinition extends vscode.TaskDefinition { + /** + * One of the task properties. This can be used to customize the task in the tasks.json + */ + customProp1: string; + } + const taskType: string = 'customTesting'; + const taskName = 'First custom task'; + const reg1 = vscode.window.onDidOpenTerminal(term => { + reg1.dispose(); + const reg2 = term.onDidWriteData(e => { + reg2.dispose(); + assert.equal(e, 'testing\r\n'); + term.dispose(); + }); + }); + const exitEmitter = new vscode.EventEmitter(); + const taskProvider = vscode.tasks.registerTaskProvider(taskType, { + provideTasks: () => { + let result: vscode.Task[] = []; + let kind: CustomTestingTaskDefinition = { + type: taskType, + customProp1: 'testing task one' + }; + const writeEmitter = new vscode.EventEmitter(); + let execution = new vscode.CustomExecution2((): Thenable => { + return Promise.resolve({ + onDidWrite: writeEmitter.event, + start: () => { + writeEmitter.fire('testing\r\n'); + }, + onDidExit: exitEmitter.event, + shutdown: () => { + taskProvider.dispose(); + done(); + } + }); + }); + let task = new vscode.Task2(kind, vscode.TaskScope.Workspace, taskName, taskType, execution); + result.push(task); + return result; + }, + resolveTask(_task: vscode.Task): vscode.Task | undefined { + return undefined; + } + }); + vscode.commands.executeCommand('workbench.action.tasks.runTask', `${taskType}: ${taskName}`); + }); + }); +}); diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index a1e82957b48..0e7f5f9dd7a 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -588,7 +588,7 @@ export class ExtHostTask implements ExtHostTaskShape { // Clone the custom execution to keep the original untouched. This is important for multiple runs of the same task. this._activeCustomExecutions2.set(execution.id, execution2); - this._terminalService.attachVirtualProcessToTerminal(terminalId, await execution2.callback()); + await this._terminalService.attachVirtualProcessToTerminal(terminalId, await execution2.callback()); } // Once a terminal is spun up for the custom execution task this event will be fired. diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 35884b08ba4..847bba891e8 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -337,8 +337,8 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { return terminal; } - public attachVirtualProcessToTerminal(id: number, virtualProcess: vscode.TerminalVirtualProcess) { - const terminal = this._getTerminalById(id); + public async attachVirtualProcessToTerminal(id: number, virtualProcess: vscode.TerminalVirtualProcess): Promise { + const terminal = this._getTerminalByIdEventually(id); if (!terminal) { throw new Error(`Cannot resolve terminal with id ${id} for virtual process`); } @@ -619,6 +619,10 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { } public async $startVirtualProcess(id: number, initialDimensions: ITerminalDimensionsDto | undefined): Promise { + // Make sure the ExtHostTerminal exists so onDidOpenTerminal has fired before we call + // TerminalVirtualProcess.start + await this._getTerminalByIdEventually(id); + // Processes should be initialized here for normal virtual process terminals, however for // tasks they are responsible for attaching the virtual process to a terminal so this // function may be called before tasks is able to attach to the terminal. From 7be48949b76aefed2186fc39a9dbcf0b9d8d13f1 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 23 Jul 2019 17:36:56 -0700 Subject: [PATCH 559/710] Remove unused exit emitter --- .../src/singlefolder-tests/workspace.tasks.test.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts index 67600f97cd6..7060829f678 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts @@ -27,7 +27,6 @@ suite.only('workspace-namespace', () => { term.dispose(); }); }); - const exitEmitter = new vscode.EventEmitter(); const taskProvider = vscode.tasks.registerTaskProvider(taskType, { provideTasks: () => { let result: vscode.Task[] = []; @@ -42,7 +41,6 @@ suite.only('workspace-namespace', () => { start: () => { writeEmitter.fire('testing\r\n'); }, - onDidExit: exitEmitter.event, shutdown: () => { taskProvider.dispose(); done(); From 188180bccf1f56b3368c4eb20e877238d69925b8 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 02:45:05 +0200 Subject: [PATCH 560/710] fix warnings --- .../workbench/contrib/extensions/browser/extensionsViewlet.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts index b695e891cca..d4b43526fee 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts @@ -18,7 +18,7 @@ import { append, $, addClass, toggleClass, Dimension } from 'vs/base/browser/dom import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; -import { IExtensionsWorkbenchService, IExtensionsViewlet, VIEWLET_ID, ExtensionState, AutoUpdateConfigurationKey, ShowRecommendationsOnlyOnDemandKey, CloseExtensionDetailsOnViewChangeKey, VIEW_CONTAINER } from '../common/extensions'; +import { IExtensionsWorkbenchService, IExtensionsViewlet, VIEWLET_ID, AutoUpdateConfigurationKey, ShowRecommendationsOnlyOnDemandKey, CloseExtensionDetailsOnViewChangeKey, VIEW_CONTAINER } from '../common/extensions'; import { ShowEnabledExtensionsAction, ShowInstalledExtensionsAction, ShowRecommendedExtensionsAction, ShowPopularExtensionsAction, ShowDisabledExtensionsAction, ShowOutdatedExtensionsAction, ClearExtensionsInputAction, ChangeSortAction, UpdateAllAction, CheckForUpdatesAction, DisableAllAction, EnableAllAction, @@ -32,7 +32,7 @@ import { OpenGlobalSettingsAction } from 'vs/workbench/contrib/preferences/brows import { IProgressService, ProgressLocation } from 'vs/platform/progress/common/progress'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import Severity from 'vs/base/common/severity'; -import { IActivityService, ProgressBadge, NumberBadge } from 'vs/workbench/services/activity/common/activity'; +import { IActivityService, NumberBadge } from 'vs/workbench/services/activity/common/activity'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IViewsRegistry, IViewDescriptor, Extensions } from 'vs/workbench/common/views'; From 09505230699e617aeb977645855b225533493afb Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 23 Jul 2019 17:46:46 -0700 Subject: [PATCH 561/710] Use const --- .../src/singlefolder-tests/workspace.tasks.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts index 7060829f678..a101cfd7c5d 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts @@ -29,13 +29,13 @@ suite.only('workspace-namespace', () => { }); const taskProvider = vscode.tasks.registerTaskProvider(taskType, { provideTasks: () => { - let result: vscode.Task[] = []; - let kind: CustomTestingTaskDefinition = { + const result: vscode.Task[] = []; + const kind: CustomTestingTaskDefinition = { type: taskType, customProp1: 'testing task one' }; const writeEmitter = new vscode.EventEmitter(); - let execution = new vscode.CustomExecution2((): Thenable => { + const execution = new vscode.CustomExecution2((): Thenable => { return Promise.resolve({ onDidWrite: writeEmitter.event, start: () => { @@ -47,7 +47,7 @@ suite.only('workspace-namespace', () => { } }); }); - let task = new vscode.Task2(kind, vscode.TaskScope.Workspace, taskName, taskType, execution); + const task = new vscode.Task2(kind, vscode.TaskScope.Workspace, taskName, taskType, execution); result.push(task); return result; }, From b0603017ba79a11cbe687ea26c7543a51d0435d6 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 23 Jul 2019 17:47:38 -0700 Subject: [PATCH 562/710] Fail test if resolveTask is called --- .../src/singlefolder-tests/workspace.tasks.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts index a101cfd7c5d..43470d24e19 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts @@ -52,6 +52,7 @@ suite.only('workspace-namespace', () => { return result; }, resolveTask(_task: vscode.Task): vscode.Task | undefined { + assert.fail('resolveTask should not trigger during the test'); return undefined; } }); From 92f31bf748a72df6826fd03512273449b1511d3b Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 11:14:59 +0200 Subject: [PATCH 563/710] Call flush instead of dispose for flushing telemetry appenders Wait until data is flushed in cli --- src/vs/code/node/cliProcessMain.ts | 4 ++-- src/vs/platform/telemetry/common/telemetryUtils.ts | 8 ++++---- src/vs/platform/telemetry/node/appInsightsAppender.ts | 4 ++-- src/vs/platform/telemetry/node/telemetryIpc.ts | 3 ++- .../test/electron-browser/appInsightsAppender.test.ts | 2 +- .../test/electron-browser/telemetryService.test.ts | 2 +- src/vs/workbench/contrib/debug/node/telemetryApp.ts | 2 +- .../services/telemetry/browser/telemetryService.ts | 4 ++-- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/vs/code/node/cliProcessMain.ts b/src/vs/code/node/cliProcessMain.ts index cd4f1f85dc9..032287a3b5d 100644 --- a/src/vs/code/node/cliProcessMain.ts +++ b/src/vs/code/node/cliProcessMain.ts @@ -354,8 +354,6 @@ export async function main(argv: ParsedArgs): Promise { services.set(ITelemetryService, new SyncDescriptor(TelemetryService, [config])); - // Dispose the AI adapter so that remaining data gets flushed. - disposables.add(combinedAppender(...appenders)); } else { services.set(ITelemetryService, NullTelemetryService); } @@ -365,6 +363,8 @@ export async function main(argv: ParsedArgs): Promise { try { await main.run(argv); + // Flush the remaining data in AI adapter. + await combinedAppender(...appenders).flush(); } finally { disposables.dispose(); } diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index e2fca2ba8c6..f8990d64a32 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -33,17 +33,17 @@ export const NullTelemetryService = new class implements ITelemetryService { export interface ITelemetryAppender { log(eventName: string, data: any): void; - dispose(): Promise | undefined; + flush(): Promise; } export function combinedAppender(...appenders: ITelemetryAppender[]): ITelemetryAppender { return { log: (e, d) => appenders.forEach(a => a.log(e, d)), - dispose: () => Promise.all(appenders.map(a => a.dispose())) + flush: () => Promise.all(appenders.map(a => a.flush())) }; } -export const NullAppender: ITelemetryAppender = { log: () => null, dispose: () => Promise.resolve(null) }; +export const NullAppender: ITelemetryAppender = { log: () => null, flush: () => Promise.resolve(null) }; export class LogAppender implements ITelemetryAppender { @@ -51,7 +51,7 @@ export class LogAppender implements ITelemetryAppender { private commonPropertiesRegex = /^sessionID$|^version$|^timestamp$|^commitHash$|^common\./; constructor(@ILogService private readonly _logService: ILogService) { } - dispose(): Promise { + flush(): Promise { return Promise.resolve(undefined); } diff --git a/src/vs/platform/telemetry/node/appInsightsAppender.ts b/src/vs/platform/telemetry/node/appInsightsAppender.ts index 2ed0150ac1f..f9c012cd344 100644 --- a/src/vs/platform/telemetry/node/appInsightsAppender.ts +++ b/src/vs/platform/telemetry/node/appInsightsAppender.ts @@ -73,7 +73,7 @@ export class AppInsightsAppender implements ITelemetryAppender { }); } - dispose(): Promise | undefined { + flush(): Promise { if (this._aiClient) { return new Promise(resolve => { this._aiClient!.flush({ @@ -85,6 +85,6 @@ export class AppInsightsAppender implements ITelemetryAppender { }); }); } - return undefined; + return Promise.resolve(undefined); } } diff --git a/src/vs/platform/telemetry/node/telemetryIpc.ts b/src/vs/platform/telemetry/node/telemetryIpc.ts index 8e1b68eb364..b49a3a23142 100644 --- a/src/vs/platform/telemetry/node/telemetryIpc.ts +++ b/src/vs/platform/telemetry/node/telemetryIpc.ts @@ -37,7 +37,8 @@ export class TelemetryAppenderClient implements ITelemetryAppender { return Promise.resolve(null); } - dispose(): any { + flush(): Promise { // TODO + return Promise.resolve(); } } diff --git a/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts b/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts index c891f9b894b..ee732ab653f 100644 --- a/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts @@ -84,7 +84,7 @@ suite('AIAdapter', () => { }); teardown(() => { - adapter.dispose(); + return adapter.flush(); }); test('Simple event', () => { diff --git a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts index 9f728745344..86a5f5203ed 100644 --- a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts @@ -30,7 +30,7 @@ class TestTelemetryAppender implements ITelemetryAppender { return this.events.length; } - public dispose(): Promise { + public flush(): Promise { this.isDisposed = true; return Promise.resolve(null); } diff --git a/src/vs/workbench/contrib/debug/node/telemetryApp.ts b/src/vs/workbench/contrib/debug/node/telemetryApp.ts index affab685550..52507e4fd20 100644 --- a/src/vs/workbench/contrib/debug/node/telemetryApp.ts +++ b/src/vs/workbench/contrib/debug/node/telemetryApp.ts @@ -8,7 +8,7 @@ import { AppInsightsAppender } from 'vs/platform/telemetry/node/appInsightsAppen import { TelemetryAppenderChannel } from 'vs/platform/telemetry/node/telemetryIpc'; const appender = new AppInsightsAppender(process.argv[2], JSON.parse(process.argv[3]), process.argv[4]); -process.once('exit', () => appender.dispose()); +process.once('exit', () => appender.flush()); const channel = new TelemetryAppenderChannel(appender); const server = new Server('telemetry'); diff --git a/src/vs/workbench/services/telemetry/browser/telemetryService.ts b/src/vs/workbench/services/telemetry/browser/telemetryService.ts index 13af5766086..652aaf3a2de 100644 --- a/src/vs/workbench/services/telemetry/browser/telemetryService.ts +++ b/src/vs/workbench/services/telemetry/browser/telemetryService.ts @@ -104,7 +104,7 @@ export class WebTelemetryAppender implements ITelemetryAppender { this._aiClient.trackEvent('monacoworkbench/' + eventName, data.properties, data.measurements); } - dispose(): Promise | undefined { + flush(): Promise { if (this._aiClient) { return new Promise(resolve => { this._aiClient!.flush(); @@ -113,7 +113,7 @@ export class WebTelemetryAppender implements ITelemetryAppender { }); } - return undefined; + return Promise.resolve(); } } From dec442e9ec0b7785e3d593a5ac7288d55a224d0b Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 11:19:14 +0200 Subject: [PATCH 564/710] fix tests --- .../telemetry/test/electron-browser/appInsightsAppender.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts b/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts index ee732ab653f..92f9d63b15e 100644 --- a/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts @@ -84,7 +84,7 @@ suite('AIAdapter', () => { }); teardown(() => { - return adapter.flush(); + adapter.flush(); }); test('Simple event', () => { From f161708a41b3e72055a080136f11bed64191cc53 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 11:35:41 +0200 Subject: [PATCH 565/710] fix #77800 --- .../browser/preferencesRenderers.ts | 33 +++++++------------ 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts index 2a122ab463d..3437785884e 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts @@ -960,9 +960,15 @@ class UnsupportedSettingsRenderer extends Disposable { private settingsEditorModel: SettingsEditorModel, @IMarkerService private markerService: IMarkerService, @IWorkbenchEnvironmentService private workbenchEnvironmentService: IWorkbenchEnvironmentService, + @IConfigurationService private configurationService: IConfigurationService, ) { super(); - this._register(this.editor.getModel()!.onDidChangeContent(() => this.renderingDelayer.trigger(() => this.render()))); + this._register(this.editor.getModel()!.onDidChangeContent(() => this.delayedRender())); + this._register(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.source === ConfigurationTarget.DEFAULT)(() => this.delayedRender())); + } + + private delayedRender(): void { + this.renderingDelayer.trigger(() => this.render()); } public render(): void { @@ -1000,10 +1006,7 @@ class UnsupportedSettingsRenderer extends Disposable { markerData.push({ severity: MarkerSeverity.Hint, tags: [MarkerTag.Unnecessary], - startLineNumber: setting.keyRange.startLineNumber, - startColumn: setting.keyRange.startColumn, - endLineNumber: setting.valueRange.endLineNumber, - endColumn: setting.valueRange.endColumn, + ...setting.range, message: nls.localize('unknown configuration setting', "Unknown Configuration Setting") }); } @@ -1018,10 +1021,7 @@ class UnsupportedSettingsRenderer extends Disposable { markerData.push({ severity: MarkerSeverity.Hint, tags: [MarkerTag.Unnecessary], - startLineNumber: setting.keyRange.startLineNumber, - startColumn: setting.keyRange.startColumn, - endLineNumber: setting.valueRange.endLineNumber, - endColumn: setting.valueRange.endColumn, + ...setting.range, message: nls.localize('unsupportedRemoteMachineSetting', "This setting can be applied only in remote machine settings") }); } @@ -1056,10 +1056,7 @@ class UnsupportedSettingsRenderer extends Disposable { markerData.push({ severity: MarkerSeverity.Hint, tags: [MarkerTag.Unnecessary], - startLineNumber: setting.keyRange.startLineNumber, - startColumn: setting.keyRange.startColumn, - endLineNumber: setting.valueRange.endLineNumber, - endColumn: setting.valueRange.endColumn, + ...setting.range, message: nls.localize('unsupportedWindowSetting', "This setting cannot be applied now. It will be applied when you open this folder directly.") }); } @@ -1069,10 +1066,7 @@ class UnsupportedSettingsRenderer extends Disposable { return { severity: MarkerSeverity.Hint, tags: [MarkerTag.Unnecessary], - startLineNumber: setting.keyRange.startLineNumber, - startColumn: setting.keyRange.startColumn, - endLineNumber: setting.valueRange.endLineNumber, - endColumn: setting.valueRange.endColumn, + ...setting.range, message: nls.localize('unsupportedApplicationSetting', "This setting can be applied only in application user settings") }; } @@ -1081,10 +1075,7 @@ class UnsupportedSettingsRenderer extends Disposable { return { severity: MarkerSeverity.Hint, tags: [MarkerTag.Unnecessary], - startLineNumber: setting.keyRange.startLineNumber, - startColumn: setting.keyRange.startColumn, - endLineNumber: setting.valueRange.endLineNumber, - endColumn: setting.valueRange.endColumn, + ...setting.range, message: nls.localize('unsupportedMachineSetting', "This setting can be applied only in user settings") }; } From 3b55ab5001617492f65470df50c4e891c80a9bd1 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 11:45:08 +0200 Subject: [PATCH 566/710] Fix #77802 --- .../contrib/preferences/browser/preferencesRenderers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts index 3437785884e..d8abbb29809 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts @@ -19,7 +19,7 @@ import { IModelDeltaDecoration, TrackedRangeStickiness } from 'vs/editor/common/ import { ModelDecorationOptions } from 'vs/editor/common/model/textModel'; import * as nls from 'vs/nls'; import { ConfigurationTarget, IConfigurationService, overrideIdentifierFromKey } from 'vs/platform/configuration/common/configuration'; -import { ConfigurationScope, Extensions as ConfigurationExtensions, IConfigurationPropertySchema, IConfigurationRegistry, IConfigurationNode } from 'vs/platform/configuration/common/configurationRegistry'; +import { ConfigurationScope, Extensions as ConfigurationExtensions, IConfigurationPropertySchema, IConfigurationRegistry, IConfigurationNode, OVERRIDE_PROPERTY_PATTERN } from 'vs/platform/configuration/common/configurationRegistry'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { Registry } from 'vs/platform/registry/common/platform'; @@ -1002,7 +1002,7 @@ class UnsupportedSettingsRenderer extends Disposable { this.handleWorkspaceFolderConfiguration(setting, configuration, markerData); break; } - } else { + } else if (!OVERRIDE_PROPERTY_PATTERN.test(setting.key)) { // Ignore override settings (language specific settings) markerData.push({ severity: MarkerSeverity.Hint, tags: [MarkerTag.Unnecessary], From 18c1b7eab52ff95e8a25b844c0748def9a56e17a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 12:09:04 +0200 Subject: [PATCH 567/710] fix compilation --- .../code/electron-browser/sharedProcess/sharedProcessMain.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts index 8e0f5f39978..b85c29ffc4a 100644 --- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts @@ -37,7 +37,7 @@ import { ILocalizationsService } from 'vs/platform/localizations/common/localiza import { LocalizationsChannel } from 'vs/platform/localizations/node/localizationsIpc'; import { DialogChannelClient } from 'vs/platform/dialogs/node/dialogIpc'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; -import { combinedDisposable, DisposableStore } from 'vs/base/common/lifecycle'; +import { combinedDisposable, DisposableStore, toDisposable } from 'vs/base/common/lifecycle'; import { DownloadService } from 'vs/platform/download/common/downloadService'; import { IDownloadService } from 'vs/platform/download/common/download'; import { IChannel, IServerChannel, StaticRouter } from 'vs/base/parts/ipc/common/ipc'; @@ -154,7 +154,7 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat if (!extensionDevelopmentLocationURI && !environmentService.args['disable-telemetry'] && product.enableTelemetry) { if (product.aiConfig && product.aiConfig.asimovKey && isBuilt) { appInsightsAppender = new AppInsightsAppender(eventPrefix, null, product.aiConfig.asimovKey, telemetryLogService); - disposables.add(appInsightsAppender); // Ensure the AI appender is disposed so that it flushes remaining data + disposables.add(toDisposable(() => appInsightsAppender!.flush())); // Ensure the AI appender is disposed so that it flushes remaining data } const config: ITelemetryServiceConfig = { appender: combinedAppender(appInsightsAppender, new LogAppender(logService)), From bc66a8005a4d72f467c82c80843df18e1915a5ee Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 12:13:15 +0200 Subject: [PATCH 568/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 05c9c32ddb0..d92d5d06486 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "8a361baa2374d6888ef7d6b15f5200fce59ad78d", + "distro": "fc3f6c1bc0a7b9880b85e6763559865327718991", "author": { "name": "Microsoft Corporation" }, From 07d00198a86e4ac1f0691efa94d8610d766fe7fc Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 12:20:48 +0200 Subject: [PATCH 569/710] render preferences features only for settings files --- .../services/preferences/browser/preferencesService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/services/preferences/browser/preferencesService.ts b/src/vs/workbench/services/preferences/browser/preferencesService.ts index 96a7a241493..8788a416741 100644 --- a/src/vs/workbench/services/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/services/preferences/browser/preferencesService.ts @@ -158,7 +158,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic return Promise.resolve(null); } - async createPreferencesEditorModel(uri: URI): Promise> { + async createPreferencesEditorModel(uri: URI): Promise | null> { if (this.isDefaultSettingsResource(uri)) { return this.createDefaultSettingsEditorModel(uri); } @@ -174,7 +174,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic if (this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) { const settingsUri = await this.getEditableSettingsURI(ConfigurationTarget.WORKSPACE_FOLDER, uri); - if (settingsUri) { + if (settingsUri && settingsUri.toString() === uri.toString()) { return this.createEditableSettingsEditorModel(ConfigurationTarget.WORKSPACE_FOLDER, uri); } } @@ -185,7 +185,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic return this.createEditableSettingsEditorModel(ConfigurationTarget.USER_REMOTE, uri); } - return Promise.reject(`unknown resource: ${uri.toString()}`); + return null; } openRawDefaultSettings(): Promise { From e0b60266a21918994aac2f473ef9d79565f58a7f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 Jul 2019 11:27:30 +0200 Subject: [PATCH 570/710] force refetch of remote resources that have been added before the SW is ready, #75061 --- src/vs/base/browser/dom.ts | 2 +- .../browser/resourceServiceWorker.ts | 14 +++--- .../browser/resourceServiceWorkerClient.ts | 50 ++++++++++++++++++- .../browser/resourceServiceWorkerMain.ts | 2 +- 4 files changed, 59 insertions(+), 9 deletions(-) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index 7e9580db4d8..fa12f629000 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -1200,7 +1200,7 @@ export function asDomUri(uri: URI): URI { if (Schemas.vscodeRemote === uri.scheme) { // rewrite vscode-remote-uris to uris of the window location // so that they can be intercepted by the service worker - return _location.with({ path: '/vscode-resources/fetch', query: JSON.stringify({ u: uri.toJSON(), i: 1 }) }); + return _location.with({ path: '/vscode-resources/fetch', query: `u=${JSON.stringify(uri)}` }); } return uri; } diff --git a/src/vs/workbench/contrib/resources/browser/resourceServiceWorker.ts b/src/vs/workbench/contrib/resources/browser/resourceServiceWorker.ts index ce0cb13dd2c..622bb7889be 100644 --- a/src/vs/workbench/contrib/resources/browser/resourceServiceWorker.ts +++ b/src/vs/workbench/contrib/resources/browser/resourceServiceWorker.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { URI, UriComponents } from 'vs/base/common/uri'; +import { URI } from 'vs/base/common/uri'; import { generateUuid } from 'vs/base/common/uuid'; import { getMediaMime } from 'vs/base/common/mime'; @@ -71,7 +71,8 @@ async function respondWithDefault(event: FetchEvent): Promise { } async function respondWithResource(event: FetchEvent, uri: URI): Promise { - const cachedValue = await caches.open(_cacheName).then(cache => cache.match(event.request)); + const cacheKey = event.request.url.replace('&r=1', ''); + const cachedValue = await caches.open(_cacheName).then(cache => cache.match(cacheKey)); if (cachedValue) { return cachedValue; } @@ -79,26 +80,27 @@ async function respondWithResource(event: FetchEvent, uri: URI): Promise(resolve => { const token = generateUuid(); - const query: { u: UriComponents, i: number } = JSON.parse(uri.query); + const [first] = uri.query.split('&'); + const components = JSON.parse(first.substr(2)); _pendingFetch.set(token, async (data: ArrayBuffer, isExtensionResource: boolean) => { const res = new Response(data, { status: 200, - headers: { 'Content-Type': getMediaMime(query.u.path) || 'text/plain' } + headers: { 'Content-Type': getMediaMime(components.path) || 'text/plain' } }); if (isExtensionResource) { // only cache extension resources but not other // resources, esp not workspace resources - await caches.open(_cacheName).then(cache => cache.put(event.request, res.clone())); + await caches.open(_cacheName).then(cache => cache.put(cacheKey, res.clone())); } return resolve(res); }); self.clients.get(event.clientId).then(client => { - client.postMessage({ uri: query.u, token }); + client.postMessage({ uri: components, token }); }); }); } diff --git a/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts b/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts index a04930f1fb6..dfda6a1cfbb 100644 --- a/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts +++ b/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts @@ -65,11 +65,12 @@ class ResourceServiceWorker { @IExtensionService private readonly _extensionService: IExtensionService, @ILogService private readonly _logService: ILogService, ) { + this._updateEarlyResourceUris(); _serviceWorker.claim(e => this._handleMessage(e)); } private _handleMessage(event: ExtendableMessageEvent): void { - this._logService.trace('SW#fetch', event.data.uri); + this._logService.trace('SW - fetch', event.data.uri); const uri = URI.revive(event.data.uri); Promise.all([ @@ -95,6 +96,53 @@ class ResourceServiceWorker { } return false; } + + private _updateEarlyResourceUris(): void { + + let updateCount = 0; + + // find style-tags + const styleElements = document.querySelectorAll('style'); + for (let i = 0; i < styleElements.length; i++) { + const el = styleElements.item(i); + if (!el.sheet) { + continue; + } + const rules = (el.sheet).rules; + for (let j = 0; j < rules.length; j++) { + const rule = rules[j]; + const newCssText = this._updateResourceUris(rule.cssText); + if (newCssText) { + (el.sheet).deleteRule(j); + (el.sheet).insertRule(newCssText, j); + updateCount += 1; + } + } + } + + // find any tag using remote uris + const htmlElements = document.querySelectorAll('[style*="/vscode-resources/fetch"]'); + for (let i = 0; i < htmlElements.length; i++) { + const el = htmlElements.item(i); + const newCssText = this._updateResourceUris(el.style.cssText); + if (newCssText) { + el.style.cssText = newCssText; + updateCount += 1; + } + } + + this._logService.trace('SW - count of changed, early dom element: ', updateCount); + } + + private _updateResourceUris(cssText: string): string | undefined { + let changed = false; + let newCssText = cssText.replace(/url\((["'])?(.+?\/vscode-resources\/fetch\?.+?)\1\)/g, (_match, g1, g2, _offset, _input) => { + changed = true; + return `url(${g1 || ''}${g2}&r=1${g1 || ''})`; + }); + + return changed ? newCssText : undefined; + } } Registry.as(Extensions.Workbench).registerWorkbenchContribution( diff --git a/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerMain.ts b/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerMain.ts index 3138288942e..49f317ecd55 100644 --- a/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerMain.ts +++ b/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerMain.ts @@ -10,7 +10,7 @@ // statement. // trigger service worker updates -const _tag = '66399613-d758-4b88-b073-ff4195611d70'; +const _tag = 'a6f9835e-c10e-4299-ab39-b8e29547c20a'; // loader world const baseUrl = '../../../../../'; From 5d8bd62eac38a58e06fd1243fa6cc68ffe7e55da Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 Jul 2019 14:58:35 +0200 Subject: [PATCH 571/710] add API test for onDidExecuteCommand, #1431 --- .../src/singlefolder-tests/commands.test.ts | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts index a3d5690b9b9..9ea76e6a119 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts @@ -113,4 +113,31 @@ suite('commands namespace tests', () => { return Promise.all([a, b, c, d]); }); -}); \ No newline at end of file + + test('onDidExecuteCommand', async function () { + let args: any[]; + let d1 = commands.registerCommand('t1', function () { + args = [...arguments]; + }); + + + const p = new Promise((resolve, reject) => { + + let d2 = commands.onDidExecuteCommand(event => { + d2.dispose(); + d1.dispose(); + + try { + assert.equal(event.command, 't1'); + assert.deepEqual(args, event.arguments); + resolve(); + } catch (e) { + reject(e); + } + }); + }); + + await commands.executeCommand('t1', { foo: 1 }); + await p; + }); +}); From 626f909341c5ae6204b40ed8df1ae03a60549bfb Mon Sep 17 00:00:00 2001 From: pi1024e <49824824+pi1024e@users.noreply.github.com> Date: Wed, 24 Jul 2019 09:12:14 -0400 Subject: [PATCH 572/710] Update rangeMap.ts --- src/vs/base/browser/ui/list/rangeMap.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/base/browser/ui/list/rangeMap.ts b/src/vs/base/browser/ui/list/rangeMap.ts index b7701b5d9fe..1bf7217d0af 100644 --- a/src/vs/base/browser/ui/list/rangeMap.ts +++ b/src/vs/base/browser/ui/list/rangeMap.ts @@ -113,11 +113,11 @@ export class RangeMap { get count(): number { const len = this.groups.length; - if (len) { - return this.groups[len - 1].range.end; + if (!len) { + return 0; } - return 0; + return this.groups[len - 1].range.end; } /** @@ -190,4 +190,4 @@ export class RangeMap { dispose() { this.groups = null!; // StrictNullOverride: nulling out ok in dispose } -} \ No newline at end of file +} From b4e3cf3332e5a88459412214414c91d5f44ec163 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 Jul 2019 15:20:15 +0200 Subject: [PATCH 573/710] revive command args using the arg processor logic, #1431 --- src/vs/workbench/api/common/extHostCommands.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/common/extHostCommands.ts b/src/vs/workbench/api/common/extHostCommands.ts index 2c03c57577d..f2456398c95 100644 --- a/src/vs/workbench/api/common/extHostCommands.ts +++ b/src/vs/workbench/api/common/extHostCommands.ts @@ -116,7 +116,10 @@ export class ExtHostCommands implements ExtHostCommandsShape { } $handleDidExecuteCommand(command: ICommandEvent): void { - this._onDidExecuteCommand.fire({ command: command.commandId, arguments: command.args }); + this._onDidExecuteCommand.fire({ + command: command.commandId, + arguments: command.args.map(arg => this._argumentProcessors.reduce((r, p) => p.processArgument(r), arg)) + }); } executeCommand(id: string, ...args: any[]): Promise { From 480c53811b201352e148a4e7cae125fd82b2220c Mon Sep 17 00:00:00 2001 From: pi1024e <49824824+pi1024e@users.noreply.github.com> Date: Wed, 24 Jul 2019 09:34:22 -0400 Subject: [PATCH 574/710] Update glob.ts --- src/vs/base/common/glob.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/base/common/glob.ts b/src/vs/base/common/glob.ts index 7200febd039..78fc5e97ce1 100644 --- a/src/vs/base/common/glob.ts +++ b/src/vs/base/common/glob.ts @@ -331,10 +331,10 @@ function wrapRelativePattern(parsedPattern: ParsedStringPattern, arg2: string | } return function (path, basename) { - if (extpath.isEqualOrParent(path, arg2.base)) { - return parsedPattern(paths.relative(arg2.base, path), basename); + if (!extpath.isEqualOrParent(path, arg2.base)) { + return null; } - return null; + return parsedPattern(paths.relative(arg2.base, path), basename); }; } From 3e98ad51773e52888483309fdea51c3c049b8bf0 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 24 Jul 2019 17:26:08 +0200 Subject: [PATCH 575/710] add 'remoteName' context key (replaces remoteAuthority) --- src/vs/platform/remote/common/remoteHosts.ts | 12 ++++++++++++ src/vs/workbench/api/node/extHost.api.impl.ts | 11 ++--------- src/vs/workbench/browser/contextkeys.ts | 7 +++++-- .../contrib/extensions/browser/extensionsViewlet.ts | 8 ++++---- .../preferences/browser/preferences.contribution.ts | 4 ++-- .../remote/electron-browser/remote.contribution.ts | 3 ++- 6 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/vs/platform/remote/common/remoteHosts.ts b/src/vs/platform/remote/common/remoteHosts.ts index 8ca915e74dc..5578246cc82 100644 --- a/src/vs/platform/remote/common/remoteHosts.ts +++ b/src/vs/platform/remote/common/remoteHosts.ts @@ -10,4 +10,16 @@ export const REMOTE_HOST_SCHEME = Schemas.vscodeRemote; export function getRemoteAuthority(uri: URI): string | undefined { return uri.scheme === REMOTE_HOST_SCHEME ? uri.authority : undefined; +} + +export function getRemoteName(authority: string | undefined): string | undefined { + if (!authority) { + return undefined; + } + const pos = authority.indexOf('+'); + if (pos < 0) { + // funky? bad authority? + return authority; + } + return authority.substr(0, pos); } \ No newline at end of file diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 508a9132834..590861767f8 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -72,6 +72,7 @@ import { ExtHostLabelService } from 'vs/workbench/api/common/extHostLabelService import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { getSingletonServiceDescriptors } from 'vs/platform/instantiation/common/extensions'; +import { getRemoteName } from 'vs/platform/remote/common/remoteHosts'; export interface IExtensionApiFactory { (extension: IExtensionDescription, registry: ExtensionDescriptionRegistry, configProvider: ExtHostConfigProvider): typeof vscode; @@ -277,15 +278,7 @@ export function createApiFactory( return extHostWindow.openUri(uri, { allowTunneling: !!initData.remote.isRemote }); }, get remoteName() { - if (!initData.remote.authority) { - return undefined; - } - const pos = initData.remote.authority.indexOf('+'); - if (pos < 0) { - // funky? bad authority? - return initData.remote.authority; - } - return initData.remote.authority.substr(0, pos); + return getRemoteName(initData.remote.authority); } }; if (!initData.environment.extensionTestsLocationURI) { diff --git a/src/vs/workbench/browser/contextkeys.ts b/src/vs/workbench/browser/contextkeys.ts index 863626bdf48..a955ab87cbe 100644 --- a/src/vs/workbench/browser/contextkeys.ts +++ b/src/vs/workbench/browser/contextkeys.ts @@ -20,6 +20,7 @@ import { IWorkbenchLayoutService, Parts, Position } from 'vs/workbench/services/ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { isMacintosh, isLinux, isWindows, isWeb } from 'vs/base/common/platform'; import { PanelPositionContext } from 'vs/workbench/common/panel'; +import { getRemoteName } from 'vs/platform/remote/common/remoteHosts'; export const IsMacContext = new RawContextKey('isMac', isMacintosh); export const IsLinuxContext = new RawContextKey('isLinux', isLinux); @@ -28,8 +29,9 @@ export const IsWindowsContext = new RawContextKey('isWindows', isWindow export const IsWebContext = new RawContextKey('isWeb', isWeb); export const IsMacNativeContext = new RawContextKey('isMacNative', isMacintosh && !isWeb); -export const RemoteAuthorityContext = new RawContextKey('remoteAuthority', ''); +export const Deprecated_RemoteAuthorityContext = new RawContextKey('remoteAuthority', ''); +export const RemoteNameContext = new RawContextKey('remoteName', ''); export const RemoteConnectionState = new RawContextKey<'' | 'initializing' | 'disconnected' | 'connected'>('remoteConnectionState', ''); export const HasMacNativeTabsContext = new RawContextKey('hasMacNativeTabs', false); @@ -121,7 +123,8 @@ export class WorkbenchContextKeysHandler extends Disposable { IsWebContext.bindTo(this.contextKeyService); IsMacNativeContext.bindTo(this.contextKeyService); - RemoteAuthorityContext.bindTo(this.contextKeyService).set(this.environmentService.configuration.remoteAuthority || ''); + Deprecated_RemoteAuthorityContext.bindTo(this.contextKeyService).set(this.environmentService.configuration.remoteAuthority || ''); // remove once + RemoteNameContext.bindTo(this.contextKeyService).set(getRemoteName(this.environmentService.configuration.remoteAuthority) || ''); // macOS Native Tabs const windowConfig = this.configurationService.getValue(); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts index d4b43526fee..9bed184ac05 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts @@ -55,7 +55,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { ExtensionType } from 'vs/platform/extensions/common/extensions'; import { Registry } from 'vs/platform/registry/common/platform'; import { ViewContainerViewlet } from 'vs/workbench/browser/parts/views/viewsViewlet'; -import { RemoteAuthorityContext } from 'vs/workbench/browser/contextkeys'; +import { RemoteNameContext } from 'vs/workbench/browser/contextkeys'; import { ILabelService } from 'vs/platform/label/common/label'; import { MementoObject } from 'vs/workbench/common/memento'; @@ -144,7 +144,7 @@ export class ExtensionsViewletViewsContribution implements IWorkbenchContributio id, name: viewIdNameMappings[id], ctorDescriptor: { ctor: EnabledExtensionsView }, - when: ContextKeyExpr.and(ContextKeyExpr.has('defaultExtensionViews'), ContextKeyExpr.has('hasInstalledExtensions'), RemoteAuthorityContext.isEqualTo('')), + when: ContextKeyExpr.and(ContextKeyExpr.has('defaultExtensionViews'), ContextKeyExpr.has('hasInstalledExtensions'), RemoteNameContext.isEqualTo('')), weight: 40, canToggleVisibility: true, order: 1 @@ -159,7 +159,7 @@ export class ExtensionsViewletViewsContribution implements IWorkbenchContributio id, name: viewIdNameMappings[id], ctorDescriptor: { ctor: DisabledExtensionsView }, - when: ContextKeyExpr.and(ContextKeyExpr.has('defaultExtensionViews'), ContextKeyExpr.has('hasInstalledExtensions'), RemoteAuthorityContext.isEqualTo('')), + when: ContextKeyExpr.and(ContextKeyExpr.has('defaultExtensionViews'), ContextKeyExpr.has('hasInstalledExtensions'), RemoteNameContext.isEqualTo('')), weight: 10, canToggleVisibility: true, order: 3, @@ -208,7 +208,7 @@ export class ExtensionsViewletViewsContribution implements IWorkbenchContributio id: `extensions.${server.authority}.default`, get name() { return getInstalledViewName(); }, ctorDescriptor: { ctor: ServerExtensionsView, arguments: [server, EventOf.map(onDidChangeServerLabel, () => getInstalledViewName())] }, - when: ContextKeyExpr.and(ContextKeyExpr.has('defaultExtensionViews'), ContextKeyExpr.has('hasInstalledExtensions'), RemoteAuthorityContext.notEqualsTo('')), + when: ContextKeyExpr.and(ContextKeyExpr.has('defaultExtensionViews'), ContextKeyExpr.has('hasInstalledExtensions'), RemoteNameContext.notEqualsTo('')), weight: 40, order: 1 }]; diff --git a/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts b/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts index 05217ca58fe..0d180c8c7a1 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts @@ -13,7 +13,7 @@ import * as nls from 'vs/nls'; import { MenuId, MenuRegistry, SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { WorkbenchStateContext, RemoteAuthorityContext, IsMacNativeContext } from 'vs/workbench/browser/contextkeys'; +import { WorkbenchStateContext, IsMacNativeContext, RemoteNameContext } from 'vs/workbench/browser/contextkeys'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; @@ -424,7 +424,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon title: { value: label, original: `Open Remote Settings (${hostLabel})` }, category: { value: nls.localize('preferencesCategory', "Preferences"), original: 'Preferences' } }, - when: RemoteAuthorityContext.notEqualsTo('') + when: RemoteNameContext.notEqualsTo('') }); }); } diff --git a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts index 4fd4e7e56ad..9b984c223e3 100644 --- a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts +++ b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts @@ -37,7 +37,7 @@ import Severity from 'vs/base/common/severity'; import { ReloadWindowAction } from 'vs/workbench/browser/actions/windowActions'; import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { RemoteConnectionState } from 'vs/workbench/browser/contextkeys'; +import { RemoteConnectionState, Deprecated_RemoteAuthorityContext } from 'vs/workbench/browser/contextkeys'; import { IDownloadService } from 'vs/platform/download/common/download'; const WINDOW_ACTIONS_COMMAND_ID = 'remote.showActions'; @@ -119,6 +119,7 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc if (this.disconnected !== isDisconnected) { this.disconnected = isDisconnected; RemoteConnectionState.bindTo(this.contextKeyService).set(isDisconnected ? 'disconnected' : 'connected'); + Deprecated_RemoteAuthorityContext.bindTo(this.contextKeyService).set(!isDisconnected && this.remoteAuthority || ''); this.updateWindowIndicator(); } } From 32eb0c0cb9ae35e66e2f52bae333347e331f5fbc Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 24 Jul 2019 18:09:23 +0200 Subject: [PATCH 576/710] use remoteName in test resolver --- extensions/vscode-test-resolver/package.json | 6 +++--- src/vs/workbench/browser/contextkeys.ts | 1 - .../contrib/remote/electron-browser/remote.contribution.ts | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/extensions/vscode-test-resolver/package.json b/extensions/vscode-test-resolver/package.json index 167df92db2d..0d93c4ea6d0 100644 --- a/extensions/vscode-test-resolver/package.json +++ b/extensions/vscode-test-resolver/package.json @@ -53,17 +53,17 @@ "statusBar/windowIndicator": [ { "command": "vscode-testresolver.newWindow", - "when": "!remoteAuthority", + "when": "!remoteName", "group": "9_local_testresolver@2" }, { "command": "vscode-testresolver.showLog", - "when": "remoteAuthority =~ /^test\\+.*$/", + "when": "remoteName == test", "group": "1_remote_testresolver_open@3" }, { "command": "vscode-testresolver.newWindow", - "when": "remoteAuthority =~ /^test\\+.*$/", + "when": "remoteName == test", "group": "1_remote_testresolver_open@1" } ] diff --git a/src/vs/workbench/browser/contextkeys.ts b/src/vs/workbench/browser/contextkeys.ts index a955ab87cbe..b1de1c5bdc6 100644 --- a/src/vs/workbench/browser/contextkeys.ts +++ b/src/vs/workbench/browser/contextkeys.ts @@ -123,7 +123,6 @@ export class WorkbenchContextKeysHandler extends Disposable { IsWebContext.bindTo(this.contextKeyService); IsMacNativeContext.bindTo(this.contextKeyService); - Deprecated_RemoteAuthorityContext.bindTo(this.contextKeyService).set(this.environmentService.configuration.remoteAuthority || ''); // remove once RemoteNameContext.bindTo(this.contextKeyService).set(getRemoteName(this.environmentService.configuration.remoteAuthority) || ''); // macOS Native Tabs diff --git a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts index 9b984c223e3..7b6f13e67ef 100644 --- a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts +++ b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts @@ -119,7 +119,7 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc if (this.disconnected !== isDisconnected) { this.disconnected = isDisconnected; RemoteConnectionState.bindTo(this.contextKeyService).set(isDisconnected ? 'disconnected' : 'connected'); - Deprecated_RemoteAuthorityContext.bindTo(this.contextKeyService).set(!isDisconnected && this.remoteAuthority || ''); + Deprecated_RemoteAuthorityContext.bindTo(this.contextKeyService).set(isDisconnected ? '' : this.remoteAuthority || ''); this.updateWindowIndicator(); } } @@ -164,7 +164,7 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc private showIndicatorActions(menu: IMenu) { - const actions = !this.disconnected || !this.remoteAuthority ? menu.getActions() : []; + const actions = menu.getActions(); const items: (IQuickPickItem | IQuickPickSeparator)[] = []; for (let actionGroup of actions) { From 1350c9450a3aac2aefc3e5cae56935dbdf324da1 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 24 Jul 2019 10:22:23 -0700 Subject: [PATCH 577/710] Revert "Clarify findFiles doc comment" This reverts commit c467419e0e3023668b8f031d3be768b79eeb1eb7. --- src/vs/vscode.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 8ef541e5eb9..65892f8b976 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -7758,7 +7758,7 @@ declare module 'vscode' { * to restrict the search results to a [workspace folder](#WorkspaceFolder). * @param exclude A [glob pattern](#GlobPattern) that defines files and folders to exclude. The glob pattern * will be matched against the file paths of resulting matches relative to their workspace. When `undefined` only default excludes will - * apply. When `null`, no search excludes will apply, but `files.exclude` will still apply. + * apply, when `null` no excludes will apply. * @param maxResults An upper-bound for the result. * @param token A token that can be used to signal cancellation to the underlying search engine. * @return A thenable that resolves to an array of resource identifiers. Will return no results if no From 1671450c24d07d95e4a75eef5a37e3555c6ac26a Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Wed, 24 Jul 2019 10:41:28 -0700 Subject: [PATCH 578/710] Remove unused word wrap icon --- src/vs/workbench/contrib/codeEditor/browser/WordWrap_16x.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/vs/workbench/contrib/codeEditor/browser/WordWrap_16x.svg diff --git a/src/vs/workbench/contrib/codeEditor/browser/WordWrap_16x.svg b/src/vs/workbench/contrib/codeEditor/browser/WordWrap_16x.svg deleted file mode 100644 index 21058f74e72..00000000000 --- a/src/vs/workbench/contrib/codeEditor/browser/WordWrap_16x.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 23c01b4ca5c6126aa459c0825fa38f4d73474c25 Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Wed, 24 Jul 2019 13:20:17 -0500 Subject: [PATCH 579/710] Add deprecated classname --- src/vs/editor/browser/widget/codeEditorWidget.ts | 2 ++ src/vs/editor/common/model/intervalTree.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 0cd342d195c..20da2f1c223 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -1851,4 +1851,6 @@ registerThemingParticipant((theme, collector) => { if (unnecessaryBorder) { collector.addRule(`.${SHOW_UNUSED_ENABLED_CLASS} .monaco-editor .${ClassName.EditorUnnecessaryDecoration} { border-bottom: 2px dashed ${unnecessaryBorder}; }`); } + + collector.addRule(`.monaco-editor .${ClassName.EditorDeprecatedDecoration} { text-decoration: strikethrough; }`); }); diff --git a/src/vs/editor/common/model/intervalTree.ts b/src/vs/editor/common/model/intervalTree.ts index 496e77b9ef4..b04d58b3101 100644 --- a/src/vs/editor/common/model/intervalTree.ts +++ b/src/vs/editor/common/model/intervalTree.ts @@ -17,7 +17,8 @@ export const enum ClassName { EditorWarningDecoration = 'squiggly-warning', EditorErrorDecoration = 'squiggly-error', EditorUnnecessaryDecoration = 'squiggly-unnecessary', - EditorUnnecessaryInlineDecoration = 'squiggly-inline-unnecessary' + EditorUnnecessaryInlineDecoration = 'squiggly-inline-unnecessary', + EditorDeprecatedDecoration = 'squiggly-deprecated' } export const enum NodeColor { From b71363ff77311f3d49fbdd5f693af70a99280db5 Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Wed, 24 Jul 2019 13:40:14 -0500 Subject: [PATCH 580/710] Use inline decoration --- src/vs/editor/browser/widget/codeEditorWidget.ts | 2 +- src/vs/editor/common/model/intervalTree.ts | 2 +- src/vs/editor/common/services/markerDecorationsServiceImpl.ts | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 20da2f1c223..54c35262a68 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -1852,5 +1852,5 @@ registerThemingParticipant((theme, collector) => { collector.addRule(`.${SHOW_UNUSED_ENABLED_CLASS} .monaco-editor .${ClassName.EditorUnnecessaryDecoration} { border-bottom: 2px dashed ${unnecessaryBorder}; }`); } - collector.addRule(`.monaco-editor .${ClassName.EditorDeprecatedDecoration} { text-decoration: strikethrough; }`); + collector.addRule(`.monaco-editor .${ClassName.EditorDeprecatedInlineDecoration} { text-decoration: strikethrough; }`); }); diff --git a/src/vs/editor/common/model/intervalTree.ts b/src/vs/editor/common/model/intervalTree.ts index b04d58b3101..d400024e7c5 100644 --- a/src/vs/editor/common/model/intervalTree.ts +++ b/src/vs/editor/common/model/intervalTree.ts @@ -18,7 +18,7 @@ export const enum ClassName { EditorErrorDecoration = 'squiggly-error', EditorUnnecessaryDecoration = 'squiggly-unnecessary', EditorUnnecessaryInlineDecoration = 'squiggly-inline-unnecessary', - EditorDeprecatedDecoration = 'squiggly-deprecated' + EditorDeprecatedInlineDecoration = 'squiggly-inline-deprecated' } export const enum NodeColor { diff --git a/src/vs/editor/common/services/markerDecorationsServiceImpl.ts b/src/vs/editor/common/services/markerDecorationsServiceImpl.ts index a319e8004b6..3da62fed16f 100644 --- a/src/vs/editor/common/services/markerDecorationsServiceImpl.ts +++ b/src/vs/editor/common/services/markerDecorationsServiceImpl.ts @@ -221,6 +221,9 @@ export class MarkerDecorationsService extends Disposable implements IMarkerDecor if (marker.tags.indexOf(MarkerTag.Unnecessary) !== -1) { inlineClassName = ClassName.EditorUnnecessaryInlineDecoration; } + if (marker.tags.indexOf(MarkerTag.Deprecated) !== -1) { + inlineClassName = ClassName.EditorDeprecatedInlineDecoration; + } } return { From 895d6323b4a7686dbc9533c09bbc76fd741f195d Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Wed, 24 Jul 2019 13:40:44 -0500 Subject: [PATCH 581/710] Add CompletionItem.deprecated property from LSP --- src/vs/editor/common/modes.ts | 4 ++++ src/vs/monaco.d.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/vs/editor/common/modes.ts b/src/vs/editor/common/modes.ts index fa05b9b968c..dbeb3fb1956 100644 --- a/src/vs/editor/common/modes.ts +++ b/src/vs/editor/common/modes.ts @@ -396,6 +396,10 @@ export interface CompletionItem { * an icon is chosen by the editor. */ kind: CompletionItemKind; + /** + * Indicates if this item is deprecated. + */ + deprecated?: boolean; /** * A human-readable string with additional information * about this item, like type or symbol information. diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 982a16b87ef..75692fbcceb 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -4790,6 +4790,10 @@ declare namespace monaco.languages { * an icon is chosen by the editor. */ kind: CompletionItemKind; + /** + * Indicates if this item is deprecated. + */ + deprecated?: boolean; /** * A human-readable string with additional information * about this item, like type or symbol information. From f20eb76226cde1262fbb867684d7e113a09526f1 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 Jul 2019 12:41:11 -0700 Subject: [PATCH 582/710] xterm@3.15.0-beta87 Diff: https://github.com/xtermjs/xterm.js/compare/e99de7a...52c562d Changes: - Fix edge cases in inputhandler methods - A lot of layering changes - Dependency security updates - test script for mouse modes - Improve logging system - Announce input and backspace on VoiceOver - Fix test exit code Fixes #42559 Fixes #56468 --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index d92d5d06486..275e0d1d765 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "vscode-ripgrep": "^1.5.5", "vscode-sqlite3": "4.0.8", "vscode-textmate": "^4.2.2", - "xterm": "3.15.0-beta71", + "xterm": "3.15.0-beta87", "xterm-addon-search": "0.2.0-beta2", "xterm-addon-web-links": "0.1.0-beta10", "yauzl": "^2.9.2", @@ -158,4 +158,4 @@ "windows-mutex": "0.3.0", "windows-process-tree": "0.2.4" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 3fa82a92145..ce4535f34c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9872,10 +9872,10 @@ xterm-addon-web-links@0.1.0-beta10: resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.1.0-beta10.tgz#610fa9773a2a5ccd41c1c83ba0e2dd2c9eb66a23" integrity sha512-xfpjy0V6bB4BR44qIgZQPoCMVakxb65gMscPkHpO//QxvUxKzabV3dxOsIbeZRFkUGsWTFlvz2OoaBLoNtv5gg== -xterm@3.15.0-beta71: - version "3.15.0-beta71" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta71.tgz#2728c9800ca3b08423e835e9504bd1f4b5de6253" - integrity sha512-8M/cLaxZ+iDopRxLPdPfKuDGaNNyYTdCeytdxjMSH0N7dZzbx6fbaEygQdCrV5pO9cGnT92MefSjVPGRXRiBLA== +xterm@3.15.0-beta87: + version "3.15.0-beta87" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta87.tgz#d04af8d89f1f2c6c1d1580960653c32b2cc344e9" + integrity sha512-9HdgqnWCoEErvhk2Q0flDSlpAOnd4o+qe4+GeN6EwzKWPVdm1aNYLwdmeaOKAjZZfE+wchGu+HaslSRwfyu5yg== y18n@^3.2.1: version "3.2.1" From 87ae3a38d337ade925a009cf86d82f11d36fe476 Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Wed, 24 Jul 2019 14:46:50 -0500 Subject: [PATCH 583/710] Add deprecated support to SuggestDataDto --- src/vs/vscode.proposed.d.ts | 7 +++++++ src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts | 1 + src/vs/workbench/api/common/extHost.protocol.ts | 1 + src/vs/workbench/api/common/extHostLanguageFeatures.ts | 1 + 4 files changed, 10 insertions(+) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 6a31141bb94..a495e65a268 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1277,6 +1277,13 @@ declare module 'vscode' { //#region Deprecated support + export interface CompletionItem { + /** + * Indicates if this item is deprecated. + */ + deprecated?: boolean; + } + export enum DiagnosticTag { /** * Deprecated or obsolete code diff --git a/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts b/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts index 75af9eebf01..3541ba2eef0 100644 --- a/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts +++ b/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts @@ -341,6 +341,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha commitCharacters: data.k, additionalTextEdits: data.l, command: data.m, + deprecated: data.n, // not-standard _id: data.x, }; diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 8fb612d3a7c..1e30b620dca 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -937,6 +937,7 @@ export interface SuggestDataDto { k/* commitCharacters */?: string[]; l/* additionalTextEdits */?: ISingleEditOperation[]; m/* command */?: modes.Command; + n/* deprecated */?: boolean; // not-standard x?: ChainedCacheId; } diff --git a/src/vs/workbench/api/common/extHostLanguageFeatures.ts b/src/vs/workbench/api/common/extHostLanguageFeatures.ts index 884618cc457..6c7065f29f2 100644 --- a/src/vs/workbench/api/common/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/common/extHostLanguageFeatures.ts @@ -736,6 +736,7 @@ class SuggestAdapter { k: item.commitCharacters, l: item.additionalTextEdits && item.additionalTextEdits.map(typeConvert.TextEdit.from), m: this._commands.toInternal(item.command, disposables), + n: item.deprecated }; // 'insertText'-logic From 3422bb0a26312c4139f3109a5dfefd75bbdb0c98 Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Wed, 24 Jul 2019 14:47:13 -0500 Subject: [PATCH 584/710] Fix css rule to line-through --- src/vs/editor/browser/widget/codeEditorWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 54c35262a68..68e1746f63d 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -1852,5 +1852,5 @@ registerThemingParticipant((theme, collector) => { collector.addRule(`.${SHOW_UNUSED_ENABLED_CLASS} .monaco-editor .${ClassName.EditorUnnecessaryDecoration} { border-bottom: 2px dashed ${unnecessaryBorder}; }`); } - collector.addRule(`.monaco-editor .${ClassName.EditorDeprecatedInlineDecoration} { text-decoration: strikethrough; }`); + collector.addRule(`.monaco-editor .${ClassName.EditorDeprecatedInlineDecoration} { text-decoration: line-through; }`); }); From 6a358f77ab735dd8ec1e4aeff86f284568641bcb Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 Jul 2019 12:48:25 -0700 Subject: [PATCH 585/710] Update types, fix debug logging and handler xterm calls --- src/typings/xterm.d.ts | 53 +++++++++++++++---- .../driver/electron-browser/driver.ts | 2 +- .../terminal/browser/terminalInstance.ts | 3 +- 3 files changed, 44 insertions(+), 14 deletions(-) diff --git a/src/typings/xterm.d.ts b/src/typings/xterm.d.ts index b41d12219a9..663b997022b 100644 --- a/src/typings/xterm.d.ts +++ b/src/typings/xterm.d.ts @@ -15,6 +15,11 @@ declare module 'xterm' { */ export type FontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; + /** + * A string representing log level. + */ + export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'off'; + /** * A string representing a renderer type. */ @@ -107,6 +112,18 @@ declare module 'xterm' { */ lineHeight?: number; + /** + * What log level to use, this will log for all levels below and including + * what is set: + * + * 1. debug + * 2. info (default) + * 3. warn + * 4. error + * 5. off + */ + logLevel?: LogLevel; + /** * Whether to treat option as the meta key. */ @@ -177,6 +194,12 @@ declare module 'xterm' { * not whitespace. */ windowsMode?: boolean; + + /** + * A string containing all characters that are considered word separated by the + * double click to select work logic. + */ + wordSeparator?: string; } /** @@ -191,7 +214,7 @@ declare module 'xterm' { cursor?: string, /** The accent color of the cursor (fg color for a block cursor) */ cursorAccent?: string, - /** The selection color (can be transparent) */ + /** The selection background color (can be transparent) */ selection?: string, /** ANSI black (eg. `\x1b[30m`) */ black?: string, @@ -483,12 +506,14 @@ declare module 'xterm' { * final character (e.g "m" for SGR) of the CSI sequence. * @param callback The function to handle the escape sequence. The callback * is called with the numerical params, as well as the special characters - * (e.g. "$" for DECSCPP). Return true if the sequence was handled; false if + * (e.g. "$" for DECSCPP). If the sequence has subparams the array will + * contain subarrays with their numercial values. + * Return true if the sequence was handled; false if * we should try a previous handler (set by addCsiHandler or setCsiHandler). * The most recently-added handler is tried first. * @return An IDisposable you can call to remove this handler. */ - addCsiHandler(flag: string, callback: (params: number[], collect: string) => boolean): IDisposable; + addCsiHandler(flag: string, callback: (params: (number | number[])[], collect: string) => boolean): IDisposable; /** * (EXPERIMENTAL) Adds a handler for OSC escape sequences. @@ -668,12 +693,12 @@ declare module 'xterm' { * Retrieves an option's value from the terminal. * @param key The option key. */ - getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'fontWeight' | 'fontWeightBold' | 'rendererType' | 'termName'): string; + getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'fontWeight' | 'fontWeightBold' | 'logLevel' | 'rendererType' | 'termName' | 'wordSeparator'): string; /** * Retrieves an option's value from the terminal. * @param key The option key. */ - getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode'): boolean; + getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode'): boolean; /** * Retrieves an option's value from the terminal. * @param key The option key. @@ -700,13 +725,19 @@ declare module 'xterm' { * @param key The option key. * @param value The option value. */ - setOption(key: 'fontFamily' | 'termName' | 'bellSound', value: string): void; + setOption(key: 'fontFamily' | 'termName' | 'bellSound' | 'wordSeparator', value: string): void; /** * Sets an option on the terminal. * @param key The option key. * @param value The option value. */ setOption(key: 'fontWeight' | 'fontWeightBold', value: null | 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'): void; + /** + * Sets an option on the terminal. + * @param key The option key. + * @param value The option value. + */ + setOption(key: 'logLevel', value: LogLevel): void; /** * Sets an option on the terminal. * @param key The option key. @@ -724,7 +755,7 @@ declare module 'xterm' { * @param key The option key. * @param value The option value. */ - setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode', value: boolean): void; + setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode', value: boolean): void; /** * Sets an option on the terminal. * @param key The option key. @@ -929,16 +960,16 @@ declare module 'xterm' { // Modifications to official .d.ts below declare module 'xterm' { interface TerminalCore { - debug: boolean; - - handler(text: string): void; - _onScroll: IEventEmitter; _onKey: IEventEmitter<{ key: string }>; _charSizeService: { width: number; height: number; + }; + + _coreService: { + triggerDataEvent(data: string, wasUserInput?: boolean): void; } _renderService: { diff --git a/src/vs/platform/driver/electron-browser/driver.ts b/src/vs/platform/driver/electron-browser/driver.ts index d6dc3f659bc..a956739bed7 100644 --- a/src/vs/platform/driver/electron-browser/driver.ts +++ b/src/vs/platform/driver/electron-browser/driver.ts @@ -206,7 +206,7 @@ class WindowDriver implements IWindowDriver { throw new Error(`Xterm not found: ${selector}`); } - xterm._core.handler(text); + xterm._core._coreService.triggerDataEvent(text); } async openDevTools(): Promise { diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index 1dc49e0e242..f64c7170621 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -1420,8 +1420,7 @@ export class TerminalInstance implements ITerminalInstance { } public toggleEscapeSequenceLogging(): void { - this._xterm._core.debug = !this._xterm._core.debug; - this._xterm.setOption('debug', this._xterm._core.debug); + this._xterm.setOption('logLevel', 'debug'); } public getInitialCwd(): Promise { From 4a2b010e340412961bf64022eac3f68c70c52066 Mon Sep 17 00:00:00 2001 From: Kamran Ayub Date: Wed, 24 Jul 2019 15:10:18 -0500 Subject: [PATCH 586/710] Add inline deprecated styling to suggest widget --- src/vs/editor/common/model/intervalTree.ts | 2 +- src/vs/editor/contrib/suggest/media/suggest.css | 7 +++++++ src/vs/editor/contrib/suggest/suggestWidget.ts | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/model/intervalTree.ts b/src/vs/editor/common/model/intervalTree.ts index d400024e7c5..1815f7ee86f 100644 --- a/src/vs/editor/common/model/intervalTree.ts +++ b/src/vs/editor/common/model/intervalTree.ts @@ -18,7 +18,7 @@ export const enum ClassName { EditorErrorDecoration = 'squiggly-error', EditorUnnecessaryDecoration = 'squiggly-unnecessary', EditorUnnecessaryInlineDecoration = 'squiggly-inline-unnecessary', - EditorDeprecatedInlineDecoration = 'squiggly-inline-deprecated' + EditorDeprecatedInlineDecoration = 'inline-deprecated' } export const enum NodeColor { diff --git a/src/vs/editor/contrib/suggest/media/suggest.css b/src/vs/editor/contrib/suggest/media/suggest.css index 09594abb493..2f740dfad64 100644 --- a/src/vs/editor/contrib/suggest/media/suggest.css +++ b/src/vs/editor/contrib/suggest/media/suggest.css @@ -97,6 +97,13 @@ font-weight: bold; } +.monaco-editor .suggest-widget .monaco-list .monaco-list-row .inline-deprecated { + text-decoration: none; /* override normal inline behavior due to HTML structure */ +} +.monaco-editor .suggest-widget .monaco-list .monaco-list-row .inline-deprecated span { + text-decoration: line-through; +} + /** Icon styles **/ .monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close, diff --git a/src/vs/editor/contrib/suggest/suggestWidget.ts b/src/vs/editor/contrib/suggest/suggestWidget.ts index 9e02b37f673..9eb1398848d 100644 --- a/src/vs/editor/contrib/suggest/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/suggestWidget.ts @@ -9,6 +9,7 @@ import { createMatches } from 'vs/base/common/filters'; import * as strings from 'vs/base/common/strings'; import { Event, Emitter } from 'vs/base/common/event'; import { onUnexpectedError } from 'vs/base/common/errors'; +import { ClassName } from 'vs/editor/common/model/intervalTree'; import { IDisposable, dispose, toDisposable, DisposableStore, Disposable } from 'vs/base/common/lifecycle'; import { addClass, append, $, hide, removeClass, show, toggleClass, getDomNodePagePosition, hasClass, addDisposableListener } from 'vs/base/browser/dom'; import { IListVirtualDelegate, IListEvent, IListRenderer, IListMouseEvent } from 'vs/base/browser/ui/list/list'; @@ -196,6 +197,10 @@ class Renderer implements IListRenderer ]; } + if (suggestion.label && suggestion.deprecated) { + labelOptions.extraClasses = (labelOptions.extraClasses || []).concat([ClassName.EditorDeprecatedInlineDecoration]); + } + data.iconLabel.setLabel(suggestion.label, undefined, labelOptions); data.typeLabel.textContent = (suggestion.detail || '').replace(/\n.*$/m, ''); From 018034a7e79e86e362d88899967bd3d0f89ef009 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Wed, 24 Jul 2019 13:58:34 -0700 Subject: [PATCH 587/710] Bubble up the change of shellLaunch config --- .../workbench/api/browser/mainThreadTerminalService.ts | 2 +- .../contrib/terminal/browser/terminalInstance.ts | 9 ++++++++- .../contrib/terminal/browser/terminalProcessManager.ts | 5 +++++ src/vs/workbench/contrib/terminal/common/terminal.ts | 3 +++ .../terminal/common/terminalProcessExtHostProxy.ts | 6 ++++++ 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadTerminalService.ts b/src/vs/workbench/api/browser/mainThreadTerminalService.ts index 03858de675f..b98e024f441 100644 --- a/src/vs/workbench/api/browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/browser/mainThreadTerminalService.ts @@ -326,7 +326,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape public $sendResolvedLaunchConfig(terminalId: number, shellLaunchConfig: IShellLaunchConfig): void { const instance = this._terminalService.getInstanceFromId(terminalId); if (instance) { - instance.shellLaunchConfig = shellLaunchConfig; + this._getTerminalProcess(terminalId).then(e => e.emitOverrideShellLaunchConfig(shellLaunchConfig)); } } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index 1e385d4c223..dc9e137d713 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -223,7 +223,6 @@ export class TerminalInstance implements ITerminalInstance { public get hadFocusOnExit(): boolean { return this._hadFocusOnExit; } public get isTitleSetByProcess(): boolean { return !!this._messageTitleDisposable; } public get shellLaunchConfig(): IShellLaunchConfig { return this._shellLaunchConfig; } - public set shellLaunchConfig(shellLaunchConfig: IShellLaunchConfig) { this._shellLaunchConfig = shellLaunchConfig; } public get commandTracker(): TerminalCommandTracker { return this._commandTracker; } private readonly _onExit = new Emitter(); @@ -969,6 +968,7 @@ export class TerminalInstance implements ITerminalInstance { this._processManager.onProcessExit(exitCode => this._onProcessExit(exitCode)); this._processManager.onProcessData(data => this._onData.fire(data)); this._processManager.onProcessOverrideDimensions(e => this.setDimensions(e)); + this._processManager.onProcessOverrideShellLaunchConfig(e => this.setShellLaunchConfig(e)); if (this._shellLaunchConfig.name) { this.setTitle(this._shellLaunchConfig.name, false); @@ -1380,6 +1380,13 @@ export class TerminalInstance implements ITerminalInstance { this._resize(); } + private setShellLaunchConfig(shellLaunchConfig: IShellLaunchConfig): void { + this._shellLaunchConfig.args = shellLaunchConfig.args; + this._shellLaunchConfig.cwd = shellLaunchConfig.cwd; + this._shellLaunchConfig.executable = shellLaunchConfig.executable; + this._shellLaunchConfig.env = shellLaunchConfig.env; + } + private _getXtermTheme(theme?: ITheme): any { if (!theme) { theme = this._themeService.getTheme(); diff --git a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts index 0d898575cd3..de751c71dea 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts @@ -70,6 +70,8 @@ export class TerminalProcessManager implements ITerminalProcessManager { public get onProcessExit(): Event { return this._onProcessExit.event; } private readonly _onProcessOverrideDimensions = new Emitter(); public get onProcessOverrideDimensions(): Event { return this._onProcessOverrideDimensions.event; } + private readonly _onProcessOverrideShellLaunchConfig = new Emitter(); + public get onProcessOverrideShellLaunchConfig(): Event { return this._onProcessOverrideShellLaunchConfig.event; } constructor( private readonly _terminalId: number, @@ -170,6 +172,9 @@ export class TerminalProcessManager implements ITerminalProcessManager { if (this._process.onProcessOverrideDimensions) { this._process.onProcessOverrideDimensions(e => this._onProcessOverrideDimensions.fire(e)); } + if (this._process.onProcessOverrideShelllaunchConfig) { + this._process.onProcessOverrideShelllaunchConfig(e => this._onProcessOverrideShellLaunchConfig.fire(e)); + } setTimeout(() => { if (this.processState === ProcessState.LAUNCHING) { diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index fbbfd48fae7..5967be511d6 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -709,6 +709,7 @@ export interface ITerminalProcessManager extends IDisposable { readonly onProcessTitle: Event; readonly onProcessExit: Event; readonly onProcessOverrideDimensions: Event; + readonly onProcessOverrideShellLaunchConfig: Event; dispose(immediate?: boolean): void; createProcess(shellLaunchConfig: IShellLaunchConfig, cols: number, rows: number, isScreenReaderModeEnabled: boolean): Promise; @@ -747,6 +748,7 @@ export interface ITerminalProcessExtHostProxy extends IDisposable { emitReady(pid: number, cwd: string): void; emitExit(exitCode: number): void; emitOverrideDimensions(dimensions: ITerminalDimensions | undefined): void; + emitOverrideShellLaunchConfig(shellLaunchConfig: IShellLaunchConfig): void; emitInitialCwd(initialCwd: string): void; emitCwd(cwd: string): void; emitLatency(latency: number): void; @@ -802,6 +804,7 @@ export interface ITerminalChildProcess { onProcessReady: Event<{ pid: number, cwd: string }>; onProcessTitleChanged: Event; onProcessOverrideDimensions?: Event; + onProcessOverrideShelllaunchConfig?: Event; /** * Shutdown the terminal process. diff --git a/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts b/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts index 0c44e01d94c..518e16bb3a3 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts @@ -24,6 +24,8 @@ export class TerminalProcessExtHostProxy extends Disposable implements ITerminal public readonly onProcessTitleChanged: Event = this._onProcessTitleChanged.event; private readonly _onProcessOverrideDimensions = new Emitter(); public get onProcessOverrideDimensions(): Event { return this._onProcessOverrideDimensions.event; } + private readonly _onProcessOverrideShellLaunchConfig = new Emitter(); + public get onProcessOverrideShelllaunchConfig(): Event { return this._onProcessOverrideShellLaunchConfig.event; } private readonly _onInput = this._register(new Emitter()); public readonly onInput: Event = this._onInput.event; @@ -93,6 +95,10 @@ export class TerminalProcessExtHostProxy extends Disposable implements ITerminal this._onProcessOverrideDimensions.fire(dimensions); } + public emitOverrideShellLaunchConfig(shellLaunchConfig: IShellLaunchConfig): void { + this._onProcessOverrideShellLaunchConfig.fire(shellLaunchConfig); + } + public emitInitialCwd(initialCwd: string): void { while (this._pendingInitialCwdRequests.length > 0) { this._pendingInitialCwdRequests.pop()!(initialCwd); From 66575b23d024084ce7f2457f9f1e805204f90958 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Wed, 24 Jul 2019 14:01:59 -0700 Subject: [PATCH 588/710] Fix #56773. --- .../browser/abstractTextMateService.ts | 25 ++++++++++++++----- .../textMate/browser/textMateService.ts | 6 +++-- .../electron-browser/textMateService.ts | 4 ++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts b/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts index 1259cec8914..9bdf3506f81 100644 --- a/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts +++ b/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts @@ -18,7 +18,8 @@ import { generateTokensCSSForColorMap } from 'vs/editor/common/modes/supports/to import { IModeService } from 'vs/editor/common/services/modeService'; import { IFileService } from 'vs/platform/files/common/files'; import { ILogService } from 'vs/platform/log/common/log'; -import { INotificationService } from 'vs/platform/notification/common/notification'; +import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { ExtensionMessageCollector } from 'vs/workbench/services/extensions/common/extensionsRegistry'; import { ITMSyntaxExtensionPoint, grammarsExtPoint } from 'vs/workbench/services/textMate/common/TMGrammars'; import { ITextMateService } from 'vs/workbench/services/textMate/common/textMateService'; @@ -50,7 +51,8 @@ export abstract class AbstractTextMateService extends Disposable implements ITex @IFileService protected readonly _fileService: IFileService, @INotificationService private readonly _notificationService: INotificationService, @ILogService private readonly _logService: ILogService, - @IConfigurationService private readonly _configurationService: IConfigurationService + @IConfigurationService private readonly _configurationService: IConfigurationService, + @IStorageService private readonly _storageService: IStorageService ) { super(); this._styleElement = dom.createStyleSheet(); @@ -219,7 +221,7 @@ export abstract class AbstractTextMateService extends Disposable implements ITex this._onDidEncounterLanguage.fire(languageId); } }); - return new TMTokenizationSupport(r.languageId, tokenization, this._notificationService, this._configurationService); + return new TMTokenizationSupport(r.languageId, tokenization, this._notificationService, this._configurationService, this._storageService); }, e => { onUnexpectedError(e); return null; @@ -328,6 +330,8 @@ export abstract class AbstractTextMateService extends Disposable implements ITex protected abstract _loadOnigLib(): Promise | undefined; } +const donotAskUpdateKey = 'editor.maxTokenizationLineLength.donotask'; + class TMTokenizationSupport implements ITokenizationSupport { private readonly _languageId: LanguageId; private readonly _actual: TMTokenization; @@ -338,11 +342,12 @@ class TMTokenizationSupport implements ITokenizationSupport { languageId: LanguageId, actual: TMTokenization, @INotificationService private readonly _notificationService: INotificationService, - @IConfigurationService private readonly _configurationService: IConfigurationService + @IConfigurationService private readonly _configurationService: IConfigurationService, + @IStorageService private readonly _storageService: IStorageService ) { this._languageId = languageId; this._actual = actual; - this._tokenizationWarningAlreadyShown = false; + this._tokenizationWarningAlreadyShown = !!(this._storageService.getBoolean(donotAskUpdateKey, StorageScope.GLOBAL)); this._maxTokenizationLineLength = this._configurationService.getValue('editor.maxTokenizationLineLength'); this._configurationService.onDidChangeConfiguration(e => { if (e.affectsConfiguration('editor.maxTokenizationLineLength')) { @@ -368,7 +373,15 @@ class TMTokenizationSupport implements ITokenizationSupport { if (line.length >= this._maxTokenizationLineLength) { if (!this._tokenizationWarningAlreadyShown) { this._tokenizationWarningAlreadyShown = true; - this._notificationService.warn(nls.localize('too many characters', "Tokenization is skipped for long lines for performance reasons. The length of a long line can be configured via `editor.maxTokenizationLineLength`.")); + this._notificationService.prompt( + Severity.Warning, + nls.localize('too many characters', "Tokenization is skipped for long lines for performance reasons. The length of a long line can be configured via `editor.maxTokenizationLineLength`."), + [{ + label: nls.localize('neverAgain', "Don't Show Again"), + isSecondary: true, + run: () => this._storageService.store(donotAskUpdateKey, true, StorageScope.GLOBAL) + }] + ); } console.log(`Line (${line.substr(0, 15)}...): longer than ${this._maxTokenizationLineLength} characters, tokenization skipped.`); return nullTokenize2(this._languageId, line, state, offsetDelta); diff --git a/src/vs/workbench/services/textMate/browser/textMateService.ts b/src/vs/workbench/services/textMate/browser/textMateService.ts index 0e95d04a847..37e0f97252f 100644 --- a/src/vs/workbench/services/textMate/browser/textMateService.ts +++ b/src/vs/workbench/services/textMate/browser/textMateService.ts @@ -14,6 +14,7 @@ import { ILogService } from 'vs/platform/log/common/log'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IStorageService } from 'vs/platform/storage/common/storage'; export class TextMateService extends AbstractTextMateService { @@ -23,9 +24,10 @@ export class TextMateService extends AbstractTextMateService { @IFileService fileService: IFileService, @INotificationService notificationService: INotificationService, @ILogService logService: ILogService, - @IConfigurationService configurationService: IConfigurationService + @IConfigurationService configurationService: IConfigurationService, + @IStorageService storageService: IStorageService ) { - super(modeService, themeService, fileService, notificationService, logService, configurationService); + super(modeService, themeService, fileService, notificationService, logService, configurationService, storageService); } protected _loadVSCodeTextmate(): Promise { diff --git a/src/vs/workbench/services/textMate/electron-browser/textMateService.ts b/src/vs/workbench/services/textMate/electron-browser/textMateService.ts index 9e301b37d85..abc60f9424d 100644 --- a/src/vs/workbench/services/textMate/electron-browser/textMateService.ts +++ b/src/vs/workbench/services/textMate/electron-browser/textMateService.ts @@ -20,6 +20,7 @@ import { TextMateWorker } from 'vs/workbench/services/textMate/electron-browser/ import { ITextModel } from 'vs/editor/common/model'; import { Disposable } from 'vs/base/common/lifecycle'; import { UriComponents, URI } from 'vs/base/common/uri'; +import { IStorageService } from 'vs/platform/storage/common/storage'; const RUN_TEXTMATE_IN_WORKER = false; @@ -110,9 +111,10 @@ export class TextMateService extends AbstractTextMateService { @INotificationService notificationService: INotificationService, @ILogService logService: ILogService, @IConfigurationService configurationService: IConfigurationService, + @IStorageService storageService: IStorageService, @IModelService private readonly _modelService: IModelService, ) { - super(modeService, themeService, fileService, notificationService, logService, configurationService); + super(modeService, themeService, fileService, notificationService, logService, configurationService, storageService); this._worker = null; this._workerProxy = null; this._tokenizers = Object.create(null); From ea1f61356f57f9a87f92f44d213914c76985aa2f Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 Jul 2019 23:22:20 +0200 Subject: [PATCH 589/710] do not read no settings properties --- .../workbench/services/preferences/common/preferencesModels.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/services/preferences/common/preferencesModels.ts b/src/vs/workbench/services/preferences/common/preferencesModels.ts index 0241619be50..d24d2a53f68 100644 --- a/src/vs/workbench/services/preferences/common/preferencesModels.ts +++ b/src/vs/workbench/services/preferences/common/preferencesModels.ts @@ -375,6 +375,7 @@ function parse(model: ITextModel, isSettingsProperty: (currentProperty: string, const position = model.getPositionAt(offset); range.endLineNumber = position.lineNumber; range.endColumn = position.column; + settingsPropertyIndex = -1; } }, onArrayBegin: (offset: number, length: number) => { From 70ab0ada55f3a8bf22ea12411988195006e4ac85 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 24 Jul 2019 14:24:04 -0700 Subject: [PATCH 590/710] Fix 'null' exclude for findFiles, add more tests Fix #77813 --- .../src/singlefolder-tests/workspace.test.ts | 14 ++++++++++++++ .../testWorkspace/.vscode/settings.json | 8 ++++++++ .../testWorkspace/files-exclude/file.txt | 1 + .../testWorkspace/search-exclude/file.txt | 1 + .../workbench/api/common/extHostTypeConverters.ts | 5 +++-- src/vs/workbench/api/common/extHostWorkspace.ts | 5 ++++- src/vs/workbench/api/node/extHost.api.impl.ts | 4 ++-- 7 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 extensions/vscode-api-tests/testWorkspace/.vscode/settings.json create mode 100644 extensions/vscode-api-tests/testWorkspace/files-exclude/file.txt create mode 100644 extensions/vscode-api-tests/testWorkspace/search-exclude/file.txt diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts index 55af5c4d5ed..898a41247c3 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts @@ -520,6 +520,20 @@ suite('workspace-namespace', () => { }); }); + test('findFiles - null exclude', async () => { + await vscode.workspace.findFiles('**/file.txt').then((res) => { + // search.exclude folder is still searched, files.exclude folder is not + assert.equal(res.length, 1); + assert.equal(basename(vscode.workspace.asRelativePath(res[0])), 'file.txt'); + }); + + await vscode.workspace.findFiles('**/file.txt', null).then((res) => { + // search.exclude and files.exclude folders are both searched + assert.equal(res.length, 2); + assert.equal(basename(vscode.workspace.asRelativePath(res[0])), 'file.txt'); + }); + }); + test('findFiles - exclude', () => { return vscode.workspace.findFiles('**/*.png').then((res) => { assert.equal(res.length, 2); diff --git a/extensions/vscode-api-tests/testWorkspace/.vscode/settings.json b/extensions/vscode-api-tests/testWorkspace/.vscode/settings.json new file mode 100644 index 00000000000..e9f6fb82156 --- /dev/null +++ b/extensions/vscode-api-tests/testWorkspace/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "search.exclude": { + "**/search-exclude/**": true + }, + "files.exclude": { + "**/files-exclude/**": true + } +} \ No newline at end of file diff --git a/extensions/vscode-api-tests/testWorkspace/files-exclude/file.txt b/extensions/vscode-api-tests/testWorkspace/files-exclude/file.txt new file mode 100644 index 00000000000..1a010b1c0f0 --- /dev/null +++ b/extensions/vscode-api-tests/testWorkspace/files-exclude/file.txt @@ -0,0 +1 @@ +file \ No newline at end of file diff --git a/extensions/vscode-api-tests/testWorkspace/search-exclude/file.txt b/extensions/vscode-api-tests/testWorkspace/search-exclude/file.txt new file mode 100644 index 00000000000..1a010b1c0f0 --- /dev/null +++ b/extensions/vscode-api-tests/testWorkspace/search-exclude/file.txt @@ -0,0 +1 @@ +file \ No newline at end of file diff --git a/src/vs/workbench/api/common/extHostTypeConverters.ts b/src/vs/workbench/api/common/extHostTypeConverters.ts index 80fef1bdda0..de31343f036 100644 --- a/src/vs/workbench/api/common/extHostTypeConverters.ts +++ b/src/vs/workbench/api/common/extHostTypeConverters.ts @@ -988,8 +988,9 @@ export namespace GlobPattern { export function from(pattern: vscode.GlobPattern): string | types.RelativePattern; export function from(pattern: undefined): undefined; - export function from(pattern: vscode.GlobPattern | undefined): string | types.RelativePattern | undefined; - export function from(pattern: vscode.GlobPattern | undefined): string | types.RelativePattern | undefined { + export function from(pattern: null): null; + export function from(pattern: vscode.GlobPattern | undefined | null): string | types.RelativePattern | undefined | null; + export function from(pattern: vscode.GlobPattern | undefined | null): string | types.RelativePattern | undefined | null { if (pattern instanceof types.RelativePattern) { return pattern; } diff --git a/src/vs/workbench/api/common/extHostWorkspace.ts b/src/vs/workbench/api/common/extHostWorkspace.ts index 5c81776820b..a97d82b4935 100644 --- a/src/vs/workbench/api/common/extHostWorkspace.ts +++ b/src/vs/workbench/api/common/extHostWorkspace.ts @@ -408,7 +408,10 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac // --- search --- - findFiles(include: string | RelativePattern | undefined, exclude: vscode.GlobPattern | undefined, maxResults: number | undefined, extensionId: ExtensionIdentifier, token: vscode.CancellationToken = CancellationToken.None): Promise { + /** + * Note, null/undefined have different and important meanings for "exclude" + */ + findFiles(include: string | RelativePattern | undefined, exclude: vscode.GlobPattern | null | undefined, maxResults: number | undefined, extensionId: ExtensionIdentifier, token: vscode.CancellationToken = CancellationToken.None): Promise { this._logService.trace(`extHostWorkspace#findFiles: fileSearch, extension: ${extensionId.value}, entryPoint: findFiles`); let includePattern: string | undefined; diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 590861767f8..27fb09b2abd 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -63,7 +63,6 @@ import * as vscode from 'vscode'; import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { originalFSPath } from 'vs/base/common/resources'; import { CLIServer } from 'vs/workbench/api/node/extHostCLIServer'; -import { withNullAsUndefined } from 'vs/base/common/types'; import { values } from 'vs/base/common/collections'; import { Schemas } from 'vs/base/common/network'; import { IURITransformer } from 'vs/base/common/uriIpc'; @@ -602,7 +601,8 @@ export function createApiFactory( return extHostWorkspace.getRelativePath(pathOrUri, includeWorkspace); }, findFiles: (include, exclude, maxResults?, token?) => { - return extHostWorkspace.findFiles(typeConverters.GlobPattern.from(include), typeConverters.GlobPattern.from(withNullAsUndefined(exclude)), maxResults, extension.identifier, token); + // Note, undefined/null have different meanings on "exclude" + return extHostWorkspace.findFiles(typeConverters.GlobPattern.from(include), typeConverters.GlobPattern.from(exclude), maxResults, extension.identifier, token); }, findTextInFiles: (query: vscode.TextSearchQuery, optionsOrCallback: vscode.FindTextInFilesOptions | ((result: vscode.TextSearchResult) => void), callbackOrToken?: vscode.CancellationToken | ((result: vscode.TextSearchResult) => void), token?: vscode.CancellationToken) => { let options: vscode.FindTextInFilesOptions; From 0899c8ca900656c30f17f33441365599a2e93efd Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Thu, 18 Jul 2019 22:33:16 -0700 Subject: [PATCH 591/710] chore: Bump electron@4.2.7 --- .yarnrc | 2 +- cgmanifest.json | 4 +-- src/typings/electron.d.ts | 73 ++++++++++++++++++++------------------- test/smoke/package.json | 2 +- test/smoke/yarn.lock | 8 ++--- 5 files changed, 46 insertions(+), 43 deletions(-) diff --git a/.yarnrc b/.yarnrc index 441b5a2e69a..c45abdbacad 100644 --- a/.yarnrc +++ b/.yarnrc @@ -1,3 +1,3 @@ disturl "https://atom.io/download/electron" -target "4.2.5" +target "4.2.7" runtime "electron" diff --git a/cgmanifest.json b/cgmanifest.json index b8c4f3bfefc..638303702ae 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -60,12 +60,12 @@ "git": { "name": "electron", "repositoryUrl": "https://github.com/electron/electron", - "commitHash": "5d67ec3da5376a5058990e8a9557bc9124ad59a8" + "commitHash": "36ea114ac0616e469e75ae94e6d53af48925e036" } }, "isOnlyProductionDependency": true, "license": "MIT", - "version": "4.2.5" + "version": "4.2.7" }, { "component": { diff --git a/src/typings/electron.d.ts b/src/typings/electron.d.ts index c52a879c36f..5be0ac0e3fe 100644 --- a/src/typings/electron.d.ts +++ b/src/typings/electron.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Electron 4.2.5 +// Type definitions for Electron 4.2.7 // Project: http://electronjs.org/ // Definitions by: The Electron Team // Definitions: https://github.com/electron/electron-typescript-definitions @@ -3479,14 +3479,14 @@ declare namespace Electron { * Creates a new NativeImage instance from the NSImage that maps to the given image * name. See NSImageName for a list of possible values. The hslShift is applied to * the image with the following rules This means that [-1, 0, 1] will make the - * image completely white and [-1, 1, 0] will make the image completely black. In - * some cases, the NSImageName doesn't match its string representation; one example - * of this is NSFolderImageName, whose string representation would actually be - * NSFolder. Therefore, you'll need to determine the correct string representation - * for your image before passing it in. This can be done with the following: echo - * -e '#import \nint main() { NSLog(@"%@", SYSTEM_IMAGE_NAME); }' | - * clang -otest -x objective-c -framework Cocoa - && ./test where SYSTEM_IMAGE_NAME - * should be replaced with any value from this list. + * image completely white and [-1, 1, 0] will make the image completely black. In + * some cases, the NSImageName doesn't match its string representation; one example + * of this is NSFolderImageName, whose string representation would actually be + * NSFolder. Therefore, you'll need to determine the correct string representation + * for your image before passing it in. This can be done with the following: echo + * -e '#import \nint main() { NSLog(@"%@", SYSTEM_IMAGE_NAME); }' | + * clang -otest -x objective-c -framework Cocoa - && ./test where SYSTEM_IMAGE_NAME + * should be replaced with any value from this list. */ static createFromNamedImage(imageName: string, hslShift: number[]): NativeImage; /** @@ -3737,6 +3737,17 @@ declare namespace Electron { once(event: 'unlock-screen', listener: Function): this; addListener(event: 'unlock-screen', listener: Function): this; removeListener(event: 'unlock-screen', listener: Function): this; + /** + * Calculate the system idle state. idleThreshold is the amount of time (in + * seconds) before considered idle. callback will be called synchronously on some + * systems and with an idleState argument that describes the system's state. locked + * is available on supported systems only. + */ + querySystemIdleState(idleThreshold: number, callback: (idleState: 'active' | 'idle' | 'locked' | 'unknown') => void): void; + /** + * Calculate system idle time in seconds. + */ + querySystemIdleTime(callback: (idleTime: number) => void): void; } interface PowerSaveBlocker extends EventEmitter { @@ -4418,30 +4429,6 @@ declare namespace Electron { * The new RGBA color the user assigned to be their system accent color. */ newColor: string) => void): this; - /** - * NOTE: This event is only emitted after you have called - * startAppLevelAppearanceTrackingOS - */ - on(event: 'appearance-changed', listener: ( - /** - * Can be `dark` or `light` - */ - newAppearance: ('dark' | 'light')) => void): this; - once(event: 'appearance-changed', listener: ( - /** - * Can be `dark` or `light` - */ - newAppearance: ('dark' | 'light')) => void): this; - addListener(event: 'appearance-changed', listener: ( - /** - * Can be `dark` or `light` - */ - newAppearance: ('dark' | 'light')) => void): this; - removeListener(event: 'appearance-changed', listener: ( - /** - * Can be `dark` or `light` - */ - newAppearance: ('dark' | 'light')) => void): this; on(event: 'color-changed', listener: (event: Event) => void): this; once(event: 'color-changed', listener: (event: Event) => void): this; addListener(event: 'color-changed', listener: (event: Event) => void): this; @@ -8789,17 +8776,33 @@ declare namespace Electron { * The type of media access being requested, can be video, audio or unknown */ mediaType: ('video' | 'audio' | 'unknown'); + /** + * The last URL the requesting frame loaded + */ + requestingUrl: string; + /** + * Whether the frame making the request is the main frame + */ + isMainFrame: boolean; } interface PermissionRequestHandlerDetails { /** * The url of the openExternal request. */ - externalURL: string; + externalURL?: string; /** * The types of media access being requested, elements can be video or audio */ - mediaTypes: Array<'video' | 'audio'>; + mediaTypes?: Array<'video' | 'audio'>; + /** + * The last URL the requesting frame loaded + */ + requestingUrl: string; + /** + * Whether the frame making the request is the main frame + */ + isMainFrame: boolean; } interface PluginCrashedEvent extends Event { diff --git a/test/smoke/package.json b/test/smoke/package.json index 2d92a7a8846..11b5662b207 100644 --- a/test/smoke/package.json +++ b/test/smoke/package.json @@ -22,7 +22,7 @@ "@types/webdriverio": "4.6.1", "concurrently": "^3.5.1", "cpx": "^1.5.0", - "electron": "4.2.5", + "electron": "4.2.7", "htmlparser2": "^3.9.2", "mkdirp": "^0.5.1", "mocha": "^5.2.0", diff --git a/test/smoke/yarn.lock b/test/smoke/yarn.lock index 4af77efee7c..b86356d3ac3 100644 --- a/test/smoke/yarn.lock +++ b/test/smoke/yarn.lock @@ -676,10 +676,10 @@ electron-download@^4.1.0: semver "^5.4.1" sumchecker "^2.0.2" -electron@4.2.5: - version "4.2.5" - resolved "https://registry.yarnpkg.com/electron/-/electron-4.2.5.tgz#1d1432c38e2b2190318f7ca30897cdfdcf942e5a" - integrity sha512-P132MXzTtyn2ZaekhKi5JeHzmTAMuR/uQt4hrg3vfJV7fpncx9SL6UFwHAK1DU13iiyZJqqIziNUu+o8nODHsA== +electron@4.2.7: + version "4.2.7" + resolved "https://registry.yarnpkg.com/electron/-/electron-4.2.7.tgz#bdd2dbf489a4a4255405bd8330cc8509831d29ba" + integrity sha512-Azpkw0OPzKVipSsN9/0DrBQhXOpG48Q1gTG7Akchtv37s8TijMe403TUgHxGGhw2ti117ek51kYf7NXLhjXqoA== dependencies: "@types/node" "^10.12.18" electron-download "^4.1.0" From 0927be89c8bbcacece8517930bec385796f39c1c Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 Jul 2019 14:29:24 -0700 Subject: [PATCH 592/710] Tweak names, make shellLaunchConfig readonly again --- src/vs/workbench/api/browser/mainThreadTerminalService.ts | 2 +- src/vs/workbench/api/common/extHost.protocol.ts | 2 +- src/vs/workbench/api/node/extHostTerminalService.ts | 1 - .../contrib/terminal/browser/terminalInstance.ts | 4 ++-- .../contrib/terminal/browser/terminalProcessManager.ts | 6 +++--- src/vs/workbench/contrib/terminal/common/terminal.ts | 8 ++++---- .../terminal/common/terminalProcessExtHostProxy.ts | 8 ++++---- 7 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadTerminalService.ts b/src/vs/workbench/api/browser/mainThreadTerminalService.ts index b98e024f441..13f4fad4663 100644 --- a/src/vs/workbench/api/browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/browser/mainThreadTerminalService.ts @@ -326,7 +326,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape public $sendResolvedLaunchConfig(terminalId: number, shellLaunchConfig: IShellLaunchConfig): void { const instance = this._terminalService.getInstanceFromId(terminalId); if (instance) { - this._getTerminalProcess(terminalId).then(e => e.emitOverrideShellLaunchConfig(shellLaunchConfig)); + this._getTerminalProcess(terminalId).then(e => e.emitResolvedShellLaunchConfig(shellLaunchConfig)); } } diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index bda74a3b53b..ad32f5f43f1 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -407,9 +407,9 @@ export interface MainThreadTerminalServiceShape extends IDisposable { $sendProcessData(terminalId: number, data: string): void; $sendProcessReady(terminalId: number, pid: number, cwd: string): void; $sendProcessExit(terminalId: number, exitCode: number): void; - $sendOverrideDimensions(terminalId: number, dimensions: ITerminalDimensions | undefined): void; $sendProcessInitialCwd(terminalId: number, cwd: string): void; $sendProcessCwd(terminalId: number, initialCwd: string): void; + $sendOverrideDimensions(terminalId: number, dimensions: ITerminalDimensions | undefined): void; $sendResolvedLaunchConfig(terminalId: number, shellLaunchConfig: IShellLaunchConfig): void; // Renderer diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 9b4a53b13e4..4aa39f91127 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -319,7 +319,6 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { const terminal = new ExtHostTerminal(this._proxy, name); terminal.create(shellPath, shellArgs); this._terminals.push(terminal); - return terminal; } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index f937ca8d4ce..bec9ed4d688 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -968,7 +968,7 @@ export class TerminalInstance implements ITerminalInstance { this._processManager.onProcessExit(exitCode => this._onProcessExit(exitCode)); this._processManager.onProcessData(data => this._onData.fire(data)); this._processManager.onProcessOverrideDimensions(e => this.setDimensions(e)); - this._processManager.onProcessOverrideShellLaunchConfig(e => this.setShellLaunchConfig(e)); + this._processManager.onProcessResolvedShellLaunchConfig(e => this._setResolvedShellLaunchConfig(e)); if (this._shellLaunchConfig.name) { this.setTitle(this._shellLaunchConfig.name, false); @@ -1380,7 +1380,7 @@ export class TerminalInstance implements ITerminalInstance { this._resize(); } - private setShellLaunchConfig(shellLaunchConfig: IShellLaunchConfig): void { + private _setResolvedShellLaunchConfig(shellLaunchConfig: IShellLaunchConfig): void { this._shellLaunchConfig.args = shellLaunchConfig.args; this._shellLaunchConfig.cwd = shellLaunchConfig.cwd; this._shellLaunchConfig.executable = shellLaunchConfig.executable; diff --git a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts index de751c71dea..a391164f1f2 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts @@ -71,7 +71,7 @@ export class TerminalProcessManager implements ITerminalProcessManager { private readonly _onProcessOverrideDimensions = new Emitter(); public get onProcessOverrideDimensions(): Event { return this._onProcessOverrideDimensions.event; } private readonly _onProcessOverrideShellLaunchConfig = new Emitter(); - public get onProcessOverrideShellLaunchConfig(): Event { return this._onProcessOverrideShellLaunchConfig.event; } + public get onProcessResolvedShellLaunchConfig(): Event { return this._onProcessOverrideShellLaunchConfig.event; } constructor( private readonly _terminalId: number, @@ -172,8 +172,8 @@ export class TerminalProcessManager implements ITerminalProcessManager { if (this._process.onProcessOverrideDimensions) { this._process.onProcessOverrideDimensions(e => this._onProcessOverrideDimensions.fire(e)); } - if (this._process.onProcessOverrideShelllaunchConfig) { - this._process.onProcessOverrideShelllaunchConfig(e => this._onProcessOverrideShellLaunchConfig.fire(e)); + if (this._process.onProcessResolvedShellLaunchConfig) { + this._process.onProcessResolvedShellLaunchConfig(e => this._onProcessOverrideShellLaunchConfig.fire(e)); } setTimeout(() => { diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index 5967be511d6..053ebd60930 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -468,7 +468,7 @@ export interface ITerminalInstance { /** * The shell launch config used to launch the shell. */ - shellLaunchConfig: IShellLaunchConfig; + readonly shellLaunchConfig: IShellLaunchConfig; /** * Whether to disable layout for the terminal. This is useful when the size of the terminal is @@ -709,7 +709,7 @@ export interface ITerminalProcessManager extends IDisposable { readonly onProcessTitle: Event; readonly onProcessExit: Event; readonly onProcessOverrideDimensions: Event; - readonly onProcessOverrideShellLaunchConfig: Event; + readonly onProcessResolvedShellLaunchConfig: Event; dispose(immediate?: boolean): void; createProcess(shellLaunchConfig: IShellLaunchConfig, cols: number, rows: number, isScreenReaderModeEnabled: boolean): Promise; @@ -748,7 +748,7 @@ export interface ITerminalProcessExtHostProxy extends IDisposable { emitReady(pid: number, cwd: string): void; emitExit(exitCode: number): void; emitOverrideDimensions(dimensions: ITerminalDimensions | undefined): void; - emitOverrideShellLaunchConfig(shellLaunchConfig: IShellLaunchConfig): void; + emitResolvedShellLaunchConfig(shellLaunchConfig: IShellLaunchConfig): void; emitInitialCwd(initialCwd: string): void; emitCwd(cwd: string): void; emitLatency(latency: number): void; @@ -804,7 +804,7 @@ export interface ITerminalChildProcess { onProcessReady: Event<{ pid: number, cwd: string }>; onProcessTitleChanged: Event; onProcessOverrideDimensions?: Event; - onProcessOverrideShelllaunchConfig?: Event; + onProcessResolvedShellLaunchConfig?: Event; /** * Shutdown the terminal process. diff --git a/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts b/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts index 518e16bb3a3..e611bce74a6 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts @@ -24,8 +24,8 @@ export class TerminalProcessExtHostProxy extends Disposable implements ITerminal public readonly onProcessTitleChanged: Event = this._onProcessTitleChanged.event; private readonly _onProcessOverrideDimensions = new Emitter(); public get onProcessOverrideDimensions(): Event { return this._onProcessOverrideDimensions.event; } - private readonly _onProcessOverrideShellLaunchConfig = new Emitter(); - public get onProcessOverrideShelllaunchConfig(): Event { return this._onProcessOverrideShellLaunchConfig.event; } + private readonly _onProcessResolvedShellLaunchConfig = new Emitter(); + public get onProcessResolvedShellLaunchConfig(): Event { return this._onProcessResolvedShellLaunchConfig.event; } private readonly _onInput = this._register(new Emitter()); public readonly onInput: Event = this._onInput.event; @@ -95,8 +95,8 @@ export class TerminalProcessExtHostProxy extends Disposable implements ITerminal this._onProcessOverrideDimensions.fire(dimensions); } - public emitOverrideShellLaunchConfig(shellLaunchConfig: IShellLaunchConfig): void { - this._onProcessOverrideShellLaunchConfig.fire(shellLaunchConfig); + public emitResolvedShellLaunchConfig(shellLaunchConfig: IShellLaunchConfig): void { + this._onProcessResolvedShellLaunchConfig.fire(shellLaunchConfig); } public emitInitialCwd(initialCwd: string): void { From 78c374172cec20c5407889c28207e865f7ce23ec Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Wed, 24 Jul 2019 14:30:34 -0700 Subject: [PATCH 593/710] Fix #77663. first comment of a thread should have an unique id. --- .../workbench/contrib/comments/browser/commentsTreeViewer.ts | 2 +- src/vs/workbench/contrib/comments/common/commentModel.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts b/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts index 86ade2f8f53..090ffa54650 100644 --- a/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts @@ -23,7 +23,7 @@ export class CommentsDataSource implements IDataSource { return `${element.owner}-${element.id}`; } if (element instanceof CommentNode) { - return `${element.owner}-${element.resource.toString()}-${element.threadId}-${element.comment.uniqueIdInThread}`; + return `${element.owner}-${element.resource.toString()}-${element.threadId}-${element.comment.uniqueIdInThread}` + (element.isRoot ? '-root' : ''); } return ''; } diff --git a/src/vs/workbench/contrib/comments/common/commentModel.ts b/src/vs/workbench/contrib/comments/common/commentModel.ts index b4e40ddca1b..256b3dda7e6 100644 --- a/src/vs/workbench/contrib/comments/common/commentModel.ts +++ b/src/vs/workbench/contrib/comments/common/commentModel.ts @@ -21,6 +21,7 @@ export class CommentNode { comment: Comment; replies: CommentNode[] = []; resource: URI; + isRoot: boolean; constructor(owner: string, threadId: string, resource: URI, comment: Comment, range: IRange) { this.owner = owner; @@ -28,6 +29,7 @@ export class CommentNode { this.comment = comment; this.resource = resource; this.range = range; + this.isRoot = false; } hasReply(): boolean { @@ -55,6 +57,8 @@ export class ResourceWithCommentThreads { commentNodes[0].replies = commentNodes.slice(1, commentNodes.length); } + commentNodes[0].isRoot = true; + return commentNodes[0]; } } From 9f5fffe73e2617b36b1e906b65447775b829327d Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Wed, 24 Jul 2019 15:02:16 -0700 Subject: [PATCH 594/710] More strongly typed telemetry events (#77658) * More strongly typed events * Fixed typo --- src/vs/editor/browser/editorExtensions.ts | 23 +++++++------ .../editor/browser/widget/codeEditorWidget.ts | 3 -- .../editor/contrib/suggest/suggestWidget.ts | 32 +++---------------- .../platform/telemetry/common/gdprTypings.ts | 2 +- .../telemetry/common/telemetryService.ts | 20 +++++------- .../electron-main/updateService.win32.ts | 7 +--- .../api/node/extHostExtensionService.ts | 9 ------ .../parts/activitybar/activitybarActions.ts | 12 +++---- .../parts/editor/breadcrumbsControl.ts | 10 +++--- .../browser/parts/views/viewsViewlet.ts | 12 +++---- .../stats/electron-browser/workspaceStats.ts | 10 +++--- .../walkThrough/browser/walkThroughPart.ts | 6 ---- 12 files changed, 46 insertions(+), 100 deletions(-) diff --git a/src/vs/editor/browser/editorExtensions.ts b/src/vs/editor/browser/editorExtensions.ts index 640002cbd26..e7494cc7a97 100644 --- a/src/vs/editor/browser/editorExtensions.ts +++ b/src/vs/editor/browser/editorExtensions.ts @@ -24,6 +24,10 @@ import { withNullAsUndefined } from 'vs/base/common/types'; export type ServicesAccessor = ServicesAccessor; export type IEditorContributionCtor = IConstructorSignature1; +export type EditorTelemetryDataFragment = { + target: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + snippet: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; +}; //#region Command @@ -219,16 +223,15 @@ export abstract class EditorAction extends EditorCommand { } protected reportTelemetry(accessor: ServicesAccessor, editor: ICodeEditor) { - /* __GDPR__ - "editorActionInvoked" : { - "name" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "id": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "${include}": [ - "${EditorTelemetryData}" - ] - } - */ - accessor.get(ITelemetryService).publicLog('editorActionInvoked', { name: this.label, id: this.id, ...editor.getTelemetryData() }); + type EditorActionInvokedClassification = { + name: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + id: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + }; + type EditorActionInvokedEvent = { + name: string; + id: string; + }; + accessor.get(ITelemetryService).publicLog2('editorActionInvoked', { name: this.label, id: this.id }); } public abstract run(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void | Promise; diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 0cd342d195c..e571b75dd3b 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -1508,9 +1508,6 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE return this._codeEditorService.resolveDecorationOptions(typeKey, writable); } - /* __GDPR__FRAGMENT__ - "EditorTelemetryData" : {} - */ public getTelemetryData(): { [key: string]: any; } | undefined { return this._telemetryData; } diff --git a/src/vs/editor/contrib/suggest/suggestWidget.ts b/src/vs/editor/contrib/suggest/suggestWidget.ts index 9e02b37f673..9fa0cc0a87b 100644 --- a/src/vs/editor/contrib/suggest/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/suggestWidget.ts @@ -810,12 +810,11 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate { const isHashedId = /^[a-f0-9]+$/i.test(values['common.machineId']); - /* __GDPR__ - "machineIdFallback" : { - "usingFallbackGuid" : { "classification": "SystemMetaData", "purpose": "BusinessInsight", "isMeasurement": true } - } - */ - this.publicLog('machineIdFallback', { usingFallbackGuid: !isHashedId }); + type MachineIdFallbackClassification = { + usingFallbackGuid: { classification: 'SystemMetaData', purpose: 'BusinessInsight', isMeasurement: true }; + }; + this.publicLog2<{ usingFallbackGuid: boolean }, MachineIdFallbackClassification>('machineIdFallback', { usingFallbackGuid: !isHashedId }); if (config.trueMachineId) { - /* __GDPR__ - "machineIdDisambiguation" : { - "correctedMachineId" : { "endPoint": "MacAddressHash", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } - } - */ - this.publicLog('machineIdDisambiguation', { correctedMachineId: config.trueMachineId }); + type MachineIdDisambiguationClassification = { + correctedMachineId: { endPoint: 'MacAddressHash', classification: 'EndUserPseudonymizedInformation', purpose: 'FeatureInsight' }; + }; + this.publicLog2<{ correctedMachineId: string }, MachineIdDisambiguationClassification>('machineIdDisambiguation', { correctedMachineId: config.trueMachineId }); } }); } diff --git a/src/vs/platform/update/electron-main/updateService.win32.ts b/src/vs/platform/update/electron-main/updateService.win32.ts index 31c7818a737..bd7a3d35f7c 100644 --- a/src/vs/platform/update/electron-main/updateService.win32.ts +++ b/src/vs/platform/update/electron-main/updateService.win32.ts @@ -114,12 +114,7 @@ export class Win32UpdateService extends AbstractUpdateService { const updateType = getUpdateType(); if (!update || !update.url || !update.version || !update.productVersion) { - /* __GDPR__ - "update:notAvailable" : { - "explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('update:notAvailable', { explicit: !!context }); + this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!context }); this.setState(State.Idle(updateType)); return Promise.resolve(null); diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 781cb8998ab..18e6bf78416 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -317,15 +317,6 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { private _logExtensionActivationTimes(extensionDescription: IExtensionDescription, reason: ExtensionActivationReason, outcome: string, activationTimes?: ExtensionActivationTimes) { const event = getTelemetryActivationEvent(extensionDescription, reason); - /* __GDPR__ - "extensionActivationTimes" : { - "${include}": [ - "${TelemetryActivationEvent}", - "${ExtensionActivationTimes}" - ], - "outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ type ExtensionActivationTimesClassification = { outcome: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; } & TelemetryActivationEventFragment & ExtensionActivationTimesFragment; diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index a95543fc0f4..d73545fb3ef 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -72,13 +72,11 @@ export class ViewletActivityAction extends ActivityAction { } private logAction(action: string) { - /* __GDPR__ - "activityBarAction" : { - "viewletId": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "action": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('activityBarAction', { viewletId: this.activity.id, action }); + type ActivityBarActionClassification = { + viewletId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + action: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + }; + this.telemetryService.publicLog2<{ viewletId: String, action: String }, ActivityBarActionClassification>('activityBarAction', { viewletId: this.activity.id, action }); } } diff --git a/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts b/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts index 85bb27482fc..0614722d536 100644 --- a/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts +++ b/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts @@ -304,12 +304,10 @@ export class BreadcrumbsControl { const { element } = event.item as Item; this._editorGroup.focus(); - /* __GDPR__ - "breadcrumbs/select" : { - "type": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this._telemetryService.publicLog('breadcrumbs/select', { type: element instanceof TreeElement ? 'symbol' : 'file' }); + type BreadcrumbSelectClassification = { + type: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + }; + this._telemetryService.publicLog2<{ type: string }, BreadcrumbSelectClassification>('breadcrumbs/select', { type: element instanceof TreeElement ? 'symbol' : 'file' }); const group = this._getEditorGroup(event.payload); if (group !== undefined) { diff --git a/src/vs/workbench/browser/parts/views/viewsViewlet.ts b/src/vs/workbench/browser/parts/views/viewsViewlet.ts index 711c98c4755..3100093436c 100644 --- a/src/vs/workbench/browser/parts/views/viewsViewlet.ts +++ b/src/vs/workbench/browser/parts/views/viewsViewlet.ts @@ -263,13 +263,11 @@ export abstract class ViewContainerViewlet extends PanelViewlet implements IView private toggleViewVisibility(viewId: string): void { const visible = !this.viewsModel.isVisible(viewId); - /* __GDPR__ - "views.toggleVisibility" : { - "viewId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "visible": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - } - */ - this.telemetryService.publicLog('views.toggledVisibility', { viewId, visible }); + type ViewsToggleVisibilityClassification = { + viewId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + visible: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + }; + this.telemetryService.publicLog2<{ viewId: String, visible: boolean }, ViewsToggleVisibilityClassification>('views.toggleVisibility', { viewId, visible }); this.viewsModel.setVisible(viewId, visible); } diff --git a/src/vs/workbench/contrib/stats/electron-browser/workspaceStats.ts b/src/vs/workbench/contrib/stats/electron-browser/workspaceStats.ts index f26596780b9..89baf8b21e4 100644 --- a/src/vs/workbench/contrib/stats/electron-browser/workspaceStats.ts +++ b/src/vs/workbench/contrib/stats/electron-browser/workspaceStats.ts @@ -319,12 +319,10 @@ export class WorkspaceStats implements IWorkbenchContribution { if (['DIRECT', 'PROXY', 'HTTPS', 'SOCKS', 'EMPTY'].indexOf(type) === -1) { type = 'UNKNOWN'; } - /* __GDPR__ - "resolveProxy.stats" : { - "type": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - } - */ - this.telemetryService.publicLog('resolveProxy.stats', { type }); + type ResolveProxyStatsClassification = { + type: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + }; + this.telemetryService.publicLog2<{ type: String }, ResolveProxyStatsClassification>('resolveProxy.stats', { type }); }).then(undefined, onUnexpectedError); } } diff --git a/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts b/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts index d78d47b4535..afd74dc859b 100644 --- a/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts +++ b/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts @@ -301,12 +301,6 @@ export class WalkThroughPart extends BaseEditor { const div = innerContent.querySelector(`#${id.replace(/\./g, '\\.')}`) as HTMLElement; const options = this.getEditorOptions(snippet.textEditorModel.getModeId()); - /* __GDPR__FRAGMENT__ - "EditorTelemetryData" : { - "target" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "snippet": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ const telemetryData = { target: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined, snippet: i From cfe465c48420b722d281ff491b9aa8e58a304bff Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 24 Jul 2019 15:04:17 -0700 Subject: [PATCH 595/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 275e0d1d765..cf653c43d08 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "fc3f6c1bc0a7b9880b85e6763559865327718991", + "distro": "13a988e218df227b97e810eb49a1a0982bfed00d", "author": { "name": "Microsoft Corporation" }, From 69617527b11eefaa4565e893d12d62e488e2b696 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 Jul 2019 15:26:22 -0700 Subject: [PATCH 596/710] Update terminal dropdown after hidden tabs are removed Fixes #77415 --- src/vs/workbench/contrib/terminal/browser/terminalActions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index d17e12cae98..71878c4bb82 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -749,6 +749,7 @@ export class SwitchTerminalActionViewItem extends SelectActionViewItem { this._register(terminalService.onInstancesChanged(this._updateItems, this)); this._register(terminalService.onActiveTabChanged(this._updateItems, this)); this._register(terminalService.onInstanceTitleChanged(this._updateItems, this)); + this._register(terminalService.onTabDisposed(this._updateItems, this)); this._register(attachSelectBoxStyler(this.selectBox, themeService)); } From 64766900ba911d1b83abb204a5af9cbf45fcf238 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 Jul 2019 16:32:59 -0700 Subject: [PATCH 597/710] Pull common parts into abstract a11y service --- .../common/abstractAccessibilityService.ts | 43 +++++++++++++++++++ .../common/accessibilityService.ts | 32 +++----------- .../node/accessibilityService.ts | 31 +++---------- 3 files changed, 57 insertions(+), 49 deletions(-) create mode 100644 src/vs/platform/accessibility/common/abstractAccessibilityService.ts diff --git a/src/vs/platform/accessibility/common/abstractAccessibilityService.ts b/src/vs/platform/accessibility/common/abstractAccessibilityService.ts new file mode 100644 index 00000000000..00710ed605c --- /dev/null +++ b/src/vs/platform/accessibility/common/abstractAccessibilityService.ts @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Disposable } from 'vs/base/common/lifecycle'; +import { IAccessibilityService, AccessibilitySupport, CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vs/platform/accessibility/common/accessibility'; +import { Event, Emitter } from 'vs/base/common/event'; +import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; + +export abstract class AbstractAccessibilityService extends Disposable implements IAccessibilityService { + _serviceBrand: any; + + private _accessibilityModeEnabledContext: IContextKey; + protected readonly _onDidChangeAccessibilitySupport = new Emitter(); + readonly onDidChangeAccessibilitySupport: Event = this._onDidChangeAccessibilitySupport.event; + + constructor( + @IContextKeyService private readonly _contextKeyService: IContextKeyService, + @IConfigurationService private readonly _configurationService: IConfigurationService, + ) { + super(); + this._accessibilityModeEnabledContext = CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService); + this._register(this._configurationService.onDidChangeConfiguration(e => { + if (e.affectsConfiguration('editor.accessibilitySupport')) { + this._updateContextKey(); + } + })); + this._updateContextKey(); + this.onDidChangeAccessibilitySupport(() => this._updateContextKey()); + } + + abstract alwaysUnderlineAccessKeys(): Promise; + abstract getAccessibilitySupport(): AccessibilitySupport; + abstract setAccessibilitySupport(accessibilitySupport: AccessibilitySupport): void; + + private _updateContextKey(): void { + const detected = this.getAccessibilitySupport() === AccessibilitySupport.Enabled; + const config = this._configurationService.getValue('editor.accessibilitySupport'); + this._accessibilityModeEnabledContext.set(config === 'on' || (config === 'auto' && detected)); + } +} \ No newline at end of file diff --git a/src/vs/platform/accessibility/common/accessibilityService.ts b/src/vs/platform/accessibility/common/accessibilityService.ts index 902531f7a19..b06cb7eb421 100644 --- a/src/vs/platform/accessibility/common/accessibilityService.ts +++ b/src/vs/platform/accessibility/common/accessibilityService.ts @@ -3,33 +3,22 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Emitter, Event } from 'vs/base/common/event'; -import { IAccessibilityService, AccessibilitySupport, CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vs/platform/accessibility/common/accessibility'; -import { Disposable } from 'vs/base/common/lifecycle'; -import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { IAccessibilityService, AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { AbstractAccessibilityService } from 'vs/platform/accessibility/common/abstractAccessibilityService'; -export class BrowserAccessibilityService extends Disposable implements IAccessibilityService { +export class BrowserAccessibilityService extends AbstractAccessibilityService implements IAccessibilityService { _serviceBrand: any; private _accessibilitySupport = AccessibilitySupport.Unknown; - private _accessibilityModeEnabledContext: IContextKey; - private readonly _onDidChangeAccessibilitySupport = new Emitter(); - readonly onDidChangeAccessibilitySupport: Event = this._onDidChangeAccessibilitySupport.event; constructor( - @IContextKeyService private readonly _contextKeyService: IContextKeyService, - @IConfigurationService private readonly _configurationService: IConfigurationService, + @IContextKeyService readonly contextKeyService: IContextKeyService, + @IConfigurationService readonly configurationService: IConfigurationService, ) { - super(); - this._accessibilityModeEnabledContext = CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService); - this._register(this._configurationService.onDidChangeConfiguration(e => { - if (e.affectsConfiguration('editor.accessibilitySupport')) { - this._updateContextKey(); - } - })); - this._updateContextKey(); + super(contextKeyService, configurationService); } alwaysUnderlineAccessKeys(): Promise { @@ -43,16 +32,9 @@ export class BrowserAccessibilityService extends Disposable implements IAccessib this._accessibilitySupport = accessibilitySupport; this._onDidChangeAccessibilitySupport.fire(); - this._updateContextKey(); } getAccessibilitySupport(): AccessibilitySupport { return this._accessibilitySupport; } - - private _updateContextKey(): void { - const detected = this.getAccessibilitySupport() === AccessibilitySupport.Enabled; - const config = this._configurationService.getValue('editor.accessibilitySupport'); - this._accessibilityModeEnabledContext.set(config === 'on' || (config === 'auto' && detected)); - } } \ No newline at end of file diff --git a/src/vs/workbench/services/accessibility/node/accessibilityService.ts b/src/vs/workbench/services/accessibility/node/accessibilityService.ts index 1efe4edadc0..02b215b5a09 100644 --- a/src/vs/workbench/services/accessibility/node/accessibilityService.ts +++ b/src/vs/workbench/services/accessibility/node/accessibilityService.ts @@ -3,35 +3,24 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IAccessibilityService, AccessibilitySupport, CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vs/platform/accessibility/common/accessibility'; +import { IAccessibilityService, AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility'; import { isWindows } from 'vs/base/common/platform'; -import { Emitter, Event } from 'vs/base/common/event'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; -import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { Disposable } from 'vs/base/common/lifecycle'; +import { AbstractAccessibilityService } from 'vs/platform/accessibility/common/abstractAccessibilityService'; -export class AccessibilityService extends Disposable implements IAccessibilityService { +export class AccessibilityService extends AbstractAccessibilityService implements IAccessibilityService { _serviceBrand: any; private _accessibilitySupport = AccessibilitySupport.Unknown; - private _accessibilityModeEnabledContext: IContextKey; - private readonly _onDidChangeAccessibilitySupport = new Emitter(); - readonly onDidChangeAccessibilitySupport: Event = this._onDidChangeAccessibilitySupport.event; constructor( @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, - @IContextKeyService private readonly _contextKeyService: IContextKeyService, - @IConfigurationService private readonly _configurationService: IConfigurationService + @IContextKeyService readonly contextKeyService: IContextKeyService, + @IConfigurationService readonly configurationService: IConfigurationService ) { - super(); - this._accessibilityModeEnabledContext = CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService); - this._register(this._configurationService.onDidChangeConfiguration(e => { - if (e.affectsConfiguration('editor.accessibilitySupport')) { - this._updateContextKey(); - } - })); - this._updateContextKey(); + super(contextKeyService, configurationService); } alwaysUnderlineAccessKeys(): Promise { @@ -70,10 +59,4 @@ export class AccessibilityService extends Disposable implements IAccessibilitySe return this._accessibilitySupport; } - - private _updateContextKey(): void { - const detected = this.getAccessibilitySupport() === AccessibilitySupport.Enabled; - const config = this._configurationService.getValue('editor.accessibilitySupport'); - this._accessibilityModeEnabledContext.set(config === 'on' || (config === 'auto' && detected)); - } } \ No newline at end of file From a9aac1207ba42b0483e26d9de2bcf5247f5741d9 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 Jul 2019 16:49:08 -0700 Subject: [PATCH 598/710] Adopt clipboard service in terminal --- src/vs/workbench/contrib/terminal/browser/terminalActions.ts | 5 ++--- .../workbench/contrib/terminal/browser/terminalInstance.ts | 4 ++-- src/vs/workbench/contrib/terminal/common/terminal.ts | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index 689b03e7ebc..23077803ab1 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -607,12 +607,11 @@ export class TerminalPasteAction extends Action { super(id, label); } - public run(event?: any): Promise { + public async run(event?: any): Promise { const instance = this.terminalService.getActiveOrCreateInstance(); if (instance) { - instance.paste(); + await instance.paste(); } - return Promise.resolve(undefined); } } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index 87a9b072e11..31cdb6fb01b 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -869,9 +869,9 @@ export class TerminalInstance implements ITerminalInstance { return this._xtermReadyPromise.then(() => this.focus(force)); } - public paste(): void { + public async paste(): Promise { this.focus(); - document.execCommand('paste'); + this._xterm._core._coreService.triggerDataEvent(await this._clipboardService.readText(), true); } public write(text: string): void { diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index 18317305a9b..f427fd3ef0e 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -588,7 +588,7 @@ export interface ITerminalInstance { /** * Focuses and pastes the contents of the clipboard into the terminal instance. */ - paste(): void; + paste(): Promise; /** * Send text to the terminal instance. The text is written to the stdin of the underlying pty From 5bff4b527672eaf41c8031db033cb3a0688d4a2b Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Wed, 24 Jul 2019 16:49:51 -0700 Subject: [PATCH 599/710] Add test cases --- src/vs/editor/contrib/find/replacePattern.ts | 5 +++-- .../contrib/find/test/replacePattern.test.ts | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/find/replacePattern.ts b/src/vs/editor/contrib/find/replacePattern.ts index c881a4e0330..50e90d7f3ea 100644 --- a/src/vs/editor/contrib/find/replacePattern.ts +++ b/src/vs/editor/contrib/find/replacePattern.ts @@ -51,7 +51,7 @@ export class ReplacePattern { public buildReplaceString(matches: string[] | null, preserveCase?: boolean): string { if (this._state.kind === ReplacePatternKind.StaticValue) { - if (preserveCase && matches && matches[0]) { + if (preserveCase && matches && (matches[0] !== '')) { if (matches[0].toUpperCase() === matches[0]) { return this._state.staticValue.toUpperCase(); } else if (matches[0].toLowerCase() === matches[0]) { @@ -59,7 +59,8 @@ export class ReplacePattern { } else if (containsUppercaseCharacter(matches[0][0])) { return this._state.staticValue[0].toUpperCase() + this._state.staticValue.substr(1); } else { - return this._state.staticValue[0].toLocaleLowerCase() + this._state.staticValue.substr(1); + // we don't understand its pattern yet. + return this._state.staticValue; } } else { return this._state.staticValue; diff --git a/src/vs/editor/contrib/find/test/replacePattern.test.ts b/src/vs/editor/contrib/find/test/replacePattern.test.ts index b36a509e34d..d252ac74c6a 100644 --- a/src/vs/editor/contrib/find/test/replacePattern.test.ts +++ b/src/vs/editor/contrib/find/test/replacePattern.test.ts @@ -153,4 +153,26 @@ suite('Replace Pattern test', () => { let actual = replacePattern.buildReplaceString(matches); assert.equal(actual, 'a{}'); }); + + test('preserve case', () => { + let replacePattern = parseReplaceString('Def'); + let actual = replacePattern.buildReplaceString(['abc'], true); + assert.equal(actual, 'def'); + actual = replacePattern.buildReplaceString(['Abc'], true); + assert.equal(actual, 'Def'); + actual = replacePattern.buildReplaceString(['ABC'], true); + assert.equal(actual, 'DEF'); + + actual = replacePattern.buildReplaceString(['abc', 'Abc'], true); + assert.equal(actual, 'def'); + actual = replacePattern.buildReplaceString(['Abc', 'abc'], true); + assert.equal(actual, 'Def'); + actual = replacePattern.buildReplaceString(['ABC', 'abc'], true); + assert.equal(actual, 'DEF'); + + actual = replacePattern.buildReplaceString(['AbC'], true); + assert.equal(actual, 'Def'); + actual = replacePattern.buildReplaceString(['aBC'], true); + assert.equal(actual, 'Def'); + }); }); From 53f95f8d4217ad32cf1cf85f83cb43f66b0f445a Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Wed, 24 Jul 2019 16:56:16 -0700 Subject: [PATCH 600/710] Use monaco-case-sensitive icon --- src/vs/editor/contrib/find/findWidget.css | 14 -------------- src/vs/editor/contrib/find/findWidget.ts | 2 +- .../contrib/find/images/preserve-case-dark.svg | 1 - .../editor/contrib/find/images/preserve-case.svg | 1 - 4 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 src/vs/editor/contrib/find/images/preserve-case-dark.svg delete mode 100644 src/vs/editor/contrib/find/images/preserve-case.svg diff --git a/src/vs/editor/contrib/find/findWidget.css b/src/vs/editor/contrib/find/findWidget.css index e806c7bef36..d210cb1dd49 100644 --- a/src/vs/editor/contrib/find/findWidget.css +++ b/src/vs/editor/contrib/find/findWidget.css @@ -220,10 +220,6 @@ background-image: url('images/tree-collapsed-light.svg'); } -.monaco-editor .find-widget .preserve-case { - background: url('images/preserve-case.svg') center center no-repeat; -} - .monaco-editor .find-widget .replace { background-image: url('images/replace-light.svg'); } @@ -314,16 +310,6 @@ background-image: url('images/close-dark.svg'); } -.monaco-editor.hc-black .find-widget .preserve-case-dark, -.monaco-editor.vs-dark .find-widget .preserve-case-dark { - background-image: url('images/preserve-case-dark.svg'); -} - -.monaco-editor.hc-black .find-widget .preserve-case, -.monaco-editor.vs-dark .find-widget .preserve-case { - background: url('images/preserve-case-dark.svg') center center no-repeat; -} - .monaco-editor.hc-black .find-widget .replace, .monaco-editor.vs-dark .find-widget .replace { background-image: url('images/replace-dark.svg'); diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index 76178fddbc8..e06de65d099 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -917,7 +917,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas })); this._preserveCase = this._register(new Checkbox({ - actionClassName: 'preserve-case', + actionClassName: 'monaco-case-sensitive', title: NLS_PRESERVE_CASE_LABEL, isChecked: false, })); diff --git a/src/vs/editor/contrib/find/images/preserve-case-dark.svg b/src/vs/editor/contrib/find/images/preserve-case-dark.svg deleted file mode 100644 index ae540172027..00000000000 --- a/src/vs/editor/contrib/find/images/preserve-case-dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/editor/contrib/find/images/preserve-case.svg b/src/vs/editor/contrib/find/images/preserve-case.svg deleted file mode 100644 index 1f3b1a2c57e..00000000000 --- a/src/vs/editor/contrib/find/images/preserve-case.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From d4b3a7a22fe01ce6af85f9c59943ad54d6f6f205 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 Jul 2019 17:35:56 -0700 Subject: [PATCH 601/710] Fix smoke tests Fixes #77670 --- src/vs/code/electron-main/app.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 7d8c5522c30..785a214c7a3 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -167,9 +167,11 @@ export class CodeApplication extends Disposable { event.preventDefault(); }); app.on('remote-get-current-web-contents', event => { - this.logService.trace(`App#on(remote-get-current-web-contents): prevented`); - - event.preventDefault(); + // The driver needs access to web contents + if (!this.environmentService.args.driver) { + this.logService.trace(`App#on(remote-get-current-web-contents): prevented`); + event.preventDefault(); + } }); app.on('web-contents-created', (_event: Electron.Event, contents) => { contents.on('will-attach-webview', (event: Electron.Event, webPreferences, params) => { From 049e4ca16d3a2d3b9116d79e3ed295910c0e2ed2 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 24 Jul 2019 23:09:36 -0700 Subject: [PATCH 602/710] Mark `addMissingAwait` as a preferred fix --- extensions/typescript-language-features/src/features/quickFix.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/typescript-language-features/src/features/quickFix.ts b/extensions/typescript-language-features/src/features/quickFix.ts index 8972df52185..6ce9f199704 100644 --- a/extensions/typescript-language-features/src/features/quickFix.ts +++ b/extensions/typescript-language-features/src/features/quickFix.ts @@ -314,6 +314,7 @@ const preferredFixes = new Set([ 'forgottenThisPropertyAccess', 'spelling', 'unusedIdentifier', + 'addMissingAwait', ]); function isPreferredFix(tsAction: Proto.CodeFixAction): boolean { return preferredFixes.has(tsAction.fixName); From 8d752d880d7151efb7b52400df74028321af6a7d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 25 Jul 2019 09:50:17 +0200 Subject: [PATCH 603/710] update references viewlet to 0.0.29 --- build/builtInExtensions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/builtInExtensions.json b/build/builtInExtensions.json index f044a0e5384..a3483f451e2 100644 --- a/build/builtInExtensions.json +++ b/build/builtInExtensions.json @@ -31,7 +31,7 @@ }, { "name": "ms-vscode.references-view", - "version": "0.0.28", + "version": "0.0.29", "repo": "https://github.com/Microsoft/vscode-reference-view", "metadata": { "id": "dc489f46-520d-4556-ae85-1f9eab3c412d", From 67814cc6b11dad00ec264c1874f5e7b8bd4923b3 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 25 Jul 2019 10:10:15 +0200 Subject: [PATCH 604/710] Fixes #74369 --- .../wordOperations/test/wordOperations.test.ts | 16 ++++++++++++++++ .../contrib/wordOperations/wordOperations.ts | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/wordOperations/test/wordOperations.test.ts b/src/vs/editor/contrib/wordOperations/test/wordOperations.test.ts index 1cae3b38fe6..98c22c721ef 100644 --- a/src/vs/editor/contrib/wordOperations/test/wordOperations.test.ts +++ b/src/vs/editor/contrib/wordOperations/test/wordOperations.test.ts @@ -137,6 +137,22 @@ suite('WordOperations', () => { assert.deepEqual(actual, EXPECTED); }); + test('cursorWordLeftSelect - issue #74369: cursorWordLeft and cursorWordLeftSelect do not behave consistently', () => { + const EXPECTED = [ + '|this.|is.|a.|test', + ].join('\n'); + const [text,] = deserializePipePositions(EXPECTED); + const actualStops = testRepeatedActionAndExtractPositions( + text, + new Position(1, 15), + ed => cursorWordLeft(ed, true), + ed => ed.getPosition()!, + ed => ed.getPosition()!.equals(new Position(1, 1)) + ); + const actual = serializePipePositions(text, actualStops); + assert.deepEqual(actual, EXPECTED); + }); + test('cursorWordStartLeft', () => { // This is the behaviour observed in Visual Studio, please do not touch test const EXPECTED = ['| |/* |Just |some |more |text |a|+= |3 |+|5|-|3 |+ |7 |*/| '].join('\n'); diff --git a/src/vs/editor/contrib/wordOperations/wordOperations.ts b/src/vs/editor/contrib/wordOperations/wordOperations.ts index 282a4e05ac1..dc4e111f962 100644 --- a/src/vs/editor/contrib/wordOperations/wordOperations.ts +++ b/src/vs/editor/contrib/wordOperations/wordOperations.ts @@ -163,7 +163,7 @@ export class CursorWordLeftSelect extends WordLeftCommand { constructor() { super({ inSelectionMode: true, - wordNavigationType: WordNavigationType.WordStart, + wordNavigationType: WordNavigationType.WordStartFast, id: 'cursorWordLeftSelect', precondition: undefined }); From a4fd7f28ca43365a64146bf95dccbcabcb4d75a1 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 25 Jul 2019 10:32:59 +0200 Subject: [PATCH 605/710] team settings --- .vscode/settings.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3fa04b1ee95..1a760bdda6b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -59,5 +59,6 @@ "git.ignoreLimitWarning": true, "remote.extensionKind": { "msjsdiag.debugger-for-chrome": "workspace" - } -} + }, + "files.insertFinalNewline": true +} \ No newline at end of file From c8c23e39639d336cdc542d6193e98f64faee467a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 25 Jul 2019 10:34:18 +0200 Subject: [PATCH 606/710] fixes #77918 --- tslint.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tslint.json b/tslint.json index 3ff7147730b..155bd9a4115 100644 --- a/tslint.json +++ b/tslint.json @@ -515,6 +515,13 @@ "**/vs/**" ] }, + { + "target": "**/vs/workbench/contrib/extensions/browser/**", + "restrictions": [ + "semver-umd", + "**/vs/**" + ] + }, { "target": "**/vs/code/node/**", "restrictions": [ @@ -563,7 +570,11 @@ ] }, { - "target": "**/{node,electron-browser,electron-main,extensions}/**", + "target": "**/{node,electron-browser,electron-main}/**", + "restrictions": "**/*" + }, + { + "target": "**/extensions/**", "restrictions": "**/*" }, { From 18da64f949be4d291de23940b45a9ee33beb5fa1 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 25 Jul 2019 10:45:22 +0200 Subject: [PATCH 607/710] stop pushing master --- build/azure-pipelines/distro-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/azure-pipelines/distro-build.yml b/build/azure-pipelines/distro-build.yml index 4057894f025..62ee67ad1c6 100644 --- a/build/azure-pipelines/distro-build.yml +++ b/build/azure-pipelines/distro-build.yml @@ -31,12 +31,12 @@ steps: git remote add distro "https://github.com/$VSCODE_MIXIN_REPO.git" git fetch distro - # Push master branch into master and oss/master - git push distro origin/master:refs/heads/master origin/master:refs/heads/oss/master + # Push master branch into oss/master + git push distro origin/master:refs/heads/oss/master # Push every release branch into oss/release git for-each-ref --format="%(refname:short)" refs/remotes/origin/release/* | sed 's/^origin\/\(.*\)$/\0:refs\/heads\/oss\/\1/' | xargs git push distro git merge $(node -p "require('./package.json').distro") - displayName: Sync & Merge Distro \ No newline at end of file + displayName: Sync & Merge Distro From 5dfd889f8367d3d323db6ac9b988dc3cc9bef3c9 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 25 Jul 2019 11:27:36 +0200 Subject: [PATCH 608/710] Fixes #73437 --- src/vs/editor/browser/controller/mouseTarget.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/browser/controller/mouseTarget.ts b/src/vs/editor/browser/controller/mouseTarget.ts index 8d69b3dffbf..9a37d512035 100644 --- a/src/vs/editor/browser/controller/mouseTarget.ts +++ b/src/vs/editor/browser/controller/mouseTarget.ts @@ -407,7 +407,12 @@ class HitTestRequest extends BareHitTestRequest { } public fulfill(type: MouseTargetType, position: Position | null = null, range: EditorRange | null = null, detail: any = null): MouseTarget { - return new MouseTarget(this.target, type, this.mouseColumn, position, range, detail); + let mouseColumn = this.mouseColumn; + if (position && position.column < this._ctx.model.getLineMaxColumn(position.lineNumber)) { + // Most likely, the line contains foreign decorations... + mouseColumn = position.column; + } + return new MouseTarget(this.target, type, mouseColumn, position, range, detail); } public withTarget(target: Element | null): HitTestRequest { From b35a0eea42b5d5b42cef8bf2244e19c5b5d3a735 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 25 Jul 2019 11:26:55 +0200 Subject: [PATCH 609/710] filter commands that start with an underscore, #1431 --- src/vs/workbench/api/common/extHostCommands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/common/extHostCommands.ts b/src/vs/workbench/api/common/extHostCommands.ts index f2456398c95..4cef83323b0 100644 --- a/src/vs/workbench/api/common/extHostCommands.ts +++ b/src/vs/workbench/api/common/extHostCommands.ts @@ -50,7 +50,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { onFirstListenerDidAdd: () => this._proxy.$registerCommandListener(), onLastListenerRemove: () => this._proxy.$unregisterCommandListener(), }); - this.onDidExecuteCommand = this._onDidExecuteCommand.event; + this.onDidExecuteCommand = Event.filter(this._onDidExecuteCommand.event, e => e.command[0] !== '_'); // filter 'private' commands this._logService = logService; this._converter = new CommandsConverter(this); this._argumentProcessors = [ From f8f0e03ea55b79aa62cbed940e234180ab8cdd1c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 25 Jul 2019 11:28:05 +0200 Subject: [PATCH 610/710] tweak name for internal delegation command --- src/vs/workbench/api/common/extHostCommands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/common/extHostCommands.ts b/src/vs/workbench/api/common/extHostCommands.ts index 4cef83323b0..19e4d5655f1 100644 --- a/src/vs/workbench/api/common/extHostCommands.ts +++ b/src/vs/workbench/api/common/extHostCommands.ts @@ -222,7 +222,7 @@ export class CommandsConverter { // --- conversion between internal and api commands constructor(commands: ExtHostCommands) { - this._delegatingCommandId = `_internal_command_delegation_${Date.now()}`; + this._delegatingCommandId = `_vscode_delegate_cmd_${Date.now().toString(36)}`; this._commands = commands; this._commands.registerCommand(true, this._delegatingCommandId, this._executeConvertedCommand, this); } From 808a11ae4360d60072f930e158ac5607040e8a8d Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 25 Jul 2019 11:30:30 +0200 Subject: [PATCH 611/710] Sorry, the bot is never using the correct labels for me --- .github/classifier.yml | 159 ++++++++++++++++++++++++++++++++--------- 1 file changed, 126 insertions(+), 33 deletions(-) diff --git a/.github/classifier.yml b/.github/classifier.yml index e7a79f7b64c..29f9fa41f52 100644 --- a/.github/classifier.yml +++ b/.github/classifier.yml @@ -18,40 +18,127 @@ assignees: [ weinand ], assignLabel: false }, - diff-editor: [], - dropdown: [], - editor: { + diff-editor: : { + assignees: [], + assignLabel: false + }, + dropdown: [], + editor: : { + assignees: [], + assignLabel: false + }, + editor-1000-limit: : { + assignees: [], + assignLabel: false + }, + editor-autoclosing: : { + assignees: [], + assignLabel: false + }, + editor-autoindent: : { + assignees: [], + assignLabel: false + }, + editor-brackets: : { + assignees: [], + assignLabel: false + }, + editor-clipboard: : { + assignees: [], + assignLabel: false + }, + editor-code-actions: : { + assignees: [], + assignLabel: false + }, + editor-code-lens: : { + assignees: [], + assignLabel: false + }, + editor-color-picker: : { + assignees: [], + assignLabel: false + }, + editor-colors: : { + assignees: [], + assignLabel: false + }, + editor-columnselect: : { + assignees: [], + assignLabel: false + }, + editor-commands: : { + assignees: [], + assignLabel: false + }, + editor-contrib: : { + assignees: [], + assignLabel: false + }, + editor-drag-and-drop: : { + assignees: [], + assignLabel: false + }, + editor-find: : { + assignees: [], + assignLabel: false + }, + editor-folding: : { + assignees: [], + assignLabel: false + }, + editor-hover: : { + assignees: [], + assignLabel: false + }, + editor-ime: : { + assignees: [], + assignLabel: false + }, + editor-input: : { + assignees: [], + assignLabel: false + }, + editor-ligatures: : { + assignees: [], + assignLabel: false + }, + editor-links: : { + assignees: [], + assignLabel: false + }, + editor-minimap: : { + assignees: [], + assignLabel: false + }, + editor-multicursor: : { + assignees: [], + assignLabel: false + }, + editor-parameter-hints: : { + assignees: [], + assignLabel: false + }, + editor-rendering: : { + assignees: [], + assignLabel: false + }, + editor-smooth: : { + assignees: [], + assignLabel: false + }, + editor-symbols: : { + assignees: [], + assignLabel: false + }, + editor-textbuffer: : { + assignees: [], + assignLabel: false + }, + editor-wrapping: : { assignees: [], assignLabel: false }, - editor-1000-limit: [], - editor-autoclosing: [], - editor-autoindent: [], - editor-brackets: [], - editor-clipboard: [], - editor-code-actions: [], - editor-code-lens: [], - editor-color-picker: [], - editor-colors: [], - editor-columnselect: [], - editor-commands: [], - editor-contrib: [], - editor-drag-and-drop: [], - editor-find: [], - editor-folding: [], - editor-hover: [], - editor-ime: [], - editor-input: [], - editor-ligatures: [], - editor-links: [], - editor-minimap: [], - editor-multicursor: [], - editor-parameter-hints: [], - editor-rendering: [], - editor-smooth: [], - editor-symbols: [], - editor-textbuffer: [], - editor-wrapping: [], emmet: [ octref ], error-list: [], explorer-custom: [], @@ -87,8 +174,14 @@ issue-reporter: [ RMacfarlane ], javascript: [ mjbvz ], json: [], - keyboard-layout: [], - keybindings: [], + keyboard-layout: : { + assignees: [], + assignLabel: false + }, + keybindings: : { + assignees: [], + assignLabel: false + }, keybindings-editor: [], lang-diagnostics: [], languages basic: [], From 30eaedc93ac1fdad81a6006c76cfed70a9884525 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 25 Jul 2019 14:47:35 +0200 Subject: [PATCH 612/710] add error message if input section is missing; fixes #76558 --- .../browser/configurationResolverService.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts b/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts index bcf4b31cef9..f406a3e0d63 100644 --- a/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts +++ b/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts @@ -227,6 +227,10 @@ export abstract class BaseConfigurationResolverService extends AbstractVariableR */ private showUserInput(variable: string, inputInfos: ConfiguredInput[]): Promise { + if (!inputInfos) { + return Promise.reject(new Error(nls.localize('inputVariable.noInputSection', "Variable '{0}' must be defined in an '{1}' section of the debug or task configuration.", variable, 'input'))); + } + // find info for the given input variable const info = inputInfos.filter(item => item.id === variable).pop(); if (info) { @@ -307,4 +311,4 @@ export class ConfigurationResolverService extends BaseConfigurationResolverServi } } -registerSingleton(IConfigurationResolverService, ConfigurationResolverService, true); \ No newline at end of file +registerSingleton(IConfigurationResolverService, ConfigurationResolverService, true); From 23d8322547e06f1beaea596c508a1de19e843a54 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 25 Jul 2019 15:38:03 +0200 Subject: [PATCH 613/710] introduce git APIState fixes #77787 --- extensions/git/src/api/api1.ts | 10 ++++++++- extensions/git/src/api/git.d.ts | 4 ++++ extensions/git/src/model.ts | 39 +++++++++++++++++++++++---------- 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/extensions/git/src/api/api1.ts b/extensions/git/src/api/api1.ts index 25742babc15..a4fd677db27 100644 --- a/extensions/git/src/api/api1.ts +++ b/extensions/git/src/api/api1.ts @@ -5,7 +5,7 @@ import { Model } from '../model'; import { Repository as BaseRepository, Resource } from '../repository'; -import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, Ref, Submodule, Commit, Change, RepositoryUIState, Status, LogOptions } from './git'; +import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, Ref, Submodule, Commit, Change, RepositoryUIState, Status, LogOptions, APIState } from './git'; import { Event, SourceControlInputBox, Uri, SourceControl } from 'vscode'; import { mapEvent } from '../util'; @@ -214,6 +214,14 @@ export class ApiImpl implements API { readonly git = new ApiGit(this._model); + get state(): APIState { + return this._model.state; + } + + get onDidChangeState(): Event { + return this._model.onDidChangeState; + } + get onDidOpenRepository(): Event { return mapEvent(this._model.onDidOpenRepository, r => new ApiRepository(r)); } diff --git a/extensions/git/src/api/git.d.ts b/extensions/git/src/api/git.d.ts index 9444ea1fada..21195974fc1 100644 --- a/extensions/git/src/api/git.d.ts +++ b/extensions/git/src/api/git.d.ts @@ -176,7 +176,11 @@ export interface Repository { log(options?: LogOptions): Promise; } +export type APIState = 'uninitialized' | 'initialized'; + export interface API { + readonly state: APIState; + readonly onDidChangeState: Event; readonly git: Git; readonly repositories: Repository[]; readonly onDidOpenRepository: Event; diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index a04dc33c8be..c410dde86bd 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -12,7 +12,7 @@ import * as path from 'path'; import * as fs from 'fs'; import * as nls from 'vscode-nls'; import { fromGitUri } from './uri'; -import { GitErrorCodes } from './api/git'; +import { GitErrorCodes, APIState as State } from './api/git'; const localize = nls.loadMessageBundle(); @@ -63,15 +63,22 @@ export class Model { private possibleGitRepositoryPaths = new Set(); + private _onDidChangeState = new EventEmitter(); + readonly onDidChangeState = this._onDidChangeState.event; + + private _state: State = 'uninitialized'; + get state(): State { return this._state; } + + setState(state: State): void { + this._state = state; + this._onDidChangeState.fire(state); + } + private disposables: Disposable[] = []; constructor(readonly git: Git, private globalState: Memento, private outputChannel: OutputChannel) { workspace.onDidChangeWorkspaceFolders(this.onDidChangeWorkspaceFolders, this, this.disposables); - this.onDidChangeWorkspaceFolders({ added: workspace.workspaceFolders || [], removed: [] }); - window.onDidChangeVisibleTextEditors(this.onDidChangeVisibleTextEditors, this, this.disposables); - this.onDidChangeVisibleTextEditors(window.visibleTextEditors); - workspace.onDidChangeConfiguration(this.onDidChangeConfiguration, this, this.disposables); const fsWatcher = workspace.createFileSystemWatcher('**'); @@ -82,7 +89,15 @@ export class Model { const onPossibleGitRepositoryChange = filterEvent(onGitRepositoryChange, uri => !this.getRepository(uri)); onPossibleGitRepositoryChange(this.onPossibleGitRepositoryChange, this, this.disposables); - this.scanWorkspaceFolders(); + this.doInitialScan().finally(() => this.setState('initialized')); + } + + private async doInitialScan(): Promise { + await Promise.all([ + this.onDidChangeWorkspaceFolders({ added: workspace.workspaceFolders || [], removed: [] }), + this.onDidChangeVisibleTextEditors(window.visibleTextEditors), + this.scanWorkspaceFolders() + ]); } /** @@ -157,8 +172,8 @@ export class Model { .filter(r => !activeRepositories.has(r!.repository)) .filter(r => !(workspace.workspaceFolders || []).some(f => isDescendant(f.uri.fsPath, r!.repository.root))) as OpenRepository[]; - possibleRepositoryFolders.forEach(p => this.openRepository(p.uri.fsPath)); openRepositoriesToDispose.forEach(r => r.dispose()); + await Promise.all(possibleRepositoryFolders.map(p => this.openRepository(p.uri.fsPath))); } private onDidChangeConfiguration(): void { @@ -175,7 +190,7 @@ export class Model { openRepositoriesToDispose.forEach(r => r.dispose()); } - private onDidChangeVisibleTextEditors(editors: TextEditor[]): void { + private async onDidChangeVisibleTextEditors(editors: TextEditor[]): Promise { const config = workspace.getConfiguration('git'); const autoRepositoryDetection = config.get('autoRepositoryDetection'); @@ -183,7 +198,7 @@ export class Model { return; } - editors.forEach(editor => { + await Promise.all(editors.map(async editor => { const uri = editor.document.uri; if (uri.scheme !== 'file') { @@ -196,8 +211,8 @@ export class Model { return; } - this.openRepository(path.dirname(uri.fsPath)); - }); + await this.openRepository(path.dirname(uri.fsPath)); + })); } @sequentialize @@ -421,4 +436,4 @@ export class Model { this.possibleGitRepositoryPaths.clear(); this.disposables = dispose(this.disposables); } -} \ No newline at end of file +} From c8e219f1a1bc770df87f9d9444b26979aec00e64 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 25 Jul 2019 15:47:20 +0200 Subject: [PATCH 614/710] up fuzzy score limit to 128, #74133 --- src/vs/base/common/filters.ts | 2 +- src/vs/base/test/common/filters.test.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 645937c3375..d01c32668ca 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -414,7 +414,7 @@ export function createMatches(score: undefined | FuzzyScore): IMatch[] { return res; } -const _maxLen = 53; +const _maxLen = 128; function initTable() { const table: number[][] = []; diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index b93e58cfc0a..25cc50d5780 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -470,4 +470,19 @@ suite('Filters', () => { test('List highlight filter: Not all characters from match are highlighterd #66923', () => { assertMatches('foo', 'barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar_foo', 'barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar_^f^o^o', fuzzyScore); }); + + test('Autocompletion is matched against truncated filterText to 54 characters #74133', () => { + assertMatches( + 'foo', + 'ffffffffffffffffffffffffffffbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar_foo', + 'ffffffffffffffffffffffffffffbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar_^f^o^o', + fuzzyScore + ); + assertMatches( + 'foo', + 'Gffffffffffffffffffffffffffffbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar_foo', + undefined, + fuzzyScore + ); + }); }); From a1ff90cfa2f1ceb482313922f24cdf25d41ff03c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 25 Jul 2019 15:52:17 +0200 Subject: [PATCH 615/710] Also add snippet to default config, #71208 --- src/vs/editor/common/config/commonEditorConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 889384a1748..5d1818712b0 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -696,7 +696,7 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.suggest.filteredTypes': { type: 'object', - default: { keyword: true }, + default: { keyword: true, snippet: true }, markdownDescription: nls.localize('suggest.filtered', "Controls whether some suggestion types should be filtered from IntelliSense. A list of suggestion types can be found here: https://code.visualstudio.com/docs/editor/intellisense#_types-of-completions."), properties: { method: { From c09ffefaf9537459fc4ed27f443f329271eed6b7 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Thu, 25 Jul 2019 08:55:19 -0700 Subject: [PATCH 616/710] Upgrade VS Code telemetry extractor (#77937) --- build/package.json | 2 +- build/yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build/package.json b/build/package.json index e292f7a7e41..daaef30be96 100644 --- a/build/package.json +++ b/build/package.json @@ -51,4 +51,4 @@ "postinstall": "npm run compile", "npmCheckJs": "tsc --noEmit" } -} \ No newline at end of file +} diff --git a/build/yarn.lock b/build/yarn.lock index 8f675d1fef0..bfc2633700a 100644 --- a/build/yarn.lock +++ b/build/yarn.lock @@ -1257,7 +1257,12 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= From 9702c08132b3545946f58cac93c53e43a0879864 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Thu, 25 Jul 2019 08:59:38 -0700 Subject: [PATCH 617/710] Upgrade telemetry extractor (#77938) * Upgrade VS Code telemetry extractor * Update telemetry extractor package --- build/package.json | 2 +- build/yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build/package.json b/build/package.json index daaef30be96..2a1c775c736 100644 --- a/build/package.json +++ b/build/package.json @@ -42,7 +42,7 @@ "tslint": "^5.9.1", "typescript": "3.5.2", "vsce": "1.48.0", - "vscode-telemetry-extractor": "1.4.3", + "vscode-telemetry-extractor": "^1.5.1", "xml2js": "^0.4.17" }, "scripts": { diff --git a/build/yarn.lock b/build/yarn.lock index bfc2633700a..7d00ac18872 100644 --- a/build/yarn.lock +++ b/build/yarn.lock @@ -2124,7 +2124,7 @@ tough-cookie@~2.3.3: dependencies: punycode "^1.4.1" -ts-morph@^3.1.2: +ts-morph@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-3.1.3.tgz#bbfa1d14481ee23bdd1c030340ccf4a243cfc844" integrity sha512-CwjgyJTtd3f8vBi7Vr0IOgdOY6Wi/Tq0MhieXOE2B5ns5WWRD7BwMNHtv+ZufKI/S2U/lMrh+Q3bOauE4tsv2g== @@ -2313,19 +2313,19 @@ vsce@1.48.0: yauzl "^2.3.1" yazl "^2.2.2" -vscode-ripgrep@^1.4.0: +vscode-ripgrep@^1.5.5: version "1.5.5" resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.5.tgz#24c0e9cb356cf889c98e15ecb58f9cf654a1d961" integrity sha512-OrPrAmcun4+uZAuNcQvE6CCPskh+5AsjANod/Q3zRcJcGNxgoOSGlQN9RPtatkUNmkN8Nn8mZBnS1jMylu/dKg== -vscode-telemetry-extractor@1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/vscode-telemetry-extractor/-/vscode-telemetry-extractor-1.4.3.tgz#e4af380beb4e2a63d6e4fa819b25ba7ef6dc4a10" - integrity sha512-OFklPErZnUBjrKte3hg+irQXue5rzgz4qnvE8kdaOnW1E/wynHUEXW9t5vF5q0hu2lodpGMkybwLkSjONZVzvg== +vscode-telemetry-extractor@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/vscode-telemetry-extractor/-/vscode-telemetry-extractor-1.5.1.tgz#67249e4ca9c65a21800ca53880732f8cef98d0fa" + integrity sha512-B5SnEdRiDrI4o6NMG9iHmengoaW1rxUQmS/sCaripgnchm+P79JURmKxhfXr5eRo4Mr1QSenFT/SDNaEop7aoQ== dependencies: command-line-args "^5.1.1" - ts-morph "^3.1.2" - vscode-ripgrep "^1.4.0" + ts-morph "^3.1.3" + vscode-ripgrep "^1.5.5" vso-node-api@6.1.2-preview: version "6.1.2-preview" From 4f9575631bfa56834e8c3bca710fefd7486d39b7 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 Jul 2019 08:30:09 -0700 Subject: [PATCH 618/710] Make start and shutdown mandatory Part of #77160 --- src/vs/vscode.proposed.d.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index d86d071f6f4..430967c999e 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -925,7 +925,7 @@ declare module 'vscode' { //#endregion - //#region Terminal virtual process + //#region Terminal extension pty export namespace window { /** @@ -1021,6 +1021,19 @@ declare module 'vscode' { */ onDidExit?: Event; + /** + * Implement to handle when the terminal is ready to start firing events. + * + * @param initialDimensions The dimensions of the terminal, this will be undefined if the + * terminal panel has not been opened before this is called. + */ + start(initialDimensions: TerminalDimensions | undefined): void; + + /** + * Implement to handle when the terminal shuts down by an act of the user. + */ + shutdown(): void; + /** * Implement to handle keystrokes in the terminal or when an extension calls * [Terminal.sendText](#Terminal.sendText). Keystrokes are converted into their @@ -1050,19 +1063,6 @@ declare module 'vscode' { * @param dimensions The new dimensions. */ setDimensions?(dimensions: TerminalDimensions): void; - - /** - * Implement to handle when the terminal shuts down by an act of the user. - */ - shutdown?(): void; - - /** - * Implement to handle when the terminal is ready to start firing events. - * - * @param initialDimensions The dimensions of the terminal, this will be undefined if the - * terminal panel has not been opened before this is called. - */ - start?(initialDimensions: TerminalDimensions | undefined): void; } //#endregion From 909ab9d1011b177ba4f3512cda4df69ffecbb9ee Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 Jul 2019 09:07:18 -0700 Subject: [PATCH 619/710] Fix compile --- .../src/singlefolder-tests/terminal.test.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts index 13b9666dbfe..63e39fdd2e4 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts @@ -265,7 +265,9 @@ suite('window namespace tests', () => { term.dispose(); }); const virtualProcess: TerminalVirtualProcess = { - onDidWrite: new EventEmitter().event + onDidWrite: new EventEmitter().event, + start: () => {}, + shutdown: () => {} }; window.createTerminal({ name: 'c', virtualProcess }); }); @@ -291,7 +293,8 @@ suite('window namespace tests', () => { const writeEmitter = new EventEmitter(); const virtualProcess: TerminalVirtualProcess = { onDidWrite: writeEmitter.event, - start: () => startResolve() + start: () => startResolve(), + shutdown: () => {} }; const terminal = window.createTerminal({ name: 'foo', virtualProcess }); }); @@ -311,7 +314,8 @@ suite('window namespace tests', () => { done(); }); terminal.dispose(); - } + }, + shutdown: () => {} }; const terminal = window.createTerminal({ name: 'foo', virtualProcess }); }); @@ -338,7 +342,9 @@ suite('window namespace tests', () => { const overrideDimensionsEmitter = new EventEmitter(); const virtualProcess: TerminalVirtualProcess = { onDidWrite: writeEmitter.event, - onDidOverrideDimensions: overrideDimensionsEmitter.event + onDidOverrideDimensions: overrideDimensionsEmitter.event, + start: () => {}, + shutdown: () => {} }; const terminal = window.createTerminal({ name: 'foo', virtualProcess }); }); From bdd49f042d63ce5636c60361bf3a5c40905137f6 Mon Sep 17 00:00:00 2001 From: Tomas Kovar Date: Thu, 25 Jul 2019 18:27:41 +0200 Subject: [PATCH 620/710] Add sk to locales than need region --- src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts b/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts index 7442639d505..da109a496f4 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts @@ -106,6 +106,7 @@ function _getLangEnvVariable(locale?: string) { ko: 'KR', pl: 'PL', ru: 'RU', + sk: 'SK', zh: 'CN' }; if (parts[0] in languageVariants) { From dba0ee0392a0a7480e5026e1da8bba21ab4476b4 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 25 Jul 2019 18:28:36 +0200 Subject: [PATCH 621/710] serialized grid should remember view visibility and cached sizes fixes #77884 --- src/vs/base/browser/ui/grid/grid.ts | 64 +++-- src/vs/base/browser/ui/grid/gridview.ts | 30 ++- src/vs/base/browser/ui/splitview/splitview.ts | 46 +++- src/vs/base/test/browser/ui/grid/grid.test.ts | 227 ++++++++++++++++++ 4 files changed, 339 insertions(+), 28 deletions(-) diff --git a/src/vs/base/browser/ui/grid/grid.ts b/src/vs/base/browser/ui/grid/grid.ts index 0fc6d389e81..08090875642 100644 --- a/src/vs/base/browser/ui/grid/grid.ts +++ b/src/vs/base/browser/ui/grid/grid.ts @@ -9,6 +9,7 @@ import { Disposable } from 'vs/base/common/lifecycle'; import { tail2 as tail, equals } from 'vs/base/common/arrays'; import { orthogonal, IView, GridView, Sizing as GridViewSizing, Box, IGridViewStyles, IViewSize } from './gridview'; import { Event } from 'vs/base/common/event'; +import { InvisibleSizing } from 'vs/base/browser/ui/splitview/splitview'; export { Orientation, Sizing as GridViewSizing } from './gridview'; @@ -31,6 +32,7 @@ function oppositeDirection(direction: Direction): Direction { export interface GridLeafNode { readonly view: T; readonly box: Box; + readonly cachedVisibleSize: number | undefined; } export interface GridBranchNode { @@ -173,16 +175,23 @@ function getGridLocation(element: HTMLElement): number[] { return [...getGridLocation(ancestor), index]; } -export const enum Sizing { - Distribute = 'distribute', - Split = 'split' +export type DistributeSizing = { type: 'distribute' }; +export type SplitSizing = { type: 'split' }; +export type InvisibleSizing = { type: 'invisible', cachedVisibleSize: number }; +export type Sizing = DistributeSizing | SplitSizing | InvisibleSizing; + +export namespace Sizing { + export const Distribute: DistributeSizing = { type: 'distribute' }; + export const Split: SplitSizing = { type: 'split' }; + export function Invisible(cachedVisibleSize: number): InvisibleSizing { return { type: 'invisible', cachedVisibleSize }; } } export interface IGridStyles extends IGridViewStyles { } export interface IGridOptions { - styles?: IGridStyles; - proportionalLayout?: boolean; + readonly styles?: IGridStyles; + readonly proportionalLayout?: boolean; + readonly firstViewVisibleCachedSize?: number; } export class Grid extends Disposable { @@ -210,7 +219,11 @@ export class Grid extends Disposable { this._register(this.gridview.onDidSashReset(this.doResetViewSize, this)); - this._addView(view, 0, [0]); + const size: number | GridViewSizing = typeof options.firstViewVisibleCachedSize === 'number' + ? GridViewSizing.Invisible(options.firstViewVisibleCachedSize) + : 0; + + this._addView(view, size, [0]); } style(styles: IGridStyles): void { @@ -241,10 +254,12 @@ export class Grid extends Disposable { let viewSize: number | GridViewSizing; - if (size === Sizing.Split) { + if (typeof size === 'number') { + viewSize = size; + } else if (size.type === 'split') { const [, index] = tail(referenceLocation); viewSize = GridViewSizing.Split(index); - } else if (size === Sizing.Distribute) { + } else if (size.type === 'distribute') { viewSize = GridViewSizing.Distribute; } else { viewSize = size; @@ -264,7 +279,7 @@ export class Grid extends Disposable { } const location = this.getViewLocation(view); - this.gridview.removeView(location, sizing === Sizing.Distribute ? GridViewSizing.Distribute : undefined); + this.gridview.removeView(location, (sizing && sizing.type === 'distribute') ? GridViewSizing.Distribute : undefined); this.views.delete(view); } @@ -379,6 +394,7 @@ export interface ISerializedLeafNode { type: 'leaf'; data: object | null; size: number; + visible?: boolean; } export interface ISerializedBranchNode { @@ -402,6 +418,10 @@ export class SerializableGrid extends Grid { const size = orientation === Orientation.VERTICAL ? node.box.width : node.box.height; if (!isGridBranchNode(node)) { + if (typeof node.cachedVisibleSize === 'number') { + return { type: 'leaf', data: node.view.toJSON(), size: node.cachedVisibleSize, visible: false }; + } + return { type: 'leaf', data: node.view.toJSON(), size }; } @@ -426,25 +446,26 @@ export class SerializableGrid extends Grid { throw new Error('Invalid JSON: \'size\' property of node must be a number.'); } + const childSize = child.type === 'leaf' && child.visible === false ? 0 : child.size; const childBox: Box = orientation === Orientation.HORIZONTAL - ? { top: box.top, left: box.left + offset, width: child.size, height: box.height } - : { top: box.top + offset, left: box.left, width: box.width, height: child.size }; + ? { top: box.top, left: box.left + offset, width: childSize, height: box.height } + : { top: box.top + offset, left: box.left, width: box.width, height: childSize }; children.push(SerializableGrid.deserializeNode(child, orthogonal(orientation), childBox, deserializer)); - offset += child.size; + offset += childSize; } return { children, box }; } else if (json.type === 'leaf') { const view: T = deserializer.fromJSON(json.data); - return { view, box }; + return { view, box, cachedVisibleSize: json.visible === false ? json.size : undefined }; } throw new Error('Invalid JSON: \'type\' property must be either \'branch\' or \'leaf\'.'); } - private static getFirstLeaf(node: GridNode): GridLeafNode | undefined { + private static getFirstLeaf(node: GridNode): GridLeafNode { if (!isGridBranchNode(node)) { return node; } @@ -473,6 +494,10 @@ export class SerializableGrid extends Grid { throw new Error('Invalid serialized state, first leaf not found'); } + if (typeof firstLeaf.cachedVisibleSize === 'number') { + options = { ...options, firstViewVisibleCachedSize: firstLeaf.cachedVisibleSize }; + } + const result = new SerializableGrid(firstLeaf.view, options); result.orientation = orientation; result.restoreViews(firstLeaf.view, orientation, root); @@ -522,13 +547,16 @@ export class SerializableGrid extends Grid { const firstLeaves = node.children.map(c => SerializableGrid.getFirstLeaf(c)); for (let i = 1; i < firstLeaves.length; i++) { - const size = orientation === Orientation.VERTICAL ? firstLeaves[i]!.box.height : firstLeaves[i]!.box.width; - this.addView(firstLeaves[i]!.view, size, referenceView, direction); - referenceView = firstLeaves[i]!.view; + const node = firstLeaves[i]; + const size: number | InvisibleSizing = typeof node.cachedVisibleSize === 'number' + ? GridViewSizing.Invisible(node.cachedVisibleSize) + : (orientation === Orientation.VERTICAL ? node.box.height : node.box.width); + this.addView(node.view, size, referenceView, direction); + referenceView = node.view; } for (let i = 0; i < node.children.length; i++) { - this.restoreViews(firstLeaves[i]!.view, orthogonal(orientation), node.children[i]); + this.restoreViews(firstLeaves[i].view, orthogonal(orientation), node.children[i]); } } diff --git a/src/vs/base/browser/ui/grid/gridview.ts b/src/vs/base/browser/ui/grid/gridview.ts index 8ce22799e56..3e05e4a9499 100644 --- a/src/vs/base/browser/ui/grid/gridview.ts +++ b/src/vs/base/browser/ui/grid/gridview.ts @@ -47,6 +47,7 @@ export interface Box { export interface GridLeafNode { readonly view: IView; readonly box: Box; + readonly cachedVisibleSize: number | undefined; } export interface GridBranchNode { @@ -343,6 +344,14 @@ class BranchNode implements ISplitView, IDisposable { this.splitview.setViewVisible(index, visible); } + getChildCachedVisibleSize(index: number): number | undefined { + if (index < 0 || index >= this.children.length) { + throw new Error('Invalid index'); + } + + return this.splitview.getViewCachedVisibleSize(index); + } + private onDidChildrenChange(): void { const onDidChildrenChange = Event.map(Event.any(...this.children.map(c => c.onDidChange)), () => undefined); this.childrenChangeDisposable.dispose(); @@ -424,6 +433,9 @@ class LeafNode implements ISplitView, IDisposable { private _size: number = 0; get size(): number { return this._size; } + private _cachedVisibleSize: number | undefined; + get cachedVisibleSize(): number | undefined { return this._cachedVisibleSize; } + private _orthogonalSize: number; get orthogonalSize(): number { return this._orthogonalSize; } @@ -528,6 +540,12 @@ class LeafNode implements ISplitView, IDisposable { } setVisible(visible: boolean): void { + if (visible) { + this._cachedVisibleSize = undefined; + } else { + this._cachedVisibleSize = this._size; + } + if (this.view.setVisible) { this.view.setVisible(visible); } @@ -658,6 +676,14 @@ export class GridView implements IDisposable { } else { const [, grandParent] = tail(pathToParent); const [, parentIndex] = tail(rest); + + let newSiblingSize: number | Sizing = 0; + + const newSiblingCachedVisibleSize = grandParent.getChildCachedVisibleSize(parentIndex); + if (typeof newSiblingCachedVisibleSize === 'number') { + newSiblingSize = Sizing.Invisible(newSiblingCachedVisibleSize); + } + grandParent.removeChild(parentIndex); const newParent = new BranchNode(parent.orientation, this.styles, this.proportionalLayout, parent.size, parent.orthogonalSize); @@ -665,7 +691,7 @@ export class GridView implements IDisposable { newParent.orthogonalLayout(parent.orthogonalSize); const newSibling = new LeafNode(parent.view, grandParent.orientation, parent.size); - newParent.addChild(newSibling, 0, 0); + newParent.addChild(newSibling, newSiblingSize, 0); if (typeof size !== 'number' && size.type === 'split') { size = Sizing.Split(0); @@ -883,7 +909,7 @@ export class GridView implements IDisposable { private _getViews(node: Node, orientation: Orientation, box: Box): GridNode { if (node instanceof LeafNode) { - return { view: node.view, box }; + return { view: node.view, box, cachedVisibleSize: node.cachedVisibleSize }; } const children: GridNode[] = []; diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 7599cc6808d..171a44837c4 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -59,8 +59,11 @@ interface ISashEvent { alt: boolean; } +type ViewItemSize = number | { cachedVisibleSize: number }; + abstract class ViewItem { + private _size: number; set size(size: number) { this._size = size; } @@ -69,10 +72,11 @@ abstract class ViewItem { return this._size; } - private cachedSize: number | undefined = undefined; + private _cachedVisibleSize: number | undefined = undefined; + get cachedVisibleSize(): number | undefined { return this._cachedVisibleSize; } get visible(): boolean { - return typeof this.cachedSize === 'undefined'; + return typeof this._cachedVisibleSize === 'undefined'; } set visible(visible: boolean) { @@ -81,10 +85,10 @@ abstract class ViewItem { } if (visible) { - this.size = this.cachedSize!; - this.cachedSize = undefined; + this.size = clamp(this._cachedVisibleSize!, this.viewMinimumSize, this.viewMaximumSize); + this._cachedVisibleSize = undefined; } else { - this.cachedSize = this.size; + this._cachedVisibleSize = this.size; this.size = 0; } @@ -104,7 +108,20 @@ abstract class ViewItem { get priority(): LayoutPriority | undefined { return this.view.priority; } get snap(): boolean { return !!this.view.snap; } - constructor(protected container: HTMLElement, private view: IView, private _size: number, private disposable: IDisposable) { + constructor( + protected container: HTMLElement, + private view: IView, + size: ViewItemSize, + private disposable: IDisposable + ) { + if (typeof size === 'number') { + this._size = size; + this._cachedVisibleSize = undefined; + } else { + this._size = 0; + this._cachedVisibleSize = size.cachedVisibleSize; + } + dom.addClass(container, 'visible'); } @@ -166,11 +183,13 @@ enum State { export type DistributeSizing = { type: 'distribute' }; export type SplitSizing = { type: 'split', index: number }; -export type Sizing = DistributeSizing | SplitSizing; +export type InvisibleSizing = { type: 'invisible', cachedVisibleSize: number }; +export type Sizing = DistributeSizing | SplitSizing | InvisibleSizing; export namespace Sizing { export const Distribute: DistributeSizing = { type: 'distribute' }; export function Split(index: number): SplitSizing { return { type: 'split', index }; } + export function Invisible(cachedVisibleSize: number): InvisibleSizing { return { type: 'invisible', cachedVisibleSize }; } } export class SplitView extends Disposable { @@ -279,12 +298,14 @@ export class SplitView extends Disposable { const containerDisposable = toDisposable(() => this.viewContainer.removeChild(container)); const disposable = combinedDisposable(onChangeDisposable, containerDisposable); - let viewSize: number; + let viewSize: ViewItemSize; if (typeof size === 'number') { viewSize = size; } else if (size.type === 'split') { viewSize = this.getViewSize(size.index) / 2; + } else if (size.type === 'invisible') { + viewSize = { cachedVisibleSize: size.cachedVisibleSize }; } else { viewSize = view.minimumSize; } @@ -420,6 +441,15 @@ export class SplitView extends Disposable { this.layoutViews(); } + getViewCachedVisibleSize(index: number): number | undefined { + if (index < 0 || index >= this.viewItems.length) { + throw new Error('Index out of bounds'); + } + + const viewItem = this.viewItems[index]; + return viewItem.cachedVisibleSize; + } + layout(size: number): void { const previousSize = Math.max(this.size, this.contentSize); this.size = size; diff --git a/src/vs/base/test/browser/ui/grid/grid.test.ts b/src/vs/base/test/browser/ui/grid/grid.test.ts index 7385b3ca4d6..092f3007082 100644 --- a/src/vs/base/test/browser/ui/grid/grid.test.ts +++ b/src/vs/base/test/browser/ui/grid/grid.test.ts @@ -8,6 +8,15 @@ import { Direction, getRelativeLocation, Orientation, SerializableGrid, ISeriali import { TestView, nodesToArrays } from './util'; import { deepClone } from 'vs/base/common/objects'; +// Simple example: +// +-----+---------------+ +// | 4 | 2 | +// +-----+---------+-----+ +// | 1 | | +// +---------------+ 3 | +// | 5 | | +// +---------------+-----+ + suite('Grid', function () { let container: HTMLElement; @@ -798,4 +807,222 @@ suite('SerializableGrid', function () { height: 1 }); }); + + test('serialize should store visibility and previous size', function () { + const view1 = new TestSerializableView('view1', 50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const grid = new SerializableGrid(view1); + container.appendChild(grid.element); + grid.layout(800, 600); + + const view2 = new TestSerializableView('view2', 50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + grid.addView(view2, 200, view1, Direction.Up); + + const view3 = new TestSerializableView('view3', 50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + grid.addView(view3, 200, view1, Direction.Right); + + const view4 = new TestSerializableView('view4', 50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + grid.addView(view4, 200, view2, Direction.Left); + + const view5 = new TestSerializableView('view5', 50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + grid.addView(view5, 100, view1, Direction.Down); + + assert.deepEqual(view1.size, [600, 300]); + assert.deepEqual(view2.size, [600, 200]); + assert.deepEqual(view3.size, [200, 400]); + assert.deepEqual(view4.size, [200, 200]); + assert.deepEqual(view5.size, [600, 100]); + + grid.setViewVisible(view5, false); + + assert.deepEqual(view1.size, [600, 400]); + assert.deepEqual(view2.size, [600, 200]); + assert.deepEqual(view3.size, [200, 400]); + assert.deepEqual(view4.size, [200, 200]); + assert.deepEqual(view5.size, [600, 0]); + + const json = grid.serialize(); + assert.deepEqual(json, { + orientation: 0, + width: 800, + height: 600, + root: { + type: 'branch', + data: [ + { + type: 'branch', + data: [ + { type: 'leaf', data: { name: 'view4' }, size: 200 }, + { type: 'leaf', data: { name: 'view2' }, size: 600 } + ], + size: 200 + }, + { + type: 'branch', + data: [ + { + type: 'branch', + data: [ + { type: 'leaf', data: { name: 'view1' }, size: 400 }, + { type: 'leaf', data: { name: 'view5' }, size: 100, visible: false } + ], + size: 600 + }, + { type: 'leaf', data: { name: 'view3' }, size: 200 } + ], + size: 400 + } + ], + size: 800 + } + }); + + grid.dispose(); + + const deserializer = new TestViewDeserializer(); + const grid2 = SerializableGrid.deserialize(json, deserializer); + + const view1Copy = deserializer.getView('view1'); + const view2Copy = deserializer.getView('view2'); + const view3Copy = deserializer.getView('view3'); + const view4Copy = deserializer.getView('view4'); + const view5Copy = deserializer.getView('view5'); + + assert.deepEqual(nodesToArrays(grid2.getViews()), [[view4Copy, view2Copy], [[view1Copy, view5Copy], view3Copy]]); + + grid2.layout(800, 600); + assert.deepEqual(view1Copy.size, [600, 400]); + assert.deepEqual(view2Copy.size, [600, 200]); + assert.deepEqual(view3Copy.size, [200, 400]); + assert.deepEqual(view4Copy.size, [200, 200]); + assert.deepEqual(view5Copy.size, [600, 0]); + + assert.deepEqual(grid2.isViewVisible(view1Copy), true); + assert.deepEqual(grid2.isViewVisible(view2Copy), true); + assert.deepEqual(grid2.isViewVisible(view3Copy), true); + assert.deepEqual(grid2.isViewVisible(view4Copy), true); + assert.deepEqual(grid2.isViewVisible(view5Copy), false); + + grid2.setViewVisible(view5Copy, true); + + assert.deepEqual(view1Copy.size, [600, 300]); + assert.deepEqual(view2Copy.size, [600, 200]); + assert.deepEqual(view3Copy.size, [200, 400]); + assert.deepEqual(view4Copy.size, [200, 200]); + assert.deepEqual(view5Copy.size, [600, 100]); + + assert.deepEqual(grid2.isViewVisible(view1Copy), true); + assert.deepEqual(grid2.isViewVisible(view2Copy), true); + assert.deepEqual(grid2.isViewVisible(view3Copy), true); + assert.deepEqual(grid2.isViewVisible(view4Copy), true); + assert.deepEqual(grid2.isViewVisible(view5Copy), true); + }); + + test('serialize should store visibility and previous size even for first leaf', function () { + const view1 = new TestSerializableView('view1', 50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + const grid = new SerializableGrid(view1); + container.appendChild(grid.element); + grid.layout(800, 600); + + const view2 = new TestSerializableView('view2', 50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + grid.addView(view2, 200, view1, Direction.Up); + + const view3 = new TestSerializableView('view3', 50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + grid.addView(view3, 200, view1, Direction.Right); + + const view4 = new TestSerializableView('view4', 50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + grid.addView(view4, 200, view2, Direction.Left); + + const view5 = new TestSerializableView('view5', 50, Number.MAX_VALUE, 50, Number.MAX_VALUE); + grid.addView(view5, 100, view1, Direction.Down); + + assert.deepEqual(view1.size, [600, 300]); + assert.deepEqual(view2.size, [600, 200]); + assert.deepEqual(view3.size, [200, 400]); + assert.deepEqual(view4.size, [200, 200]); + assert.deepEqual(view5.size, [600, 100]); + + grid.setViewVisible(view4, false); + + assert.deepEqual(view1.size, [600, 300]); + assert.deepEqual(view2.size, [800, 200]); + assert.deepEqual(view3.size, [200, 400]); + assert.deepEqual(view4.size, [0, 200]); + assert.deepEqual(view5.size, [600, 100]); + + const json = grid.serialize(); + assert.deepEqual(json, { + orientation: 0, + width: 800, + height: 600, + root: { + type: 'branch', + data: [ + { + type: 'branch', + data: [ + { type: 'leaf', data: { name: 'view4' }, size: 200, visible: false }, + { type: 'leaf', data: { name: 'view2' }, size: 800 } + ], + size: 200 + }, + { + type: 'branch', + data: [ + { + type: 'branch', + data: [ + { type: 'leaf', data: { name: 'view1' }, size: 300 }, + { type: 'leaf', data: { name: 'view5' }, size: 100 } + ], + size: 600 + }, + { type: 'leaf', data: { name: 'view3' }, size: 200 } + ], + size: 400 + } + ], + size: 800 + } + }); + + grid.dispose(); + + const deserializer = new TestViewDeserializer(); + const grid2 = SerializableGrid.deserialize(json, deserializer); + + const view1Copy = deserializer.getView('view1'); + const view2Copy = deserializer.getView('view2'); + const view3Copy = deserializer.getView('view3'); + const view4Copy = deserializer.getView('view4'); + const view5Copy = deserializer.getView('view5'); + + assert.deepEqual(nodesToArrays(grid2.getViews()), [[view4Copy, view2Copy], [[view1Copy, view5Copy], view3Copy]]); + + grid2.layout(800, 600); + assert.deepEqual(view1Copy.size, [600, 300]); + assert.deepEqual(view2Copy.size, [800, 200]); + assert.deepEqual(view3Copy.size, [200, 400]); + assert.deepEqual(view4Copy.size, [0, 200]); + assert.deepEqual(view5Copy.size, [600, 100]); + + assert.deepEqual(grid2.isViewVisible(view1Copy), true); + assert.deepEqual(grid2.isViewVisible(view2Copy), true); + assert.deepEqual(grid2.isViewVisible(view3Copy), true); + assert.deepEqual(grid2.isViewVisible(view4Copy), false); + assert.deepEqual(grid2.isViewVisible(view5Copy), true); + + grid2.setViewVisible(view4Copy, true); + + assert.deepEqual(view1Copy.size, [600, 300]); + assert.deepEqual(view2Copy.size, [600, 200]); + assert.deepEqual(view3Copy.size, [200, 400]); + assert.deepEqual(view4Copy.size, [200, 200]); + assert.deepEqual(view5Copy.size, [600, 100]); + + assert.deepEqual(grid2.isViewVisible(view1Copy), true); + assert.deepEqual(grid2.isViewVisible(view2Copy), true); + assert.deepEqual(grid2.isViewVisible(view3Copy), true); + assert.deepEqual(grid2.isViewVisible(view4Copy), true); + assert.deepEqual(grid2.isViewVisible(view5Copy), true); + }); }); From 8968c83198bad8bb045b5fa7591e4f1668f124f6 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 Jul 2019 17:36:56 +0200 Subject: [PATCH 622/710] remoteAuthority context key: set to disconnected to avoid matches --- .../contrib/remote/electron-browser/remote.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts index 7b6f13e67ef..9f861987bc4 100644 --- a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts +++ b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts @@ -119,7 +119,7 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc if (this.disconnected !== isDisconnected) { this.disconnected = isDisconnected; RemoteConnectionState.bindTo(this.contextKeyService).set(isDisconnected ? 'disconnected' : 'connected'); - Deprecated_RemoteAuthorityContext.bindTo(this.contextKeyService).set(isDisconnected ? '' : this.remoteAuthority || ''); + Deprecated_RemoteAuthorityContext.bindTo(this.contextKeyService).set(isDisconnected ? '' : this.remoteAuthority || `disconnected/${this.remoteAuthority}`); this.updateWindowIndicator(); } } From 89afd3fe5e5940dea589ad77856fb4e872d9766c Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 Jul 2019 17:38:36 +0200 Subject: [PATCH 623/710] update html service. FIxes #77792 --- .../server/package.json | 6 ++--- .../server/src/utils/documentContext.ts | 7 ++++- .../html-language-features/server/yarn.lock | 27 ++++++++++--------- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/extensions/html-language-features/server/package.json b/extensions/html-language-features/server/package.json index e97a42ab0a6..087fbaec82b 100644 --- a/extensions/html-language-features/server/package.json +++ b/extensions/html-language-features/server/package.json @@ -9,12 +9,12 @@ }, "main": "./out/htmlServerMain", "dependencies": { - "vscode-css-languageservice": "^4.0.2", - "vscode-html-languageservice": "^3.0.0", + "vscode-css-languageservice": "^4.0.3-next.0", + "vscode-html-languageservice": "^3.0.3", "vscode-languageserver": "^5.3.0-next.8", "vscode-languageserver-types": "3.15.0-next.2", "vscode-nls": "^4.1.1", - "vscode-uri": "^2.0.1" + "vscode-uri": "^2.0.3" }, "devDependencies": { "@types/mocha": "2.2.33", diff --git a/extensions/html-language-features/server/src/utils/documentContext.ts b/extensions/html-language-features/server/src/utils/documentContext.ts index bfd26d1aa8d..71f9a3591be 100644 --- a/extensions/html-language-features/server/src/utils/documentContext.ts +++ b/extensions/html-language-features/server/src/utils/documentContext.ts @@ -32,7 +32,12 @@ export function getDocumentContext(documentUri: string, workspaceFolders: Worksp } } } - return url.resolve(base, ref); + try { + return url.resolve(base, ref); + } catch { + return undefined; + } + }, }; } diff --git a/extensions/html-language-features/server/yarn.lock b/extensions/html-language-features/server/yarn.lock index 8c532e3136f..c386ce0bbb9 100644 --- a/extensions/html-language-features/server/yarn.lock +++ b/extensions/html-language-features/server/yarn.lock @@ -229,22 +229,23 @@ supports-color@5.4.0: dependencies: has-flag "^3.0.0" -vscode-css-languageservice@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.2.tgz#7496e538b0c151feac16d5888cc0b1b104f4c736" - integrity sha512-pTnfXbsME3pl+yDfhUp/mtvPyIJk0Le4zqJxDn56s9GY9LqY0RmkSEh0oHH6D0HXR3Ni6wKosIaqu8a2G0+jdw== +vscode-css-languageservice@^4.0.3-next.0: + version "4.0.3-next.0" + resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.0.tgz#ba96894cf2a0c86c744a1274590f27e55ea60f58" + integrity sha512-ku58Y5jDFNfDicv2AAhgu1edgfGcRZPwlKu6EBK2ck/O/Vco7Zy64FDoClJghcYBhJiDs7sy2q/UtQD0IoGbRw== dependencies: vscode-languageserver-types "^3.15.0-next.2" vscode-nls "^4.1.1" + vscode-uri "^2.0.3" -vscode-html-languageservice@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-3.0.0.tgz#b9649aa0713d68665d7546bd3772dd10e4dbe200" - integrity sha512-AgNyjaYrmgundh5gXP0bqCLeLdfUTyvNafF1moNwYdqeNh6DIpMG6RjwYwgtNChXSsVGXnaHiwGMtAUwMxkQUQ== +vscode-html-languageservice@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-3.0.3.tgz#0aeae18a59000e317447ea34965f72680a2140ef" + integrity sha512-U+upM3gHp3HaF3wXAnUduA6IDKcz6frWS/dTAju3cZVIyZwOLBBFElQVlLH0ycHyMzqUFrjvdv+kEyPAEWfQ/g== dependencies: vscode-languageserver-types "^3.15.0-next.2" vscode-nls "^4.1.1" - vscode-uri "^2.0.1" + vscode-uri "^2.0.3" vscode-jsonrpc@^4.1.0-next.2: version "4.1.0-next.2" @@ -288,10 +289,10 @@ vscode-uri@^1.0.6: resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-1.0.6.tgz#6b8f141b0bbc44ad7b07e94f82f168ac7608ad4d" integrity sha512-sLI2L0uGov3wKVb9EB+vIQBl9tVP90nqRvxSoJ35vI3NjxE8jfsE5DSOhWgSunHSZmKS4OCi2jrtfxK7uyp2ww== -vscode-uri@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.0.1.tgz#5448e4f77d21d93ffa34b96f84c6c5e09e3f5a9b" - integrity sha512-s/k0zsYr6y+tsocFyxT/+G5aq8mEdpDZuph3LZ+UmCs7LNhx/xomiCy5kyP+jOAKC7RMCUvb6JbPD1/TgAvq0g== +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== wrappy@1: version "1.0.2" From 81380bb822effd42006764f81ffaabeff4745009 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 Jul 2019 18:32:56 +0200 Subject: [PATCH 624/710] register selectionRangeProviders --- extensions/css-language-features/server/src/cssServerMain.ts | 3 ++- extensions/html-language-features/server/src/htmlServerMain.ts | 3 ++- extensions/json-language-features/server/src/jsonServerMain.ts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/css-language-features/server/src/cssServerMain.ts b/extensions/css-language-features/server/src/cssServerMain.ts index 884306d299a..f762bde09c4 100644 --- a/extensions/css-language-features/server/src/cssServerMain.ts +++ b/extensions/css-language-features/server/src/cssServerMain.ts @@ -140,7 +140,8 @@ connection.onInitialize((params: InitializeParams): InitializeResult => { codeActionProvider: true, renameProvider: true, colorProvider: {}, - foldingRangeProvider: true + foldingRangeProvider: true, + selectionRangeProvider: true }; return { capabilities }; }); diff --git a/extensions/html-language-features/server/src/htmlServerMain.ts b/extensions/html-language-features/server/src/htmlServerMain.ts index 6eb8fc298fe..7ca71d16760 100644 --- a/extensions/html-language-features/server/src/htmlServerMain.ts +++ b/extensions/html-language-features/server/src/htmlServerMain.ts @@ -135,7 +135,8 @@ connection.onInitialize((params: InitializeParams): InitializeResult => { signatureHelpProvider: { triggerCharacters: ['('] }, referencesProvider: true, colorProvider: {}, - foldingRangeProvider: true + foldingRangeProvider: true, + selectionRangeProvider: true }; return { capabilities }; }); diff --git a/extensions/json-language-features/server/src/jsonServerMain.ts b/extensions/json-language-features/server/src/jsonServerMain.ts index 699e73a9c91..27e29a96764 100644 --- a/extensions/json-language-features/server/src/jsonServerMain.ts +++ b/extensions/json-language-features/server/src/jsonServerMain.ts @@ -154,7 +154,8 @@ connection.onInitialize((params: InitializeParams): InitializeResult => { documentSymbolProvider: true, documentRangeFormattingProvider: false, colorProvider: {}, - foldingRangeProvider: true + foldingRangeProvider: true, + selectionRangeProvider: true }; return { capabilities }; From 3b5ee24ca3e3eaf12d730a5ac9dd72f3669aa954 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 Jul 2019 18:33:12 +0200 Subject: [PATCH 625/710] [json] update vscode-uri --- extensions/json-language-features/server/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/json-language-features/server/package.json b/extensions/json-language-features/server/package.json index 061cb69249a..68e6a005537 100644 --- a/extensions/json-language-features/server/package.json +++ b/extensions/json-language-features/server/package.json @@ -17,7 +17,7 @@ "vscode-json-languageservice": "^3.3.0", "vscode-languageserver": "^5.3.0-next.8", "vscode-nls": "^4.1.1", - "vscode-uri": "^2.0.1" + "vscode-uri": "^2.0.3" }, "devDependencies": { "@types/mocha": "2.2.33", From 9d8d0841292544241827a51d44aa88fbbde85cf2 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 25 Jul 2019 19:05:39 +0200 Subject: [PATCH 626/710] properly use default terminal for debug; fixes #77110 --- .../api/browser/mainThreadDebugService.ts | 6 +-- .../workbench/api/common/extHost.protocol.ts | 4 +- .../workbench/api/node/extHostDebugService.ts | 13 ++++--- .../browser/debugConfigurationManager.ts | 6 +-- .../workbench/contrib/debug/common/debug.ts | 11 +----- .../contrib/debug/common/debugger.ts | 5 +-- .../workbench/contrib/debug/node/terminals.ts | 38 ++++++++++--------- 7 files changed, 40 insertions(+), 43 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadDebugService.ts b/src/vs/workbench/api/browser/mainThreadDebugService.ts index 7386b69e611..85039369466 100644 --- a/src/vs/workbench/api/browser/mainThreadDebugService.ts +++ b/src/vs/workbench/api/browser/mainThreadDebugService.ts @@ -5,7 +5,7 @@ import { DisposableStore } from 'vs/base/common/lifecycle'; import { URI as uri } from 'vs/base/common/uri'; -import { IDebugService, IConfig, IDebugConfigurationProvider, IBreakpoint, IFunctionBreakpoint, IBreakpointData, ITerminalSettings, IDebugAdapter, IDebugAdapterDescriptorFactory, IDebugSession, IDebugAdapterFactory } from 'vs/workbench/contrib/debug/common/debug'; +import { IDebugService, IConfig, IDebugConfigurationProvider, IBreakpoint, IFunctionBreakpoint, IBreakpointData, IDebugAdapter, IDebugAdapterDescriptorFactory, IDebugSession, IDebugAdapterFactory } from 'vs/workbench/contrib/debug/common/debug'; import { ExtHostContext, ExtHostDebugServiceShape, MainThreadDebugServiceShape, DebugSessionUUID, MainContext, IExtHostContext, IBreakpointsDeltaDto, ISourceMultiBreakpointDto, ISourceBreakpointDto, IFunctionBreakpointDto, IDebugSessionDto @@ -71,8 +71,8 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb return Promise.resolve(this._proxy.$substituteVariables(folder ? folder.uri : undefined, config)); } - runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): Promise { - return Promise.resolve(this._proxy.$runInTerminal(args, config)); + runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments): Promise { + return Promise.resolve(this._proxy.$runInTerminal(args)); } // RPC methods (MainThreadDebugServiceShape) diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index ad32f5f43f1..f8d565df56c 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -40,7 +40,7 @@ import { EditorViewColumn } from 'vs/workbench/api/common/shared/editor'; import * as tasks from 'vs/workbench/api/common/shared/tasks'; import { IRevealOptions, ITreeItem } from 'vs/workbench/common/views'; import * as callHierarchy from 'vs/workbench/contrib/callHierarchy/common/callHierarchy'; -import { IAdapterDescriptor, IConfig, ITerminalSettings } from 'vs/workbench/contrib/debug/common/debug'; +import { IAdapterDescriptor, IConfig } from 'vs/workbench/contrib/debug/common/debug'; import { ITextQueryBuilderOptions } from 'vs/workbench/contrib/search/common/queryBuilder'; import { ITerminalDimensions, IShellLaunchConfig } from 'vs/workbench/contrib/terminal/common/terminal'; import { ExtensionActivationError } from 'vs/workbench/services/extensions/common/extensions'; @@ -1245,7 +1245,7 @@ export type IDebugSessionDto = IDebugSessionFullDto | DebugSessionUUID; export interface ExtHostDebugServiceShape { $substituteVariables(folder: UriComponents | undefined, config: IConfig): Promise; - $runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): Promise; + $runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments): Promise; $startDASession(handle: number, session: IDebugSessionDto): Promise; $stopDASession(handle: number): Promise; $sendDAMessage(handle: number, message: DebugProtocol.ProtocolMessage): void; diff --git a/src/vs/workbench/api/node/extHostDebugService.ts b/src/vs/workbench/api/node/extHostDebugService.ts index e5b2a445ec3..d9172447d73 100644 --- a/src/vs/workbench/api/node/extHostDebugService.ts +++ b/src/vs/workbench/api/node/extHostDebugService.ts @@ -20,7 +20,7 @@ import { AbstractDebugAdapter } from 'vs/workbench/contrib/debug/common/abstract import { IExtHostWorkspaceProvider } from 'vs/workbench/api/common/extHostWorkspace'; import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService'; import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors'; -import { ITerminalSettings, IDebuggerContribution, IConfig, IDebugAdapter, IDebugAdapterServer, IDebugAdapterExecutable, IAdapterDescriptor } from 'vs/workbench/contrib/debug/common/debug'; +import { IDebuggerContribution, IConfig, IDebugAdapter, IDebugAdapterServer, IDebugAdapterExecutable, IAdapterDescriptor } from 'vs/workbench/contrib/debug/common/debug'; import { hasChildProcesses, prepareCommand, runInExternalTerminal } from 'vs/workbench/contrib/debug/node/terminals'; import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; import { AbstractVariableResolverService } from 'vs/workbench/services/configurationResolver/common/variableResolver'; @@ -318,7 +318,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { // RPC methods (ExtHostDebugServiceShape) - public $runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): Promise { + public async $runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments): Promise { if (args.kind === 'integrated') { @@ -350,9 +350,12 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { terminal.show(); - return this._integratedTerminalInstance.processId.then(shellProcessId => { + return this._integratedTerminalInstance.processId.then(async shellProcessId => { + + const configProvider = await this._configurationService.getConfigProvider(); + const shell = this._terminalService.getDefaultShell(configProvider); + const command = prepareCommand(args, shell, configProvider); - const command = prepareCommand(args, config); terminal.sendText(command, true); return shellProcessId; @@ -361,7 +364,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { } else if (args.kind === 'external') { - runInExternalTerminal(args, config); + runInExternalTerminal(args, await this._configurationService.getConfigProvider()); } return Promise.resolve(undefined); } diff --git a/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts b/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts index 82be95aef9b..df8a68cbc67 100644 --- a/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts +++ b/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts @@ -21,7 +21,7 @@ import { IFileService } from 'vs/platform/files/common/files'; import { IWorkspaceContextService, IWorkspaceFolder, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ICommandService } from 'vs/platform/commands/common/commands'; -import { IDebugConfigurationProvider, ICompound, IDebugConfiguration, IConfig, IGlobalConfig, IConfigurationManager, ILaunch, IDebugAdapterDescriptorFactory, IDebugAdapter, ITerminalSettings, IDebugSession, IAdapterDescriptor, CONTEXT_DEBUG_CONFIGURATION_TYPE, IDebugAdapterFactory, IDebugService } from 'vs/workbench/contrib/debug/common/debug'; +import { IDebugConfigurationProvider, ICompound, IDebugConfiguration, IConfig, IGlobalConfig, IConfigurationManager, ILaunch, IDebugAdapterDescriptorFactory, IDebugAdapter, IDebugSession, IAdapterDescriptor, CONTEXT_DEBUG_CONFIGURATION_TYPE, IDebugAdapterFactory, IDebugService } from 'vs/workbench/contrib/debug/common/debug'; import { Debugger } from 'vs/workbench/contrib/debug/common/debugger'; import { IEditorService, ACTIVE_GROUP, SIDE_GROUP } from 'vs/workbench/services/editor/common/editorService'; import { isCodeEditor } from 'vs/editor/browser/editorBrowser'; @@ -108,10 +108,10 @@ export class ConfigurationManager implements IConfigurationManager { return Promise.resolve(config); } - runInTerminal(debugType: string, args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): Promise { + runInTerminal(debugType: string, args: DebugProtocol.RunInTerminalRequestArguments): Promise { let tl = this.debugAdapterFactories.get(debugType); if (tl) { - return tl.runInTerminal(args, config); + return tl.runInTerminal(args); } return Promise.resolve(void 0); } diff --git a/src/vs/workbench/contrib/debug/common/debug.ts b/src/vs/workbench/contrib/debug/common/debug.ts index 363f6eeb346..1ac7b96593d 100644 --- a/src/vs/workbench/contrib/debug/common/debug.ts +++ b/src/vs/workbench/contrib/debug/common/debug.ts @@ -24,9 +24,7 @@ import { IViewContainersRegistry, ViewContainer, Extensions as ViewContainerExte import { Registry } from 'vs/platform/registry/common/platform'; import { TaskIdentifier } from 'vs/workbench/contrib/tasks/common/tasks'; import { TelemetryService } from 'vs/platform/telemetry/common/telemetryService'; -import { ITerminalConfiguration } from 'vs/workbench/contrib/terminal/common/terminal'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IExternalTerminalSettings } from 'vs/workbench/contrib/externalTerminal/common/externalTerminal'; export const VIEWLET_ID = 'workbench.view.debug'; export const VIEW_CONTAINER: ViewContainer = Registry.as(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer(VIEWLET_ID); @@ -573,12 +571,7 @@ export interface IDebugAdapterTrackerFactory { } export interface ITerminalLauncher { - runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): Promise; -} - -export interface ITerminalSettings { - external: IExternalTerminalSettings; - integrated: ITerminalConfiguration; + runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments): Promise; } export interface IConfigurationManager { @@ -623,7 +616,7 @@ export interface IConfigurationManager { createDebugAdapter(session: IDebugSession): IDebugAdapter | undefined; substituteVariables(debugType: string, folder: IWorkspaceFolder | undefined, config: IConfig): Promise; - runInTerminal(debugType: string, args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): Promise; + runInTerminal(debugType: string, args: DebugProtocol.RunInTerminalRequestArguments): Promise; } export interface ILaunch { diff --git a/src/vs/workbench/contrib/debug/common/debugger.ts b/src/vs/workbench/contrib/debug/common/debugger.ts index 4034a6c9596..8f317ccc138 100644 --- a/src/vs/workbench/contrib/debug/common/debugger.ts +++ b/src/vs/workbench/contrib/debug/common/debugger.ts @@ -9,7 +9,7 @@ import * as objects from 'vs/base/common/objects'; import { isObject } from 'vs/base/common/types'; import { IJSONSchema, IJSONSchemaSnippet } from 'vs/base/common/jsonSchema'; import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; -import { IConfig, IDebuggerContribution, INTERNAL_CONSOLE_OPTIONS_SCHEMA, IConfigurationManager, IDebugAdapter, ITerminalSettings, IDebugger, IDebugSession, IDebugHelperService } from 'vs/workbench/contrib/debug/common/debug'; +import { IConfig, IDebuggerContribution, INTERNAL_CONSOLE_OPTIONS_SCHEMA, IConfigurationManager, IDebugAdapter, IDebugger, IDebugSession, IDebugHelperService } from 'vs/workbench/contrib/debug/common/debug'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationResolverService } from 'vs/workbench/services/configurationResolver/common/configurationResolver'; import * as ConfigurationResolverUtils from 'vs/workbench/services/configurationResolver/common/configurationResolverUtils'; @@ -108,8 +108,7 @@ export class Debugger implements IDebugger { } runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments): Promise { - const config = this.configurationService.getValue('terminal'); - return this.configurationManager.runInTerminal(this.type, args, config); + return this.configurationManager.runInTerminal(this.type, args); } get label(): string { diff --git a/src/vs/workbench/contrib/debug/node/terminals.ts b/src/vs/workbench/contrib/debug/node/terminals.ts index 6f173a4864f..7813de75b26 100644 --- a/src/vs/workbench/contrib/debug/node/terminals.ts +++ b/src/vs/workbench/contrib/debug/node/terminals.ts @@ -5,15 +5,15 @@ import * as cp from 'child_process'; import * as env from 'vs/base/common/platform'; -import { ITerminalSettings } from 'vs/workbench/contrib/debug/common/debug'; import { getSystemShell } from 'vs/workbench/contrib/terminal/node/terminal'; import { WindowsExternalTerminalService, MacExternalTerminalService, LinuxExternalTerminalService } from 'vs/workbench/contrib/externalTerminal/node/externalTerminalService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IExternalTerminalService } from 'vs/workbench/contrib/externalTerminal/common/externalTerminal'; +import { ExtHostConfigProvider } from 'vs/workbench/api/common/extHostConfiguration'; let externalTerminalService: IExternalTerminalService | undefined = undefined; -export function runInExternalTerminal(args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): void { +export function runInExternalTerminal(args: DebugProtocol.RunInTerminalRequestArguments, configProvider: ExtHostConfigProvider): void { if (!externalTerminalService) { if (env.isWindows) { externalTerminalService = new WindowsExternalTerminalService(undefined); @@ -24,6 +24,7 @@ export function runInExternalTerminal(args: DebugProtocol.RunInTerminalRequestAr } } if (externalTerminalService) { + const config = configProvider.getConfiguration('terminal'); externalTerminalService.runInTerminal(args.title!, args.cwd, args.args, args.env || {}, config.external || {}); } } @@ -60,24 +61,25 @@ export function hasChildProcesses(processId: number): boolean { const enum ShellType { cmd, powershell, bash } -export function prepareCommand(args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): string { +export function prepareCommand(args: DebugProtocol.RunInTerminalRequestArguments, shell: string, configProvider: ExtHostConfigProvider): string { - let shellType: ShellType; + let shellType = env.isWindows ? ShellType.cmd : ShellType.bash; // pick a good default - // get the shell configuration for the current platform - let shell: string; - const shell_config = config.integrated.shell; - if (env.isWindows) { - shell = shell_config.windows || getSystemShell(env.Platform.Windows); - shellType = ShellType.cmd; - } else if (env.isLinux) { - shell = shell_config.linux || getSystemShell(env.Platform.Linux); - shellType = ShellType.bash; - } else if (env.isMacintosh) { - shell = shell_config.osx || getSystemShell(env.Platform.Mac); - shellType = ShellType.bash; - } else { - throw new Error('Unknown platform'); + if (shell) { + + const config = configProvider.getConfiguration('terminal'); + + // get the shell configuration for the current platform + const shell_config = config.integrated.shell; + if (env.isWindows) { + shell = shell_config.windows || getSystemShell(env.Platform.Windows); + } else if (env.isLinux) { + shell = shell_config.linux || getSystemShell(env.Platform.Linux); + } else if (env.isMacintosh) { + shell = shell_config.osx || getSystemShell(env.Platform.Mac); + } else { + throw new Error('Unknown platform'); + } } // try to determine the shell type From a8b0169f94b4a162ddc4065cdaec7ecd412fe29f Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 Jul 2019 11:02:15 -0700 Subject: [PATCH 627/710] xterm@3.15.0-beta88, xterm-addon-search@0.2.0-beta3 Diff: https://github.com/xtermjs/xterm.js/compare/52c562d...378982a Changes: - Cancel events when not in screeReaderMode - Search addon behavior change + tests Related #77891 Fixes #77945 --- package.json | 4 ++-- remote/package.json | 4 ++-- remote/yarn.lock | 16 ++++++++-------- yarn.lock | 16 ++++++++-------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index cf653c43d08..6ef1d2f25a7 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,8 @@ "vscode-ripgrep": "^1.5.5", "vscode-sqlite3": "4.0.8", "vscode-textmate": "^4.2.2", - "xterm": "3.15.0-beta87", - "xterm-addon-search": "0.2.0-beta2", + "xterm": "3.15.0-beta88", + "xterm-addon-search": "0.2.0-beta3", "xterm-addon-web-links": "0.1.0-beta10", "yauzl": "^2.9.2", "yazl": "^2.4.3" diff --git a/remote/package.json b/remote/package.json index 081eb5c6076..ccb412ef358 100644 --- a/remote/package.json +++ b/remote/package.json @@ -20,8 +20,8 @@ "vscode-proxy-agent": "0.4.0", "vscode-ripgrep": "^1.5.5", "vscode-textmate": "^4.2.2", - "xterm": "3.15.0-beta71", - "xterm-addon-search": "0.2.0-beta2", + "xterm": "3.15.0-beta88", + "xterm-addon-search": "0.2.0-beta3", "xterm-addon-web-links": "0.1.0-beta10", "yauzl": "^2.9.2", "yazl": "^2.4.3" diff --git a/remote/yarn.lock b/remote/yarn.lock index 3ed8f02de3c..b5077ce87a4 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -1149,20 +1149,20 @@ vscode-windows-registry@1.0.1: dependencies: nan "^2.12.1" -xterm-addon-search@0.2.0-beta2: - version "0.2.0-beta2" - resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.2.0-beta2.tgz#c3173f0a6f207ee9f1848849174ee5d6b6ce8262" - integrity sha512-XEcwi2TeFGk2MuIFjiI/OpVXSNO5dGQBvHH3o+9KzqG3ooVqhhDqzwxs092QGNcNCGh8hGn/PWZiczaBBnKm/g== +xterm-addon-search@0.2.0-beta3: + version "0.2.0-beta3" + resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.2.0-beta3.tgz#710ce14658e269c5a4791f5a9e2f520883a2e62b" + integrity sha512-KzVdkEtGbKJe9ER2TmrI7XjF/wUq1lir9U63vPJi0t2ymQvIECl1V63f9QtOp1vvpdhbZiXBxO+vGTj+y0tRow== xterm-addon-web-links@0.1.0-beta10: version "0.1.0-beta10" resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.1.0-beta10.tgz#610fa9773a2a5ccd41c1c83ba0e2dd2c9eb66a23" integrity sha512-xfpjy0V6bB4BR44qIgZQPoCMVakxb65gMscPkHpO//QxvUxKzabV3dxOsIbeZRFkUGsWTFlvz2OoaBLoNtv5gg== -xterm@3.15.0-beta71: - version "3.15.0-beta71" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta71.tgz#2728c9800ca3b08423e835e9504bd1f4b5de6253" - integrity sha512-8M/cLaxZ+iDopRxLPdPfKuDGaNNyYTdCeytdxjMSH0N7dZzbx6fbaEygQdCrV5pO9cGnT92MefSjVPGRXRiBLA== +xterm@3.15.0-beta88: + version "3.15.0-beta88" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta88.tgz#9a1c8d8a869517a4a8f103426fe0a89473455aa4" + integrity sha512-4nWNf4AbeoTRyOrhmWah9tZTXRepNo4uxzXdGskBWC9dAtItjD6ShNgi5z+xuVB4NmKoDp1b8rWNNMJ1I6/TLA== yauzl@^2.9.2: version "2.10.0" diff --git a/yarn.lock b/yarn.lock index ce4535f34c8..700e0195f87 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9862,20 +9862,20 @@ xtend@~2.1.1: dependencies: object-keys "~0.4.0" -xterm-addon-search@0.2.0-beta2: - version "0.2.0-beta2" - resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.2.0-beta2.tgz#c3173f0a6f207ee9f1848849174ee5d6b6ce8262" - integrity sha512-XEcwi2TeFGk2MuIFjiI/OpVXSNO5dGQBvHH3o+9KzqG3ooVqhhDqzwxs092QGNcNCGh8hGn/PWZiczaBBnKm/g== +xterm-addon-search@0.2.0-beta3: + version "0.2.0-beta3" + resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.2.0-beta3.tgz#710ce14658e269c5a4791f5a9e2f520883a2e62b" + integrity sha512-KzVdkEtGbKJe9ER2TmrI7XjF/wUq1lir9U63vPJi0t2ymQvIECl1V63f9QtOp1vvpdhbZiXBxO+vGTj+y0tRow== xterm-addon-web-links@0.1.0-beta10: version "0.1.0-beta10" resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.1.0-beta10.tgz#610fa9773a2a5ccd41c1c83ba0e2dd2c9eb66a23" integrity sha512-xfpjy0V6bB4BR44qIgZQPoCMVakxb65gMscPkHpO//QxvUxKzabV3dxOsIbeZRFkUGsWTFlvz2OoaBLoNtv5gg== -xterm@3.15.0-beta87: - version "3.15.0-beta87" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta87.tgz#d04af8d89f1f2c6c1d1580960653c32b2cc344e9" - integrity sha512-9HdgqnWCoEErvhk2Q0flDSlpAOnd4o+qe4+GeN6EwzKWPVdm1aNYLwdmeaOKAjZZfE+wchGu+HaslSRwfyu5yg== +xterm@3.15.0-beta88: + version "3.15.0-beta88" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta88.tgz#9a1c8d8a869517a4a8f103426fe0a89473455aa4" + integrity sha512-4nWNf4AbeoTRyOrhmWah9tZTXRepNo4uxzXdGskBWC9dAtItjD6ShNgi5z+xuVB4NmKoDp1b8rWNNMJ1I6/TLA== y18n@^3.2.1: version "3.2.1" From ee1a5ab1458475a55b42b7e983c5c7f0e1554f51 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 25 Jul 2019 11:25:53 -0700 Subject: [PATCH 628/710] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6ef1d2f25a7..eee312cd134 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "13a988e218df227b97e810eb49a1a0982bfed00d", + "distro": "60ca9cac46049ff774e34d11e335d172587da608", "author": { "name": "Microsoft Corporation" }, From fb810784a67c8b673fc6f28195df91ddddb31fc8 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 25 Jul 2019 11:27:39 -0700 Subject: [PATCH 629/710] revert #59193. --- src/vs/editor/contrib/clipboard/clipboard.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/vs/editor/contrib/clipboard/clipboard.ts b/src/vs/editor/contrib/clipboard/clipboard.ts index 102f1b019dc..c0929f47d00 100644 --- a/src/vs/editor/contrib/clipboard/clipboard.ts +++ b/src/vs/editor/contrib/clipboard/clipboard.ts @@ -148,12 +148,6 @@ class ExecCommandCopyAction extends ExecCommandAction { if (!emptySelectionClipboard && editor.getSelection().isEmpty()) { return; } - // Prevent copying an empty line by accident - if (editor.getSelections().length === 1 && editor.getSelection().isEmpty()) { - if (editor.getModel().getLineFirstNonWhitespaceColumn(editor.getSelection().positionLineNumber) === 0) { - return; - } - } super.run(accessor, editor); } From 79bf9fd27b977aef21616bc4b8b33df5582f8357 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 25 Jul 2019 11:47:57 -0700 Subject: [PATCH 630/710] Make sure we use a consistent name for portMappings field --- .../workbench/contrib/webview/browser/webviewEditorService.ts | 2 +- src/vs/workbench/contrib/webview/browser/webviewElement.ts | 2 +- src/vs/workbench/contrib/webview/common/webview.ts | 2 +- .../contrib/webview/electron-browser/webviewElement.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts index 49d8bcc11cd..e81418df66a 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts @@ -90,7 +90,7 @@ export function areWebviewInputOptionsEqual(a: WebviewInputOptions, b: WebviewIn && a.retainContextWhenHidden === b.retainContextWhenHidden && a.tryRestoreScrollPosition === b.tryRestoreScrollPosition && (a.localResourceRoots === b.localResourceRoots || (Array.isArray(a.localResourceRoots) && Array.isArray(b.localResourceRoots) && equals(a.localResourceRoots, b.localResourceRoots, (a, b) => a.toString() === b.toString()))) - && (a.portMappings === b.portMappings || (Array.isArray(a.portMappings) && Array.isArray(b.portMappings) && equals(a.portMappings, b.portMappings, (a, b) => a.extensionHostPort === b.extensionHostPort && a.webviewPort === b.webviewPort))); + && (a.portMapping === b.portMapping || (Array.isArray(a.portMapping) && Array.isArray(b.portMapping) && equals(a.portMapping, b.portMapping, (a, b) => a.extensionHostPort === b.extensionHostPort && a.webviewPort === b.webviewPort))); } function canRevive(reviver: WebviewReviver, webview: WebviewEditorInput): boolean { diff --git a/src/vs/workbench/contrib/webview/browser/webviewElement.ts b/src/vs/workbench/contrib/webview/browser/webviewElement.ts index 5e5df2a02cf..aa4473313d4 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewElement.ts @@ -53,7 +53,7 @@ export class IFrameWebview extends Disposable implements Webview { this._portMappingManager = this._register(new WebviewPortMappingManager( this._options.extension ? this._options.extension.location : undefined, - () => this.content.options.portMappings || [], + () => this.content.options.portMapping || [], tunnelService )); diff --git a/src/vs/workbench/contrib/webview/common/webview.ts b/src/vs/workbench/contrib/webview/common/webview.ts index 8d81b487a5a..d6a73ff5d61 100644 --- a/src/vs/workbench/contrib/webview/common/webview.ts +++ b/src/vs/workbench/contrib/webview/common/webview.ts @@ -55,7 +55,7 @@ export interface WebviewContentOptions { readonly allowScripts?: boolean; readonly svgWhiteList?: string[]; readonly localResourceRoots?: ReadonlyArray; - readonly portMappings?: ReadonlyArray; + readonly portMapping?: ReadonlyArray; readonly enableCommandUris?: boolean; } diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts index e42e1a4b401..3c030feb235 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts @@ -327,7 +327,7 @@ export class ElectronWebviewBasedWebview extends Disposable implements Webview { this._register(new WebviewPortMappingProvider( session, _options.extension ? _options.extension.location : undefined, - () => (this.content.options.portMappings || []), + () => (this.content.options.portMapping || []), tunnelService, )); From 065aa24d3567740e078f53dfa9b01a3842f5e3dc Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 25 Jul 2019 11:48:29 -0700 Subject: [PATCH 631/710] Update monaco build recipt. --- build/monaco/monaco.usage.recipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/monaco/monaco.usage.recipe b/build/monaco/monaco.usage.recipe index 13290a7abb5..f1a74a25e30 100644 --- a/build/monaco/monaco.usage.recipe +++ b/build/monaco/monaco.usage.recipe @@ -30,7 +30,7 @@ import * as editorAPI from './vs/editor/editor.api'; a = (>b).type; a = (b).start; a = (b).end; - a = (>b).getProxyObject; // IWorkerClient + a = (>b).getProxyObject; // IWorkerClient a = create1; a = create2; a = (b).extensionId; From 076c45be1adeca25374d67fa32f9c2567aaa8f46 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 25 Jul 2019 10:57:20 -0700 Subject: [PATCH 632/710] Update sytles for replace input boxes --- src/vs/editor/contrib/find/findModel.ts | 8 +++++--- src/vs/editor/contrib/find/findWidget.ts | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/find/findModel.ts b/src/vs/editor/contrib/find/findModel.ts index 56fa23cf1b0..1600655f6c3 100644 --- a/src/vs/editor/contrib/find/findModel.ts +++ b/src/vs/editor/contrib/find/findModel.ts @@ -483,12 +483,14 @@ export class FindModelBoundToEditorModel { const replacePattern = this._getReplacePattern(); let resultText: string; + const preserveCase = this._state.preserveCase; + if (replacePattern.hasReplacementPatterns) { resultText = modelText.replace(searchRegex, function () { - return replacePattern.buildReplaceString(arguments); + return replacePattern.buildReplaceString(arguments, preserveCase); }); } else { - resultText = modelText.replace(searchRegex, replacePattern.buildReplaceString(null)); + resultText = modelText.replace(searchRegex, replacePattern.buildReplaceString(null, preserveCase)); } let command = new ReplaceCommandThatPreservesSelection(fullModelRange, resultText, this._editor.getSelection()); @@ -502,7 +504,7 @@ export class FindModelBoundToEditorModel { let replaceStrings: string[] = []; for (let i = 0, len = matches.length; i < len; i++) { - replaceStrings[i] = replacePattern.buildReplaceString(matches[i].matches); + replaceStrings[i] = replacePattern.buildReplaceString(matches[i].matches, this._state.preserveCase); } let command = new ReplaceAllCommand(this._editor.getSelection(), matches.map(m => m.range), replaceStrings); diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index e06de65d099..3b667c3e2d2 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -593,6 +593,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas }; this._findInput.style(inputStyles); this._replaceInputBox.style(inputStyles); + this._preserveCase.style(inputStyles); } private _tryUpdateWidgetWidth() { From 6157007341589c334ce771cbbe453c18142c7bce Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 25 Jul 2019 22:24:02 +0200 Subject: [PATCH 633/710] Only overtype automatically inserted characters (fixes #37315) --- src/vs/base/browser/browser.ts | 2 +- src/vs/editor/browser/widget/media/editor.css | 6 +- src/vs/editor/common/controller/cursor.ts | 124 +++++++++++++++++- .../common/controller/cursorTypeOperations.ts | 44 ++++++- src/vs/editor/common/core/range.ts | 26 ++++ .../test/browser/controller/cursor.test.ts | 105 ++++++++++++++- src/vs/monaco.d.ts | 8 ++ 7 files changed, 302 insertions(+), 13 deletions(-) diff --git a/src/vs/base/browser/browser.ts b/src/vs/base/browser/browser.ts index b447e0b68ec..6d4436c23eb 100644 --- a/src/vs/base/browser/browser.ts +++ b/src/vs/base/browser/browser.ts @@ -122,7 +122,7 @@ export const isSafari = (!isChrome && (userAgent.indexOf('Safari') >= 0)); export const isWebkitWebView = (!isChrome && !isSafari && isWebKit); export const isIPad = (userAgent.indexOf('iPad') >= 0); export const isEdgeWebView = isEdge && (userAgent.indexOf('WebView/') >= 0); -export const isStandalone = (window.matchMedia('(display-mode: standalone)').matches); +export const isStandalone = (window.matchMedia && window.matchMedia('(display-mode: standalone)').matches); export function hasClipboardSupport() { if (isIE) { diff --git a/src/vs/editor/browser/widget/media/editor.css b/src/vs/editor/browser/widget/media/editor.css index 3266ae96364..83c0859bd29 100644 --- a/src/vs/editor/browser/widget/media/editor.css +++ b/src/vs/editor/browser/widget/media/editor.css @@ -39,4 +39,8 @@ .monaco-editor .view-overlays { position: absolute; top: 0; -} \ No newline at end of file +} + +.monaco-editor .auto-closed-character { + opacity: 0.3; +} diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index add9f3444a9..789d3a97b02 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -10,15 +10,16 @@ import { CursorCollection } from 'vs/editor/common/controller/cursorCollection'; import { CursorColumns, CursorConfiguration, CursorContext, CursorState, EditOperationResult, EditOperationType, IColumnSelectData, ICursors, PartialCursorState, RevealTarget } from 'vs/editor/common/controller/cursorCommon'; import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperations'; import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; -import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; +import { TypeOperations, TypeWithAutoClosingCommand } from 'vs/editor/common/controller/cursorTypeOperations'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { ISelection, Selection, SelectionDirection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { IIdentifiedSingleEditOperation, ITextModel, TrackedRangeStickiness } from 'vs/editor/common/model'; +import { IIdentifiedSingleEditOperation, ITextModel, TrackedRangeStickiness, IModelDeltaDecoration } from 'vs/editor/common/model'; import { RawContentChangedType } from 'vs/editor/common/model/textModelEvents'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; +import { dispose } from 'vs/base/common/lifecycle'; function containsLineMappingChanged(events: viewEvents.ViewEvent[]): boolean { for (let i = 0, len = events.length; i < len; i++) { @@ -83,6 +84,64 @@ export class CursorModelState { } } +class AutoClosedAction { + + private readonly _model: ITextModel; + + private _autoClosedCharactersDecorations: string[]; + private _autoClosedEnclosingDecorations: string[]; + + constructor(model: ITextModel, autoClosedCharactersDecorations: string[], autoClosedEnclosingDecorations: string[]) { + this._model = model; + this._autoClosedCharactersDecorations = autoClosedCharactersDecorations; + this._autoClosedEnclosingDecorations = autoClosedEnclosingDecorations; + } + + public dispose(): void { + this._autoClosedCharactersDecorations = this._model.deltaDecorations(this._autoClosedCharactersDecorations, []); + this._autoClosedEnclosingDecorations = this._model.deltaDecorations(this._autoClosedEnclosingDecorations, []); + } + + public getAutoClosedCharactersRanges(): Range[] { + let result: Range[] = []; + for (let i = 0; i < this._autoClosedCharactersDecorations.length; i++) { + const decorationRange = this._model.getDecorationRange(this._autoClosedCharactersDecorations[i]); + if (decorationRange) { + result.push(decorationRange); + } + } + return result; + } + + public isValid(selections: Range[]): boolean { + let enclosingRanges: Range[] = []; + for (let i = 0; i < this._autoClosedEnclosingDecorations.length; i++) { + const decorationRange = this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]); + if (decorationRange) { + enclosingRanges.push(decorationRange); + if (decorationRange.startLineNumber !== decorationRange.endLineNumber) { + // Stop tracking if the range becomes multiline... + return false; + } + } + } + enclosingRanges.sort(Range.compareRangesUsingStarts); + + selections.sort(Range.compareRangesUsingStarts); + + for (let i = 0; i < selections.length; i++) { + if (i >= enclosingRanges.length) { + return false; + } + if (!enclosingRanges[i].strictContainsRange(selections[i])) { + return false; + } + } + + return true; + } +} + export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { public static MAX_CURSOR_COUNT = 10000; @@ -106,6 +165,7 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { private _isHandling: boolean; private _isDoingComposition: boolean; private _columnSelectData: IColumnSelectData | null; + private _autoClosedActions: AutoClosedAction[]; private _prevEditOperationType: EditOperationType; constructor(configuration: editorCommon.IConfiguration, model: ITextModel, viewModel: IViewModel) { @@ -120,6 +180,7 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { this._isHandling = false; this._isDoingComposition = false; this._columnSelectData = null; + this._autoClosedActions = []; this._prevEditOperationType = EditOperationType.Other; this._register(this._model.onDidChangeRawContent((e) => { @@ -173,9 +234,24 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { public dispose(): void { this._cursors.dispose(); + this._autoClosedActions = dispose(this._autoClosedActions); super.dispose(); } + private _validateAutoClosedActions(): void { + if (this._autoClosedActions.length > 0) { + let selections: Range[] = this._cursors.getSelections(); + for (let i = 0; i < this._autoClosedActions.length; i++) { + const autoClosedAction = this._autoClosedActions[i]; + if (!autoClosedAction.isValid(selections)) { + autoClosedAction.dispose(); + this._autoClosedActions.splice(i, 1); + i--; + } + } + } + } + // ------ some getters/setters public getPrimaryCursor(): CursorState { @@ -202,6 +278,8 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { this._cursors.normalize(); this._columnSelectData = null; + this._validateAutoClosedActions(); + this._emitStateChangedIfNecessary(source, reason, oldState); } @@ -296,7 +374,7 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { // a model.setValue() was called this._cursors.dispose(); this._cursors = new CursorCollection(this.context); - + this._validateAutoClosedActions(); this._emitStateChangedIfNecessary('model', CursorChangeReason.ContentFlush, null); } else { const selectionsFromMarkers = this._cursors.readSelectionFromMarkers(); @@ -367,6 +445,35 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { // The commands were applied correctly this._interpretCommandResult(result); + // Check for auto-closing closed characters + let autoClosedCharactersRanges: IModelDeltaDecoration[] = []; + let autoClosedEnclosingRanges: IModelDeltaDecoration[] = []; + + for (let i = 0; i < opResult.commands.length; i++) { + const command = opResult.commands[i]; + if (command instanceof TypeWithAutoClosingCommand && command.enclosingRange && command.closeCharacterRange) { + autoClosedCharactersRanges.push({ + range: command.closeCharacterRange, + options: { + inlineClassName: 'auto-closed-character', + stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges + } + }); + autoClosedEnclosingRanges.push({ + range: command.enclosingRange, + options: { + stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges + } + }); + } + } + + if (autoClosedCharactersRanges.length > 0) { + const autoClosedCharactersDecorations = this._model.deltaDecorations([], autoClosedCharactersRanges); + const autoClosedEnclosingDecorations = this._model.deltaDecorations([], autoClosedEnclosingRanges); + this._autoClosedActions.push(new AutoClosedAction(this._model, autoClosedCharactersDecorations, autoClosedEnclosingDecorations)); + } + this._prevEditOperationType = opResult.type; } @@ -540,6 +647,8 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { this._cursors.startTrackingSelections(); } + this._validateAutoClosedActions(); + if (this._emitStateChangedIfNecessary(source, cursorChangeReason, oldState)) { this._revealRange(RevealTarget.Primary, viewEvents.VerticalRevealType.Simple, true, editorCommon.ScrollType.Smooth); } @@ -566,8 +675,15 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { chr = text.charAt(i); } + let autoClosedCharacters: Range[] = []; + if (this._autoClosedActions.length > 0) { + for (let i = 0, len = this._autoClosedActions.length; i < len; i++) { + autoClosedCharacters = autoClosedCharacters.concat(this._autoClosedActions[i].getAutoClosedCharactersRanges()); + } + } + // Here we must interpret each typed character individually, that's why we create a new context - this._executeEditOperation(TypeOperations.typeWithInterceptors(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), chr)); + this._executeEditOperation(TypeOperations.typeWithInterceptors(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), autoClosedCharacters, chr)); } } else { diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index c18d081379d..73d984cfb62 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -13,7 +13,7 @@ import { CursorColumns, CursorConfiguration, EditOperationResult, EditOperationT import { WordCharacterClass, getMapForWordSeparators } from 'vs/editor/common/controller/wordCharacterClassifier'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; -import { ICommand } from 'vs/editor/common/editorCommon'; +import { ICommand, ICursorStateComputerData } from 'vs/editor/common/editorCommon'; import { ITextModel } from 'vs/editor/common/model'; import { EnterAction, IndentAction } from 'vs/editor/common/modes/languageConfiguration'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; @@ -430,7 +430,7 @@ export class TypeOperations { return null; } - private static _isAutoClosingCloseCharType(config: CursorConfiguration, model: ITextModel, selections: Selection[], ch: string): boolean { + private static _isAutoClosingCloseCharType(config: CursorConfiguration, model: ITextModel, selections: Selection[], autoClosedCharacters: Range[], ch: string): boolean { const autoCloseConfig = isQuote(ch) ? config.autoClosingQuotes : config.autoClosingBrackets; if (autoCloseConfig === 'never' || !config.autoClosingPairsClose.hasOwnProperty(ch)) { @@ -461,6 +461,19 @@ export class TypeOperations { return false; } } + + // Must over-type a closing character typed by the editor + let found = false; + for (let j = 0, lenJ = autoClosedCharacters.length; j < lenJ; j++) { + const autoClosedCharacter = autoClosedCharacters[j]; + if (position.lineNumber === autoClosedCharacter.startLineNumber && position.column === autoClosedCharacter.startColumn) { + found = true; + break; + } + } + if (!found) { + return false; + } } return true; @@ -573,7 +586,7 @@ export class TypeOperations { for (let i = 0, len = selections.length; i < len; i++) { const selection = selections[i]; const closeCharacter = config.autoClosingPairsOpen[ch]; - commands[i] = new ReplaceCommandWithOffsetCursorState(selection, ch + closeCharacter, 0, -closeCharacter.length); + commands[i] = new TypeWithAutoClosingCommand(selection, ch, closeCharacter); } return new EditOperationResult(EditOperationType.Typing, commands, { shouldPushStackElementBefore: true, @@ -802,7 +815,7 @@ export class TypeOperations { }); } - public static typeWithInterceptors(prevEditOperationType: EditOperationType, config: CursorConfiguration, model: ITextModel, selections: Selection[], ch: string): EditOperationResult { + public static typeWithInterceptors(prevEditOperationType: EditOperationType, config: CursorConfiguration, model: ITextModel, selections: Selection[], autoClosedCharacters: Range[], ch: string): EditOperationResult { if (ch === '\n') { let commands: ICommand[] = []; @@ -833,7 +846,7 @@ export class TypeOperations { } } - if (this._isAutoClosingCloseCharType(config, model, selections, ch)) { + if (this._isAutoClosingCloseCharType(config, model, selections, autoClosedCharacters, ch)) { return this._runAutoClosingCloseCharType(prevEditOperationType, config, model, selections, ch); } @@ -923,3 +936,24 @@ export class TypeOperations { return commands; } } + +export class TypeWithAutoClosingCommand extends ReplaceCommandWithOffsetCursorState { + + private _closeCharacter: string; + public closeCharacterRange: Range | null; + public enclosingRange: Range | null; + + constructor(selection: Selection, openCharacter: string, closeCharacter: string) { + super(selection, openCharacter + closeCharacter, 0, -closeCharacter.length); + this._closeCharacter = closeCharacter; + this.closeCharacterRange = null; + } + + public computeCursorState(model: ITextModel, helper: ICursorStateComputerData): Selection { + let inverseEditOperations = helper.getInverseEditOperations(); + let range = inverseEditOperations[0].range; + this.closeCharacterRange = new Range(range.startLineNumber, range.endColumn - this._closeCharacter.length, range.endLineNumber, range.endColumn); + this.enclosingRange = range; + return super.computeCursorState(model, helper); + } +} diff --git a/src/vs/editor/common/core/range.ts b/src/vs/editor/common/core/range.ts index c84b5df9d8a..e212e757dce 100644 --- a/src/vs/editor/common/core/range.ts +++ b/src/vs/editor/common/core/range.ts @@ -126,6 +126,32 @@ export class Range { return true; } + /** + * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true. + */ + public strictContainsRange(range: IRange): boolean { + return Range.strictContainsRange(this, range); + } + + /** + * Test if `otherRange` is strinctly in `range` (must start after, and end before). If the ranges are equal, will return false. + */ + public static strictContainsRange(range: IRange, otherRange: IRange): boolean { + if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) { + return false; + } + if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) { + return false; + } + if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn <= range.startColumn) { + return false; + } + if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn >= range.endColumn) { + return false; + } + return true; + } + /** * A reunion of the two ranges. * The smallest position will be used as the start point, and the largest one as the end point. diff --git a/src/vs/editor/test/browser/controller/cursor.test.ts b/src/vs/editor/test/browser/controller/cursor.test.ts index cf0905a08ea..c2a4e4a4560 100644 --- a/src/vs/editor/test/browser/controller/cursor.test.ts +++ b/src/vs/editor/test/browser/controller/cursor.test.ts @@ -4344,12 +4344,12 @@ suite('autoClosingPairs', () => { let autoClosePositions = [ 'var a |=| [|]|;|', 'var b |=| |`asd`|;|', - 'var c |=| |\'asd!\'|;|', + 'var c |=| |\'asd\'|;|', 'var d |=| |"asd"|;|', 'var e |=| /*3*/| 3;|', 'var f |=| /**| 3 */3;|', 'var g |=| (3+5)|;|', - 'var h |=| {| a:| |\'value!\'| |}|;|', + 'var h |=| {| a:| |\'value\'| |}|;|', ]; for (let i = 0, len = autoClosePositions.length; i < len; i++) { const lineNumber = i + 1; @@ -4494,6 +4494,107 @@ suite('autoClosingPairs', () => { mode.dispose(); }); + test('issue #37315 - overtypes only those characters that it inserted', () => { + let mode = new AutoClosingMode(); + usingCursor({ + text: [ + '', + 'y=();' + ], + languageIdentifier: mode.getLanguageIdentifier() + }, (model, cursor) => { + assertCursor(cursor, new Position(1, 1)); + + cursorCommand(cursor, H.Type, { text: 'x=(' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=()'); + + cursorCommand(cursor, H.Type, { text: 'asd' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=(asd)'); + + // overtype! + cursorCommand(cursor, H.Type, { text: ')' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=(asd)'); + + // do not overtype! + cursor.setSelections('test', [new Selection(2, 4, 2, 4)]); + cursorCommand(cursor, H.Type, { text: ')' }, 'keyboard'); + assert.strictEqual(model.getLineContent(2), 'y=());'); + + }); + mode.dispose(); + }); + + test('issue #37315 - stops overtyping once cursor leaves area', () => { + let mode = new AutoClosingMode(); + usingCursor({ + text: [ + '', + 'y=();' + ], + languageIdentifier: mode.getLanguageIdentifier() + }, (model, cursor) => { + assertCursor(cursor, new Position(1, 1)); + + cursorCommand(cursor, H.Type, { text: 'x=(' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=()'); + + cursor.setSelections('test', [new Selection(1, 5, 1, 5)]); + cursorCommand(cursor, H.Type, { text: ')' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=())'); + }); + mode.dispose(); + }); + + test('issue #37315 - it overtypes only once', () => { + let mode = new AutoClosingMode(); + usingCursor({ + text: [ + '', + 'y=();' + ], + languageIdentifier: mode.getLanguageIdentifier() + }, (model, cursor) => { + assertCursor(cursor, new Position(1, 1)); + + cursorCommand(cursor, H.Type, { text: 'x=(' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=()'); + + cursorCommand(cursor, H.Type, { text: ')' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=()'); + + cursor.setSelections('test', [new Selection(1, 4, 1, 4)]); + cursorCommand(cursor, H.Type, { text: ')' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=())'); + }); + mode.dispose(); + }); + + test('issue #37315 - it can remember multiple auto-closed instances', () => { + let mode = new AutoClosingMode(); + usingCursor({ + text: [ + '', + 'y=();' + ], + languageIdentifier: mode.getLanguageIdentifier() + }, (model, cursor) => { + assertCursor(cursor, new Position(1, 1)); + + cursorCommand(cursor, H.Type, { text: 'x=(' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=()'); + + cursorCommand(cursor, H.Type, { text: '(' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=(())'); + + cursorCommand(cursor, H.Type, { text: ')' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=(())'); + + cursorCommand(cursor, H.Type, { text: ')' }, 'keyboard'); + assert.strictEqual(model.getLineContent(1), 'x=(())'); + }); + mode.dispose(); + }); + test('issue #15825: accents on mac US intl keyboard', () => { let mode = new AutoClosingMode(); usingCursor({ diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 5f0f52de148..e08ad368312 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -585,6 +585,14 @@ declare namespace monaco { * Test if `otherRange` is in `range`. If the ranges are equal, will return true. */ static containsRange(range: IRange, otherRange: IRange): boolean; + /** + * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true. + */ + strictContainsRange(range: IRange): boolean; + /** + * Test if `otherRange` is strinctly in `range` (must start after, and end before). If the ranges are equal, will return false. + */ + static strictContainsRange(range: IRange, otherRange: IRange): boolean; /** * A reunion of the two ranges. * The smallest position will be used as the start point, and the largest one as the end point. From b999cdbea4a5be8ac679a596e0af9bc9c9501447 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Thu, 25 Jul 2019 14:02:02 -0700 Subject: [PATCH 634/710] Change default search to find previous --- extensions/json-language-features/server/yarn.lock | 5 +++++ src/vs/editor/contrib/find/simpleFindWidget.ts | 6 +++--- .../contrib/terminal/browser/terminalFindWidget.ts | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/extensions/json-language-features/server/yarn.lock b/extensions/json-language-features/server/yarn.lock index 1bb198a5210..13ab8c59ab0 100644 --- a/extensions/json-language-features/server/yarn.lock +++ b/extensions/json-language-features/server/yarn.lock @@ -134,3 +134,8 @@ vscode-uri@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.0.1.tgz#5448e4f77d21d93ffa34b96f84c6c5e09e3f5a9b" integrity sha512-s/k0zsYr6y+tsocFyxT/+G5aq8mEdpDZuph3LZ+UmCs7LNhx/xomiCy5kyP+jOAKC7RMCUvb6JbPD1/TgAvq0g== + +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== diff --git a/src/vs/editor/contrib/find/simpleFindWidget.ts b/src/vs/editor/contrib/find/simpleFindWidget.ts index 54f256d48aa..e6e992dc4da 100644 --- a/src/vs/editor/contrib/find/simpleFindWidget.ts +++ b/src/vs/editor/contrib/find/simpleFindWidget.ts @@ -93,13 +93,13 @@ export abstract class SimpleFindWidget extends Widget { this._register(this._findInput.onKeyDown((e) => { if (e.equals(KeyCode.Enter)) { - this.find(false); + this.find(true); e.preventDefault(); return; } if (e.equals(KeyMod.Shift | KeyCode.Enter)) { - this.find(true); + this.find(false); e.preventDefault(); return; } @@ -295,4 +295,4 @@ registerThemingParticipant((theme, collector) => { if (widgetShadowColor) { collector.addRule(`.monaco-workbench .simple-find-part { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); } -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts b/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts index 75e51bcfa22..b214d4a7bcc 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts @@ -50,7 +50,7 @@ export class TerminalFindWidget extends SimpleFindWidget { // Ignore input changes for now const instance = this._terminalService.getActiveInstance(); if (instance !== null) { - return instance.findNext(this.inputValue, { regex: this._getRegexValue(), wholeWord: this._getWholeWordValue(), caseSensitive: this._getCaseSensitiveValue(), incremental: true }); + return instance.findPrevious(this.inputValue, { regex: this._getRegexValue(), wholeWord: this._getWholeWordValue(), caseSensitive: this._getCaseSensitiveValue(), incremental: true }); } return false; } @@ -78,4 +78,4 @@ export class TerminalFindWidget extends SimpleFindWidget { protected onFindInputFocusTrackerBlur() { this._findInputFocused.reset(); } -} \ No newline at end of file +} From 94702ffa04a201da20268a027dba597273522a97 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 25 Jul 2019 14:30:12 -0700 Subject: [PATCH 635/710] Fix Microsoft/monaco-editor#1353. Use wheel event for modern browsers. --- src/vs/base/browser/mouseEvent.ts | 6 +++++- src/vs/base/browser/ui/scrollbar/scrollableElement.ts | 3 ++- src/vs/editor/browser/controller/mouseHandler.ts | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/vs/base/browser/mouseEvent.ts b/src/vs/base/browser/mouseEvent.ts index dee572ce892..4c7295e3b9b 100644 --- a/src/vs/base/browser/mouseEvent.ts +++ b/src/vs/base/browser/mouseEvent.ts @@ -160,6 +160,8 @@ export class StandardWheelEvent { this.deltaY = e1.wheelDeltaY / 120; } else if (typeof e2.VERTICAL_AXIS !== 'undefined' && e2.axis === e2.VERTICAL_AXIS) { this.deltaY = -e2.detail / 3; + } else { + this.deltaY = -e.deltaY / 40; } // horizontal delta scroll @@ -171,6 +173,8 @@ export class StandardWheelEvent { } } else if (typeof e2.HORIZONTAL_AXIS !== 'undefined' && e2.axis === e2.HORIZONTAL_AXIS) { this.deltaX = -e.detail / 3; + } else { + this.deltaX = -e.deltaX / 40; } // Assume a vertical scroll if nothing else worked @@ -195,4 +199,4 @@ export class StandardWheelEvent { } } } -} \ No newline at end of file +} diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts index fbf8d5dcd13..1c1ded9eb2c 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import 'vs/css!./media/scrollbars'; +import { isEdgeOrIE } from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { IMouseEvent, StandardWheelEvent, IMouseWheelEvent } from 'vs/base/browser/mouseEvent'; @@ -312,7 +313,7 @@ export abstract class AbstractScrollableElement extends Widget { this._onMouseWheel(new StandardWheelEvent(browserEvent)); }; - this._mouseWheelToDispose.push(dom.addDisposableListener(this._listenOnDomNode, 'mousewheel', onMouseWheel)); + this._mouseWheelToDispose.push(dom.addDisposableListener(this._listenOnDomNode, isEdgeOrIE ? 'mousewheel' : 'wheel', onMouseWheel)); } } diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts index 4a2dc7661c9..06d4b2f5307 100644 --- a/src/vs/editor/browser/controller/mouseHandler.ts +++ b/src/vs/editor/browser/controller/mouseHandler.ts @@ -123,7 +123,7 @@ export class MouseHandler extends ViewEventHandler { e.stopPropagation(); } }; - this._register(dom.addDisposableListener(this.viewHelper.viewDomNode, 'mousewheel', onMouseWheel, true)); + this._register(dom.addDisposableListener(this.viewHelper.viewDomNode, browser.isEdgeOrIE ? 'mousewheel' : 'wheel', onMouseWheel, true)); this._context.addEventHandler(this); } From 7f88351f58d111f23f4b709edc6fa4619338d429 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 25 Jul 2019 15:02:29 -0700 Subject: [PATCH 636/710] Fix #76773. Hide Find Widget when editor content is hidden. --- src/vs/editor/contrib/find/findWidget.css | 5 +++++ src/vs/editor/contrib/find/findWidget.ts | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/find/findWidget.css b/src/vs/editor/contrib/find/findWidget.css index d210cb1dd49..7e1140442ea 100644 --- a/src/vs/editor/contrib/find/findWidget.css +++ b/src/vs/editor/contrib/find/findWidget.css @@ -39,6 +39,11 @@ transition: top 200ms linear; padding: 0 4px; } + +.monaco-editor .find-widget.hiddenEditor { + display: none; +} + /* Find widget when replace is toggled on */ .monaco-editor .find-widget.replaceToggled { top: -74px; /* find input height + replace input height + shadow (10px) */ diff --git a/src/vs/editor/contrib/find/findWidget.ts b/src/vs/editor/contrib/find/findWidget.ts index 3b667c3e2d2..9c9af950e6b 100644 --- a/src/vs/editor/contrib/find/findWidget.ts +++ b/src/vs/editor/contrib/find/findWidget.ts @@ -600,8 +600,19 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas if (!this._isVisible) { return; } - let editorWidth = this._codeEditor.getConfiguration().layoutInfo.width; - let minimapWidth = this._codeEditor.getConfiguration().layoutInfo.minimapWidth; + + const editorContentWidth = this._codeEditor.getConfiguration().layoutInfo.contentWidth; + + if (editorContentWidth <= 0) { + // for example, diff view original editor + dom.addClass(this._domNode, 'hiddenEditor'); + return; + } else if (dom.hasClass(this._domNode, 'hiddenEditor')) { + dom.removeClass(this._domNode, 'hiddenEditor'); + } + + const editorWidth = this._codeEditor.getConfiguration().layoutInfo.width; + const minimapWidth = this._codeEditor.getConfiguration().layoutInfo.minimapWidth; let collapsedFindWidget = false; let reducedFindWidget = false; let narrowFindWidget = false; From 96cc6dc2aafab74d629f15aaf33ba76bc174f91c Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Thu, 25 Jul 2019 15:29:33 -0700 Subject: [PATCH 637/710] Fix comment actions not updating on when clause change, fixes #77012 --- .../contrib/comments/browser/commentNode.ts | 102 +++++++++--------- 1 file changed, 54 insertions(+), 48 deletions(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentNode.ts b/src/vs/workbench/contrib/comments/browser/commentNode.ts index d3ac220871e..f5a80eea68b 100644 --- a/src/vs/workbench/contrib/comments/browser/commentNode.ts +++ b/src/vs/workbench/contrib/comments/browser/commentNode.ts @@ -28,7 +28,7 @@ import { AnchorAlignment } from 'vs/base/browser/ui/contextview/contextview'; import { ToggleReactionsAction, ReactionAction, ReactionActionViewItem } from './reactionsAction'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { ICommentThreadWidget } from 'vs/workbench/contrib/comments/common/commentThreadWidget'; -import { MenuItemAction, SubmenuItemAction } from 'vs/platform/actions/common/actions'; +import { MenuItemAction, SubmenuItemAction, IMenu } from 'vs/platform/actions/common/actions'; import { ContextAwareMenuEntryActionViewItem } from 'vs/platform/actions/browser/menuEntryActionViewItem'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; @@ -54,7 +54,7 @@ export class CommentNode extends Disposable { private _commentContextValue: IContextKey; protected actionRunner?: IActionRunner; - protected toolbar: ToolBar; + protected toolbar: ToolBar | undefined; private _commentFormActions: CommentFormActions; private _onDidDelete = new Emitter(); @@ -134,9 +134,49 @@ export class CommentNode extends Disposable { this.createActionsToolbar(); } + private getToolbarActions(menu: IMenu): { primary: IAction[], secondary: IAction[] } { + const contributedActions = menu.getActions({ shouldForwardArgs: true }); + const primary: IAction[] = []; + const secondary: IAction[] = []; + const result = { primary, secondary }; + fillInActions(contributedActions, result, false, g => /^inline/.test(g)); + return result; + } + + private createToolbar() { + this.toolbar = new ToolBar(this._actionsToolbarContainer, this.contextMenuService, { + actionViewItemProvider: action => { + if (action.id === ToggleReactionsAction.ID) { + return new DropdownMenuActionViewItem( + action, + (action).menuActions, + this.contextMenuService, + action => { + return this.actionViewItemProvider(action as Action); + }, + this.actionRunner!, + undefined, + 'toolbar-toggle-pickReactions', + () => { return AnchorAlignment.RIGHT; } + ); + } + return this.actionViewItemProvider(action as Action); + }, + orientation: ActionsOrientation.HORIZONTAL + }); + + this.toolbar.context = { + thread: this.commentThread, + commentUniqueId: this.comment.uniqueIdInThread, + $mid: 9 + }; + + this.registerActionBarListeners(this._actionsToolbarContainer); + this._register(this.toolbar); + } + private createActionsToolbar() { const actions: IAction[] = []; - const secondaryActions: IAction[] = []; let hasReactionHandler = this.commentService.hasReactionHandler(this.owner); @@ -149,54 +189,20 @@ export class CommentNode extends Disposable { const menu = commentMenus.getCommentTitleActions(this.comment, this._contextKeyService); this._register(menu); this._register(menu.onDidChange(e => { - const primary: IAction[] = []; - const secondary: IAction[] = []; - const result = { primary, secondary }; - fillInActions(contributedActions, result, false, g => /^inline/.test(g)); - this.toolbar.setActions(primary, secondary); + const { primary, secondary } = this.getToolbarActions(menu); + if (!this.toolbar && (primary.length || secondary.length)) { + this.createToolbar(); + } + + this.toolbar!.setActions(primary, secondary)(); })); - const contributedActions = menu.getActions({ shouldForwardArgs: true }); - { - const primary: IAction[] = []; - const secondary: IAction[] = []; - const result = { primary, secondary }; - fillInActions(contributedActions, result, false, g => /^inline/.test(g)); - actions.push(...primary); - secondaryActions.push(...secondary); - } + const { primary, secondary } = this.getToolbarActions(menu); + actions.push(...primary); - if (actions.length || secondaryActions.length) { - this.toolbar = new ToolBar(this._actionsToolbarContainer, this.contextMenuService, { - actionViewItemProvider: action => { - if (action.id === ToggleReactionsAction.ID) { - return new DropdownMenuActionViewItem( - action, - (action).menuActions, - this.contextMenuService, - action => { - return this.actionViewItemProvider(action as Action); - }, - this.actionRunner!, - undefined, - 'toolbar-toggle-pickReactions', - () => { return AnchorAlignment.RIGHT; } - ); - } - return this.actionViewItemProvider(action as Action); - }, - orientation: ActionsOrientation.HORIZONTAL - }); - - this.toolbar.context = { - thread: this.commentThread, - commentUniqueId: this.comment.uniqueIdInThread, - $mid: 9 - }; - - this.registerActionBarListeners(this._actionsToolbarContainer); - this.toolbar.setActions(actions, secondaryActions)(); - this._register(this.toolbar); + if (actions.length || secondary.length) { + this.createToolbar(); + this.toolbar!.setActions(actions, secondary)(); } } From 3866deba3572efba0fefd9f26f04a441e87de410 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 Jul 2019 16:00:41 -0700 Subject: [PATCH 638/710] Use pty naming instead of virtual process Part of #77160 --- .../src/singlefolder-tests/terminal.test.ts | 18 +-- .../workspace.tasks.test.ts | 4 +- src/vs/vscode.proposed.d.ts | 118 ++++++++++-------- .../api/browser/mainThreadTerminalService.ts | 10 +- .../workbench/api/common/extHost.protocol.ts | 4 +- src/vs/workbench/api/common/extHostTypes.ts | 8 +- src/vs/workbench/api/node/extHost.api.impl.ts | 6 +- src/vs/workbench/api/node/extHostTask.ts | 2 +- .../api/node/extHostTerminalService.ts | 60 ++++----- .../tasks/browser/terminalTaskSystem.ts | 2 +- .../browser/terminalProcessManager.ts | 10 +- .../contrib/terminal/common/terminal.ts | 12 +- .../common/terminalProcessExtHostProxy.ts | 7 +- .../terminal/common/terminalService.ts | 10 +- 14 files changed, 142 insertions(+), 129 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts index 63e39fdd2e4..ee5f7505d6c 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { window, Terminal, TerminalVirtualProcess, EventEmitter, TerminalDimensions, workspace, ConfigurationTarget } from 'vscode'; +import { window, Terminal, Pseudoterminal, EventEmitter, TerminalDimensions, workspace, ConfigurationTarget } from 'vscode'; import { doesNotThrow, equal, ok } from 'assert'; suite('window namespace tests', () => { @@ -264,12 +264,12 @@ suite('window namespace tests', () => { }); term.dispose(); }); - const virtualProcess: TerminalVirtualProcess = { + const pty: Pseudoterminal = { onDidWrite: new EventEmitter().event, start: () => {}, shutdown: () => {} }; - window.createTerminal({ name: 'c', virtualProcess }); + window.createTerminal({ name: 'c', pty }); }); test('should fire Terminal.onData on write', (done) => { @@ -291,12 +291,12 @@ suite('window namespace tests', () => { let startResolve: () => void; const startPromise: Promise = new Promise(r => startResolve = r); const writeEmitter = new EventEmitter(); - const virtualProcess: TerminalVirtualProcess = { + const pty: Pseudoterminal = { onDidWrite: writeEmitter.event, start: () => startResolve(), shutdown: () => {} }; - const terminal = window.createTerminal({ name: 'foo', virtualProcess }); + const terminal = window.createTerminal({ name: 'foo', pty }); }); test('should fire provide dimensions on start as the terminal has been shown', (done) => { @@ -304,7 +304,7 @@ suite('window namespace tests', () => { equal(terminal, term); reg1.dispose(); }); - const virtualProcess: TerminalVirtualProcess = { + const pty: Pseudoterminal = { onDidWrite: new EventEmitter().event, start: (dimensions) => { ok(dimensions!.columns > 0); @@ -317,7 +317,7 @@ suite('window namespace tests', () => { }, shutdown: () => {} }; - const terminal = window.createTerminal({ name: 'foo', virtualProcess }); + const terminal = window.createTerminal({ name: 'foo', pty }); }); test('should respect dimension overrides', (done) => { @@ -340,13 +340,13 @@ suite('window namespace tests', () => { }); const writeEmitter = new EventEmitter(); const overrideDimensionsEmitter = new EventEmitter(); - const virtualProcess: TerminalVirtualProcess = { + const pty: Pseudoterminal = { onDidWrite: writeEmitter.event, onDidOverrideDimensions: overrideDimensionsEmitter.event, start: () => {}, shutdown: () => {} }; - const terminal = window.createTerminal({ name: 'foo', virtualProcess }); + const terminal = window.createTerminal({ name: 'foo', pty }); }); }); }); diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts index 43470d24e19..695ac4b0f59 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts @@ -35,8 +35,8 @@ suite.only('workspace-namespace', () => { customProp1: 'testing task one' }; const writeEmitter = new vscode.EventEmitter(); - const execution = new vscode.CustomExecution2((): Thenable => { - return Promise.resolve({ + const execution = new vscode.CustomExecution2((): Thenable => { + return Promise.resolve({ onDidWrite: writeEmitter.event, start: () => { writeEmitter.fire('testing\r\n'); diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 430967c999e..d1bb0e8eb67 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -816,7 +816,7 @@ declare module 'vscode' { * [Terminal.sendText](#Terminal.sendText) is triggered that will fire the * [TerminalRenderer.onDidAcceptInput](#TerminalRenderer.onDidAcceptInput) event. * - * @deprecated Use [virtual processes](#TerminalVirtualProcess) instead. + * @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead. * * **Example:** Create a terminal renderer, show it and write hello world in red * ```typescript @@ -828,7 +828,7 @@ declare module 'vscode' { export interface TerminalRenderer { /** * The name of the terminal, this will appear in the terminal selector. - * @deprecated Use [virtual processes](#TerminalVirtualProcess) instead. + * @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead. */ name: string; @@ -837,7 +837,7 @@ declare module 'vscode' { * a value smaller than the maximum value, if this is undefined the terminal will auto fit * to the maximum value [maximumDimensions](TerminalRenderer.maximumDimensions). * - * @deprecated Use [virtual processes](#TerminalVirtualProcess) instead. + * @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead. * * **Example:** Override the dimensions of a TerminalRenderer to 20 columns and 10 rows * ```typescript @@ -855,14 +855,14 @@ declare module 'vscode' { * Listen to [onDidChangeMaximumDimensions](TerminalRenderer.onDidChangeMaximumDimensions) * to get notified when this value changes. * - * @deprecated Use [virtual processes](#TerminalVirtualProcess) instead. + * @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead. */ readonly maximumDimensions: TerminalDimensions | undefined; /** * The corresponding [Terminal](#Terminal) for this TerminalRenderer. * - * @deprecated Use [virtual processes](#TerminalVirtualProcess) instead. + * @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead. */ readonly terminal: Terminal; @@ -871,7 +871,7 @@ declare module 'vscode' { * text to the underlying _process_, this will write the text to the terminal itself. * * @param text The text to write. - * @deprecated Use [virtual processes](#TerminalVirtualProcess) instead. + * @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead. * * **Example:** Write red text to the terminal * ```typescript @@ -890,7 +890,7 @@ declare module 'vscode' { * [Terminal.sendText](#Terminal.sendText). Keystrokes are converted into their * corresponding VT sequence representation. * - * @deprecated Use [virtual processes](#TerminalVirtualProcess) instead. + * @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead. * * **Example:** Simulate interaction with the terminal from an outside extension or a * workbench command such as `workbench.action.terminal.runSelectedText` @@ -908,7 +908,7 @@ declare module 'vscode' { * An event which fires when the [maximum dimensions](#TerminalRenderer.maximumDimensions) of * the terminal renderer change. * - * @deprecated Use [virtual processes](#TerminalVirtualProcess) instead. + * @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead. */ readonly onDidChangeMaximumDimensions: Event; } @@ -918,60 +918,60 @@ declare module 'vscode' { * Create a [TerminalRenderer](#TerminalRenderer). * * @param name The name of the terminal renderer, this shows up in the terminal selector. - * @deprecated Use [virtual processes](#TerminalVirtualProcess) instead. + * @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead. */ export function createTerminalRenderer(name: string): TerminalRenderer; } //#endregion - //#region Terminal extension pty + //#region Extension terminals export namespace window { /** - * Creates a [Terminal](#Terminal) where an extension acts as the process. + * Creates a [Terminal](#Terminal) where an extension controls the teerminal. * - * @param options A [TerminalVirtualProcessOptions](#TerminalVirtualProcessOptions) object describing the - * characteristics of the new terminal. + * @param options An [ExtensionTerminalOptions](#ExtensionTerminalOptions) object describing + * the characteristics of the new terminal. * @return A new Terminal. */ - export function createTerminal(options: TerminalVirtualProcessOptions): Terminal; + export function createTerminal(options: ExtensionTerminalOptions): Terminal; } /** * Value-object describing what options a virtual process terminal should use. */ - export interface TerminalVirtualProcessOptions { + export interface ExtensionTerminalOptions { /** * A human-readable string which will be used to represent the terminal in the UI. */ name: string; /** - * An implementation of [TerminalVirtualProcess](#TerminalVirtualProcess) that allows an - * extension to act as a terminal's backing process. + * An implementation of [Pseudoterminal](#Pseudoterminal) that allows an extension to + * control a terminal. */ - virtualProcess: TerminalVirtualProcess; + pty: Pseudoterminal; } /** - * Defines the interface of a terminal virtual process, enabling extensions to act as a process - * in the terminal. + * Defines the interface of a terminal pty, enabling extensions to control a terminal. */ - interface TerminalVirtualProcess { + interface Pseudoterminal { /** * An event that when fired will write data to the terminal. Unlike - * [Terminal.sendText](#Terminal.sendText) which sends text to the underlying _process_, - * this will write the text to the terminal itself. + * [Terminal.sendText](#Terminal.sendText) which sends text to the underlying _process_ + * (the pty "slave"), this will write the text to the terminal itself (the pty "master"). * * **Example:** Write red text to the terminal * ```typescript * const writeEmitter = new vscode.EventEmitter(); - * const virtualProcess: TerminalVirtualProcess = { - * onDidWrite: writeEmitter.event + * const pty: vscode.Pseudoterminal = { + * onDidWrite: writeEmitter.event, + * start: () => writeEmitter.fire('\x1b[31mHello world\x1b[0m'), + * shutdown: () => {} * }; - * vscode.window.createTerminal({ name: 'My terminal', virtualProcess }); - * writeEmitter.fire('\x1b[31mHello world\x1b[0m'); + * vscode.window.createTerminal({ name: 'My terminal', pty }); * ``` * * **Example:** Move the cursor to the 10th row and 20th column and write an asterisk @@ -985,44 +985,50 @@ declare module 'vscode' { * An event that when fired allows overriding the [dimensions](#Terminal.dimensions) of the * terminal. Note that when set the overridden dimensions will only take effect when they * are lower than the actual dimensions of the terminal (ie. there will never be a scroll - * bar). Set to `undefined` for the terminal to go back to the regular dimensions. + * bar). Set to `undefined` for the terminal to go back to the regular dimensions (fit to + * the size of the panel). * * **Example:** Override the dimensions of a terminal to 20 columns and 10 rows * ```typescript * const dimensionsEmitter = new vscode.EventEmitter(); - * const virtualProcess: TerminalVirtualProcess = { + * const pty: vscode.Pseudoterminal = { * onDidWrite: writeEmitter.event, - * onDidOverrideDimensions: dimensionsEmitter.event + * onDidOverrideDimensions: dimensionsEmitter.event, + * start: () => { + * dimensionsEmitter.fire({ + * columns: 20, + * rows: 10 + * }); + * }, + * shutdown: () => {} * }; - * vscode.window.createTerminal({ name: 'My terminal', virtualProcess }); - * dimensionsEmitter.fire({ - * columns: 20, - * rows: 10 - * }); + * vscode.window.createTerminal({ name: 'My terminal', pty }); * ``` */ onDidOverrideDimensions?: Event; /** * An event that when fired will exit the process with an exit code, this will behave the - * same for a virtual process as when a regular process exits with an exit code. Note that - * exit codes must be positive numbers, when negative the exit code will be forced to `1`. + * same for an extension treminal as when a regular process exits with an exit code. Note + * that exit codes must be positive numbers, when negative the exit code will be forced to + * `1`. * * **Example:** Exit with an exit code of `0` if the y key is pressed, otherwise `1`. * ```typescript * const writeEmitter = new vscode.EventEmitter(); * const exitEmitter = new vscode.EventEmitter(); - * const virtualProcess: TerminalVirtualProcess = { + * const pty: vscode.Pseudoterminal = { * onDidWrite: writeEmitter.event, - * input: data => exitEmitter.fire(data === 'y' ? 0 : 1) + * start: () => writeEmitter.fire('Press y to exit successfully'), + * shutdown: () => {} + * handleInput: data => exitEmitter.fire(data === 'y' ? 0 : 1) * }; - * vscode.window.createTerminal({ name: 'Exit example', virtualProcess }); - * writeEmitter.fire('Press y to exit successfully'); + * vscode.window.createTerminal({ name: 'Exit example', pty }); */ onDidExit?: Event; /** - * Implement to handle when the terminal is ready to start firing events. + * Implement to handle when the pty is ready to start firing events. * * @param initialDimensions The dimensions of the terminal, this will be undefined if the * terminal panel has not been opened before this is called. @@ -1035,21 +1041,23 @@ declare module 'vscode' { shutdown(): void; /** - * Implement to handle keystrokes in the terminal or when an extension calls - * [Terminal.sendText](#Terminal.sendText). Keystrokes are converted into their - * corresponding VT sequence representation. + * Implement to handle incoming keystrokes in the terminal or when an extension calls + * [Terminal.sendText](#Terminal.sendText). `data` contains the keystrokes/text serialized into + * their corresponding VT sequence representation. * - * @param data The sent data. + * @param data The incoming data. * * **Example:** Echo input in the terminal. The sequence for enter (`\r`) is translated to * CRLF to go to a new line and move the cursor to the start of the line. * ```typescript * const writeEmitter = new vscode.EventEmitter(); - * const virtualProcess: TerminalVirtualProcess = { + * const pty: vscode.Pseudoterminal = { * onDidWrite: writeEmitter.event, + * start: () => {}, + * shutdown: () => {}, * handleInput: data => writeEmitter.fire(data === '\r' ? '\r\n' : data) * }; - * vscode.window.createTerminal({ name: 'Local echo', virtualProcess }); + * vscode.window.createTerminal({ name: 'Local echo', pty }); * ``` */ handleInput?(data: string): void; @@ -1145,6 +1153,7 @@ declare module 'vscode' { } //#endregion + //#region CustomExecution /** * Class used to execute an extension callback as a task. */ @@ -1168,16 +1177,18 @@ declare module 'vscode' { */ export class CustomExecution2 { /** - * @param process The [TerminalVirtualProcess](#TerminalVirtualProcess) to be used by the task to display output. + * @param process The [Pseudotrminal](#Pseudoterminal) to be used by the task to display output. * @param callback The callback that will be called when the task is started by a user. */ - constructor(callback: (thisArg?: any) => Thenable); + constructor(callback: (thisArg?: any) => Thenable); /** - * The callback used to execute the task. Cancellation should be handled using the shutdown method of [TerminalVirtualProcess](#TerminalVirtualProcess). - * When the task is complete, onDidExit should be fired on the TerminalVirtualProcess with the exit code with '0' for success and a non-zero value for failure. + * The callback used to execute the task. Cancellation should be handled using + * [Pseudoterminal.shutdown](#Pseudoterminal.shutdown). When the task is complete, + * [Pseudoterminal.onDidExit](#Pseudoterminal.onDidExit) should be fired with the exit code + * with '0' for success and a non-zero value for failure. */ - callback: (thisArg?: any) => Thenable; + callback: (thisArg?: any) => Thenable; } /** @@ -1203,6 +1214,7 @@ declare module 'vscode' { */ execution2?: ProcessExecution | ShellExecution | CustomExecution | CustomExecution2; } + //#endregion //#region Tasks export interface TaskPresentationOptions { diff --git a/src/vs/workbench/api/browser/mainThreadTerminalService.ts b/src/vs/workbench/api/browser/mainThreadTerminalService.ts index 13f4fad4663..2d3dd6d0035 100644 --- a/src/vs/workbench/api/browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/browser/mainThreadTerminalService.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { IDisposable, DisposableStore } from 'vs/base/common/lifecycle'; -import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalProcessExtHostProxy, ITerminalProcessExtHostRequest, ITerminalDimensions, EXT_HOST_CREATION_DELAY, IAvailableShellsRequest, IDefaultShellAndArgsRequest, ITerminalVirtualProcessRequest } from 'vs/workbench/contrib/terminal/common/terminal'; +import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalProcessExtHostProxy, ITerminalProcessExtHostRequest, ITerminalDimensions, EXT_HOST_CREATION_DELAY, IAvailableShellsRequest, IDefaultShellAndArgsRequest, IExtensionTerminalRequest } from 'vs/workbench/contrib/terminal/common/terminal'; import { ExtHostContext, ExtHostTerminalServiceShape, MainThreadTerminalServiceShape, MainContext, IExtHostContext, ShellLaunchConfigDto, TerminalLaunchConfig, ITerminalDimensionsDto } from 'vs/workbench/api/common/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers'; import { URI } from 'vs/base/common/uri'; @@ -48,7 +48,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape this._toDispose.add(_terminalService.onInstanceDimensionsChanged(instance => this._onInstanceDimensionsChanged(instance))); this._toDispose.add(_terminalService.onInstanceMaximumDimensionsChanged(instance => this._onInstanceMaximumDimensionsChanged(instance))); this._toDispose.add(_terminalService.onInstanceRequestExtHostProcess(request => this._onTerminalRequestExtHostProcess(request))); - this._toDispose.add(_terminalService.onInstanceRequestVirtualProcess(e => this._onTerminalRequestVirtualProcess(e))); + this._toDispose.add(_terminalService.onInstanceRequestExtensionTerminal(e => this._onTerminalRequestExtensionTerminal(e))); this._toDispose.add(_terminalService.onActiveInstanceChanged(instance => this._onActiveTerminalChanged(instance ? instance.id : null))); this._toDispose.add(_terminalService.onInstanceTitleChanged(instance => this._onTitleChanged(instance.id, instance.title))); this._toDispose.add(_terminalService.configHelper.onWorkspacePermissionsChanged(isAllowed => this._onWorkspacePermissionsChanged(isAllowed))); @@ -90,7 +90,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape env: launchConfig.env, strictEnv: launchConfig.strictEnv, hideFromUser: launchConfig.hideFromUser, - isVirtualProcess: launchConfig.isVirtualProcess + isExtensionTerminal: launchConfig.isExtensionTerminal }; const terminal = this._terminalService.createTerminal(shellLaunchConfig); this._terminalProcesses.set(terminal.id, new Promise(r => this._terminalProcessesReady.set(terminal.id, r))); @@ -270,7 +270,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape proxy.onRequestLatency(() => this._onRequestLatency(proxy.terminalId)); } - private _onTerminalRequestVirtualProcess(request: ITerminalVirtualProcessRequest): void { + private _onTerminalRequestExtensionTerminal(request: IExtensionTerminalRequest): void { const proxy = request.proxy; const ready = this._terminalProcessesReady.get(proxy.terminalId); if (!ready) { @@ -286,7 +286,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape columns: request.cols, rows: request.rows } : undefined; - this._proxy.$startVirtualProcess(proxy.terminalId, initialDimensions); + this._proxy.$startExtensionTerminal(proxy.terminalId, initialDimensions); proxy.onInput(data => this._proxy.$acceptProcessInput(proxy.terminalId, data)); proxy.onShutdown(immediate => this._proxy.$acceptProcessShutdown(proxy.terminalId, immediate)); proxy.onRequestCwd(() => this._proxy.$acceptProcessRequestCwd(proxy.terminalId)); diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index f8d565df56c..6a76d4e86b4 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -390,7 +390,7 @@ export interface TerminalLaunchConfig { waitOnExit?: boolean; strictEnv?: boolean; hideFromUser?: boolean; - isVirtualProcess?: boolean; + isExtensionTerminal?: boolean; } export interface MainThreadTerminalServiceShape extends IDisposable { @@ -1162,7 +1162,7 @@ export interface ExtHostTerminalServiceShape { $acceptTerminalDimensions(id: number, cols: number, rows: number): void; $acceptTerminalMaximumDimensions(id: number, cols: number, rows: number): void; $createProcess(id: number, shellLaunchConfig: ShellLaunchConfigDto, activeWorkspaceRootUri: UriComponents, cols: number, rows: number, isWorkspaceShellAllowed: boolean): void; - $startVirtualProcess(id: number, initialDimensions: ITerminalDimensionsDto | undefined): void; + $startExtensionTerminal(id: number, initialDimensions: ITerminalDimensionsDto | undefined): void; $acceptProcessInput(id: number, data: string): void; $acceptProcessResize(id: number, cols: number, rows: number): void; $acceptProcessShutdown(id: number, immediate: boolean): void; diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index b8aebf92b45..20d60dddd30 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -1773,19 +1773,19 @@ export class CustomExecution implements vscode.CustomExecution { } export class CustomExecution2 implements vscode.CustomExecution2 { - private _callback: () => Thenable; - constructor(callback: () => Thenable) { + private _callback: () => Thenable; + constructor(callback: () => Thenable) { this._callback = callback; } public computeId(): string { return 'customExecution' + generateUuid(); } - public set callback(value: () => Thenable) { + public set callback(value: () => Thenable) { this._callback = value; } - public get callback(): (() => Thenable) { + public get callback(): (() => Thenable) { return this._callback; } } diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 27fb09b2abd..f4df88c11ba 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -528,10 +528,10 @@ export function createApiFactory( checkProposedApiEnabled(extension); return extHostEditorInsets.createWebviewEditorInset(editor, line, height, options, extension); }, - createTerminal(nameOrOptions?: vscode.TerminalOptions | vscode.TerminalVirtualProcessOptions | string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal { + createTerminal(nameOrOptions?: vscode.TerminalOptions | vscode.ExtensionTerminalOptions | string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal { if (typeof nameOrOptions === 'object') { - if ('virtualProcess' in nameOrOptions) { - return extHostTerminalService.createVirtualProcessTerminal(nameOrOptions); + if ('pty' in nameOrOptions) { + return extHostTerminalService.createExtensionTerminal(nameOrOptions); } else { nameOrOptions.hideFromUser = nameOrOptions.hideFromUser || (nameOrOptions.runInBackground && extension.enableProposedApi); return extHostTerminalService.createTerminalFromOptions(nameOrOptions); diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 0e7f5f9dd7a..9191b53aa47 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -588,7 +588,7 @@ export class ExtHostTask implements ExtHostTaskShape { // Clone the custom execution to keep the original untouched. This is important for multiple runs of the same task. this._activeCustomExecutions2.set(execution.id, execution2); - await this._terminalService.attachVirtualProcessToTerminal(terminalId, await execution2.callback()); + await this._terminalService.attachPtyToTerminal(terminalId, await execution2.callback()); } // Once a terminal is spun up for the custom execution task this event will be fired. diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 4aa39f91127..604008252d5 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -124,8 +124,8 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi this._runQueuedRequests(terminal.id); } - public async createVirtualProcess(): Promise { - const terminal = await this._proxy.$createTerminal({ name: this._name, isVirtualProcess: true }); + public async createExtensionTerminal(): Promise { + const terminal = await this._proxy.$createTerminal({ name: this._name, isExtensionTerminal: true }); this._name = terminal.name; this._runQueuedRequests(terminal.id); } @@ -329,20 +329,20 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { return terminal; } - public createVirtualProcessTerminal(options: vscode.TerminalVirtualProcessOptions): vscode.Terminal { + public createExtensionTerminal(options: vscode.ExtensionTerminalOptions): vscode.Terminal { const terminal = new ExtHostTerminal(this._proxy, options.name); - const p = new ExtHostVirtualProcess(options.virtualProcess); - terminal.createVirtualProcess().then(() => this._setupExtHostProcessListeners(terminal._id, p)); + const p = new ExtHostPseudoterminal(options.pty); + terminal.createExtensionTerminal().then(() => this._setupExtHostProcessListeners(terminal._id, p)); this._terminals.push(terminal); return terminal; } - public async attachVirtualProcessToTerminal(id: number, virtualProcess: vscode.TerminalVirtualProcess): Promise { + public async attachPtyToTerminal(id: number, pty: vscode.Pseudoterminal): Promise { const terminal = this._getTerminalByIdEventually(id); if (!terminal) { throw new Error(`Cannot resolve terminal with id ${id} for virtual process`); } - const p = new ExtHostVirtualProcess(virtualProcess); + const p = new ExtHostPseudoterminal(pty); this._setupExtHostProcessListeners(id, p); } @@ -619,9 +619,9 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { this._setupExtHostProcessListeners(id, new TerminalProcess(shellLaunchConfig, initialCwd, cols, rows, env, enableConpty, this._logService)); } - public async $startVirtualProcess(id: number, initialDimensions: ITerminalDimensionsDto | undefined): Promise { + public async $startExtensionTerminal(id: number, initialDimensions: ITerminalDimensionsDto | undefined): Promise { // Make sure the ExtHostTerminal exists so onDidOpenTerminal has fired before we call - // TerminalVirtualProcess.start + // Pseudoterminal.start await this._getTerminalByIdEventually(id); // Processes should be initialized here for normal virtual process terminals, however for @@ -630,7 +630,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { let retries = 5; while (retries-- > 0) { if (this._terminalProcesses[id]) { - (this._terminalProcesses[id] as ExtHostVirtualProcess).startSendingEvents(initialDimensions); + (this._terminalProcesses[id] as ExtHostPseudoterminal).startSendingEvents(initialDimensions); return; } await timeout(50); @@ -773,7 +773,7 @@ class ApiRequest { } } -class ExtHostVirtualProcess implements ITerminalChildProcess { +class ExtHostPseudoterminal implements ITerminalChildProcess { private _queuedEvents: (IQueuedEvent | IQueuedEvent | IQueuedEvent<{ pid: number, cwd: string }> | IQueuedEvent)[] = []; private _queueDisposables: IDisposable[] | undefined; @@ -789,33 +789,33 @@ class ExtHostVirtualProcess implements ITerminalChildProcess { public get onProcessOverrideDimensions(): Event { return this._onProcessOverrideDimensions.event; } constructor( - private readonly _virtualProcess: vscode.TerminalVirtualProcess + private readonly _pty: vscode.Pseudoterminal ) { this._queueDisposables = []; - this._queueDisposables.push(this._virtualProcess.onDidWrite(e => this._queuedEvents.push({ emitter: this._onProcessData, data: e }))); - if (this._virtualProcess.onDidExit) { - this._queueDisposables.push(this._virtualProcess.onDidExit(e => this._queuedEvents.push({ emitter: this._onProcessExit, data: e }))); + this._queueDisposables.push(this._pty.onDidWrite(e => this._queuedEvents.push({ emitter: this._onProcessData, data: e }))); + if (this._pty.onDidExit) { + this._queueDisposables.push(this._pty.onDidExit(e => this._queuedEvents.push({ emitter: this._onProcessExit, data: e }))); } - if (this._virtualProcess.onDidOverrideDimensions) { - this._queueDisposables.push(this._virtualProcess.onDidOverrideDimensions(e => this._queuedEvents.push({ emitter: this._onProcessOverrideDimensions, data: e ? { cols: e.columns, rows: e.rows } : undefined }))); + if (this._pty.onDidOverrideDimensions) { + this._queueDisposables.push(this._pty.onDidOverrideDimensions(e => this._queuedEvents.push({ emitter: this._onProcessOverrideDimensions, data: e ? { cols: e.columns, rows: e.rows } : undefined }))); } } shutdown(): void { - if (this._virtualProcess.shutdown) { - this._virtualProcess.shutdown(); + if (this._pty.shutdown) { + this._pty.shutdown(); } } input(data: string): void { - if (this._virtualProcess.handleInput) { - this._virtualProcess.handleInput(data); + if (this._pty.handleInput) { + this._pty.handleInput(data); } } resize(cols: number, rows: number): void { - if (this._virtualProcess.setDimensions) { - this._virtualProcess.setDimensions({ columns: cols, rows }); + if (this._pty.setDimensions) { + this._pty.setDimensions({ columns: cols, rows }); } } @@ -838,19 +838,19 @@ class ExtHostVirtualProcess implements ITerminalChildProcess { this._queueDisposables = undefined; // Attach the real listeners - this._virtualProcess.onDidWrite(e => this._onProcessData.fire(e)); - if (this._virtualProcess.onDidExit) { - this._virtualProcess.onDidExit(e => { + this._pty.onDidWrite(e => this._onProcessData.fire(e)); + if (this._pty.onDidExit) { + this._pty.onDidExit(e => { // Ensure only positive exit codes are returned this._onProcessExit.fire(e >= 0 ? e : 1); }); } - if (this._virtualProcess.onDidOverrideDimensions) { - this._virtualProcess.onDidOverrideDimensions(e => this._onProcessOverrideDimensions.fire(e ? { cols: e.columns, rows: e.rows } : e)); + if (this._pty.onDidOverrideDimensions) { + this._pty.onDidOverrideDimensions(e => this._onProcessOverrideDimensions.fire(e ? { cols: e.columns, rows: e.rows } : e)); } - if (this._virtualProcess.start) { - this._virtualProcess.start(initialDimensions); + if (this._pty.start) { + this._pty.start(initialDimensions); } } } diff --git a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts index 21491081db7..efef7a28135 100644 --- a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts +++ b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts @@ -926,7 +926,7 @@ export class TerminalTaskSystem implements ITaskSystem { }; } else if (task.command.runtime === RuntimeType.CustomExecution2) { this.currentTask.shellLaunchConfig = launchConfigs = { - isVirtualProcess: true, + isExtensionTerminal: true, waitOnExit, name: this.createTerminalName(task, workspaceFolder), initialText: task.command.presentation && task.command.presentation.echo ? `\x1b[1m> Executing task: ${task._label} <\x1b[0m\n` : undefined diff --git a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts index a391164f1f2..348b93e3307 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts @@ -31,7 +31,7 @@ const LATENCY_MEASURING_INTERVAL = 1000; enum ProcessType { Process, - VirtualProcess + ExtensionTerminal } /** @@ -113,8 +113,8 @@ export class TerminalProcessManager implements ITerminalProcessManager { rows: number, isScreenReaderModeEnabled: boolean ): Promise { - if (shellLaunchConfig.isVirtualProcess) { - this._processType = ProcessType.VirtualProcess; + if (shellLaunchConfig.isExtensionTerminal) { + this._processType = ProcessType.ExtensionTerminal; this._process = this._instantiationService.createInstance(TerminalProcessExtHostProxy, this._terminalId, shellLaunchConfig, undefined, cols, rows, this._configHelper); } else { const forceExtHostProcess = (this._configHelper.config as any).extHostProcess; @@ -239,7 +239,7 @@ export class TerminalProcessManager implements ITerminalProcessManager { } public write(data: string): void { - if (this.shellProcessId || this._processType === ProcessType.VirtualProcess) { + if (this.shellProcessId || this._processType === ProcessType.ExtensionTerminal) { if (this._process) { // Send data if the pty is ready this._process.input(data); @@ -292,4 +292,4 @@ export class TerminalProcessManager implements ITerminalProcessManager { this._onProcessExit.fire(exitCode); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index f427fd3ef0e..2774d70a82c 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -188,14 +188,14 @@ export interface IShellLaunchConfig { initialText?: string; /** - * @deprecated use `isVirtualProcess` + * @deprecated use `isExtensionTerminal` */ isRendererOnly?: boolean; /** - * When true an extension is acting as the terminal's process. + * Whether an extension is controlling the terminal via a `vscode.Pseudoterminal`. */ - isVirtualProcess?: boolean; + isExtensionTerminal?: boolean; /** * Whether the terminal process environment should be exactly as provided in @@ -232,7 +232,7 @@ export interface ITerminalService { onInstanceDimensionsChanged: Event; onInstanceMaximumDimensionsChanged: Event; onInstanceRequestExtHostProcess: Event; - onInstanceRequestVirtualProcess: Event; + onInstanceRequestExtensionTerminal: Event; onInstancesChanged: Event; onInstanceTitleChanged: Event; onActiveInstanceChanged: Event; @@ -300,7 +300,7 @@ export interface ITerminalService { extHostReady(remoteAuthority: string): void; requestExtHostProcess(proxy: ITerminalProcessExtHostProxy, shellLaunchConfig: IShellLaunchConfig, activeWorkspaceRootUri: URI, cols: number, rows: number, isWorkspaceShellAllowed: boolean): void; - requestVirtualProcess(proxy: ITerminalProcessExtHostProxy, cols: number, rows: number): void; + requestExtensionTerminal(proxy: ITerminalProcessExtHostProxy, cols: number, rows: number): void; } /** @@ -769,7 +769,7 @@ export interface ITerminalProcessExtHostRequest { isWorkspaceShellAllowed: boolean; } -export interface ITerminalVirtualProcessRequest { +export interface IExtensionTerminalRequest { proxy: ITerminalProcessExtHostProxy; cols: number; rows: number; diff --git a/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts b/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts index e611bce74a6..7093d6aa7f6 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts @@ -58,8 +58,9 @@ export class TerminalProcessExtHostProxy extends Disposable implements ITerminal // Request a process if needed, if this is a virtual process this step can be skipped as // there is no real "process" and we know it's ready on the ext host already. - if (shellLaunchConfig.isVirtualProcess) { - this._terminalService.requestVirtualProcess(this, cols, rows); + if (shellLaunchConfig.isExtensionTerminal) { + // TODO: This name should be improved + this._terminalService.requestExtensionTerminal(this, cols, rows); } else { remoteAgentService.getEnvironment().then(env => { if (!env) { @@ -149,4 +150,4 @@ export class TerminalProcessExtHostProxy extends Disposable implements ITerminal this._pendingLatencyRequests.push(resolve); }); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/contrib/terminal/common/terminalService.ts b/src/vs/workbench/contrib/terminal/common/terminalService.ts index 558be1e44ea..36cbc613dba 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalService.ts @@ -8,7 +8,7 @@ import { Event, Emitter } from 'vs/base/common/event'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; -import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalConfigHelper, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, TERMINAL_PANEL_ID, ITerminalTab, ITerminalProcessExtHostProxy, ITerminalProcessExtHostRequest, KEYBINDING_CONTEXT_TERMINAL_IS_OPEN, ITerminalNativeService, IShellDefinition, IAvailableShellsRequest, ITerminalVirtualProcessRequest } from 'vs/workbench/contrib/terminal/common/terminal'; +import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalConfigHelper, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, TERMINAL_PANEL_ID, ITerminalTab, ITerminalProcessExtHostProxy, ITerminalProcessExtHostRequest, KEYBINDING_CONTEXT_TERMINAL_IS_OPEN, ITerminalNativeService, IShellDefinition, IAvailableShellsRequest, IExtensionTerminalRequest } from 'vs/workbench/contrib/terminal/common/terminal'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { URI } from 'vs/base/common/uri'; import { FindReplaceState } from 'vs/editor/contrib/find/findState'; @@ -55,8 +55,8 @@ export abstract class TerminalService implements ITerminalService { public get onInstanceProcessIdReady(): Event { return this._onInstanceProcessIdReady.event; } protected readonly _onInstanceRequestExtHostProcess = new Emitter(); public get onInstanceRequestExtHostProcess(): Event { return this._onInstanceRequestExtHostProcess.event; } - protected readonly _onInstanceRequestVirtualProcess = new Emitter(); - public get onInstanceRequestVirtualProcess(): Event { return this._onInstanceRequestVirtualProcess.event; } + protected readonly _onInstanceRequestExtensionTerminal = new Emitter(); + public get onInstanceRequestExtensionTerminal(): Event { return this._onInstanceRequestExtensionTerminal.event; } protected readonly _onInstanceDimensionsChanged = new Emitter(); public get onInstanceDimensionsChanged(): Event { return this._onInstanceDimensionsChanged.event; } protected readonly _onInstanceMaximumDimensionsChanged = new Emitter(); @@ -144,8 +144,8 @@ export abstract class TerminalService implements ITerminalService { }); } - public requestVirtualProcess(proxy: ITerminalProcessExtHostProxy, cols: number, rows: number): void { - this._onInstanceRequestVirtualProcess.fire({ proxy, cols, rows }); + public requestExtensionTerminal(proxy: ITerminalProcessExtHostProxy, cols: number, rows: number): void { + this._onInstanceRequestExtensionTerminal.fire({ proxy, cols, rows }); } public extHostReady(remoteAuthority: string): void { From a16e432670428ce4d26b845c88bbfbb47ba2a790 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Thu, 25 Jul 2019 16:02:40 -0700 Subject: [PATCH 639/710] Invert default direction --- src/vs/editor/contrib/find/simpleFindWidget.ts | 12 ++++++++---- .../contrib/terminal/browser/terminalFindWidget.ts | 3 +-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/contrib/find/simpleFindWidget.ts b/src/vs/editor/contrib/find/simpleFindWidget.ts index e6e992dc4da..27a89a40b67 100644 --- a/src/vs/editor/contrib/find/simpleFindWidget.ts +++ b/src/vs/editor/contrib/find/simpleFindWidget.ts @@ -26,7 +26,7 @@ const NLS_NEXT_MATCH_BTN_LABEL = nls.localize('label.nextMatchButton', "Next mat const NLS_CLOSE_BTN_LABEL = nls.localize('label.closeButton', "Close"); export abstract class SimpleFindWidget extends Widget { - private readonly _findInput: FindInput; + protected readonly _findInput: FindInput; private readonly _domNode: HTMLElement; private readonly _innerDomNode: HTMLElement; private _isVisible: boolean = false; @@ -36,15 +36,18 @@ export abstract class SimpleFindWidget extends Widget { private prevBtn: SimpleButton; private nextBtn: SimpleButton; private foundMatch: boolean; + private readonly _invertDefaultDirection: boolean | undefined; constructor( @IContextViewService private readonly _contextViewService: IContextViewService, @IContextKeyService contextKeyService: IContextKeyService, private readonly _state: FindReplaceState = new FindReplaceState(), - showOptionButtons?: boolean + showOptionButtons?: boolean, + invertDefaultDirection?: boolean ) { super(); + this._invertDefaultDirection = invertDefaultDirection; this._findInput = this._register(new ContextScopedFindInput(null, this._contextViewService, { label: NLS_FIND_INPUT_LABEL, placeholder: NLS_FIND_INPUT_PLACEHOLDER, @@ -93,13 +96,14 @@ export abstract class SimpleFindWidget extends Widget { this._register(this._findInput.onKeyDown((e) => { if (e.equals(KeyCode.Enter)) { - this.find(true); + // Flip the direction search goes in the terminal case so it matches other terminals + this.find(this._invertDefaultDirection ? true : false); e.preventDefault(); return; } if (e.equals(KeyMod.Shift | KeyCode.Enter)) { - this.find(false); + this.find(this._invertDefaultDirection ? false : true); e.preventDefault(); return; } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts b/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts index b214d4a7bcc..f8035e70b4f 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts @@ -8,7 +8,6 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_FOCUSED, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED } from 'vs/workbench/contrib/terminal/common/terminal'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { FindReplaceState } from 'vs/editor/contrib/find/findState'; - export class TerminalFindWidget extends SimpleFindWidget { protected _findInputFocused: IContextKey; protected _findWidgetFocused: IContextKey; @@ -19,7 +18,7 @@ export class TerminalFindWidget extends SimpleFindWidget { @IContextKeyService private readonly _contextKeyService: IContextKeyService, @ITerminalService private readonly _terminalService: ITerminalService ) { - super(_contextViewService, _contextKeyService, findState, true); + super(_contextViewService, _contextKeyService, findState, true, true); this._register(findState.onFindReplaceStateChange(() => { this.show(); })); From a62dd35412237761e04e207f43b3e6d92fda9639 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Thu, 25 Jul 2019 16:03:20 -0700 Subject: [PATCH 640/710] Make findInput private again --- src/vs/editor/contrib/find/simpleFindWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/simpleFindWidget.ts b/src/vs/editor/contrib/find/simpleFindWidget.ts index 27a89a40b67..02b522158d6 100644 --- a/src/vs/editor/contrib/find/simpleFindWidget.ts +++ b/src/vs/editor/contrib/find/simpleFindWidget.ts @@ -26,7 +26,7 @@ const NLS_NEXT_MATCH_BTN_LABEL = nls.localize('label.nextMatchButton', "Next mat const NLS_CLOSE_BTN_LABEL = nls.localize('label.closeButton', "Close"); export abstract class SimpleFindWidget extends Widget { - protected readonly _findInput: FindInput; + private readonly _findInput: FindInput; private readonly _domNode: HTMLElement; private readonly _innerDomNode: HTMLElement; private _isVisible: boolean = false; From 9b60caf9e0527fe278c4f919325111e83e8b2fb2 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 Jul 2019 16:09:03 -0700 Subject: [PATCH 641/710] Improve naming of start/spawn request calls --- .../api/browser/mainThreadTerminalService.ts | 12 ++++++------ .../workbench/api/common/extHost.protocol.ts | 2 +- .../api/node/extHostTerminalService.ts | 2 +- .../contrib/terminal/common/terminal.ts | 12 ++++++------ .../common/terminalProcessExtHostProxy.ts | 5 ++--- .../contrib/terminal/common/terminalService.ts | 18 +++++++++--------- 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadTerminalService.ts b/src/vs/workbench/api/browser/mainThreadTerminalService.ts index 2d3dd6d0035..f23b625d140 100644 --- a/src/vs/workbench/api/browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/browser/mainThreadTerminalService.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { IDisposable, DisposableStore } from 'vs/base/common/lifecycle'; -import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalProcessExtHostProxy, ITerminalProcessExtHostRequest, ITerminalDimensions, EXT_HOST_CREATION_DELAY, IAvailableShellsRequest, IDefaultShellAndArgsRequest, IExtensionTerminalRequest } from 'vs/workbench/contrib/terminal/common/terminal'; +import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalProcessExtHostProxy, ISpawnExtHostProcessRequest, ITerminalDimensions, EXT_HOST_CREATION_DELAY, IAvailableShellsRequest, IDefaultShellAndArgsRequest, IStartExtensionTerminalRequest } from 'vs/workbench/contrib/terminal/common/terminal'; import { ExtHostContext, ExtHostTerminalServiceShape, MainThreadTerminalServiceShape, MainContext, IExtHostContext, ShellLaunchConfigDto, TerminalLaunchConfig, ITerminalDimensionsDto } from 'vs/workbench/api/common/extHost.protocol'; import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers'; import { URI } from 'vs/base/common/uri'; @@ -47,8 +47,8 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape this._toDispose.add(_terminalService.onInstanceProcessIdReady(instance => this._onTerminalProcessIdReady(instance))); this._toDispose.add(_terminalService.onInstanceDimensionsChanged(instance => this._onInstanceDimensionsChanged(instance))); this._toDispose.add(_terminalService.onInstanceMaximumDimensionsChanged(instance => this._onInstanceMaximumDimensionsChanged(instance))); - this._toDispose.add(_terminalService.onInstanceRequestExtHostProcess(request => this._onTerminalRequestExtHostProcess(request))); - this._toDispose.add(_terminalService.onInstanceRequestExtensionTerminal(e => this._onTerminalRequestExtensionTerminal(e))); + this._toDispose.add(_terminalService.onInstanceRequestSpawnExtHostProcess(request => this._onRequestSpawnExtHostProcess(request))); + this._toDispose.add(_terminalService.onInstanceRequestStartExtensionTerminal(e => this._onRequestStartExtensionTerminal(e))); this._toDispose.add(_terminalService.onActiveInstanceChanged(instance => this._onActiveTerminalChanged(instance ? instance.id : null))); this._toDispose.add(_terminalService.onInstanceTitleChanged(instance => this._onTitleChanged(instance.id, instance.title))); this._toDispose.add(_terminalService.configHelper.onWorkspacePermissionsChanged(isAllowed => this._onWorkspacePermissionsChanged(isAllowed))); @@ -240,7 +240,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape this._proxy.$acceptTerminalMaximumDimensions(instance.id, instance.maxCols, instance.maxRows); } - private _onTerminalRequestExtHostProcess(request: ITerminalProcessExtHostRequest): void { + private _onRequestSpawnExtHostProcess(request: ISpawnExtHostProcessRequest): void { // Only allow processes on remote ext hosts if (!this._remoteAuthority) { return; @@ -261,7 +261,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape cwd: request.shellLaunchConfig.cwd, env: request.shellLaunchConfig.env }; - this._proxy.$createProcess(proxy.terminalId, shellLaunchConfigDto, request.activeWorkspaceRootUri, request.cols, request.rows, request.isWorkspaceShellAllowed); + this._proxy.$spawnExtHostProcess(proxy.terminalId, shellLaunchConfigDto, request.activeWorkspaceRootUri, request.cols, request.rows, request.isWorkspaceShellAllowed); proxy.onInput(data => this._proxy.$acceptProcessInput(proxy.terminalId, data)); proxy.onResize(dimensions => this._proxy.$acceptProcessResize(proxy.terminalId, dimensions.cols, dimensions.rows)); proxy.onShutdown(immediate => this._proxy.$acceptProcessShutdown(proxy.terminalId, immediate)); @@ -270,7 +270,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape proxy.onRequestLatency(() => this._onRequestLatency(proxy.terminalId)); } - private _onTerminalRequestExtensionTerminal(request: IExtensionTerminalRequest): void { + private _onRequestStartExtensionTerminal(request: IStartExtensionTerminalRequest): void { const proxy = request.proxy; const ready = this._terminalProcessesReady.get(proxy.terminalId); if (!ready) { diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 6a76d4e86b4..e224dcc9c5d 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -1161,7 +1161,7 @@ export interface ExtHostTerminalServiceShape { $acceptTerminalTitleChange(id: number, name: string): void; $acceptTerminalDimensions(id: number, cols: number, rows: number): void; $acceptTerminalMaximumDimensions(id: number, cols: number, rows: number): void; - $createProcess(id: number, shellLaunchConfig: ShellLaunchConfigDto, activeWorkspaceRootUri: UriComponents, cols: number, rows: number, isWorkspaceShellAllowed: boolean): void; + $spawnExtHostProcess(id: number, shellLaunchConfig: ShellLaunchConfigDto, activeWorkspaceRootUri: UriComponents, cols: number, rows: number, isWorkspaceShellAllowed: boolean): void; $startExtensionTerminal(id: number, initialDimensions: ITerminalDimensionsDto | undefined): void; $acceptProcessInput(id: number, data: string): void; $acceptProcessResize(id: number, cols: number, rows: number): void; diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 604008252d5..7b5df64321c 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -550,7 +550,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { this._variableResolver = new ExtHostVariableResolverService(workspaceFolders || [], this._extHostDocumentsAndEditors, configProvider); } - public async $createProcess(id: number, shellLaunchConfigDto: ShellLaunchConfigDto, activeWorkspaceRootUriComponents: UriComponents, cols: number, rows: number, isWorkspaceShellAllowed: boolean): Promise { + public async $spawnExtHostProcess(id: number, shellLaunchConfigDto: ShellLaunchConfigDto, activeWorkspaceRootUriComponents: UriComponents, cols: number, rows: number, isWorkspaceShellAllowed: boolean): Promise { const shellLaunchConfig: IShellLaunchConfig = { name: shellLaunchConfigDto.name, executable: shellLaunchConfigDto.executable, diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index 2774d70a82c..f6413d9857e 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -231,8 +231,8 @@ export interface ITerminalService { onInstanceProcessIdReady: Event; onInstanceDimensionsChanged: Event; onInstanceMaximumDimensionsChanged: Event; - onInstanceRequestExtHostProcess: Event; - onInstanceRequestExtensionTerminal: Event; + onInstanceRequestSpawnExtHostProcess: Event; + onInstanceRequestStartExtensionTerminal: Event; onInstancesChanged: Event; onInstanceTitleChanged: Event; onActiveInstanceChanged: Event; @@ -299,8 +299,8 @@ export interface ITerminalService { preparePathForTerminalAsync(path: string, executable: string | undefined, title: string): Promise; extHostReady(remoteAuthority: string): void; - requestExtHostProcess(proxy: ITerminalProcessExtHostProxy, shellLaunchConfig: IShellLaunchConfig, activeWorkspaceRootUri: URI, cols: number, rows: number, isWorkspaceShellAllowed: boolean): void; - requestExtensionTerminal(proxy: ITerminalProcessExtHostProxy, cols: number, rows: number): void; + requestSpawnExtHostProcess(proxy: ITerminalProcessExtHostProxy, shellLaunchConfig: IShellLaunchConfig, activeWorkspaceRootUri: URI, cols: number, rows: number, isWorkspaceShellAllowed: boolean): void; + requestStartExtensionTerminal(proxy: ITerminalProcessExtHostProxy, cols: number, rows: number): void; } /** @@ -760,7 +760,7 @@ export interface ITerminalProcessExtHostProxy extends IDisposable { onRequestLatency: Event; } -export interface ITerminalProcessExtHostRequest { +export interface ISpawnExtHostProcessRequest { proxy: ITerminalProcessExtHostProxy; shellLaunchConfig: IShellLaunchConfig; activeWorkspaceRootUri: URI; @@ -769,7 +769,7 @@ export interface ITerminalProcessExtHostRequest { isWorkspaceShellAllowed: boolean; } -export interface IExtensionTerminalRequest { +export interface IStartExtensionTerminalRequest { proxy: ITerminalProcessExtHostProxy; cols: number; rows: number; diff --git a/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts b/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts index 7093d6aa7f6..80923d84486 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts @@ -59,14 +59,13 @@ export class TerminalProcessExtHostProxy extends Disposable implements ITerminal // Request a process if needed, if this is a virtual process this step can be skipped as // there is no real "process" and we know it's ready on the ext host already. if (shellLaunchConfig.isExtensionTerminal) { - // TODO: This name should be improved - this._terminalService.requestExtensionTerminal(this, cols, rows); + this._terminalService.requestStartExtensionTerminal(this, cols, rows); } else { remoteAgentService.getEnvironment().then(env => { if (!env) { throw new Error('Could not fetch environment'); } - this._terminalService.requestExtHostProcess(this, shellLaunchConfig, activeWorkspaceRootUri, cols, rows, configHelper.checkWorkspaceShellPermissions(env.os)); + this._terminalService.requestSpawnExtHostProcess(this, shellLaunchConfig, activeWorkspaceRootUri, cols, rows, configHelper.checkWorkspaceShellPermissions(env.os)); }); if (!hasReceivedResponse) { setTimeout(() => this._onProcessTitleChanged.fire(nls.localize('terminal.integrated.starting', "Starting...")), 0); diff --git a/src/vs/workbench/contrib/terminal/common/terminalService.ts b/src/vs/workbench/contrib/terminal/common/terminalService.ts index 36cbc613dba..1bb31239d69 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalService.ts @@ -8,7 +8,7 @@ import { Event, Emitter } from 'vs/base/common/event'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; -import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalConfigHelper, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, TERMINAL_PANEL_ID, ITerminalTab, ITerminalProcessExtHostProxy, ITerminalProcessExtHostRequest, KEYBINDING_CONTEXT_TERMINAL_IS_OPEN, ITerminalNativeService, IShellDefinition, IAvailableShellsRequest, IExtensionTerminalRequest } from 'vs/workbench/contrib/terminal/common/terminal'; +import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalConfigHelper, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, TERMINAL_PANEL_ID, ITerminalTab, ITerminalProcessExtHostProxy, ISpawnExtHostProcessRequest, KEYBINDING_CONTEXT_TERMINAL_IS_OPEN, ITerminalNativeService, IShellDefinition, IAvailableShellsRequest, IStartExtensionTerminalRequest } from 'vs/workbench/contrib/terminal/common/terminal'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { URI } from 'vs/base/common/uri'; import { FindReplaceState } from 'vs/editor/contrib/find/findState'; @@ -53,10 +53,10 @@ export abstract class TerminalService implements ITerminalService { public get onInstanceDisposed(): Event { return this._onInstanceDisposed.event; } protected readonly _onInstanceProcessIdReady = new Emitter(); public get onInstanceProcessIdReady(): Event { return this._onInstanceProcessIdReady.event; } - protected readonly _onInstanceRequestExtHostProcess = new Emitter(); - public get onInstanceRequestExtHostProcess(): Event { return this._onInstanceRequestExtHostProcess.event; } - protected readonly _onInstanceRequestExtensionTerminal = new Emitter(); - public get onInstanceRequestExtensionTerminal(): Event { return this._onInstanceRequestExtensionTerminal.event; } + protected readonly _onInstanceRequestSpawnExtHostProcess = new Emitter(); + public get onInstanceRequestSpawnExtHostProcess(): Event { return this._onInstanceRequestSpawnExtHostProcess.event; } + protected readonly _onInstanceRequestStartExtensionTerminal = new Emitter(); + public get onInstanceRequestStartExtensionTerminal(): Event { return this._onInstanceRequestStartExtensionTerminal.event; } protected readonly _onInstanceDimensionsChanged = new Emitter(); public get onInstanceDimensionsChanged(): Event { return this._onInstanceDimensionsChanged.event; } protected readonly _onInstanceMaximumDimensionsChanged = new Emitter(); @@ -131,7 +131,7 @@ export abstract class TerminalService implements ITerminalService { return activeInstance ? activeInstance : this.createTerminal(undefined, wasNewTerminalAction); } - public requestExtHostProcess(proxy: ITerminalProcessExtHostProxy, shellLaunchConfig: IShellLaunchConfig, activeWorkspaceRootUri: URI, cols: number, rows: number, isWorkspaceShellAllowed: boolean): void { + public requestSpawnExtHostProcess(proxy: ITerminalProcessExtHostProxy, shellLaunchConfig: IShellLaunchConfig, activeWorkspaceRootUri: URI, cols: number, rows: number, isWorkspaceShellAllowed: boolean): void { this._extensionService.whenInstalledExtensionsRegistered().then(async () => { // Wait for the remoteAuthority to be ready (and listening for events) before proceeding const conn = this._remoteAgentService.getConnection(); @@ -140,12 +140,12 @@ export abstract class TerminalService implements ITerminalService { while (!this._extHostsReady[remoteAuthority] && ++retries < 50) { await timeout(100); } - this._onInstanceRequestExtHostProcess.fire({ proxy, shellLaunchConfig, activeWorkspaceRootUri, cols, rows, isWorkspaceShellAllowed }); + this._onInstanceRequestSpawnExtHostProcess.fire({ proxy, shellLaunchConfig, activeWorkspaceRootUri, cols, rows, isWorkspaceShellAllowed }); }); } - public requestExtensionTerminal(proxy: ITerminalProcessExtHostProxy, cols: number, rows: number): void { - this._onInstanceRequestExtensionTerminal.fire({ proxy, cols, rows }); + public requestStartExtensionTerminal(proxy: ITerminalProcessExtHostProxy, cols: number, rows: number): void { + this._onInstanceRequestStartExtensionTerminal.fire({ proxy, cols, rows }); } public extHostReady(remoteAuthority: string): void { From ae86d9415f1889973f650fbad9740f4c1ad7ae19 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 Jul 2019 16:24:04 -0700 Subject: [PATCH 642/710] Remove suite.only --- .../src/singlefolder-tests/workspace.tasks.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts index 695ac4b0f59..56559d6aacc 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import * as vscode from 'vscode'; -suite.only('workspace-namespace', () => { +suite('workspace-namespace', () => { suite('Tasks', () => { From d471d1c7f918ff567e71026671896f17f388a784 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 Jul 2019 16:24:04 -0700 Subject: [PATCH 643/710] Remove suite.only --- .../vscode-api-tests/src/singlefolder-tests/terminal.test.ts | 2 +- .../src/singlefolder-tests/workspace.tasks.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts index 63e39fdd2e4..8c78cf68ead 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts @@ -11,7 +11,7 @@ suite('window namespace tests', () => { // Disable conpty in integration tests because of https://github.com/microsoft/vscode/issues/76548 await workspace.getConfiguration('terminal.integrated').update('windowsEnableConpty', false, ConfigurationTarget.Global); }); - suite('Terminal', () => { + suite.skip('Terminal', () => { test('sendText immediately after createTerminal should not throw', (done) => { const reg1 = window.onDidOpenTerminal(term => { equal(terminal, term); diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts index 43470d24e19..c839127a255 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import * as vscode from 'vscode'; -suite.only('workspace-namespace', () => { +suite('workspace-namespace', () => { suite('Tasks', () => { From 33dd83585571c33fb26cf1edad6b60a69bd908d5 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 Jul 2019 16:35:55 -0700 Subject: [PATCH 644/710] Update yarn.lock This change happens on a clear run of yarn --- extensions/json-language-features/server/yarn.lock | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/json-language-features/server/yarn.lock b/extensions/json-language-features/server/yarn.lock index 1bb198a5210..13ab8c59ab0 100644 --- a/extensions/json-language-features/server/yarn.lock +++ b/extensions/json-language-features/server/yarn.lock @@ -134,3 +134,8 @@ vscode-uri@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.0.1.tgz#5448e4f77d21d93ffa34b96f84c6c5e09e3f5a9b" integrity sha512-s/k0zsYr6y+tsocFyxT/+G5aq8mEdpDZuph3LZ+UmCs7LNhx/xomiCy5kyP+jOAKC7RMCUvb6JbPD1/TgAvq0g== + +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== From 3a2423174cb205c5dde964c7a75b2372cb848d55 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 Jul 2019 17:02:04 -0700 Subject: [PATCH 645/710] xterm@3.15.0-beta89 Diff: https://github.com/xtermjs/xterm.js/compare/378982a...689fb6b Changes: - Fix NPE when disposing detached terminals Fixes microsoft/vscode-remote-release#1033 --- .../src/singlefolder-tests/terminal.test.ts | 2 +- package.json | 2 +- remote/package.json | 2 +- remote/yarn.lock | 8 ++++---- yarn.lock | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts index 8c78cf68ead..63e39fdd2e4 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts @@ -11,7 +11,7 @@ suite('window namespace tests', () => { // Disable conpty in integration tests because of https://github.com/microsoft/vscode/issues/76548 await workspace.getConfiguration('terminal.integrated').update('windowsEnableConpty', false, ConfigurationTarget.Global); }); - suite.skip('Terminal', () => { + suite('Terminal', () => { test('sendText immediately after createTerminal should not throw', (done) => { const reg1 = window.onDidOpenTerminal(term => { equal(terminal, term); diff --git a/package.json b/package.json index eee312cd134..f59a80c947f 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "vscode-ripgrep": "^1.5.5", "vscode-sqlite3": "4.0.8", "vscode-textmate": "^4.2.2", - "xterm": "3.15.0-beta88", + "xterm": "3.15.0-beta89", "xterm-addon-search": "0.2.0-beta3", "xterm-addon-web-links": "0.1.0-beta10", "yauzl": "^2.9.2", diff --git a/remote/package.json b/remote/package.json index ccb412ef358..34ffee1a4be 100644 --- a/remote/package.json +++ b/remote/package.json @@ -20,7 +20,7 @@ "vscode-proxy-agent": "0.4.0", "vscode-ripgrep": "^1.5.5", "vscode-textmate": "^4.2.2", - "xterm": "3.15.0-beta88", + "xterm": "3.15.0-beta89", "xterm-addon-search": "0.2.0-beta3", "xterm-addon-web-links": "0.1.0-beta10", "yauzl": "^2.9.2", diff --git a/remote/yarn.lock b/remote/yarn.lock index b5077ce87a4..1c4e700f495 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -1159,10 +1159,10 @@ xterm-addon-web-links@0.1.0-beta10: resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.1.0-beta10.tgz#610fa9773a2a5ccd41c1c83ba0e2dd2c9eb66a23" integrity sha512-xfpjy0V6bB4BR44qIgZQPoCMVakxb65gMscPkHpO//QxvUxKzabV3dxOsIbeZRFkUGsWTFlvz2OoaBLoNtv5gg== -xterm@3.15.0-beta88: - version "3.15.0-beta88" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta88.tgz#9a1c8d8a869517a4a8f103426fe0a89473455aa4" - integrity sha512-4nWNf4AbeoTRyOrhmWah9tZTXRepNo4uxzXdGskBWC9dAtItjD6ShNgi5z+xuVB4NmKoDp1b8rWNNMJ1I6/TLA== +xterm@3.15.0-beta89: + version "3.15.0-beta89" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta89.tgz#255962e2595deefb42b8c0043001256526163a3f" + integrity sha512-rNaoUamacPRg+ejbKDGRDNqR3SZ3Uf/pUW0mO+FF25/lIgdLq8x7RgZVBgFweCZ/dijPjxoyMcgfNDTH9h8LOg== yauzl@^2.9.2: version "2.10.0" diff --git a/yarn.lock b/yarn.lock index 700e0195f87..6c206d6fa00 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9872,10 +9872,10 @@ xterm-addon-web-links@0.1.0-beta10: resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.1.0-beta10.tgz#610fa9773a2a5ccd41c1c83ba0e2dd2c9eb66a23" integrity sha512-xfpjy0V6bB4BR44qIgZQPoCMVakxb65gMscPkHpO//QxvUxKzabV3dxOsIbeZRFkUGsWTFlvz2OoaBLoNtv5gg== -xterm@3.15.0-beta88: - version "3.15.0-beta88" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta88.tgz#9a1c8d8a869517a4a8f103426fe0a89473455aa4" - integrity sha512-4nWNf4AbeoTRyOrhmWah9tZTXRepNo4uxzXdGskBWC9dAtItjD6ShNgi5z+xuVB4NmKoDp1b8rWNNMJ1I6/TLA== +xterm@3.15.0-beta89: + version "3.15.0-beta89" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta89.tgz#255962e2595deefb42b8c0043001256526163a3f" + integrity sha512-rNaoUamacPRg+ejbKDGRDNqR3SZ3Uf/pUW0mO+FF25/lIgdLq8x7RgZVBgFweCZ/dijPjxoyMcgfNDTH9h8LOg== y18n@^3.2.1: version "3.2.1" From ce731779831c9a4f285730361f852d5c5b5dc2cc Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 Jul 2019 17:27:15 -0700 Subject: [PATCH 646/710] Minimize diff --- src/vs/editor/contrib/find/simpleFindWidget.ts | 9 +++------ .../contrib/terminal/browser/terminalFindWidget.ts | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/contrib/find/simpleFindWidget.ts b/src/vs/editor/contrib/find/simpleFindWidget.ts index 02b522158d6..e3723366157 100644 --- a/src/vs/editor/contrib/find/simpleFindWidget.ts +++ b/src/vs/editor/contrib/find/simpleFindWidget.ts @@ -36,18 +36,16 @@ export abstract class SimpleFindWidget extends Widget { private prevBtn: SimpleButton; private nextBtn: SimpleButton; private foundMatch: boolean; - private readonly _invertDefaultDirection: boolean | undefined; constructor( @IContextViewService private readonly _contextViewService: IContextViewService, @IContextKeyService contextKeyService: IContextKeyService, private readonly _state: FindReplaceState = new FindReplaceState(), showOptionButtons?: boolean, - invertDefaultDirection?: boolean + private readonly _invertDefaultDirection: boolean = false ) { super(); - this._invertDefaultDirection = invertDefaultDirection; this._findInput = this._register(new ContextScopedFindInput(null, this._contextViewService, { label: NLS_FIND_INPUT_LABEL, placeholder: NLS_FIND_INPUT_PLACEHOLDER, @@ -96,14 +94,13 @@ export abstract class SimpleFindWidget extends Widget { this._register(this._findInput.onKeyDown((e) => { if (e.equals(KeyCode.Enter)) { - // Flip the direction search goes in the terminal case so it matches other terminals - this.find(this._invertDefaultDirection ? true : false); + this.find(this._invertDefaultDirection); e.preventDefault(); return; } if (e.equals(KeyMod.Shift | KeyCode.Enter)) { - this.find(this._invertDefaultDirection ? false : true); + this.find(!this._invertDefaultDirection); e.preventDefault(); return; } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts b/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts index f8035e70b4f..1ab97705568 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts @@ -8,6 +8,7 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_FOCUSED, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED } from 'vs/workbench/contrib/terminal/common/terminal'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { FindReplaceState } from 'vs/editor/contrib/find/findState'; + export class TerminalFindWidget extends SimpleFindWidget { protected _findInputFocused: IContextKey; protected _findWidgetFocused: IContextKey; From 62a102ec0c863be7c7775ec9acb924bc7a217312 Mon Sep 17 00:00:00 2001 From: Sana Ajani Date: Thu, 25 Jul 2019 17:31:02 -0700 Subject: [PATCH 647/710] add office and sharepoint packages --- .../electron-browser/workspaceStatsService.ts | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts b/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts index 5041cb4be1e..ff776387035 100644 --- a/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts +++ b/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts @@ -47,7 +47,22 @@ const ModulesToLookFor = [ 'azure-storage', 'firebase', '@google-cloud/common', - 'heroku-cli' + 'heroku-cli', + //Office and Sharepoint packages + '@microsoft/office-js', + '@microsoft/office-js-helpers', + '@types/office-js', + '@types/office-runtime', + 'office-ui-fabric-react', + '@uifabric/icons', + '@uifabric/merge-styles', + '@uifabric/styling', + '@uifabric/experiments', + '@uifabric/utilities', + '@microsoft/rush', + 'lerna', + 'just-task', + 'beachball' ]; const PyModulesToLookFor = [ 'azure', @@ -143,6 +158,20 @@ export class WorkspaceStatsService implements IWorkspaceStatsService { "workspace.npm.@google-cloud/common" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.npm.firebase" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.npm.heroku-cli" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@microsoft/office-js" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@microsoft/office-js-helpers" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@types/office-js" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@types/office-runtime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.office-ui-fabric-react" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@uifabric/icons" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@uifabric/merge-styles" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@uifabric/styling" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@uifabric/experiments" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@uifabric/utilities" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@microsoft/rush" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.lerna" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.just-task" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.beachball" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.bower" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.yeoman.code.ext" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.cordova.high" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, @@ -187,7 +216,8 @@ export class WorkspaceStatsService implements IWorkspaceStatsService { "workspace.py.pydocumentdb" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.py.botbuilder-core" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.py.botbuilder-schema" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.botframework-connector" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } + "workspace.py.botframework-connector" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + } */ From e7070d00e6fed745adccccc79ee5a36f78a0eda2 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 25 Jul 2019 19:11:33 -0700 Subject: [PATCH 648/710] Fix #74715. --- src/vs/editor/common/model/textModelSearch.ts | 6 ++++++ .../test/common/model/textModelSearch.test.ts | 19 +++++++++++++++++++ test/electron/renderer.html | 4 ++-- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/model/textModelSearch.ts b/src/vs/editor/common/model/textModelSearch.ts index 1b63ef93f9f..ec2bb71ec30 100644 --- a/src/vs/editor/common/model/textModelSearch.ts +++ b/src/vs/editor/common/model/textModelSearch.ts @@ -545,6 +545,12 @@ export class Searcher { const matchStartIndex = m.index; const matchLength = m[0].length; if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) { + if (matchLength === 0) { + // the search result is an empty string and won't advance `regex.lastIndex`, so `regex.exec` will stuck here + // we attempt to recover from that by advancing by one + this._searchRegex.lastIndex += 1; + continue; + } // Exit early if the regex matches the same range twice return null; } diff --git a/src/vs/editor/test/common/model/textModelSearch.test.ts b/src/vs/editor/test/common/model/textModelSearch.test.ts index 1dc5e82b52c..6476015cb5d 100644 --- a/src/vs/editor/test/common/model/textModelSearch.test.ts +++ b/src/vs/editor/test/common/model/textModelSearch.test.ts @@ -733,4 +733,23 @@ suite('TextModelSearch', () => { assert(isMultilineRegexSource('\\n')); assert(isMultilineRegexSource('foo\\W')); }); + + test('issue #74715. \\d* finds empty string and stops searching.', () => { + let model = TextModel.createFromString('10.243.30.10'); + + let searchParams = new SearchParams('\\d*', true, false, null); + + let actual = TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 100); + assert.deepEqual(actual, [ + new FindMatch(new Range(1, 1, 1, 3), ['10']), + new FindMatch(new Range(1, 3, 1, 3), ['']), + new FindMatch(new Range(1, 4, 1, 7), ['243']), + new FindMatch(new Range(1, 7, 1, 7), ['']), + new FindMatch(new Range(1, 8, 1, 10), ['30']), + new FindMatch(new Range(1, 10, 1, 10), ['']), + new FindMatch(new Range(1, 11, 1, 13), ['10']) + ]); + + model.dispose(); + }); }); diff --git a/test/electron/renderer.html b/test/electron/renderer.html index 1eb67318bfa..10ddaaf3341 100644 --- a/test/electron/renderer.html +++ b/test/electron/renderer.html @@ -15,8 +15,8 @@ ui: 'tdd', timeout: 5000 }); - require('./renderer'); + require('/Users/penlv/code/vscode/test/electron/renderer'); - \ No newline at end of file + From f0f7220eed1ce0c2c967a9c5340c805e5db7f070 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 25 Jul 2019 20:32:04 -0700 Subject: [PATCH 649/710] bump distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f59a80c947f..0bdff88bdee 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "60ca9cac46049ff774e34d11e335d172587da608", + "distro": "ecf90e8c66d243c7ac15e30c24b3cc437d0700dc", "author": { "name": "Microsoft Corporation" }, From 6d82826e990407364d5c829b73602a19ecdf7d00 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 25 Jul 2019 20:42:36 -0700 Subject: [PATCH 650/710] Revert test require renderer --- test/electron/renderer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/electron/renderer.html b/test/electron/renderer.html index 10ddaaf3341..72454389597 100644 --- a/test/electron/renderer.html +++ b/test/electron/renderer.html @@ -15,7 +15,7 @@ ui: 'tdd', timeout: 5000 }); - require('/Users/penlv/code/vscode/test/electron/renderer'); + require('./renderer'); From 9ead7b9775dd7375f5272e60c747764eeeb9d672 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 26 Jul 2019 09:58:15 +0200 Subject: [PATCH 651/710] RemoteConnectionState not disconnected when initialization fails (for microsoft/vscode-remote-release#1029) --- .../electron-browser/remote.contribution.ts | 52 ++++++++++--------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts index 9f861987bc4..04975876713 100644 --- a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts +++ b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts @@ -49,7 +49,7 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc private windowCommandMenu: IMenu; private hasWindowActions: boolean = false; private remoteAuthority: string | undefined; - private disconnected: boolean = true; + private connectionState: 'initializing' | 'connected' | 'disconnected' | undefined = undefined; constructor( @IStatusbarService private readonly statusbarService: IStatusbarService, @@ -76,7 +76,8 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc if (this.remoteAuthority) { // Pending entry until extensions are ready this.renderWindowIndicator(nls.localize('host.open', "$(sync~spin) Opening Remote..."), undefined, WINDOW_ACTIONS_COMMAND_ID); - RemoteConnectionState.bindTo(this.contextKeyService).set('initializing'); + this.connectionState = 'initializing'; + RemoteConnectionState.bindTo(this.contextKeyService).set(this.connectionState); MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, { group: '6_close', @@ -86,6 +87,23 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc }, order: 3.5 }); + + const connection = remoteAgentService.getConnection(); + if (connection) { + this._register(connection.onDidStateChange((e) => { + switch (e.type) { + case PersistentConnectionEventType.ConnectionLost: + case PersistentConnectionEventType.ReconnectionPermanentFailure: + case PersistentConnectionEventType.ReconnectionRunning: + case PersistentConnectionEventType.ReconnectionWait: + this.setDisconnected(true); + break; + case PersistentConnectionEventType.ConnectionGain: + this.setDisconnected(false); + break; + } + })); + } } extensionService.whenInstalledExtensionsRegistered().then(_ => { @@ -96,30 +114,14 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc this._register(this.windowCommandMenu.onDidChange(e => this.updateWindowActions())); this.updateWindowIndicator(); }); - - const connection = remoteAgentService.getConnection(); - if (connection) { - this._register(connection.onDidStateChange((e) => { - switch (e.type) { - case PersistentConnectionEventType.ConnectionLost: - case PersistentConnectionEventType.ReconnectionPermanentFailure: - case PersistentConnectionEventType.ReconnectionRunning: - case PersistentConnectionEventType.ReconnectionWait: - this.setDisconnected(true); - break; - case PersistentConnectionEventType.ConnectionGain: - this.setDisconnected(false); - break; - } - })); - } } private setDisconnected(isDisconnected: boolean): void { - if (this.disconnected !== isDisconnected) { - this.disconnected = isDisconnected; - RemoteConnectionState.bindTo(this.contextKeyService).set(isDisconnected ? 'disconnected' : 'connected'); - Deprecated_RemoteAuthorityContext.bindTo(this.contextKeyService).set(isDisconnected ? '' : this.remoteAuthority || `disconnected/${this.remoteAuthority}`); + const newState = isDisconnected ? 'disconnected' : 'connected'; + if (this.connectionState !== newState) { + this.connectionState = newState; + RemoteConnectionState.bindTo(this.contextKeyService).set(this.connectionState); + Deprecated_RemoteAuthorityContext.bindTo(this.contextKeyService).set(isDisconnected ? 'disconnected/${this.remoteAuthority!}' : this.remoteAuthority!); this.updateWindowIndicator(); } } @@ -128,7 +130,7 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc const windowActionCommand = (this.remoteAuthority || this.windowCommandMenu.getActions().length) ? WINDOW_ACTIONS_COMMAND_ID : undefined; if (this.remoteAuthority) { const hostLabel = this.labelService.getHostLabel(REMOTE_HOST_SCHEME, this.remoteAuthority) || this.remoteAuthority; - if (!this.disconnected) { + if (this.connectionState !== 'disconnected') { this.renderWindowIndicator(`$(remote) ${hostLabel}`, nls.localize('host.tooltip', "Editing on {0}", hostLabel), windowActionCommand); } else { this.renderWindowIndicator(`$(alert) ${nls.localize('disconnectedFrom', "Disconnected from")} ${hostLabel}`, nls.localize('host.tooltipDisconnected', "Disconnected from {0}", hostLabel), windowActionCommand); @@ -468,4 +470,4 @@ Registry.as(ConfigurationExtensions.Configuration) } } } - }); \ No newline at end of file + }); From 3e9cac9b85d68766a4f3b45f17484bb979917a69 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 Jul 2019 11:30:06 +0200 Subject: [PATCH 652/710] properly cancel suggestion details requests, #77926 --- src/vs/editor/contrib/suggest/suggestWidget.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/contrib/suggest/suggestWidget.ts b/src/vs/editor/contrib/suggest/suggestWidget.ts index 9fa0cc0a87b..9d020eaf89c 100644 --- a/src/vs/editor/contrib/suggest/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/suggestWidget.ts @@ -672,7 +672,7 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate { - if (this.list.length < index) { + if (index >= this.list.length || item !== this.list.element(index)) { return; } @@ -689,11 +689,7 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate { - if (this.focusedItem === item) { - this.currentSuggestionDetails = null; - } - }); + }).catch(onUnexpectedError); } // emit an event From 0911c90ac4e7fbd8b46d339aa84ebb83a41c63a5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 Jul 2019 11:44:04 +0200 Subject: [PATCH 653/710] suggest - keep commit character when item isn't changing --- src/vs/editor/contrib/suggest/suggestCommitCharacters.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vs/editor/contrib/suggest/suggestCommitCharacters.ts b/src/vs/editor/contrib/suggest/suggestCommitCharacters.ts index 8a6fca72612..20a7656532a 100644 --- a/src/vs/editor/contrib/suggest/suggestCommitCharacters.ts +++ b/src/vs/editor/contrib/suggest/suggestCommitCharacters.ts @@ -36,10 +36,17 @@ export class CommitCharacterController { private _onItem(selected: ISelectedSuggestion | undefined): void { if (!selected || !isNonEmptyArray(selected.item.completion.commitCharacters)) { + // no item or no commit characters this.reset(); return; } + if (this._active && this._active.item.item === selected.item) { + // still the same item + return; + } + + // keep item and its commit characters const acceptCharacters = new CharacterSet(); for (const ch of selected.item.completion.commitCharacters) { if (ch.length > 0) { From a7122371aaa76237b155cd38c57e9d66a5f47637 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 Jul 2019 11:56:20 +0200 Subject: [PATCH 654/710] dispo - add some more DisposableStore usage --- .../editor/contrib/suggest/suggestWidget.ts | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/vs/editor/contrib/suggest/suggestWidget.ts b/src/vs/editor/contrib/suggest/suggestWidget.ts index 9d020eaf89c..e6ac05dab25 100644 --- a/src/vs/editor/contrib/suggest/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/suggestWidget.ts @@ -50,7 +50,7 @@ interface ISuggestionTemplateData { iconLabel: IconLabel; typeLabel: HTMLElement; readMore: HTMLElement; - disposables: IDisposable[]; + disposables: DisposableStore; } /** @@ -106,8 +106,7 @@ class Renderer implements IListRenderer renderTemplate(container: HTMLElement): ISuggestionTemplateData { const data = Object.create(null); - const disposables = new DisposableStore(); - data.disposables = [disposables]; + data.disposables = new DisposableStore(); data.root = container; addClass(data.root, 'show-file-icons'); @@ -119,7 +118,7 @@ class Renderer implements IListRenderer const main = append(text, $('.main')); data.iconLabel = new IconLabel(main, { supportHighlights: true }); - disposables.add(data.iconLabel); + data.disposables.add(data.iconLabel); data.typeLabel = append(main, $('span.type-label')); @@ -147,7 +146,7 @@ class Renderer implements IListRenderer configureFont(); - disposables.add(Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)) + data.disposables.add(Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)) .filter(e => e.fontInfo || e.contribInfo) .on(configureFont, null)); @@ -218,7 +217,7 @@ class Renderer implements IListRenderer } disposeTemplate(templateData: ISuggestionTemplateData): void { - templateData.disposables = dispose(templateData.disposables); + templateData.disposables.dispose(); } } @@ -253,7 +252,7 @@ class SuggestionDetails { private type: HTMLElement; private docs: HTMLElement; private ariaLabel: string | null; - private disposables: IDisposable[]; + private readonly disposables: DisposableStore; private renderDisposeable: IDisposable; private borderWidth: number = 1; @@ -264,16 +263,16 @@ class SuggestionDetails { private readonly markdownRenderer: MarkdownRenderer, private readonly triggerKeybindingLabel: string, ) { - this.disposables = []; + this.disposables = new DisposableStore(); this.el = append(container, $('.details')); - this.disposables.push(toDisposable(() => container.removeChild(this.el))); + this.disposables.add(toDisposable(() => container.removeChild(this.el))); this.body = $('.body'); this.scrollbar = new DomScrollableElement(this.body, {}); append(this.el, this.scrollbar.getDomNode()); - this.disposables.push(this.scrollbar); + this.disposables.add(this.scrollbar); this.header = append(this.body, $('.header')); this.close = append(this.header, $('span.close')); @@ -414,7 +413,7 @@ class SuggestionDetails { } dispose(): void { - this.disposables = dispose(this.disposables); + this.disposables.dispose(); this.renderDisposeable = dispose(this.renderDisposeable); } } From 98fc1148c923e7fae1d9e4b7993965dd238be495 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 14:18:57 +0200 Subject: [PATCH 655/710] :lipstick: --- .../common/inactiveExtensionUrlHandler.ts | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts b/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts index bf7bb20ec81..7330ceedefb 100644 --- a/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts +++ b/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts @@ -96,8 +96,10 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { return true; } - const confirmedExtensionIds = this.getConfirmedExtensionIds(); - confirmed = confirmed || confirmedExtensionIds.has(ExtensionIdentifier.toKey(extensionId)); + if (!confirmed) { + const confirmedExtensionIds = this.getConfirmedExtensionIds(); + confirmed = confirmedExtensionIds.has(ExtensionIdentifier.toKey(extensionId)); + } if (!confirmed) { let uriString = uri.toString(); @@ -283,18 +285,17 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { } private getConfirmedExtensionIds(): Set { - return new Set([ + const ids = [ ...this.getConfirmedExtensionIdsFromStorage(), ...this.getConfirmedExtensionIdsFromConfiguration(), - ].map( - extensionId => ExtensionIdentifier.toKey(extensionId) - )); + ].map(extensionId => ExtensionIdentifier.toKey(extensionId)); + + return new Set(ids); } private getConfirmedExtensionIdsFromConfiguration(): Array { - const confirmedExtensionIds = this.configurationService.getValue>( - CONFIRMED_EXTENSIONS_CONFIGURATION_KEY - ); + const confirmedExtensionIds = this.configurationService.getValue>(CONFIRMED_EXTENSIONS_CONFIGURATION_KEY); + if (!Array.isArray(confirmedExtensionIds)) { return []; } @@ -303,17 +304,15 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { } private getConfirmedExtensionIdsFromStorage(): Array { - const confirmedExtensionIdsJson = this.storageService.get( - CONFIRMED_EXTENSIONS_STORAGE_KEY, - StorageScope.GLOBAL, - '[]', - ); + const confirmedExtensionIdsJson = this.storageService.get(CONFIRMED_EXTENSIONS_STORAGE_KEY, StorageScope.GLOBAL, '[]'); + try { return JSON.parse(confirmedExtensionIdsJson); } catch (err) { return []; } } + private addConfirmedExtensionIdToStorage(extensionId: string): void { const existingConfirmedExtensionIds = this.getConfirmedExtensionIdsFromStorage(); this.storageService.store( From 8213baf0769d63d6bc65db25b93fc5fb91432173 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 14:37:33 +0200 Subject: [PATCH 656/710] extract first repository.status call related to https://github.com/microsoft/vscode/issues/77787#issuecomment-515207062 --- extensions/git/src/model.ts | 1 + extensions/git/src/repository.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index c410dde86bd..da6a940428e 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -251,6 +251,7 @@ export class Model { const repository = new Repository(this.git.open(repositoryRoot, dotGit), this.globalState, this.outputChannel); this.open(repository); + await repository.status(); } catch (err) { if (err.gitErrorCode === GitErrorCodes.NotAGitRepository) { return; diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index a581f9f5fd4..36366ad7d09 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -713,7 +713,6 @@ export class Repository implements Disposable { this.disposables.push(progressManager); this.updateCommitTemplate(); - this.status(); } validateInput(text: string, position: number): SourceControlInputBoxValidation | undefined { From be873f71699b8617e088c8f5ecd57f56e6ad140f Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Fri, 26 Jul 2019 15:16:12 +0200 Subject: [PATCH 657/710] pass env and cwd to createTerminal; fixes #77111 --- .../workbench/api/node/extHostDebugService.ts | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/api/node/extHostDebugService.ts b/src/vs/workbench/api/node/extHostDebugService.ts index d9172447d73..be353ca5bde 100644 --- a/src/vs/workbench/api/node/extHostDebugService.ts +++ b/src/vs/workbench/api/node/extHostDebugService.ts @@ -341,19 +341,29 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { } else { resolve(true); } - }).then(needNewTerminal => { + }).then(async needNewTerminal => { + + const configProvider = await this._configurationService.getConfigProvider(); + const shell = this._terminalService.getDefaultShell(configProvider); if (needNewTerminal || !this._integratedTerminalInstance) { - this._integratedTerminalInstance = this._terminalService.createTerminal(args.title || nls.localize('debug.terminal.title', "debuggee")); + const options: vscode.TerminalOptions = { + shellPath: shell, + // shellArgs: this._terminalService._getDefaultShellArgs(configProvider), + cwd: args.cwd, + name: args.title || nls.localize('debug.terminal.title', "debuggee"), + env: args.env + }; + delete args.cwd; + delete args.env; + this._integratedTerminalInstance = this._terminalService.createTerminalFromOptions(options); } const terminal: vscode.Terminal = this._integratedTerminalInstance; terminal.show(); - return this._integratedTerminalInstance.processId.then(async shellProcessId => { + return this._integratedTerminalInstance.processId.then(shellProcessId => { - const configProvider = await this._configurationService.getConfigProvider(); - const shell = this._terminalService.getDefaultShell(configProvider); const command = prepareCommand(args, shell, configProvider); terminal.sendText(command, true); From 4882ae5b9e5e5c21faaf95e28cd5f31dfe38892f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 Jul 2019 15:24:11 +0200 Subject: [PATCH 658/710] Revert "Add inline deprecated styling to suggest widget" This reverts commit 4a2b010e340412961bf64022eac3f68c70c52066. --- src/vs/editor/common/model/intervalTree.ts | 2 +- src/vs/editor/contrib/suggest/media/suggest.css | 7 ------- src/vs/editor/contrib/suggest/suggestWidget.ts | 5 ----- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/vs/editor/common/model/intervalTree.ts b/src/vs/editor/common/model/intervalTree.ts index 1815f7ee86f..d400024e7c5 100644 --- a/src/vs/editor/common/model/intervalTree.ts +++ b/src/vs/editor/common/model/intervalTree.ts @@ -18,7 +18,7 @@ export const enum ClassName { EditorErrorDecoration = 'squiggly-error', EditorUnnecessaryDecoration = 'squiggly-unnecessary', EditorUnnecessaryInlineDecoration = 'squiggly-inline-unnecessary', - EditorDeprecatedInlineDecoration = 'inline-deprecated' + EditorDeprecatedInlineDecoration = 'squiggly-inline-deprecated' } export const enum NodeColor { diff --git a/src/vs/editor/contrib/suggest/media/suggest.css b/src/vs/editor/contrib/suggest/media/suggest.css index 2f740dfad64..09594abb493 100644 --- a/src/vs/editor/contrib/suggest/media/suggest.css +++ b/src/vs/editor/contrib/suggest/media/suggest.css @@ -97,13 +97,6 @@ font-weight: bold; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .inline-deprecated { - text-decoration: none; /* override normal inline behavior due to HTML structure */ -} -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .inline-deprecated span { - text-decoration: line-through; -} - /** Icon styles **/ .monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close, diff --git a/src/vs/editor/contrib/suggest/suggestWidget.ts b/src/vs/editor/contrib/suggest/suggestWidget.ts index 9eb1398848d..9e02b37f673 100644 --- a/src/vs/editor/contrib/suggest/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/suggestWidget.ts @@ -9,7 +9,6 @@ import { createMatches } from 'vs/base/common/filters'; import * as strings from 'vs/base/common/strings'; import { Event, Emitter } from 'vs/base/common/event'; import { onUnexpectedError } from 'vs/base/common/errors'; -import { ClassName } from 'vs/editor/common/model/intervalTree'; import { IDisposable, dispose, toDisposable, DisposableStore, Disposable } from 'vs/base/common/lifecycle'; import { addClass, append, $, hide, removeClass, show, toggleClass, getDomNodePagePosition, hasClass, addDisposableListener } from 'vs/base/browser/dom'; import { IListVirtualDelegate, IListEvent, IListRenderer, IListMouseEvent } from 'vs/base/browser/ui/list/list'; @@ -197,10 +196,6 @@ class Renderer implements IListRenderer ]; } - if (suggestion.label && suggestion.deprecated) { - labelOptions.extraClasses = (labelOptions.extraClasses || []).concat([ClassName.EditorDeprecatedInlineDecoration]); - } - data.iconLabel.setLabel(suggestion.label, undefined, labelOptions); data.typeLabel.textContent = (suggestion.detail || '').replace(/\n.*$/m, ''); From 53006c0af48632dd79268bab6534abd8f13b7e3b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 Jul 2019 15:24:21 +0200 Subject: [PATCH 659/710] Revert "Add deprecated support to SuggestDataDto" This reverts commit 87ae3a38d337ade925a009cf86d82f11d36fe476. --- src/vs/vscode.proposed.d.ts | 7 ------- src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts | 1 - src/vs/workbench/api/common/extHost.protocol.ts | 1 - src/vs/workbench/api/common/extHostLanguageFeatures.ts | 1 - 4 files changed, 10 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index a495e65a268..6a31141bb94 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1277,13 +1277,6 @@ declare module 'vscode' { //#region Deprecated support - export interface CompletionItem { - /** - * Indicates if this item is deprecated. - */ - deprecated?: boolean; - } - export enum DiagnosticTag { /** * Deprecated or obsolete code diff --git a/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts b/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts index 3541ba2eef0..75af9eebf01 100644 --- a/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts +++ b/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts @@ -341,7 +341,6 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha commitCharacters: data.k, additionalTextEdits: data.l, command: data.m, - deprecated: data.n, // not-standard _id: data.x, }; diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 1e30b620dca..8fb612d3a7c 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -937,7 +937,6 @@ export interface SuggestDataDto { k/* commitCharacters */?: string[]; l/* additionalTextEdits */?: ISingleEditOperation[]; m/* command */?: modes.Command; - n/* deprecated */?: boolean; // not-standard x?: ChainedCacheId; } diff --git a/src/vs/workbench/api/common/extHostLanguageFeatures.ts b/src/vs/workbench/api/common/extHostLanguageFeatures.ts index 6c7065f29f2..884618cc457 100644 --- a/src/vs/workbench/api/common/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/common/extHostLanguageFeatures.ts @@ -736,7 +736,6 @@ class SuggestAdapter { k: item.commitCharacters, l: item.additionalTextEdits && item.additionalTextEdits.map(typeConvert.TextEdit.from), m: this._commands.toInternal(item.command, disposables), - n: item.deprecated }; // 'insertText'-logic From 29f6ec0b34516474babf46710770a735887a2c85 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 Jul 2019 15:24:30 +0200 Subject: [PATCH 660/710] Revert "Add CompletionItem.deprecated property from LSP" This reverts commit 895d6323b4a7686dbc9533c09bbc76fd741f195d. --- src/vs/editor/common/modes.ts | 4 ---- src/vs/monaco.d.ts | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/vs/editor/common/modes.ts b/src/vs/editor/common/modes.ts index dbeb3fb1956..fa05b9b968c 100644 --- a/src/vs/editor/common/modes.ts +++ b/src/vs/editor/common/modes.ts @@ -396,10 +396,6 @@ export interface CompletionItem { * an icon is chosen by the editor. */ kind: CompletionItemKind; - /** - * Indicates if this item is deprecated. - */ - deprecated?: boolean; /** * A human-readable string with additional information * about this item, like type or symbol information. diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 75692fbcceb..982a16b87ef 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -4790,10 +4790,6 @@ declare namespace monaco.languages { * an icon is chosen by the editor. */ kind: CompletionItemKind; - /** - * Indicates if this item is deprecated. - */ - deprecated?: boolean; /** * A human-readable string with additional information * about this item, like type or symbol information. From a154f8f45185fc4d87b5d159c9a6e6678623d190 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 15:33:27 +0200 Subject: [PATCH 661/710] fixes #77345 --- extensions/git/src/repository.ts | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 36366ad7d09..196a1bddade 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -519,8 +519,8 @@ class DotGitWatcher implements IFileWatcher { this.transientDisposables.push(upstreamWatcher); upstreamWatcher.event(this.emitter.fire, this.emitter, this.transientDisposables); } catch (err) { - if (env.logLevel <= LogLevel.Info) { - this.outputChannel.appendLine(`Failed to watch ref '${upstreamPath}'. Ref is most likely packed.`); + if (env.logLevel <= LogLevel.Error) { + this.outputChannel.appendLine(`Failed to watch ref '${upstreamPath}', is most likely packed.\n${err.stack || err}`); } } } @@ -651,19 +651,30 @@ export class Repository implements Disposable { const onWorkspaceRepositoryFileChange = filterEvent(onWorkspaceFileChange, uri => isDescendant(repository.root, uri.fsPath)); const onWorkspaceWorkingTreeFileChange = filterEvent(onWorkspaceRepositoryFileChange, uri => !/\/\.git($|\/)/.test(uri.path)); - const dotGitFileWatcher = new DotGitWatcher(this, outputChannel); - this.disposables.push(dotGitFileWatcher); + let onDotGitFileChange: Event; + + try { + const dotGitFileWatcher = new DotGitWatcher(this, outputChannel); + onDotGitFileChange = dotGitFileWatcher.event; + this.disposables.push(dotGitFileWatcher); + } catch (err) { + if (env.logLevel <= LogLevel.Error) { + outputChannel.appendLine(`Failed to watch '${this.dotGit}', reverting to legacy API file watched. Some events might be lost.\n${err.stack || err}`); + } + + onDotGitFileChange = filterEvent(onWorkspaceRepositoryFileChange, uri => /\/\.git($|\/)/.test(uri.path)); + } // FS changes should trigger `git status`: // - any change inside the repository working tree // - any change whithin the first level of the `.git` folder, except the folder itself and `index.lock` - const onFileChange = anyEvent(onWorkspaceWorkingTreeFileChange, dotGitFileWatcher.event); + const onFileChange = anyEvent(onWorkspaceWorkingTreeFileChange, onDotGitFileChange); onFileChange(this.onFileChange, this, this.disposables); // Relevate repository changes should trigger virtual document change events - dotGitFileWatcher.event(this._onDidChangeRepository.fire, this._onDidChangeRepository, this.disposables); + onDotGitFileChange(this._onDidChangeRepository.fire, this._onDidChangeRepository, this.disposables); - this.disposables.push(new FileEventLogger(onWorkspaceWorkingTreeFileChange, dotGitFileWatcher.event, outputChannel)); + this.disposables.push(new FileEventLogger(onWorkspaceWorkingTreeFileChange, onDotGitFileChange, outputChannel)); const root = Uri.file(repository.root); this._sourceControl = scm.createSourceControl('git', 'Git', root); From c96cf5d4d9cf0bcab5d10a6511dbe57d41f4245a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 16:08:27 +0200 Subject: [PATCH 662/710] fixes #76508 --- build/gulpfile.reh.js | 2 +- build/lib/extensions.js | 2 +- build/lib/extensions.ts | 2 +- build/lib/typings/gulp-remote-src.d.ts | 4 +-- package.json | 2 +- yarn.lock | 39 ++++++++++++++++++++------ 6 files changed, 37 insertions(+), 14 deletions(-) diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js index 8784602db3e..7085c4f8f50 100644 --- a/build/gulpfile.reh.js +++ b/build/gulpfile.reh.js @@ -17,7 +17,7 @@ const gunzip = require('gulp-gunzip'); const untar = require('gulp-untar'); const File = require('vinyl'); const fs = require('fs'); -const remote = require('gulp-remote-src'); +const remote = require('gulp-remote-retry-src'); const rename = require('gulp-rename'); const filter = require('gulp-filter'); const cp = require('child_process'); diff --git a/build/lib/extensions.js b/build/lib/extensions.js index a73f8cf5864..73d2c7acef3 100644 --- a/build/lib/extensions.js +++ b/build/lib/extensions.js @@ -13,7 +13,7 @@ const File = require("vinyl"); const vsce = require("vsce"); const stats_1 = require("./stats"); const util2 = require("./util"); -const remote = require("gulp-remote-src"); +const remote = require("gulp-remote-retry-src"); const vzip = require('gulp-vinyl-zip'); const filter = require("gulp-filter"); const rename = require("gulp-rename"); diff --git a/build/lib/extensions.ts b/build/lib/extensions.ts index 94bc81c15df..4b185aff681 100644 --- a/build/lib/extensions.ts +++ b/build/lib/extensions.ts @@ -13,7 +13,7 @@ import * as File from 'vinyl'; import * as vsce from 'vsce'; import { createStatsStream } from './stats'; import * as util2 from './util'; -import remote = require('gulp-remote-src'); +import remote = require('gulp-remote-retry-src'); const vzip = require('gulp-vinyl-zip'); import filter = require('gulp-filter'); import rename = require('gulp-rename'); diff --git a/build/lib/typings/gulp-remote-src.d.ts b/build/lib/typings/gulp-remote-src.d.ts index 6ea57f84fe5..ff9026b79bb 100644 --- a/build/lib/typings/gulp-remote-src.d.ts +++ b/build/lib/typings/gulp-remote-src.d.ts @@ -1,4 +1,4 @@ -declare module 'gulp-remote-src' { +declare module 'gulp-remote-retry-src' { import stream = require("stream"); @@ -20,4 +20,4 @@ declare module 'gulp-remote-src' { } export = remote; -} \ No newline at end of file +} diff --git a/package.json b/package.json index 0bdff88bdee..f973590748b 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "gulp-gunzip": "^1.0.0", "gulp-json-editor": "^2.5.0", "gulp-plumber": "^1.2.0", - "gulp-remote-src": "^0.4.4", + "gulp-remote-retry-src": "^0.6.0", "gulp-rename": "^1.2.0", "gulp-replace": "^0.5.4", "gulp-shell": "^0.6.5", diff --git a/yarn.lock b/yarn.lock index 6c206d6fa00..f1c162556e3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3907,14 +3907,15 @@ gulp-plumber@^1.2.0: plugin-error "^0.1.2" through2 "^2.0.3" -gulp-remote-src@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/gulp-remote-src/-/gulp-remote-src-0.4.4.tgz#4a4d18fac0ffedde94a7855953de90db00a1d1b1" - integrity sha512-mo7lGgZmNXyTbcUzfjSnUVkx1pnqqiwv/pPaIrYdTO77hq0WNTxXLAzQdoYOnyJ0mfVLNmNl9AGqWLiAzTPMMA== +gulp-remote-retry-src@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/gulp-remote-retry-src/-/gulp-remote-retry-src-0.6.0.tgz#fdcb5d5c9e67c31ae378a2a886ddad3d47913bb1" + integrity sha512-lFxpwwbM/GEIdYiNumxiUcPHZUROFJaF1zTBne1H8b3Pwx6Te6O9uEYp++JZPP62jdheOWcHUTBREiMkpdbm4Q== dependencies: event-stream "3.3.4" node.extend "~1.1.2" request "^2.88.0" + requestretry "^4.0.0" through2 "~2.0.3" vinyl "~2.0.1" @@ -4161,6 +4162,13 @@ has@^1.0.1: dependencies: function-bind "^1.0.2" +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + hash-base@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" @@ -6088,11 +6096,12 @@ node-pty@0.9.0-beta19: nan "^2.13.2" node.extend@~1.1.2: - version "1.1.6" - resolved "https://registry.yarnpkg.com/node.extend/-/node.extend-1.1.6.tgz#a7b882c82d6c93a4863a5504bd5de8ec86258b96" - integrity sha1-p7iCyC1sk6SGOlUEvV3o7IYli5Y= + version "1.1.8" + resolved "https://registry.yarnpkg.com/node.extend/-/node.extend-1.1.8.tgz#0aab3e63789f4e6d68b42bc00073ad1881243cf0" + integrity sha512-L/dvEBwyg3UowwqOUTyDsGBU6kjBQOpOhshio9V3i3BMPv5YUb9+mWNN8MK0IbWqT0AqaTSONZf0aTuMMahWgA== dependencies: - is "^3.1.0" + has "^1.0.3" + is "^3.2.1" noop-logger@^0.1.1: version "0.1.1" @@ -7737,6 +7746,15 @@ request@^2.86.0, request@^2.88.0: tunnel-agent "^0.6.0" uuid "^3.3.2" +requestretry@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/requestretry/-/requestretry-4.0.0.tgz#4e9e7280a7d8561bf33e9925264cf026e2be3e89" + integrity sha512-ST8m0+5FQH2FA+gbzUQyOQjUwHf22kbPQnd6TexveR0p+2UV1YYBg+Roe7BnKQ1Bb/+LtJwwm0QzxK2NA20Cug== + dependencies: + extend "^3.0.2" + lodash "^4.17.10" + when "^3.7.7" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -9684,6 +9702,11 @@ webpack@^4.16.5, webpack@^4.7.0: watchpack "^1.5.0" webpack-sources "^1.0.1" +when@^3.7.7: + version "3.7.8" + resolved "https://registry.yarnpkg.com/when/-/when-3.7.8.tgz#c7130b6a7ea04693e842cdc9e7a1f2aa39a39f82" + integrity sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I= + whet.extend@~0.9.9: version "0.9.9" resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" From e788b154d1d95e99b5dd01eca2eae365cfdeb729 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 26 Jul 2019 11:25:05 +0200 Subject: [PATCH 663/710] Fix usage of context keys --- src/vs/platform/browser/contextScopedHistoryWidget.ts | 6 +++--- src/vs/workbench/contrib/scm/browser/scm.contribution.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/platform/browser/contextScopedHistoryWidget.ts b/src/vs/platform/browser/contextScopedHistoryWidget.ts index 94d4de658b5..5e5e8603683 100644 --- a/src/vs/platform/browser/contextScopedHistoryWidget.ts +++ b/src/vs/platform/browser/contextScopedHistoryWidget.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IContextKeyService, ContextKeyDefinedExpr, ContextKeyExpr, ContextKeyAndExpr, ContextKeyEqualsExpr, RawContextKey, IContextKey, IContextKeyServiceTarget } from 'vs/platform/contextkey/common/contextkey'; +import { IContextKeyService, ContextKeyExpr, RawContextKey, IContextKey, IContextKeyServiceTarget } from 'vs/platform/contextkey/common/contextkey'; import { HistoryInputBox, IHistoryInputOptions } from 'vs/base/browser/ui/inputbox/inputBox'; import { FindInput, IFindInputOptions } from 'vs/base/browser/ui/findinput/findInput'; import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; @@ -66,7 +66,7 @@ export class ContextScopedFindInput extends FindInput { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'history.showPrevious', weight: KeybindingWeight.WorkbenchContrib, - when: ContextKeyExpr.and(new ContextKeyDefinedExpr(HistoryNavigationWidgetContext), new ContextKeyEqualsExpr(HistoryNavigationEnablementContext, true)), + when: ContextKeyExpr.and(ContextKeyExpr.has(HistoryNavigationWidgetContext), ContextKeyExpr.equals(HistoryNavigationEnablementContext, true)), primary: KeyCode.UpArrow, secondary: [KeyMod.Alt | KeyCode.UpArrow], handler: (accessor, arg2) => { @@ -81,7 +81,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'history.showNext', weight: KeybindingWeight.WorkbenchContrib, - when: new ContextKeyAndExpr([new ContextKeyDefinedExpr(HistoryNavigationWidgetContext), new ContextKeyEqualsExpr(HistoryNavigationEnablementContext, true)]), + when: ContextKeyExpr.and(ContextKeyExpr.has(HistoryNavigationWidgetContext), ContextKeyExpr.equals(HistoryNavigationEnablementContext, true)), primary: KeyCode.DownArrow, secondary: [KeyMod.Alt | KeyCode.DownArrow], handler: (accessor, arg2) => { diff --git a/src/vs/workbench/contrib/scm/browser/scm.contribution.ts b/src/vs/workbench/contrib/scm/browser/scm.contribution.ts index db9568a6eb4..beef3cdc9fb 100644 --- a/src/vs/workbench/contrib/scm/browser/scm.contribution.ts +++ b/src/vs/workbench/contrib/scm/browser/scm.contribution.ts @@ -18,7 +18,7 @@ import { SCMViewlet } from 'vs/workbench/contrib/scm/browser/scmViewlet'; import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; -import { ContextKeyDefinedExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; @@ -115,7 +115,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'scm.acceptInput', description: { description: localize('scm accept', "SCM: Accept Input"), args: [] }, weight: KeybindingWeight.WorkbenchContrib, - when: new ContextKeyDefinedExpr('scmRepository'), + when: ContextKeyExpr.has('scmRepository'), primary: KeyMod.CtrlCmd | KeyCode.Enter, handler: accessor => { const contextKeyService = accessor.get(IContextKeyService); @@ -134,4 +134,4 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ } }); -registerSingleton(ISCMService, SCMService); \ No newline at end of file +registerSingleton(ISCMService, SCMService); From 893635042ccd4dbdf919a4493a062330aec2cbc7 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 26 Jul 2019 16:35:45 +0200 Subject: [PATCH 664/710] Fixes #22778: Add `or` for when clause contexts --- .../standalone/browser/simpleServices.ts | 2 +- .../platform/contextkey/common/contextkey.ts | 394 ++++++++++++++---- .../contextkey/test/common/contextkey.test.ts | 31 +- .../keybinding/common/keybindingResolver.ts | 40 +- .../test/common/keybindingResolver.test.ts | 83 ++-- .../parts/editor/editor.contribution.ts | 2 +- .../debug/browser/debug.contribution.ts | 2 +- .../files/browser/fileActions.contribution.ts | 2 +- .../keybinding/browser/keybindingService.ts | 4 +- 9 files changed, 387 insertions(+), 173 deletions(-) diff --git a/src/vs/editor/standalone/browser/simpleServices.ts b/src/vs/editor/standalone/browser/simpleServices.ts index 576092c9865..d333ce03746 100644 --- a/src/vs/editor/standalone/browser/simpleServices.ts +++ b/src/vs/editor/standalone/browser/simpleServices.ts @@ -356,7 +356,7 @@ export class StandaloneKeybindingService extends AbstractKeybindingService { private _toNormalizedKeybindingItems(items: IKeybindingItem[], isDefault: boolean): ResolvedKeybindingItem[] { let result: ResolvedKeybindingItem[] = [], resultLen = 0; for (const item of items) { - const when = (item.when ? item.when.normalize() : undefined); + const when = item.when || undefined; const keybinding = item.keybinding; if (!keybinding) { diff --git a/src/vs/platform/contextkey/common/contextkey.ts b/src/vs/platform/contextkey/common/contextkey.ts index 289ba8668ce..8c01c1452d8 100644 --- a/src/vs/platform/contextkey/common/contextkey.ts +++ b/src/vs/platform/contextkey/common/contextkey.ts @@ -13,7 +13,9 @@ export const enum ContextKeyExprType { Equals = 3, NotEquals = 4, And = 5, - Regex = 6 + Regex = 6, + NotRegex = 7, + Or = 8 } export interface IContextKeyExprMapper { @@ -27,27 +29,31 @@ export interface IContextKeyExprMapper { export abstract class ContextKeyExpr { public static has(key: string): ContextKeyExpr { - return new ContextKeyDefinedExpr(key); + return ContextKeyDefinedExpr.create(key); } public static equals(key: string, value: any): ContextKeyExpr { - return new ContextKeyEqualsExpr(key, value); + return ContextKeyEqualsExpr.create(key, value); } public static notEquals(key: string, value: any): ContextKeyExpr { - return new ContextKeyNotEqualsExpr(key, value); + return ContextKeyNotEqualsExpr.create(key, value); } public static regex(key: string, value: RegExp): ContextKeyExpr { - return new ContextKeyRegexExpr(key, value); + return ContextKeyRegexExpr.create(key, value); } public static not(key: string): ContextKeyExpr { - return new ContextKeyNotExpr(key); + return ContextKeyNotExpr.create(key); } - public static and(...expr: Array): ContextKeyExpr { - return new ContextKeyAndExpr(expr); + public static and(...expr: Array): ContextKeyExpr | undefined { + return ContextKeyAndExpr.create(expr); + } + + public static or(...expr: Array): ContextKeyExpr | undefined { + return ContextKeyOrExpr.create(expr); } public static deserialize(serialized: string | null | undefined, strict: boolean = false): ContextKeyExpr | undefined { @@ -55,9 +61,17 @@ export abstract class ContextKeyExpr { return undefined; } + return this._deserializeOrExpression(serialized, strict); + } + + private static _deserializeOrExpression(serialized: string, strict: boolean): ContextKeyExpr | undefined { + let pieces = serialized.split('||'); + return ContextKeyOrExpr.create(pieces.map(p => this._deserializeAndExpression(p, strict))); + } + + private static _deserializeAndExpression(serialized: string, strict: boolean): ContextKeyExpr | undefined { let pieces = serialized.split('&&'); - let result = new ContextKeyAndExpr(pieces.map(p => this._deserializeOne(p, strict))); - return result.normalize(); + return ContextKeyAndExpr.create(pieces.map(p => this._deserializeOne(p, strict))); } private static _deserializeOne(serializedOne: string, strict: boolean): ContextKeyExpr { @@ -65,24 +79,24 @@ export abstract class ContextKeyExpr { if (serializedOne.indexOf('!=') >= 0) { let pieces = serializedOne.split('!='); - return new ContextKeyNotEqualsExpr(pieces[0].trim(), this._deserializeValue(pieces[1], strict)); + return ContextKeyNotEqualsExpr.create(pieces[0].trim(), this._deserializeValue(pieces[1], strict)); } if (serializedOne.indexOf('==') >= 0) { let pieces = serializedOne.split('=='); - return new ContextKeyEqualsExpr(pieces[0].trim(), this._deserializeValue(pieces[1], strict)); + return ContextKeyEqualsExpr.create(pieces[0].trim(), this._deserializeValue(pieces[1], strict)); } if (serializedOne.indexOf('=~') >= 0) { let pieces = serializedOne.split('=~'); - return new ContextKeyRegexExpr(pieces[0].trim(), this._deserializeRegexValue(pieces[1], strict)); + return ContextKeyRegexExpr.create(pieces[0].trim(), this._deserializeRegexValue(pieces[1], strict)); } if (/^\!\s*/.test(serializedOne)) { - return new ContextKeyNotExpr(serializedOne.substr(1).trim()); + return ContextKeyNotExpr.create(serializedOne.substr(1).trim()); } - return new ContextKeyDefinedExpr(serializedOne); + return ContextKeyDefinedExpr.create(serializedOne); } private static _deserializeValue(serializedValue: string, strict: boolean): any { @@ -143,10 +157,10 @@ export abstract class ContextKeyExpr { public abstract getType(): ContextKeyExprType; public abstract equals(other: ContextKeyExpr): boolean; public abstract evaluate(context: IContext): boolean; - public abstract normalize(): ContextKeyExpr | undefined; public abstract serialize(): string; public abstract keys(): string[]; public abstract map(mapFnc: IContextKeyExprMapper): ContextKeyExpr; + public abstract negate(): ContextKeyExpr; } function cmp(a: ContextKeyExpr, b: ContextKeyExpr): number { @@ -166,13 +180,21 @@ function cmp(a: ContextKeyExpr, b: ContextKeyExpr): number { return (a).cmp(b); case ContextKeyExprType.Regex: return (a).cmp(b); + case ContextKeyExprType.NotRegex: + return (a).cmp(b); + case ContextKeyExprType.And: + return (a).cmp(b); default: throw new Error('Unknown ContextKeyExpr!'); } } export class ContextKeyDefinedExpr implements ContextKeyExpr { - constructor(protected key: string) { + public static create(key: string): ContextKeyExpr { + return new ContextKeyDefinedExpr(key); + } + + protected constructor(protected key: string) { } public getType(): ContextKeyExprType { @@ -200,10 +222,6 @@ export class ContextKeyDefinedExpr implements ContextKeyExpr { return (!!context.getValue(this.key)); } - public normalize(): ContextKeyExpr { - return this; - } - public serialize(): string { return this.key; } @@ -215,10 +233,25 @@ export class ContextKeyDefinedExpr implements ContextKeyExpr { public map(mapFnc: IContextKeyExprMapper): ContextKeyExpr { return mapFnc.mapDefined(this.key); } + + public negate(): ContextKeyExpr { + return ContextKeyNotExpr.create(this.key); + } } export class ContextKeyEqualsExpr implements ContextKeyExpr { - constructor(private readonly key: string, private readonly value: any) { + + public static create(key: string, value: any): ContextKeyExpr { + if (typeof value === 'boolean') { + if (value) { + return ContextKeyDefinedExpr.create(key); + } + return ContextKeyNotExpr.create(key); + } + return new ContextKeyEqualsExpr(key, value); + } + + private constructor(private readonly key: string, private readonly value: any) { } public getType(): ContextKeyExprType { @@ -255,21 +288,7 @@ export class ContextKeyEqualsExpr implements ContextKeyExpr { /* tslint:enable:triple-equals */ } - public normalize(): ContextKeyExpr { - if (typeof this.value === 'boolean') { - if (this.value) { - return new ContextKeyDefinedExpr(this.key); - } - return new ContextKeyNotExpr(this.key); - } - return this; - } - public serialize(): string { - if (typeof this.value === 'boolean') { - return this.normalize().serialize(); - } - return this.key + ' == \'' + this.value + '\''; } @@ -280,10 +299,25 @@ export class ContextKeyEqualsExpr implements ContextKeyExpr { public map(mapFnc: IContextKeyExprMapper): ContextKeyExpr { return mapFnc.mapEquals(this.key, this.value); } + + public negate(): ContextKeyExpr { + return ContextKeyNotEqualsExpr.create(this.key, this.value); + } } export class ContextKeyNotEqualsExpr implements ContextKeyExpr { - constructor(private key: string, private value: any) { + + public static create(key: string, value: any): ContextKeyExpr { + if (typeof value === 'boolean') { + if (value) { + return ContextKeyNotExpr.create(key); + } + return ContextKeyDefinedExpr.create(key); + } + return new ContextKeyNotEqualsExpr(key, value); + } + + private constructor(private key: string, private value: any) { } public getType(): ContextKeyExprType { @@ -320,21 +354,7 @@ export class ContextKeyNotEqualsExpr implements ContextKeyExpr { /* tslint:enable:triple-equals */ } - public normalize(): ContextKeyExpr { - if (typeof this.value === 'boolean') { - if (this.value) { - return new ContextKeyNotExpr(this.key); - } - return new ContextKeyDefinedExpr(this.key); - } - return this; - } - public serialize(): string { - if (typeof this.value === 'boolean') { - return this.normalize().serialize(); - } - return this.key + ' != \'' + this.value + '\''; } @@ -345,10 +365,19 @@ export class ContextKeyNotEqualsExpr implements ContextKeyExpr { public map(mapFnc: IContextKeyExprMapper): ContextKeyExpr { return mapFnc.mapNotEquals(this.key, this.value); } + + public negate(): ContextKeyExpr { + return ContextKeyEqualsExpr.create(this.key, this.value); + } } export class ContextKeyNotExpr implements ContextKeyExpr { - constructor(private key: string) { + + public static create(key: string): ContextKeyExpr { + return new ContextKeyNotExpr(key); + } + + private constructor(private key: string) { } public getType(): ContextKeyExprType { @@ -376,10 +405,6 @@ export class ContextKeyNotExpr implements ContextKeyExpr { return (!context.getValue(this.key)); } - public normalize(): ContextKeyExpr { - return this; - } - public serialize(): string { return '!' + this.key; } @@ -391,11 +416,19 @@ export class ContextKeyNotExpr implements ContextKeyExpr { public map(mapFnc: IContextKeyExprMapper): ContextKeyExpr { return mapFnc.mapNot(this.key); } + + public negate(): ContextKeyExpr { + return ContextKeyDefinedExpr.create(this.key); + } } export class ContextKeyRegexExpr implements ContextKeyExpr { - constructor(private key: string, private regexp: RegExp | null) { + public static create(key: string, regexp: RegExp | null): ContextKeyExpr { + return new ContextKeyRegexExpr(key, regexp); + } + + private constructor(private key: string, private regexp: RegExp | null) { // } @@ -435,10 +468,6 @@ export class ContextKeyRegexExpr implements ContextKeyExpr { return this.regexp ? this.regexp.test(value) : false; } - public normalize(): ContextKeyExpr { - return this; - } - public serialize(): string { const value = this.regexp ? `/${this.regexp.source}/${this.regexp.ignoreCase ? 'i' : ''}` @@ -450,22 +479,99 @@ export class ContextKeyRegexExpr implements ContextKeyExpr { return [this.key]; } - public map(mapFnc: IContextKeyExprMapper): ContextKeyExpr { + public map(mapFnc: IContextKeyExprMapper): ContextKeyRegexExpr { return mapFnc.mapRegex(this.key, this.regexp); } + + public negate(): ContextKeyExpr { + return ContextKeyNotRegexExpr.create(this); + } +} + +export class ContextKeyNotRegexExpr implements ContextKeyExpr { + + public static create(actual: ContextKeyRegexExpr): ContextKeyExpr { + return new ContextKeyNotRegexExpr(actual); + } + + private constructor(private readonly _actual: ContextKeyRegexExpr) { + // + } + + public getType(): ContextKeyExprType { + return ContextKeyExprType.NotRegex; + } + + public cmp(other: ContextKeyNotRegexExpr): number { + return this._actual.cmp(other._actual); + } + + public equals(other: ContextKeyExpr): boolean { + if (other instanceof ContextKeyNotRegexExpr) { + return this._actual.equals(other._actual); + } + return false; + } + + public evaluate(context: IContext): boolean { + return !this._actual.evaluate(context); + } + + public serialize(): string { + throw new Error('Method not implemented.'); + } + + public keys(): string[] { + return this._actual.keys(); + } + + public map(mapFnc: IContextKeyExprMapper): ContextKeyExpr { + return new ContextKeyNotRegexExpr(this._actual.map(mapFnc)); + } + + public negate(): ContextKeyExpr { + return this._actual; + } } export class ContextKeyAndExpr implements ContextKeyExpr { - public readonly expr: ContextKeyExpr[]; - constructor(expr: Array) { - this.expr = ContextKeyAndExpr._normalizeArr(expr); + public static create(_expr: Array): ContextKeyExpr | undefined { + const expr = ContextKeyAndExpr._normalizeArr(_expr); + if (expr.length === 0) { + return undefined; + } + + if (expr.length === 1) { + return expr[0]; + } + + return new ContextKeyAndExpr(expr); + } + + private constructor(public readonly expr: ContextKeyExpr[]) { } public getType(): ContextKeyExprType { return ContextKeyExprType.And; } + public cmp(other: ContextKeyAndExpr): number { + if (this.expr.length < other.expr.length) { + return -1; + } + if (this.expr.length > other.expr.length) { + return 1; + } + for (let i = 0, len = this.expr.length; i < len; i++) { + const r = cmp(this.expr[i], other.expr[i]); + if (r !== 0) { + return r; + } + } + return 0; + } + public equals(other: ContextKeyExpr): boolean { if (other instanceof ContextKeyAndExpr) { if (this.expr.length !== other.expr.length) { @@ -500,16 +606,16 @@ export class ContextKeyAndExpr implements ContextKeyExpr { continue; } - e = e.normalize(); - if (!e) { - continue; - } - if (e instanceof ContextKeyAndExpr) { expr = expr.concat(e.expr); continue; } + if (e instanceof ContextKeyOrExpr) { + // Not allowed, because we don't have parens! + throw new Error(`It is not allowed to have an or expression here due to lack of parens!`); + } + expr.push(e); } @@ -519,29 +625,7 @@ export class ContextKeyAndExpr implements ContextKeyExpr { return expr; } - public normalize(): ContextKeyExpr | undefined { - if (this.expr.length === 0) { - return undefined; - } - - if (this.expr.length === 1) { - return this.expr[0]; - } - - return this; - } - public serialize(): string { - if (this.expr.length === 0) { - return ''; - } - if (this.expr.length === 1) { - const normalized = this.normalize(); - if (!normalized) { - return ''; - } - return normalized.serialize(); - } return this.expr.map(e => e.serialize()).join(' && '); } @@ -556,6 +640,132 @@ export class ContextKeyAndExpr implements ContextKeyExpr { public map(mapFnc: IContextKeyExprMapper): ContextKeyExpr { return new ContextKeyAndExpr(this.expr.map(expr => expr.map(mapFnc))); } + + public negate(): ContextKeyExpr { + let result: ContextKeyExpr[] = []; + for (let expr of this.expr) { + result.push(expr.negate()); + } + return ContextKeyOrExpr.create(result)!; + } +} + +export class ContextKeyOrExpr implements ContextKeyExpr { + + public static create(_expr: Array): ContextKeyExpr | undefined { + const expr = ContextKeyOrExpr._normalizeArr(_expr); + if (expr.length === 0) { + return undefined; + } + + if (expr.length === 1) { + return expr[0]; + } + + return new ContextKeyOrExpr(expr); + } + + private constructor(public readonly expr: ContextKeyExpr[]) { + } + + public getType(): ContextKeyExprType { + return ContextKeyExprType.Or; + } + + public equals(other: ContextKeyExpr): boolean { + if (other instanceof ContextKeyOrExpr) { + if (this.expr.length !== other.expr.length) { + return false; + } + for (let i = 0, len = this.expr.length; i < len; i++) { + if (!this.expr[i].equals(other.expr[i])) { + return false; + } + } + return true; + } + return false; + } + + public evaluate(context: IContext): boolean { + for (let i = 0, len = this.expr.length; i < len; i++) { + if (this.expr[i].evaluate(context)) { + return true; + } + } + return false; + } + + private static _normalizeArr(arr: Array): ContextKeyExpr[] { + let expr: ContextKeyExpr[] = []; + + if (arr) { + for (let i = 0, len = arr.length; i < len; i++) { + let e: ContextKeyExpr | null | undefined = arr[i]; + if (!e) { + continue; + } + + if (e instanceof ContextKeyOrExpr) { + expr = expr.concat(e.expr); + continue; + } + + expr.push(e); + } + + expr.sort(cmp); + } + + return expr; + } + + public serialize(): string { + return this.expr.map(e => e.serialize()).join(' || '); + } + + public keys(): string[] { + const result: string[] = []; + for (let expr of this.expr) { + result.push(...expr.keys()); + } + return result; + } + + public map(mapFnc: IContextKeyExprMapper): ContextKeyExpr { + return new ContextKeyOrExpr(this.expr.map(expr => expr.map(mapFnc))); + } + + public negate(): ContextKeyExpr { + let result: ContextKeyExpr[] = []; + for (let expr of this.expr) { + result.push(expr.negate()); + } + + const terminals = (node: ContextKeyExpr) => { + if (node instanceof ContextKeyOrExpr) { + return node.expr; + } + return [node]; + }; + + // We don't support parens, so here we distribute the AND over the OR terminals + // We always take the first 2 AND pairs and distribute them + while (result.length > 1) { + const LEFT = result.shift()!; + const RIGHT = result.shift()!; + + const all: ContextKeyExpr[] = []; + for (const left of terminals(LEFT)) { + for (const right of terminals(RIGHT)) { + all.push(ContextKeyExpr.and(left, right)!); + } + } + result.unshift(ContextKeyExpr.or(...all)!); + } + + return result[0]; + } } export class RawContextKey extends ContextKeyDefinedExpr { diff --git a/src/vs/platform/contextkey/test/common/contextkey.test.ts b/src/vs/platform/contextkey/test/common/contextkey.test.ts index cb12470e3c2..9db3782da31 100644 --- a/src/vs/platform/contextkey/test/common/contextkey.test.ts +++ b/src/vs/platform/contextkey/test/common/contextkey.test.ts @@ -27,7 +27,7 @@ suite('ContextKeyExpr', () => { ContextKeyExpr.notEquals('c2', 'cc2'), ContextKeyExpr.not('d1'), ContextKeyExpr.not('d2') - ); + )!; let b = ContextKeyExpr.and( ContextKeyExpr.equals('b2', 'bb2'), ContextKeyExpr.notEquals('c1', 'cc1'), @@ -40,7 +40,7 @@ suite('ContextKeyExpr', () => { ContextKeyExpr.has('a1'), ContextKeyExpr.and(ContextKeyExpr.equals('and.a', true)), ContextKeyExpr.not('d2') - ); + )!; assert(a.equals(b), 'expressions should be equal'); }); @@ -50,10 +50,10 @@ suite('ContextKeyExpr', () => { let key1IsFalse = ContextKeyExpr.equals('key1', false); let key1IsNotTrue = ContextKeyExpr.notEquals('key1', true); - assert.ok(key1IsTrue.normalize()!.equals(ContextKeyExpr.has('key1'))); - assert.ok(key1IsNotFalse.normalize()!.equals(ContextKeyExpr.has('key1'))); - assert.ok(key1IsFalse.normalize()!.equals(ContextKeyExpr.not('key1'))); - assert.ok(key1IsNotTrue.normalize()!.equals(ContextKeyExpr.not('key1'))); + assert.ok(key1IsTrue.equals(ContextKeyExpr.has('key1'))); + assert.ok(key1IsNotFalse.equals(ContextKeyExpr.has('key1'))); + assert.ok(key1IsFalse.equals(ContextKeyExpr.not('key1'))); + assert.ok(key1IsNotTrue.equals(ContextKeyExpr.not('key1'))); }); test('evaluate', () => { @@ -93,5 +93,24 @@ suite('ContextKeyExpr', () => { testExpression('a && !b && c == 5', true && !false && '5' == '5'); testExpression('d =~ /e.*/', false); /* tslint:enable:triple-equals */ + + // precedence test: false && true || true === true because && is evaluated first + testExpression('b && a || a', true); + + testExpression('a || b', true); + testExpression('b || b', false); + testExpression('b && a || a && b', false); + }); + + test('negate', () => { + function testNegate(expr: string, expected: string): void { + const actual = ContextKeyExpr.deserialize(expr)!.negate().serialize(); + assert.strictEqual(actual, expected); + } + testNegate('a', '!a'); + testNegate('a && b || c', '!a && !c || !b && !c'); + testNegate('a && b || c || d', '!a && !c && !d || !b && !c && !d'); + testNegate('!a && !b || !c && !d', 'a && c || a && d || b && c || b && d'); + testNegate('!a && !b || !c && !d || !e && !f', 'a && c && e || a && c && f || a && d && e || a && d && f || b && c && e || b && c && f || b && d && e || b && d && f'); }); }); diff --git a/src/vs/platform/keybinding/common/keybindingResolver.ts b/src/vs/platform/keybinding/common/keybindingResolver.ts index 1436cfa6604..29d559eab4d 100644 --- a/src/vs/platform/keybinding/common/keybindingResolver.ts +++ b/src/vs/platform/keybinding/common/keybindingResolver.ts @@ -6,7 +6,7 @@ import { isNonEmptyArray } from 'vs/base/common/arrays'; import { MenuRegistry } from 'vs/platform/actions/common/actions'; import { CommandsRegistry, ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; -import { ContextKeyAndExpr, ContextKeyExpr, IContext } from 'vs/platform/contextkey/common/contextkey'; +import { ContextKeyExpr, IContext, ContextKeyOrExpr } from 'vs/platform/contextkey/common/contextkey'; import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem'; import { keys } from 'vs/base/common/map'; @@ -171,7 +171,6 @@ export class KeybindingResolver { /** * Returns true if it is provable `a` implies `b`. - * **Precondition**: Assumes `a` and `b` are normalized! */ public static whenIsEntirelyIncluded(a: ContextKeyExpr | null | undefined, b: ContextKeyExpr | null | undefined): boolean { if (!b) { @@ -181,26 +180,35 @@ export class KeybindingResolver { return false; } - const aExpressions: ContextKeyExpr[] = ((a instanceof ContextKeyAndExpr) ? a.expr : [a]); - const bExpressions: ContextKeyExpr[] = ((b instanceof ContextKeyAndExpr) ? b.expr : [b]); + return this._implies(a, b); + } - let aIndex = 0; - for (const bExpr of bExpressions) { - let bExprMatched = false; - while (!bExprMatched && aIndex < aExpressions.length) { - let aExpr = aExpressions[aIndex]; - if (aExpr.equals(bExpr)) { - bExprMatched = true; - } - aIndex++; + /** + * Returns true if it is provable `p` implies `q`. + */ + private static _implies(p: ContextKeyExpr, q: ContextKeyExpr): boolean { + const notP = p.negate(); + + const terminals = (node: ContextKeyExpr) => { + if (node instanceof ContextKeyOrExpr) { + return node.expr; } + return [node]; + }; - if (!bExprMatched) { - return false; + let expr = terminals(notP).concat(terminals(q)); + for (let i = 0; i < expr.length; i++) { + const a = expr[i]; + const notA = a.negate(); + for (let j = i + 1; j < expr.length; j++) { + const b = expr[j]; + if (notA.equals(b)) { + return true; + } } } - return true; + return false; } public getDefaultBoundCommands(): Map { diff --git a/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts b/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts index a4488cffb17..c85003be1ac 100644 --- a/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts +++ b/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts @@ -5,7 +5,7 @@ import * as assert from 'assert'; import { KeyChord, KeyCode, KeyMod, SimpleKeybinding, createKeybinding, createSimpleKeybinding } from 'vs/base/common/keyCodes'; import { OS } from 'vs/base/common/platform'; -import { ContextKeyAndExpr, ContextKeyExpr, IContext } from 'vs/platform/contextkey/common/contextkey'; +import { ContextKeyExpr, IContext } from 'vs/platform/contextkey/common/contextkey'; import { KeybindingResolver } from 'vs/platform/keybinding/common/keybindingResolver'; import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem'; import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding'; @@ -20,13 +20,13 @@ function createContext(ctx: any) { suite('KeybindingResolver', () => { - function kbItem(keybinding: number, command: string, commandArgs: any, when: ContextKeyExpr, isDefault: boolean): ResolvedKeybindingItem { + function kbItem(keybinding: number, command: string, commandArgs: any, when: ContextKeyExpr | undefined, isDefault: boolean): ResolvedKeybindingItem { const resolvedKeybinding = (keybinding !== 0 ? new USLayoutResolvedKeybinding(createKeybinding(keybinding, OS)!, OS) : undefined); return new ResolvedKeybindingItem( resolvedKeybinding, command, commandArgs, - when ? when.normalize() : undefined, + when, isDefault ); } @@ -191,64 +191,41 @@ suite('KeybindingResolver', () => { }); test('contextIsEntirelyIncluded', () => { - let assertIsIncluded = (a: ContextKeyExpr[], b: ContextKeyExpr[]) => { - let tmpA = new ContextKeyAndExpr(a).normalize(); - let tmpB = new ContextKeyAndExpr(b).normalize(); - assert.equal(KeybindingResolver.whenIsEntirelyIncluded(tmpA, tmpB), true); + const assertIsIncluded = (a: string | null, b: string | null) => { + assert.equal(KeybindingResolver.whenIsEntirelyIncluded(ContextKeyExpr.deserialize(a), ContextKeyExpr.deserialize(b)), true); }; - let assertIsNotIncluded = (a: ContextKeyExpr[], b: ContextKeyExpr[]) => { - let tmpA = new ContextKeyAndExpr(a).normalize(); - let tmpB = new ContextKeyAndExpr(b).normalize(); - assert.equal(KeybindingResolver.whenIsEntirelyIncluded(tmpA, tmpB), false); + const assertIsNotIncluded = (a: string | null, b: string | null) => { + assert.equal(KeybindingResolver.whenIsEntirelyIncluded(ContextKeyExpr.deserialize(a), ContextKeyExpr.deserialize(b)), false); }; - let key1IsTrue = ContextKeyExpr.equals('key1', true); - let key1IsNotFalse = ContextKeyExpr.notEquals('key1', false); - let key1IsFalse = ContextKeyExpr.equals('key1', false); - let key1IsNotTrue = ContextKeyExpr.notEquals('key1', true); - let key2IsTrue = ContextKeyExpr.equals('key2', true); - let key2IsNotFalse = ContextKeyExpr.notEquals('key2', false); - let key3IsTrue = ContextKeyExpr.equals('key3', true); - let key4IsTrue = ContextKeyExpr.equals('key4', true); - assertIsIncluded([key1IsTrue], null!); - assertIsIncluded([key1IsTrue], []); - assertIsIncluded([key1IsTrue], [key1IsTrue]); - assertIsIncluded([key1IsTrue], [key1IsNotFalse]); + assertIsIncluded('key1', null); + assertIsIncluded('key1', ''); + assertIsIncluded('key1', 'key1'); + assertIsIncluded('!key1', ''); + assertIsIncluded('!key1', '!key1'); + assertIsIncluded('key2', ''); + assertIsIncluded('key2', 'key2'); + assertIsIncluded('key1 && key1 && key2 && key2', 'key2'); + assertIsIncluded('key1 && key2', 'key2'); + assertIsIncluded('key1 && key2', 'key1'); + assertIsIncluded('key1 && key2', ''); + assertIsIncluded('key1', 'key1 || key2'); + assertIsIncluded('key1 || !key1', 'key2 || !key2'); + assertIsIncluded('key1', 'key1 || key2 && key3'); - assertIsIncluded([key1IsFalse], []); - assertIsIncluded([key1IsFalse], [key1IsFalse]); - assertIsIncluded([key1IsFalse], [key1IsNotTrue]); - - assertIsIncluded([key2IsNotFalse], []); - assertIsIncluded([key2IsNotFalse], [key2IsNotFalse]); - assertIsIncluded([key2IsNotFalse], [key2IsTrue]); - - assertIsIncluded([key1IsTrue, key2IsNotFalse], [key2IsTrue]); - assertIsIncluded([key1IsTrue, key2IsNotFalse], [key2IsNotFalse]); - assertIsIncluded([key1IsTrue, key2IsNotFalse], [key1IsTrue]); - assertIsIncluded([key1IsTrue, key2IsNotFalse], [key1IsNotFalse]); - assertIsIncluded([key1IsTrue, key2IsNotFalse], []); - - assertIsNotIncluded([key1IsTrue], [key1IsFalse]); - assertIsNotIncluded([key1IsTrue], [key1IsNotTrue]); - assertIsNotIncluded([key1IsNotFalse], [key1IsFalse]); - assertIsNotIncluded([key1IsNotFalse], [key1IsNotTrue]); - - assertIsNotIncluded([key1IsFalse], [key1IsTrue]); - assertIsNotIncluded([key1IsFalse], [key1IsNotFalse]); - assertIsNotIncluded([key1IsNotTrue], [key1IsTrue]); - assertIsNotIncluded([key1IsNotTrue], [key1IsNotFalse]); - - assertIsNotIncluded([key1IsTrue, key2IsNotFalse], [key3IsTrue]); - assertIsNotIncluded([key1IsTrue, key2IsNotFalse], [key4IsTrue]); - assertIsNotIncluded([key1IsTrue], [key2IsTrue]); - assertIsNotIncluded([], [key2IsTrue]); - assertIsNotIncluded(null!, [key2IsTrue]); + assertIsNotIncluded('key1', '!key1'); + assertIsNotIncluded('!key1', 'key1'); + assertIsNotIncluded('key1 && key2', 'key3'); + assertIsNotIncluded('key1 && key2', 'key4'); + assertIsNotIncluded('key1', 'key2'); + assertIsNotIncluded('key1 || key2', 'key2'); + assertIsNotIncluded('', 'key2'); + assertIsNotIncluded(null, 'key2'); }); test('resolve command', function () { - function _kbItem(keybinding: number, command: string, when: ContextKeyExpr): ResolvedKeybindingItem { + function _kbItem(keybinding: number, command: string, when: ContextKeyExpr | undefined): ResolvedKeybindingItem { return kbItem(keybinding, command, null, when, true); } diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index 53629222ca3..354ef330025 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -448,7 +448,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: editorCommands. interface IEditorToolItem { id: string; title: string; iconDark: string; iconLight: string; } -function appendEditorToolItem(primary: IEditorToolItem, when: ContextKeyExpr, order: number, alternative?: IEditorToolItem): void { +function appendEditorToolItem(primary: IEditorToolItem, when: ContextKeyExpr | undefined, order: number, alternative?: IEditorToolItem): void { const item: IMenuItem = { command: { id: primary.id, diff --git a/src/vs/workbench/contrib/debug/browser/debug.contribution.ts b/src/vs/workbench/contrib/debug/browser/debug.contribution.ts index 84afaa1d2f1..9a1431da67e 100644 --- a/src/vs/workbench/contrib/debug/browser/debug.contribution.ts +++ b/src/vs/workbench/contrib/debug/browser/debug.contribution.ts @@ -534,7 +534,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, { // Touch Bar if (isMacintosh) { - const registerTouchBarEntry = (id: string, title: string, order: number, when: ContextKeyExpr, icon: string) => { + const registerTouchBarEntry = (id: string, title: string, order: number, when: ContextKeyExpr | undefined, icon: string) => { MenuRegistry.appendMenuItem(MenuId.TouchBarContext, { command: { id, diff --git a/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts b/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts index 044c0db7733..8b29304e715 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts @@ -203,7 +203,7 @@ appendEditorTitleContextMenuItem(REVEAL_IN_OS_COMMAND_ID, REVEAL_IN_OS_LABEL, Re appendEditorTitleContextMenuItem(REVEAL_IN_OS_COMMAND_ID, REVEAL_IN_OS_LABEL, ContextKeyExpr.and(IsWebContext.toNegated(), ResourceContextKey.Scheme.isEqualTo(Schemas.userData))); appendEditorTitleContextMenuItem(REVEAL_IN_EXPLORER_COMMAND_ID, nls.localize('revealInSideBar', "Reveal in Side Bar"), ResourceContextKey.IsFileSystemResource); -function appendEditorTitleContextMenuItem(id: string, title: string, when: ContextKeyExpr, group?: string): void { +function appendEditorTitleContextMenuItem(id: string, title: string, when: ContextKeyExpr | undefined, group?: string): void { // Menu MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { diff --git a/src/vs/workbench/services/keybinding/browser/keybindingService.ts b/src/vs/workbench/services/keybinding/browser/keybindingService.ts index 4e64ebdc0c6..dec59cfca2c 100644 --- a/src/vs/workbench/services/keybinding/browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/browser/keybindingService.ts @@ -300,7 +300,7 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService { private _resolveKeybindingItems(items: IKeybindingItem[], isDefault: boolean): ResolvedKeybindingItem[] { let result: ResolvedKeybindingItem[] = [], resultLen = 0; for (const item of items) { - const when = (item.when ? item.when.normalize() : undefined); + const when = item.when || undefined; const keybinding = item.keybinding; if (!keybinding) { // This might be a removal keybinding item in user settings => accept it @@ -323,7 +323,7 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService { private _resolveUserKeybindingItems(items: IUserKeybindingItem[], isDefault: boolean): ResolvedKeybindingItem[] { let result: ResolvedKeybindingItem[] = [], resultLen = 0; for (const item of items) { - const when = (item.when ? item.when.normalize() : undefined); + const when = item.when || undefined; const parts = item.parts; if (parts.length === 0) { // This might be a removal keybinding item in user settings => accept it From 141617c5b5793b2f7313e8295581afdf88480014 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 26 Jul 2019 16:37:31 +0200 Subject: [PATCH 665/710] Remove dimmed auto closed character --- src/vs/editor/browser/widget/media/editor.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/editor/browser/widget/media/editor.css b/src/vs/editor/browser/widget/media/editor.css index 83c0859bd29..fb9e5f5e8b8 100644 --- a/src/vs/editor/browser/widget/media/editor.css +++ b/src/vs/editor/browser/widget/media/editor.css @@ -41,6 +41,8 @@ top: 0; } +/* .monaco-editor .auto-closed-character { opacity: 0.3; } +*/ From f9be8224e709c60d94d50eeb2086ccc41909749d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 Jul 2019 16:51:22 +0200 Subject: [PATCH 666/710] tweak jsdoc, #56694 --- src/vs/vscode.proposed.d.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index d410fcedffd..fc19f4d513a 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1295,10 +1295,9 @@ declare module 'vscode' { export enum DiagnosticTag { /** - * Deprecated or obsolete code + * Deprecated or obsolete code. * - * Can be used to style with strikeout or other "obsolete" styling. See: - * https://github.com/microsoft/vscode/issues/50972 + * Diagnostics with this tag are rendered with a strike through. */ Deprecated = 2, } From 55c8530ec421e0766f1032830576965169083275 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Fri, 26 Jul 2019 17:11:58 +0200 Subject: [PATCH 667/710] properly pass non-key/value cli arguments; fixes #76989 --- src/vs/workbench/contrib/debug/browser/rawDebugSession.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts b/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts index b67785c3d98..a0f2120b920 100644 --- a/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts +++ b/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts @@ -587,7 +587,13 @@ export class RawDebugSession { } } else { - args._.push(a2); + const match = /^--(.+)$/.exec(a2); + if (match && match.length === 2) { + const key = match[1]; + (args)[key] = true; + } else { + args._.push(a2); + } } } } From 1c6047158b540dd5e38e75bf9793bc9527d26e4b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 17:16:04 +0200 Subject: [PATCH 668/710] distro --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f973590748b..709608cbc69 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "ecf90e8c66d243c7ac15e30c24b3cc437d0700dc", + "distro": "7a8caddf61783ec1867857444d613a317aca500a", "author": { "name": "Microsoft Corporation" }, @@ -158,4 +158,4 @@ "windows-mutex": "0.3.0", "windows-process-tree": "0.2.4" } -} +} \ No newline at end of file From 1545b1bb59c8cd266365011b2204b2a98deb8163 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 23 Jul 2019 12:54:45 +0200 Subject: [PATCH 669/710] allow extension tips based on location --- src/vs/platform/product/common/product.ts | 2 +- .../electron-browser/extensionTipsService.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts index 45c31ca0f3d..b5451aea32c 100644 --- a/src/vs/platform/product/common/product.ts +++ b/src/vs/platform/product/common/product.ts @@ -72,7 +72,7 @@ export interface IProductConfiguration { readonly recommendationsUrl: string; }; extensionTips: { [id: string]: string; }; - extensionImportantTips: { [id: string]: { name: string; pattern: string; }; }; + extensionImportantTips: { [id: string]: { name: string; pattern: string; isLocationPattern?: boolean, isExtensionPack?: boolean }; }; readonly exeBasedExtensionTips: { [id: string]: { friendlyName: string, windowsPath?: string, recommendations: readonly string[] }; }; readonly extensionKeywords: { [extension: string]: readonly string[]; }; readonly extensionAllowedBadgeProviders: readonly string[]; diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts index f4af7a1c9b6..1b08aea0f93 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts @@ -597,7 +597,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe const now = Date.now(); forEach(this._availableRecommendations, entry => { let { key: pattern, value: ids } = entry; - if (match(pattern, model.uri.path)) { + if (match(pattern, model.uri.toString())) { for (let id of ids) { if (caseInsensitiveGet(product.extensionImportantTips, id)) { recommendationsToSuggest.push(id); @@ -670,12 +670,12 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe if (!entry) { return false; } - const name = entry['name']; - + const name = entry.name; let message = localize('reallyRecommended2', "The '{0}' extension is recommended for this file type.", name); - // Temporary fix for the only extension pack we recommend. See https://github.com/Microsoft/vscode/issues/35364 - if (id === 'vscjava.vscode-java-pack') { + if (entry.isExtensionPack) { message = localize('reallyRecommendedExtensionPack', "The '{0}' extension pack is recommended for this file type.", name); + } else if (entry.isLocationPattern) { + message = localize('reallyRecommendedLocationPattern', "The '{0}' extension is recommended for files at this location.", name); } const setIgnoreRecommendationsConfig = (configVal: boolean) => { From 5cc02113634f9ab8ae9ba4adb00d29dcff14a2c2 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 26 Jul 2019 18:02:52 +0200 Subject: [PATCH 670/710] recommend important exe extensions --- src/vs/platform/product/common/product.ts | 12 +- .../extensions/browser/extensionsActions.ts | 2 +- .../electron-browser/extensionTipsService.ts | 219 +++++++++++++----- 3 files changed, 175 insertions(+), 58 deletions(-) diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts index b5451aea32c..d39dd65c08f 100644 --- a/src/vs/platform/product/common/product.ts +++ b/src/vs/platform/product/common/product.ts @@ -72,8 +72,8 @@ export interface IProductConfiguration { readonly recommendationsUrl: string; }; extensionTips: { [id: string]: string; }; - extensionImportantTips: { [id: string]: { name: string; pattern: string; isLocationPattern?: boolean, isExtensionPack?: boolean }; }; - readonly exeBasedExtensionTips: { [id: string]: { friendlyName: string, windowsPath?: string, recommendations: readonly string[] }; }; + extensionImportantTips: { [id: string]: { name: string; pattern: string; isExtensionPack?: boolean }; }; + readonly exeBasedExtensionTips: { [id: string]: IExeBasedExtensionTip; }; readonly extensionKeywords: { [extension: string]: readonly string[]; }; readonly extensionAllowedBadgeProviders: readonly string[]; readonly extensionAllowedProposedApi: readonly string[]; @@ -120,6 +120,14 @@ export interface IProductConfiguration { readonly uiExtensions?: readonly string[]; } +export interface IExeBasedExtensionTip { + friendlyName: string; + windowsPath?: string; + recommendations: readonly string[]; + important?: boolean; + exeFriendlyName?: string; +} + export interface ISurveyData { surveyId: string; surveyUrl: string; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index df4be0957a3..fdb0056d228 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -1694,7 +1694,7 @@ export class InstallRecommendedExtensionAction extends Action { return this.viewletService.openViewlet(VIEWLET_ID, true) .then(viewlet => viewlet as IExtensionsViewlet) .then(viewlet => { - viewlet.search('@recommended '); + viewlet.search(`@id:${this.extensionId}`); viewlet.focus(); return this.extensionWorkbenchService.queryGallery({ names: [this.extensionId], source: 'install-recommendation', pageSize: 1 }, CancellationToken.None) .then(pager => { diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts index 1b08aea0f93..b64e6d66977 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { localize } from 'vs/nls'; -import { join } from 'vs/base/common/path'; +import { join, basename } from 'vs/base/common/path'; import { forEach } from 'vs/base/common/collections'; import { Disposable } from 'vs/base/common/lifecycle'; import { match } from 'vs/base/common/glob'; @@ -43,6 +43,8 @@ import { CancellationToken } from 'vs/base/common/cancellation'; import { ExtensionType } from 'vs/platform/extensions/common/extensions'; import { extname } from 'vs/base/common/resources'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { IExeBasedExtensionTip } from 'vs/platform/product/common/product'; +import { timeout } from 'vs/base/common/async'; const milliSecondsInADay = 1000 * 60 * 60 * 24; const choiceNever = localize('neverShowAgain', "Don't Show Again"); @@ -71,7 +73,8 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe _serviceBrand: any; private _fileBasedRecommendations: { [id: string]: { recommendedTime: number, sources: ExtensionRecommendationSource[] }; } = Object.create(null); - private _exeBasedRecommendations: { [id: string]: string; } = Object.create(null); + private _exeBasedRecommendations: { [id: string]: IExeBasedExtensionTip; } = Object.create(null); + private _importantExeBasedRecommendations: { [id: string]: IExeBasedExtensionTip; } = Object.create(null); private _availableRecommendations: { [pattern: string]: string[] } = Object.create(null); private _allWorkspaceRecommendedExtensions: IExtensionRecommendation[] = []; private _dynamicWorkspaceRecommendations: string[] = []; @@ -187,7 +190,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe forEach(this._exeBasedRecommendations, entry => output[entry.key.toLowerCase()] = { reasonId: ExtensionRecommendationReason.Executable, - reasonText: localize('exeBasedRecommendation', "This extension is recommended because you have {0} installed.", entry.value) + reasonText: localize('exeBasedRecommendation', "This extension is recommended because you have {0} installed.", entry.value.friendlyName) }); forEach(this._fileBasedRecommendations, entry => output[entry.key.toLowerCase()] = { @@ -496,6 +499,100 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe //#endregion + //#region important exe based extension + + private async promptForImportantExeBasedExtension(): Promise { + + const storageKey = 'extensionsAssistant/workspaceRecommendationsIgnore'; + const config = this.configurationService.getValue(ConfigurationKey); + + if (config.ignoreRecommendations + || config.showRecommendationsOnlyOnDemand + || this.storageService.getBoolean(storageKey, StorageScope.WORKSPACE, false)) { + return false; + } + + const installed = await this.extensionManagementService.getInstalled(ExtensionType.User); + let recommendationsToSuggest = Object.keys(this._importantExeBasedRecommendations); + recommendationsToSuggest = this.filterAllIgnoredInstalledAndNotAllowed(recommendationsToSuggest, installed); + if (recommendationsToSuggest.length === 0) { + return false; + } + + const id = recommendationsToSuggest[0]; + const tip = this._importantExeBasedRecommendations[id]; + const message = localize('exeRecommended', "The '{0}' extension is recommended as you have {1} installed on your system.", tip.friendlyName!, tip.exeFriendlyName || basename(tip.windowsPath!)); + + this.notificationService.prompt(Severity.Info, message, + [{ + label: localize('install', 'Install'), + run: () => { + /* __GDPR__ + "exeExtensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" } + } + */ + this.telemetryService.publicLog('exeExtensionRecommendations:popup', { userReaction: 'install', extensionId: name }); + this.instantiationService.createInstance(InstallRecommendedExtensionAction, id).run(); + } + }, { + label: localize('showRecommendations', "Show Recommendations"), + run: () => { + /* __GDPR__ + "exeExtensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" } + } + */ + this.telemetryService.publicLog('exeExtensionRecommendations:popup', { userReaction: 'show', extensionId: name }); + + const recommendationsAction = this.instantiationService.createInstance(ShowRecommendedExtensionsAction, ShowRecommendedExtensionsAction.ID, localize('showRecommendations', "Show Recommendations")); + recommendationsAction.run(); + recommendationsAction.dispose(); + } + }, { + label: choiceNever, + isSecondary: true, + run: () => { + this.addToImportantRecommendationsIgnore(id); + /* __GDPR__ + "exeExtensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" } + } + */ + this.telemetryService.publicLog('exeExtensionRecommendations:popup', { userReaction: 'neverShowAgain', extensionId: name }); + this.notificationService.prompt( + Severity.Info, + localize('ignoreExtensionRecommendations', "Do you want to ignore all extension recommendations?"), + [{ + label: localize('ignoreAll', "Yes, Ignore All"), + run: () => this.setIgnoreRecommendationsConfig(true) + }, { + label: localize('no', "No"), + run: () => this.setIgnoreRecommendationsConfig(false) + }] + ); + } + }], + { + sticky: true, + onCancel: () => { + /* __GDPR__ + "exeExtensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" } + } + */ + this.telemetryService.publicLog('exeExtensionRecommendations:popup', { userReaction: 'cancelled', extensionId: name }); + } + } + ); + + return true; + } + //#region fileBasedRecommendations getFileBasedRecommendations(): IExtensionRecommendation[] { @@ -646,21 +743,8 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe } private async promptRecommendedExtensionForFileType(recommendationsToSuggest: string[], installed: ILocalExtension[]): Promise { - const importantRecommendationsIgnoreList = JSON.parse(this.storageService.get('extensionsAssistant/importantRecommendationsIgnore', StorageScope.GLOBAL, '[]')); - const installedExtensionsIds = installed.reduce((result, i) => { result.add(i.identifier.id.toLowerCase()); return result; }, new Set()); - recommendationsToSuggest = recommendationsToSuggest.filter(id => { - if (importantRecommendationsIgnoreList.indexOf(id) !== -1) { - return false; - } - if (!this.isExtensionAllowedToBeRecommended(id)) { - return false; - } - if (installedExtensionsIds.has(id.toLowerCase())) { - return false; - } - return true; - }); + recommendationsToSuggest = this.filterAllIgnoredInstalledAndNotAllowed(recommendationsToSuggest, installed); if (recommendationsToSuggest.length === 0) { return false; } @@ -674,18 +758,8 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe let message = localize('reallyRecommended2', "The '{0}' extension is recommended for this file type.", name); if (entry.isExtensionPack) { message = localize('reallyRecommendedExtensionPack', "The '{0}' extension pack is recommended for this file type.", name); - } else if (entry.isLocationPattern) { - message = localize('reallyRecommendedLocationPattern', "The '{0}' extension is recommended for files at this location.", name); } - const setIgnoreRecommendationsConfig = (configVal: boolean) => { - this.configurationService.updateValue('extensions.ignoreRecommendations', configVal, ConfigurationTarget.USER); - if (configVal) { - const ignoreWorkspaceRecommendationsStorageKey = 'extensionsAssistant/workspaceRecommendationsIgnore'; - this.storageService.store(ignoreWorkspaceRecommendationsStorageKey, true, StorageScope.WORKSPACE); - } - }; - this.notificationService.prompt(Severity.Info, message, [{ label: localize('install', 'Install'), @@ -718,12 +792,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe label: choiceNever, isSecondary: true, run: () => { - importantRecommendationsIgnoreList.push(id); - this.storageService.store( - 'extensionsAssistant/importantRecommendationsIgnore', - JSON.stringify(importantRecommendationsIgnoreList), - StorageScope.GLOBAL - ); + this.addToImportantRecommendationsIgnore(id); /* __GDPR__ "extensionRecommendations:popup" : { "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, @@ -736,10 +805,10 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe localize('ignoreExtensionRecommendations', "Do you want to ignore all extension recommendations?"), [{ label: localize('ignoreAll', "Yes, Ignore All"), - run: () => setIgnoreRecommendationsConfig(true) + run: () => this.setIgnoreRecommendationsConfig(true) }, { label: localize('no', "No"), - run: () => setIgnoreRecommendationsConfig(false) + run: () => this.setIgnoreRecommendationsConfig(false) }] ); } @@ -831,6 +900,42 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe ); } + private filterAllIgnoredInstalledAndNotAllowed(recommendationsToSuggest: string[], installed: ILocalExtension[]): string[] { + + const importantRecommendationsIgnoreList = JSON.parse(this.storageService.get('extensionsAssistant/importantRecommendationsIgnore', StorageScope.GLOBAL, '[]')); + const installedExtensionsIds = installed.reduce((result, i) => { result.add(i.identifier.id.toLowerCase()); return result; }, new Set()); + return recommendationsToSuggest.filter(id => { + if (importantRecommendationsIgnoreList.indexOf(id) !== -1) { + return false; + } + if (!this.isExtensionAllowedToBeRecommended(id)) { + return false; + } + if (installedExtensionsIds.has(id.toLowerCase())) { + return false; + } + return true; + }); + } + + private addToImportantRecommendationsIgnore(id: string) { + const importantRecommendationsIgnoreList = JSON.parse(this.storageService.get('extensionsAssistant/importantRecommendationsIgnore', StorageScope.GLOBAL, '[]')); + importantRecommendationsIgnoreList.push(id); + this.storageService.store( + 'extensionsAssistant/importantRecommendationsIgnore', + JSON.stringify(importantRecommendationsIgnoreList), + StorageScope.GLOBAL + ); + } + + private setIgnoreRecommendationsConfig(configVal: boolean) { + this.configurationService.updateValue('extensions.ignoreRecommendations', configVal, ConfigurationTarget.USER); + if (configVal) { + const ignoreWorkspaceRecommendationsStorageKey = 'extensionsAssistant/workspaceRecommendationsIgnore'; + this.storageService.store(ignoreWorkspaceRecommendationsStorageKey, true, StorageScope.WORKSPACE); + } + } + //#endregion //#region otherRecommendations @@ -857,18 +962,18 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe } private fetchProactiveRecommendations(calledDuringStartup?: boolean): Promise { - let fetchPromise = Promise.resolve(undefined); + let fetchPromise = Promise.resolve(undefined); if (!this.proactiveRecommendationsFetched) { this.proactiveRecommendationsFetched = true; - // Executable based recommendations carry out a lot of file stats, so run them after 10 secs - // So that the startup is not affected + // Executable based recommendations carry out a lot of file stats, delay the resolution so that the startup is not affected + // 10 sec for regular extensions + // 3 secs for important - fetchPromise = new Promise((c, e) => { - setTimeout(() => { - Promise.all([this.fetchExecutableRecommendations(), this.fetchDynamicWorkspaceRecommendations()]).then(() => c(undefined)); - }, calledDuringStartup ? 10000 : 0); - }); + const importantExeBasedRecommendations = timeout(calledDuringStartup ? 3000 : 0).then(_ => this.fetchExecutableRecommendations(true)); + importantExeBasedRecommendations.then(_ => this.promptForImportantExeBasedExtension()); + + fetchPromise = timeout(calledDuringStartup ? 10000 : 0).then(_ => Promise.all([this.fetchDynamicWorkspaceRecommendations(), this.fetchExecutableRecommendations(false), importantExeBasedRecommendations])); } return fetchPromise; @@ -877,20 +982,22 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe /** * If user has any of the tools listed in product.exeBasedExtensionTips, fetch corresponding recommendations */ - private fetchExecutableRecommendations(): Promise { + private fetchExecutableRecommendations(important: boolean): Promise { const homeDir = os.homedir(); let foundExecutables: Set = new Set(); - let findExecutable = (exeName: string, path: string) => { + let findExecutable = (exeName: string, tip: IExeBasedExtensionTip, path: string) => { return pfs.fileExists(path).then(exists => { if (exists && !foundExecutables.has(exeName)) { foundExecutables.add(exeName); - (product.exeBasedExtensionTips[exeName]['recommendations'] || []) - .forEach(extensionId => { - if (product.exeBasedExtensionTips[exeName]['friendlyName']) { - this._exeBasedRecommendations[extensionId.toLowerCase()] = product.exeBasedExtensionTips[exeName]['friendlyName']; + (tip['recommendations'] || []).forEach(extensionId => { + if (tip.friendlyName) { + if (important) { + this._importantExeBasedRecommendations[extensionId.toLowerCase()] = tip; } - }); + this._exeBasedRecommendations[extensionId.toLowerCase()] = tip; + } + }); } }); }; @@ -901,8 +1008,10 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe if (typeof entry.value !== 'object' || !Array.isArray(entry.value['recommendations'])) { return; } - - let exeName = entry.key; + if (important !== !!entry.value.important) { + return; + } + const exeName = entry.key; if (process.platform === 'win32') { let windowsPath = entry.value['windowsPath']; if (!windowsPath || typeof windowsPath !== 'string') { @@ -913,10 +1022,10 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe .replace('%ProgramFiles%', process.env['ProgramFiles']!) .replace('%APPDATA%', process.env['APPDATA']!) .replace('%WINDIR%', process.env['WINDIR']!); - promises.push(findExecutable(exeName, windowsPath)); + promises.push(findExecutable(exeName, entry.value, windowsPath)); } else { - promises.push(findExecutable(exeName, join('/usr/local/bin', exeName))); - promises.push(findExecutable(exeName, join(homeDir, exeName))); + promises.push(findExecutable(exeName, entry.value, join('/usr/local/bin', exeName))); + promises.push(findExecutable(exeName, entry.value, join(homeDir, exeName))); } }); From 916287fdd467e3b4a1bf431ac80aa36eddf4bbdb Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 16:26:58 +0200 Subject: [PATCH 671/710] remove EditorPart._preferredSize related to #67367 --- .../browser/parts/editor/editorPart.ts | 34 ------------------- .../test/browser/editorGroupsService.test.ts | 11 ------ 2 files changed, 45 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index a42cf0aed2f..53611687ce5 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -112,13 +112,8 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro private _onDidSizeConstraintsChange = this._register(new Relay<{ width: number; height: number; } | undefined>()); get onDidSizeConstraintsChange(): Event<{ width: number; height: number; } | undefined> { return Event.any(this.onDidSetGridWidget.event, this._onDidSizeConstraintsChange.event); } - private readonly _onDidPreferredSizeChange: Emitter = this._register(new Emitter()); - readonly onDidPreferredSizeChange: Event = this._onDidPreferredSizeChange.event; - //#endregion - private _preferredSize: Dimension | undefined; - private readonly workspaceMemento: MementoObject; private readonly globalMemento: MementoObject; @@ -366,9 +361,6 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro const newOrientation = (orientation === GroupOrientation.HORIZONTAL) ? Orientation.HORIZONTAL : Orientation.VERTICAL; if (this.gridWidget.orientation !== newOrientation) { this.gridWidget.orientation = newOrientation; - - // Mark preferred size as changed - this.resetPreferredSize(); } } @@ -423,9 +415,6 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro // Update container this.updateContainer(); - // Mark preferred size as changed - this.resetPreferredSize(); - // Events for groups that got added this.getGroups(GroupsOrder.GRID_APPEARANCE).forEach(groupView => { if (currentGroupViews.indexOf(groupView) === -1) { @@ -490,9 +479,6 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro // Update container this.updateContainer(); - // Mark preferred size as changed - this.resetPreferredSize(); - // Event this._onDidAddGroup.fire(newGroupView); @@ -661,9 +647,6 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro // Update container this.updateContainer(); - // Mark preferred size as changed - this.resetPreferredSize(); - // Event this._onDidRemoveGroup.fire(groupView); } @@ -764,23 +747,6 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro get onDidChange(): Event { return this.centeredLayoutWidget.onDidChange; } readonly priority: LayoutPriority = LayoutPriority.High; - get preferredSize(): Dimension { - if (!this._preferredSize) { - this._preferredSize = new Dimension(this.gridWidget.minimumWidth, this.gridWidget.minimumHeight); - } - - return this._preferredSize; - } - - private resetPreferredSize(): void { - - // Reset (will be computed upon next access) - this._preferredSize = undefined; - - // Event - this._onDidPreferredSizeChange.fire(); - } - private get gridSeparatorBorder(): Color { return this.theme.getColor(EDITOR_GROUP_BORDER) || this.theme.getColor(contrastBorder) || Color.transparent; } diff --git a/src/vs/workbench/services/editor/test/browser/editorGroupsService.test.ts b/src/vs/workbench/services/editor/test/browser/editorGroupsService.test.ts index b577d40f181..477fdfc5bc7 100644 --- a/src/vs/workbench/services/editor/test/browser/editorGroupsService.test.ts +++ b/src/vs/workbench/services/editor/test/browser/editorGroupsService.test.ts @@ -118,11 +118,6 @@ suite('EditorGroupsService', () => { groupMovedCounter++; }); - let preferredSizeChangeCounter = 0; - const preferredSizeChangeListener = part.onDidPreferredSizeChange(() => { - preferredSizeChangeCounter++; - }); - // always a root group const rootGroup = part.groups[0]; assert.equal(part.groups.length, 1); @@ -141,7 +136,6 @@ suite('EditorGroupsService', () => { assert.equal(part.groups.length, 2); assert.equal(part.count, 2); assert.ok(part.activeGroup === rootGroup); - assert.equal(preferredSizeChangeCounter, 1); assert.equal(rootGroup.label, 'Group 1'); assert.equal(rightGroup.label, 'Group 2'); @@ -189,7 +183,6 @@ suite('EditorGroupsService', () => { assert.equal(part.groups.length, 3); assert.ok(part.activeGroup === rightGroup); assert.ok(!downGroup.activeControl); - assert.equal(preferredSizeChangeCounter, 2); assert.equal(rootGroup.label, 'Group 1'); assert.equal(rightGroup.label, 'Group 2'); assert.equal(downGroup.label, 'Group 3'); @@ -208,13 +201,11 @@ suite('EditorGroupsService', () => { part.moveGroup(downGroup, rightGroup, GroupDirection.DOWN); assert.equal(groupMovedCounter, 1); - assert.equal(preferredSizeChangeCounter, 2); part.removeGroup(downGroup); assert.ok(!part.getGroup(downGroup.id)); assert.equal(didDispose, true); assert.equal(groupRemovedCounter, 1); - assert.equal(preferredSizeChangeCounter, 3); assert.equal(part.groups.length, 2); assert.ok(part.activeGroup === rightGroup); assert.equal(rootGroup.label, 'Group 1'); @@ -254,13 +245,11 @@ suite('EditorGroupsService', () => { assert.ok(part.activeGroup === rootGroup); part.setGroupOrientation(part.orientation === GroupOrientation.HORIZONTAL ? GroupOrientation.VERTICAL : GroupOrientation.HORIZONTAL); - assert.equal(preferredSizeChangeCounter, 5); activeGroupChangeListener.dispose(); groupAddedListener.dispose(); groupRemovedListener.dispose(); groupMovedListener.dispose(); - preferredSizeChangeListener.dispose(); part.dispose(); }); From dcdab4125be3ed7b121078b7a5efe1ebe0be9946 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 16:53:59 +0200 Subject: [PATCH 672/710] hide away gridview types --- .../base/browser/ui/centered/centeredViewLayout.ts | 2 +- src/vs/base/browser/ui/grid/grid.ts | 12 ++++++++---- src/vs/base/test/browser/ui/grid/util.ts | 5 +++-- src/vs/workbench/browser/part.ts | 5 ++--- src/vs/workbench/browser/parts/editor/editorPart.ts | 5 ++--- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/vs/base/browser/ui/centered/centeredViewLayout.ts b/src/vs/base/browser/ui/centered/centeredViewLayout.ts index b40384018f1..299b6534873 100644 --- a/src/vs/base/browser/ui/centered/centeredViewLayout.ts +++ b/src/vs/base/browser/ui/centered/centeredViewLayout.ts @@ -6,7 +6,7 @@ import { SplitView, Orientation, ISplitViewStyles, IView as ISplitViewView } from 'vs/base/browser/ui/splitview/splitview'; import { $ } from 'vs/base/browser/dom'; import { Event } from 'vs/base/common/event'; -import { IView, IViewSize } from 'vs/base/browser/ui/grid/gridview'; +import { IView, IViewSize } from 'vs/base/browser/ui/grid/grid'; import { IDisposable, DisposableStore } from 'vs/base/common/lifecycle'; import { Color } from 'vs/base/common/color'; diff --git a/src/vs/base/browser/ui/grid/grid.ts b/src/vs/base/browser/ui/grid/grid.ts index 08090875642..7b38753725d 100644 --- a/src/vs/base/browser/ui/grid/grid.ts +++ b/src/vs/base/browser/ui/grid/grid.ts @@ -7,11 +7,11 @@ import 'vs/css!./gridview'; import { Orientation } from 'vs/base/browser/ui/sash/sash'; import { Disposable } from 'vs/base/common/lifecycle'; import { tail2 as tail, equals } from 'vs/base/common/arrays'; -import { orthogonal, IView, GridView, Sizing as GridViewSizing, Box, IGridViewStyles, IViewSize } from './gridview'; +import { orthogonal, IView as IGridViewView, GridView, Sizing as GridViewSizing, Box, IGridViewStyles, IViewSize } from './gridview'; import { Event } from 'vs/base/common/event'; import { InvisibleSizing } from 'vs/base/browser/ui/splitview/splitview'; -export { Orientation, Sizing as GridViewSizing } from './gridview'; +export { Orientation, Sizing as GridViewSizing, IViewSize, orthogonal, LayoutPriority } from './gridview'; export const enum Direction { Up, @@ -29,6 +29,10 @@ function oppositeDirection(direction: Direction): Direction { } } +export interface IView extends IGridViewView { + readonly preferredSize?: number; +} + export interface GridLeafNode { readonly view: T; readonly box: Box; @@ -217,7 +221,7 @@ export class Grid extends Disposable { this.gridview = new GridView(options); this._register(this.gridview); - this._register(this.gridview.onDidSashReset(this.doResetViewSize, this)); + this._register(this.gridview.onDidSashReset(this.onDidSashReset, this)); const size: number | GridViewSizing = typeof options.firstViewVisibleCachedSize === 'number' ? GridViewSizing.Invisible(options.firstViewVisibleCachedSize) @@ -370,7 +374,7 @@ export class Grid extends Disposable { return getGridLocation(element); } - private doResetViewSize(location: number[]): void { + private onDidSashReset(location: number[]): void { const [parentLocation,] = tail(location); this.gridview.distributeViewSizes(parentLocation); } diff --git a/src/vs/base/test/browser/ui/grid/util.ts b/src/vs/base/test/browser/ui/grid/util.ts index 0efdc44851a..39a35736ddd 100644 --- a/src/vs/base/test/browser/ui/grid/util.ts +++ b/src/vs/base/test/browser/ui/grid/util.ts @@ -5,7 +5,8 @@ import * as assert from 'assert'; import { Emitter, Event } from 'vs/base/common/event'; -import { IView, GridNode, isGridBranchNode, } from 'vs/base/browser/ui/grid/gridview'; +import { GridNode, isGridBranchNode } from 'vs/base/browser/ui/grid/gridview'; +import { IView } from 'vs/base/browser/ui/grid/grid'; export class TestView implements IView { @@ -78,4 +79,4 @@ export function nodesToArrays(node: GridNode): any { } else { return node.view; } -} \ No newline at end of file +} diff --git a/src/vs/workbench/browser/part.ts b/src/vs/workbench/browser/part.ts index f80e4545957..f5281df2802 100644 --- a/src/vs/workbench/browser/part.ts +++ b/src/vs/workbench/browser/part.ts @@ -9,10 +9,9 @@ import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { Dimension, size } from 'vs/base/browser/dom'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IDimension } from 'vs/platform/layout/browser/layoutService'; -import { ISerializableView, Orientation } from 'vs/base/browser/ui/grid/grid'; +import { ISerializableView, Orientation, IViewSize } from 'vs/base/browser/ui/grid/grid'; import { Event, Emitter } from 'vs/base/common/event'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; -import { IViewSize } from 'vs/base/browser/ui/grid/gridview'; export interface IPartOptions { hasTitle?: boolean; @@ -164,4 +163,4 @@ class PartLayout { return { titleSize, contentSize }; } -} \ No newline at end of file +} diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 53611687ce5..84b899658bc 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -11,7 +11,7 @@ import { Event, Emitter, Relay } from 'vs/base/common/event'; import { contrastBorder, editorBackground } from 'vs/platform/theme/common/colorRegistry'; import { GroupDirection, IAddGroupOptions, GroupsArrangement, GroupOrientation, IMergeGroupOptions, MergeGroupMode, ICopyEditorOptions, GroupsOrder, GroupChangeKind, GroupLocation, IFindGroupScope, EditorGroupLayout, GroupLayoutArgument, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; -import { Direction, SerializableGrid, Sizing, ISerializedGrid, Orientation, GridBranchNode, isGridBranchNode, GridNode, createSerializedGrid, Grid } from 'vs/base/browser/ui/grid/grid'; +import { IView, orthogonal, LayoutPriority, IViewSize, Direction, SerializableGrid, Sizing, ISerializedGrid, Orientation, GridBranchNode, isGridBranchNode, GridNode, createSerializedGrid, Grid } from 'vs/base/browser/ui/grid/grid'; import { GroupIdentifier, IWorkbenchEditorConfiguration, IEditorPartOptions } from 'vs/workbench/common/editor'; import { values } from 'vs/base/common/map'; import { EDITOR_GROUP_BORDER, EDITOR_PANE_BACKGROUND } from 'vs/workbench/common/theme'; @@ -27,7 +27,6 @@ import { EditorDropTarget } from 'vs/workbench/browser/parts/editor/editorDropTa import { localize } from 'vs/nls'; import { Color } from 'vs/base/common/color'; import { CenteredViewLayout } from 'vs/base/browser/ui/centered/centeredViewLayout'; -import { IView, orthogonal, LayoutPriority, IViewSize } from 'vs/base/browser/ui/grid/gridview'; import { onUnexpectedError } from 'vs/base/common/errors'; import { Parts, IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; @@ -994,4 +993,4 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro } } -registerSingleton(IEditorGroupsService, EditorPart); \ No newline at end of file +registerSingleton(IEditorGroupsService, EditorPart); From 6cfe0672e7f981a066a0ecaf09eef690e52153af Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 17:28:06 +0200 Subject: [PATCH 673/710] splitview: improve sash reset and distributeViewSizes behavior --- src/vs/base/browser/ui/splitview/splitview.ts | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 171a44837c4..6f031dac570 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -336,7 +336,24 @@ export class SplitView extends Disposable { const onChangeDisposable = onChange(this.onSashChange, this); const onEnd = Event.map(sash.onDidEnd, () => firstIndex(this.sashItems, item => item.sash === sash)); const onEndDisposable = onEnd(this.onSashEnd, this); - const onDidResetDisposable = sash.onDidReset(() => this._onDidSashReset.fire(firstIndex(this.sashItems, item => item.sash === sash))); + + const onDidResetDisposable = sash.onDidReset(() => { + const index = firstIndex(this.sashItems, item => item.sash === sash); + const upIndexes = range(index, -1); + const downIndexes = range(index + 1, this.viewItems.length); + const snapBeforeIndex = this.findFirstSnapIndex(upIndexes); + const snapAfterIndex = this.findFirstSnapIndex(downIndexes); + + if (typeof snapBeforeIndex === 'number' && !this.viewItems[snapBeforeIndex].visible) { + return; + } + + if (typeof snapAfterIndex === 'number' && !this.viewItems[snapAfterIndex].visible) { + return; + } + + this._onDidSashReset.fire(index); + }); const disposable = combinedDisposable(onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash); const sashItem: ISashItem = { sash, disposable }; @@ -630,10 +647,19 @@ export class SplitView extends Disposable { } distributeViewSizes(): void { - const size = Math.floor(this.size / this.viewItems.length); + const flexibleViewItems: ViewItem[] = []; + let flexibleSize = 0; - for (let i = 0; i < this.viewItems.length; i++) { - const item = this.viewItems[i]; + for (const item of this.viewItems) { + if (item.maximumSize - item.minimumSize > 0) { + flexibleViewItems.push(item); + flexibleSize += item.size; + } + } + + const size = Math.floor(flexibleSize / flexibleViewItems.length); + + for (const item of flexibleViewItems) { item.size = clamp(size, item.minimumSize, item.maximumSize); } From 5d228fb849a1cc0eefc071079334050f79cef41e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 17:28:40 +0200 Subject: [PATCH 674/710] grid: onDidSashReset with preferred width/height --- src/vs/base/browser/ui/grid/grid.ts | 36 +++++++++++++++++-- src/vs/base/browser/ui/grid/gridview.ts | 7 ++-- .../test/browser/ui/grid/gridview.test.ts | 22 ++++++------ 3 files changed, 49 insertions(+), 16 deletions(-) diff --git a/src/vs/base/browser/ui/grid/grid.ts b/src/vs/base/browser/ui/grid/grid.ts index 7b38753725d..386503317c4 100644 --- a/src/vs/base/browser/ui/grid/grid.ts +++ b/src/vs/base/browser/ui/grid/grid.ts @@ -30,7 +30,8 @@ function oppositeDirection(direction: Direction): Direction { } export interface IView extends IGridViewView { - readonly preferredSize?: number; + readonly preferredHeight?: number; + readonly preferredWidth?: number; } export interface GridLeafNode { @@ -339,7 +340,7 @@ export class Grid extends Disposable { } getViews(): GridBranchNode { - return this.gridview.getViews() as GridBranchNode; + return this.gridview.getView() as GridBranchNode; } getNeighborViews(view: T, direction: Direction, wrap: boolean = false): T[] { @@ -375,7 +376,36 @@ export class Grid extends Disposable { } private onDidSashReset(location: number[]): void { - const [parentLocation,] = tail(location); + const resizeToPreferredSize = (node: GridNode): boolean => { + if (isGridBranchNode(node)) { + return false; + } + + const direction = getLocationOrientation(this.orientation, location); + const size = direction === Orientation.HORIZONTAL ? node.view.preferredWidth : node.view.preferredHeight; + + if (typeof size !== 'number') { + return false; + } + + const viewSize = Orientation.HORIZONTAL ? { width: size } : { height: size }; + this.gridview.resizeView(location, viewSize); + return true; + }; + + let node = this.gridview.getView(location) as GridNode; + + if (resizeToPreferredSize(node)) { + return; + } + + const [parentLocation, index] = tail(location); + node = this.gridview.getView([...parentLocation, index + 1]) as GridNode; + + if (resizeToPreferredSize(node)) { + return; + } + this.gridview.distributeViewSizes(parentLocation); } } diff --git a/src/vs/base/browser/ui/grid/gridview.ts b/src/vs/base/browser/ui/grid/gridview.ts index 3e05e4a9499..f6e65de3a14 100644 --- a/src/vs/base/browser/ui/grid/gridview.ts +++ b/src/vs/base/browser/ui/grid/gridview.ts @@ -903,8 +903,11 @@ export class GridView implements IDisposable { parent.setChildVisible(index, visible); } - getViews(): GridBranchNode { - return this._getViews(this.root, this.orientation, { top: 0, left: 0, width: this.width, height: this.height }) as GridBranchNode; + getView(): GridBranchNode; + getView(location?: number[]): GridNode; + getView(location?: number[]): GridNode { + const node = location ? this.getNode(location)[1] : this._root; + return this._getViews(node, this.orientation, { top: 0, left: 0, width: this.width, height: this.height }); } private _getViews(node: Node, orientation: Orientation, box: Box): GridNode { diff --git a/src/vs/base/test/browser/ui/grid/gridview.test.ts b/src/vs/base/test/browser/ui/grid/gridview.test.ts index 20b7626b184..78cc44cc76a 100644 --- a/src/vs/base/test/browser/ui/grid/gridview.test.ts +++ b/src/vs/base/test/browser/ui/grid/gridview.test.ts @@ -22,7 +22,7 @@ suite('Gridview', function () { }); test('empty gridview is empty', function () { - assert.deepEqual(nodesToArrays(gridview.getViews()), []); + assert.deepEqual(nodesToArrays(gridview.getView()), []); gridview.dispose(); }); @@ -43,7 +43,7 @@ suite('Gridview', function () { gridview.addView(views[1], 200, [1]); gridview.addView(views[2], 200, [2]); - assert.deepEqual(nodesToArrays(gridview.getViews()), views); + assert.deepEqual(nodesToArrays(gridview.getView()), views); gridview.dispose(); }); @@ -62,7 +62,7 @@ suite('Gridview', function () { gridview.addView((views[1] as TestView[])[0] as IView, 200, [1]); gridview.addView((views[1] as TestView[])[1] as IView, 200, [1, 1]); - assert.deepEqual(nodesToArrays(gridview.getViews()), views); + assert.deepEqual(nodesToArrays(gridview.getView()), views); gridview.dispose(); }); @@ -71,35 +71,35 @@ suite('Gridview', function () { const view1 = new TestView(20, 20, 20, 20); gridview.addView(view1 as IView, 200, [0]); - assert.deepEqual(nodesToArrays(gridview.getViews()), [view1]); + assert.deepEqual(nodesToArrays(gridview.getView()), [view1]); const view2 = new TestView(20, 20, 20, 20); gridview.addView(view2 as IView, 200, [1]); - assert.deepEqual(nodesToArrays(gridview.getViews()), [view1, view2]); + assert.deepEqual(nodesToArrays(gridview.getView()), [view1, view2]); const view3 = new TestView(20, 20, 20, 20); gridview.addView(view3 as IView, 200, [1, 0]); - assert.deepEqual(nodesToArrays(gridview.getViews()), [view1, [view3, view2]]); + assert.deepEqual(nodesToArrays(gridview.getView()), [view1, [view3, view2]]); const view4 = new TestView(20, 20, 20, 20); gridview.addView(view4 as IView, 200, [1, 0, 0]); - assert.deepEqual(nodesToArrays(gridview.getViews()), [view1, [[view4, view3], view2]]); + assert.deepEqual(nodesToArrays(gridview.getView()), [view1, [[view4, view3], view2]]); const view5 = new TestView(20, 20, 20, 20); gridview.addView(view5 as IView, 200, [1, 0]); - assert.deepEqual(nodesToArrays(gridview.getViews()), [view1, [view5, [view4, view3], view2]]); + assert.deepEqual(nodesToArrays(gridview.getView()), [view1, [view5, [view4, view3], view2]]); const view6 = new TestView(20, 20, 20, 20); gridview.addView(view6 as IView, 200, [2]); - assert.deepEqual(nodesToArrays(gridview.getViews()), [view1, [view5, [view4, view3], view2], view6]); + assert.deepEqual(nodesToArrays(gridview.getView()), [view1, [view5, [view4, view3], view2], view6]); const view7 = new TestView(20, 20, 20, 20); gridview.addView(view7 as IView, 200, [1, 1]); - assert.deepEqual(nodesToArrays(gridview.getViews()), [view1, [view5, view7, [view4, view3], view2], view6]); + assert.deepEqual(nodesToArrays(gridview.getView()), [view1, [view5, view7, [view4, view3], view2], view6]); const view8 = new TestView(20, 20, 20, 20); gridview.addView(view8 as IView, 200, [1, 1, 0]); - assert.deepEqual(nodesToArrays(gridview.getViews()), [view1, [view5, [view8, view7], [view4, view3], view2], view6]); + assert.deepEqual(nodesToArrays(gridview.getView()), [view1, [view5, [view8, view7], [view4, view3], view2], view6]); gridview.dispose(); }); From b8bb655858966a417e5051f307435325b8e0a6b8 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 17:38:17 +0200 Subject: [PATCH 675/710] grid: fix preferred size usage --- src/vs/base/browser/ui/grid/grid.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/vs/base/browser/ui/grid/grid.ts b/src/vs/base/browser/ui/grid/grid.ts index 386503317c4..d2cc4ee6ff5 100644 --- a/src/vs/base/browser/ui/grid/grid.ts +++ b/src/vs/base/browser/ui/grid/grid.ts @@ -376,7 +376,9 @@ export class Grid extends Disposable { } private onDidSashReset(location: number[]): void { - const resizeToPreferredSize = (node: GridNode): boolean => { + const resizeToPreferredSize = (location: number[]): boolean => { + const node = this.gridview.getView(location) as GridNode; + if (isGridBranchNode(node)) { return false; } @@ -388,21 +390,18 @@ export class Grid extends Disposable { return false; } - const viewSize = Orientation.HORIZONTAL ? { width: size } : { height: size }; + const viewSize = direction === Orientation.HORIZONTAL ? { width: Math.round(size) } : { height: Math.round(size) }; this.gridview.resizeView(location, viewSize); return true; }; - let node = this.gridview.getView(location) as GridNode; - - if (resizeToPreferredSize(node)) { + if (resizeToPreferredSize(location)) { return; } const [parentLocation, index] = tail(location); - node = this.gridview.getView([...parentLocation, index + 1]) as GridNode; - if (resizeToPreferredSize(node)) { + if (resizeToPreferredSize([...parentLocation, index + 1])) { return; } From 1fd0d4533f2fa19b0eaa83bb9414455da8f9cd33 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 18:06:26 +0200 Subject: [PATCH 676/710] rename contentDimension --- src/vs/workbench/browser/parts/editor/editorPart.ts | 10 +++++----- .../workbench/contrib/watermark/browser/watermark.ts | 4 ++-- .../services/editor/common/editorGroupsService.ts | 2 +- src/vs/workbench/test/workbenchTestServices.ts | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 84b899658bc..14ea050a1b9 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -199,8 +199,8 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro //#region IEditorGroupsService - private _dimension: Dimension; - get dimension(): Dimension { return this._dimension; } + private _contentDimension: Dimension; + get contentDimension(): Dimension { return this._contentDimension; } get activeGroup(): IEditorGroupView { return this._activeGroup; @@ -409,7 +409,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro this.doCreateGridControlWithState(gridDescriptor, activeGroup.id, currentGroupViews); // Layout - this.doLayout(this._dimension); + this.doLayout(this._contentDimension); // Update container this.updateContainer(); @@ -933,10 +933,10 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro } private doLayout(dimension: Dimension): void { - this._dimension = dimension; + this._contentDimension = dimension; // Layout Grid - this.centeredLayoutWidget.layout(this._dimension.width, this._dimension.height); + this.centeredLayoutWidget.layout(this._contentDimension.width, this._contentDimension.height); // Event this._onDidLayout.fire(dimension); diff --git a/src/vs/workbench/contrib/watermark/browser/watermark.ts b/src/vs/workbench/contrib/watermark/browser/watermark.ts index 7788f6e36a0..54c9b8620f5 100644 --- a/src/vs/workbench/contrib/watermark/browser/watermark.ts +++ b/src/vs/workbench/contrib/watermark/browser/watermark.ts @@ -173,7 +173,7 @@ export class WatermarkContribution extends Disposable implements IWorkbenchContr dom.prepend(container.firstElementChild as HTMLElement, this.watermark); this._register(this.keybindingService.onDidUpdateKeybindings(update)); this._register(this.editorGroupsService.onDidLayout(dimension => this.handleEditorPartSize(container, dimension))); - this.handleEditorPartSize(container, this.editorGroupsService.dimension); + this.handleEditorPartSize(container, this.editorGroupsService.contentDimension); } private handleEditorPartSize(container: HTMLElement, dimension: IDimension): void { @@ -214,4 +214,4 @@ Registry.as(ConfigurationExtensions.Configuration) 'description': nls.localize('tips.enabled', "When enabled, will show the watermark tips when no editor is open.") }, } - }); \ No newline at end of file + }); diff --git a/src/vs/workbench/services/editor/common/editorGroupsService.ts b/src/vs/workbench/services/editor/common/editorGroupsService.ts index c91173e5514..a9ab498cc98 100644 --- a/src/vs/workbench/services/editor/common/editorGroupsService.ts +++ b/src/vs/workbench/services/editor/common/editorGroupsService.ts @@ -179,7 +179,7 @@ export interface IEditorGroupsService { /** * The size of the editor groups area. */ - readonly dimension: IDimension; + readonly contentDimension: IDimension; /** * An active group is the default location for new editors to open. diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 9e9e0d739e8..0c9a9f933aa 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -667,7 +667,7 @@ export class TestEditorGroupsService implements IEditorGroupsService { whenRestored: Promise = Promise.resolve(undefined); willRestoreEditors = false; - dimension = { width: 800, height: 600 }; + contentDimension = { width: 800, height: 600 }; get activeGroup(): IEditorGroup { return this.groups[0]; @@ -1622,4 +1622,4 @@ export class RemoteFileSystemProvider implements IFileSystemProvider { write(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise { return this.diskFileSystemProvider.write!(fd, pos, data, offset, length); } private toFileResource(resource: URI): URI { return resource.with({ scheme: Schemas.file, authority: '' }); } -} \ No newline at end of file +} From 45d944cfe399e7f6291969a6c8c3fd42f1014394 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 26 Jul 2019 18:13:39 +0200 Subject: [PATCH 677/710] workbench: implement preferred size for panel and sidebar fixes #67367 --- src/vs/workbench/browser/layout.ts | 6 ++++- src/vs/workbench/browser/legacyLayout.ts | 10 ++++---- src/vs/workbench/browser/part.ts | 11 +++++++-- .../workbench/browser/parts/compositePart.ts | 1 + .../browser/parts/panel/panelPart.ts | 24 +++++++++++++------ .../browser/parts/sidebar/sidebarPart.ts | 18 +++++++++++++- .../browser/parts/statusbar/statusbarPart.ts | 3 ++- .../services/layout/browser/layoutService.ts | 6 +++++ src/vs/workbench/test/browser/part.test.ts | 5 ++-- .../workbench/test/workbenchTestServices.ts | 4 ++++ 10 files changed, 68 insertions(+), 20 deletions(-) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index c2e011c5370..7950b273c23 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -5,7 +5,7 @@ import { Disposable, DisposableStore } from 'vs/base/common/lifecycle'; import { Event, Emitter } from 'vs/base/common/event'; -import { EventType, addDisposableListener, addClass, removeClass, isAncestor, getClientArea, position, size, EventHelper } from 'vs/base/browser/dom'; +import { EventType, addDisposableListener, addClass, removeClass, isAncestor, getClientArea, position, size, EventHelper, Dimension } from 'vs/base/browser/dom'; import { onDidChangeFullscreen, isFullscreen, getZoomFactor } from 'vs/base/browser/browser'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { Registry } from 'vs/platform/registry/common/platform'; @@ -545,6 +545,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi return true; // any other part cannot be hidden } + getDimension(part: Parts): Dimension { + return this.getPart(part).dimension; + } + getTitleBarOffset(): number { let offset = 0; if (this.isVisible(Parts.TITLEBAR_PART)) { diff --git a/src/vs/workbench/browser/legacyLayout.ts b/src/vs/workbench/browser/legacyLayout.ts index d936e13f1b2..8800afc09e8 100644 --- a/src/vs/workbench/browser/legacyLayout.ts +++ b/src/vs/workbench/browser/legacyLayout.ts @@ -626,11 +626,11 @@ export class WorkbenchLegacyLayout extends Disposable implements IVerticalSashLa } // Propagate to Part Layouts - this.parts.titlebar.layout(this.workbenchSize.width, this.titlebarHeight, -1); - this.parts.editor.layout(editorSize.width, editorSize.height, -1); - this.parts.sidebar.layout(sidebarSize.width, sidebarSize.height, -1); - this.parts.panel.layout(panelDimension.width, panelDimension.height, -1); - this.parts.activitybar.layout(activityBarSize.width, activityBarSize.height, -1); + this.parts.titlebar.layout(this.workbenchSize.width, this.titlebarHeight); + this.parts.editor.layout(editorSize.width, editorSize.height); + this.parts.sidebar.layout(sidebarSize.width, sidebarSize.height); + this.parts.panel.layout(panelDimension.width, panelDimension.height); + this.parts.activitybar.layout(activityBarSize.width, activityBarSize.height); // Propagate to Context View this.contextViewService.layout(); diff --git a/src/vs/workbench/browser/part.ts b/src/vs/workbench/browser/part.ts index f5281df2802..c78ad168cb7 100644 --- a/src/vs/workbench/browser/part.ts +++ b/src/vs/workbench/browser/part.ts @@ -9,7 +9,7 @@ import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { Dimension, size } from 'vs/base/browser/dom'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IDimension } from 'vs/platform/layout/browser/layoutService'; -import { ISerializableView, Orientation, IViewSize } from 'vs/base/browser/ui/grid/grid'; +import { ISerializableView, IViewSize } from 'vs/base/browser/ui/grid/grid'; import { Event, Emitter } from 'vs/base/common/event'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; @@ -28,6 +28,10 @@ export interface ILayoutContentResult { * arranges an optional title and mandatory content area to show content. */ export abstract class Part extends Component implements ISerializableView { + + private _dimension: Dimension; + get dimension(): Dimension { return this._dimension; } + private parent: HTMLElement; private titleArea: HTMLElement | null; private contentArea: HTMLElement | null; @@ -127,7 +131,10 @@ export abstract class Part extends Component implements ISerializableView { abstract minimumHeight: number; abstract maximumHeight: number; - abstract layout(width: number, height: number, orientation: Orientation): void; + layout(width: number, height: number): void { + this._dimension = new Dimension(width, height); + } + abstract toJSON(): object; //#endregion diff --git a/src/vs/workbench/browser/parts/compositePart.ts b/src/vs/workbench/browser/parts/compositePart.ts index d09cf93901b..e5d7cfbe7c8 100644 --- a/src/vs/workbench/browser/parts/compositePart.ts +++ b/src/vs/workbench/browser/parts/compositePart.ts @@ -466,6 +466,7 @@ export abstract class CompositePart extends Part { } layout(width: number, height: number): void { + super.layout(width, height); // Layout contents this.contentAreaSize = super.layoutContents(width, height).contentSize; diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 874d81baddb..1189df45c45 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -59,6 +59,16 @@ export class PanelPart extends CompositePart implements IPanelService { readonly snap = true; + get preferredHeight(): number | undefined { + const sidebarDimension = this.layoutService.getDimension(Parts.SIDEBAR_PART); + return sidebarDimension.height * 0.4; + } + + get preferredWidth(): number | undefined { + const statusbarPart = this.layoutService.getDimension(Parts.STATUSBAR_PART); + return statusbarPart.width * 0.4; + } + //#endregion get onDidPanelOpen(): Event<{ panel: IPanel, focus: boolean }> { return Event.map(this.onDidCompositeOpen.event, compositeOpen => ({ panel: compositeOpen.composite, focus: compositeOpen.focus })); } @@ -74,7 +84,7 @@ export class PanelPart extends CompositePart implements IPanelService { private compositeActions: Map = new Map(); private blockOpeningPanel: boolean; - private dimension: Dimension; + private _contentDimension: Dimension; constructor( @INotificationService notificationService: INotificationService, @@ -293,21 +303,21 @@ export class PanelPart extends CompositePart implements IPanelService { } if (this.layoutService.getPanelPosition() === Position.RIGHT) { - this.dimension = new Dimension(width - 1, height!); // Take into account the 1px border when layouting + this._contentDimension = new Dimension(width - 1, height!); // Take into account the 1px border when layouting } else { - this.dimension = new Dimension(width, height!); + this._contentDimension = new Dimension(width, height!); } // Layout contents - super.layout(this.dimension.width, this.dimension.height); + super.layout(this._contentDimension.width, this._contentDimension.height); // Layout composite bar this.layoutCompositeBar(); } private layoutCompositeBar(): void { - if (this.dimension) { - let availableWidth = this.dimension.width - 40; // take padding into account + if (this._contentDimension) { + let availableWidth = this._contentDimension.width - 40; // take padding into account if (this.toolBar) { availableWidth = Math.max(PanelPart.MIN_COMPOSITE_BAR_WIDTH, availableWidth - this.getToolbarWidth()); // adjust height for global actions showing } @@ -522,4 +532,4 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { } }); -registerSingleton(IPanelService, PanelPart); \ No newline at end of file +registerSingleton(IPanelService, PanelPart); diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index 88c40e827ae..8b50a07b662 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -47,6 +47,22 @@ export class SidebarPart extends CompositePart implements IViewletServi readonly snap = true; + get preferredWidth(): number | undefined { + const viewlet = this.getActiveViewlet(); + + if (!viewlet) { + return; + } + + const width = viewlet.getOptimalWidth(); + + if (typeof width !== 'number') { + return; + } + + return width; + } + //#endregion get onDidViewletRegister(): Event { return >this.viewletRegistry.onDidRegister; } @@ -303,4 +319,4 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(FocusSideBarAction, Fo primary: KeyMod.CtrlCmd | KeyCode.KEY_0 }), 'View: Focus into Side Bar', nls.localize('viewCategory', "View")); -registerSingleton(IViewletService, SidebarPart); \ No newline at end of file +registerSingleton(IViewletService, SidebarPart); diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts index 00fe6c45bc4..089cbd3003e 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts @@ -611,6 +611,7 @@ export class StatusbarPart extends Part implements IStatusbarService { } layout(width: number, height: number): void { + super.layout(width, height); super.layoutContents(width, height); } @@ -816,4 +817,4 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { } }); -registerSingleton(IStatusbarService, StatusbarPart); \ No newline at end of file +registerSingleton(IStatusbarService, StatusbarPart); diff --git a/src/vs/workbench/services/layout/browser/layoutService.ts b/src/vs/workbench/services/layout/browser/layoutService.ts index d0bf836984f..344c7657de5 100644 --- a/src/vs/workbench/services/layout/browser/layoutService.ts +++ b/src/vs/workbench/services/layout/browser/layoutService.ts @@ -8,6 +8,7 @@ import { Event } from 'vs/base/common/event'; import { MenuBarVisibility } from 'vs/platform/windows/common/windows'; import { ILayoutService } from 'vs/platform/layout/browser/layoutService'; import { Part } from 'vs/workbench/browser/part'; +import { Dimension } from 'vs/base/browser/dom'; export const IWorkbenchLayoutService = createDecorator('layoutService'); @@ -81,6 +82,11 @@ export interface IWorkbenchLayoutService extends ILayoutService { */ isVisible(part: Parts): boolean; + /** + * Returns if the part is visible. + */ + getDimension(part: Parts): Dimension; + /** * Set activity bar hidden or not */ diff --git a/src/vs/workbench/test/browser/part.test.ts b/src/vs/workbench/test/browser/part.test.ts index 73878b4e603..ed151b3aced 100644 --- a/src/vs/workbench/test/browser/part.test.ts +++ b/src/vs/workbench/test/browser/part.test.ts @@ -10,7 +10,6 @@ import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService import { append, $, hide } from 'vs/base/browser/dom'; import { TestStorageService, TestLayoutService } from 'vs/workbench/test/workbenchTestServices'; import { StorageScope } from 'vs/platform/storage/common/storage'; -import { Orientation } from 'vs/base/browser/ui/grid/grid'; class SimplePart extends Part { @@ -19,7 +18,7 @@ class SimplePart extends Part { minimumHeight: number; maximumHeight: number; - layout(width: number, height: number, orientation: Orientation): void { + layout(width: number, height: number): void { throw new Error('Method not implemented.'); } @@ -172,4 +171,4 @@ suite('Workbench parts', () => { assert(!document.getElementById('myPart.title')); assert(document.getElementById('myPart.content')); }); -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 0c9a9f933aa..153fc2bbae5 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -474,6 +474,10 @@ export class TestLayoutService implements IWorkbenchLayoutService { return true; } + getDimension(_part: Parts): Dimension { + return new Dimension(0, 0); + } + public getContainer(_part: Parts): HTMLElement { return null!; } From 0e346590c409e63b7e3fab42bd073fe57c7d42ac Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Fri, 26 Jul 2019 11:36:56 -0700 Subject: [PATCH 678/710] Tweak comment reaction css --- src/vs/workbench/contrib/comments/browser/media/review.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/comments/browser/media/review.css b/src/vs/workbench/contrib/comments/browser/media/review.css index 767e4c97057..47f8feb5fc9 100644 --- a/src/vs/workbench/contrib/comments/browser/media/review.css +++ b/src/vs/workbench/contrib/comments/browser/media/review.css @@ -400,7 +400,7 @@ .monaco-editor .review-widget .action-item { min-width: 18px; - min-height: 18px; + min-height: 20px; margin-left: 4px; } From 937fd58245addcbc4522f421fecbd617a38e6ab8 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Fri, 26 Jul 2019 11:37:23 -0700 Subject: [PATCH 679/710] Small amount of code cleanup in commentNode.ts --- .../contrib/comments/browser/commentNode.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentNode.ts b/src/vs/workbench/contrib/comments/browser/commentNode.ts index f5a80eea68b..e8d7d850123 100644 --- a/src/vs/workbench/contrib/comments/browser/commentNode.ts +++ b/src/vs/workbench/contrib/comments/browser/commentNode.ts @@ -181,7 +181,7 @@ export class CommentNode extends Disposable { let hasReactionHandler = this.commentService.hasReactionHandler(this.owner); if (hasReactionHandler) { - let toggleReactionAction = this.createReactionPicker2(this.comment.commentReactions || []); + let toggleReactionAction = this.createReactionPicker(this.comment.commentReactions || []); actions.push(toggleReactionAction); } @@ -208,7 +208,7 @@ export class CommentNode extends Disposable { actionViewItemProvider(action: Action) { let options = {}; - if (action.id === 'comment.delete' || action.id === 'comment.edit' || action.id === ToggleReactionsAction.ID) { + if (action.id === ToggleReactionsAction.ID) { options = { label: false, icon: true }; } else { options = { label: false, icon: true }; @@ -226,7 +226,7 @@ export class CommentNode extends Disposable { } } - private createReactionPicker2(reactionGroup: modes.CommentReaction[]): ToggleReactionsAction { + private createReactionPicker(reactionGroup: modes.CommentReaction[]): ToggleReactionsAction { let toggleReactionActionViewItem: DropdownMenuActionViewItem; let toggleReactionAction = this._register(new ToggleReactionsAction(() => { if (toggleReactionActionViewItem) { @@ -321,14 +321,8 @@ export class CommentNode extends Disposable { }); if (hasReactionHandler) { - let toggleReactionAction = this.createReactionPicker2(this.comment.commentReactions || []); + let toggleReactionAction = this.createReactionPicker(this.comment.commentReactions || []); this._reactionsActionBar.push(toggleReactionAction, { label: false, icon: true }); - } else { - // let reactionGroup = this.commentService.getReactionGroup(this.owner); - // if (reactionGroup && reactionGroup.length) { - // let toggleReactionAction = this.createReactionPicker2(reactionGroup || []); - // this._reactionsActionBar.push(toggleReactionAction, { label: false, icon: true }); - // } } } @@ -526,4 +520,4 @@ function fillInActions(groups: [string, Array Date: Fri, 26 Jul 2019 11:46:01 -0700 Subject: [PATCH 680/710] Fix #77994. Use scoped contextKeyService in a comment thread. --- .../contrib/comments/browser/commentThreadWidget.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts index b7c1ea6f12a..aac697e221c 100644 --- a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts +++ b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts @@ -115,7 +115,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget this._contextKeyService = contextKeyService.createScoped(this.domNode); this._threadIsEmpty = CommentContextKeys.commentThreadIsEmpty.bindTo(this._contextKeyService); this._threadIsEmpty.set(!_commentThread.comments || !_commentThread.comments.length); - this._commentThreadContextValue = contextKeyService.createKey('commentThread', _commentThread.contextValue); + this._commentThreadContextValue = this._contextKeyService.createKey('commentThread', _commentThread.contextValue); this._resizeObserver = null; this._isExpanded = _commentThread.collapsibleState === modes.CommentThreadCollapsibleState.Expanded; @@ -569,8 +569,12 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget const menu = this._commentMenus.getCommentThreadActions(commentThread, this._contextKeyService); this._disposables.add(menu); - this._disposables.add(menu.onDidChange(() => { - this._commentFormActions.setActions(menu); + this._disposables.add(menu.onDidChange((newMenu) => { + if (newMenu) { + this._commentFormActions.setActions(newMenu); + } else { + this._commentFormActions.setActions(menu); + } })); this._commentFormActions = new CommentFormActions(container, async (action: IAction) => { @@ -897,4 +901,4 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget this._submitActionsDisposables.forEach(local => local.dispose()); this._onDidClose.fire(undefined); } -} \ No newline at end of file +} From f0d3c50abcb96edc6717d3c0a26aea6fe66e165c Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Fri, 26 Jul 2019 11:49:35 -0700 Subject: [PATCH 681/710] menu.onDidChagne always returns undefined. --- .../contrib/comments/browser/commentThreadWidget.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts index aac697e221c..0bd28e5fe58 100644 --- a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts +++ b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts @@ -569,12 +569,8 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget const menu = this._commentMenus.getCommentThreadActions(commentThread, this._contextKeyService); this._disposables.add(menu); - this._disposables.add(menu.onDidChange((newMenu) => { - if (newMenu) { - this._commentFormActions.setActions(newMenu); - } else { - this._commentFormActions.setActions(menu); - } + this._disposables.add(menu.onDidChange(() => { + this._commentFormActions.setActions(menu); })); this._commentFormActions = new CommentFormActions(container, async (action: IAction) => { From 185695c93109365c90babb6f1d17953dfd991558 Mon Sep 17 00:00:00 2001 From: Sana Ajani Date: Thu, 25 Jul 2019 17:31:02 -0700 Subject: [PATCH 682/710] add office and sharepoint packages --- .../electron-browser/workspaceStatsService.ts | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts b/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts index 5041cb4be1e..ff776387035 100644 --- a/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts +++ b/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts @@ -47,7 +47,22 @@ const ModulesToLookFor = [ 'azure-storage', 'firebase', '@google-cloud/common', - 'heroku-cli' + 'heroku-cli', + //Office and Sharepoint packages + '@microsoft/office-js', + '@microsoft/office-js-helpers', + '@types/office-js', + '@types/office-runtime', + 'office-ui-fabric-react', + '@uifabric/icons', + '@uifabric/merge-styles', + '@uifabric/styling', + '@uifabric/experiments', + '@uifabric/utilities', + '@microsoft/rush', + 'lerna', + 'just-task', + 'beachball' ]; const PyModulesToLookFor = [ 'azure', @@ -143,6 +158,20 @@ export class WorkspaceStatsService implements IWorkspaceStatsService { "workspace.npm.@google-cloud/common" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.npm.firebase" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.npm.heroku-cli" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@microsoft/office-js" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@microsoft/office-js-helpers" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@types/office-js" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@types/office-runtime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.office-ui-fabric-react" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@uifabric/icons" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@uifabric/merge-styles" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@uifabric/styling" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@uifabric/experiments" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@uifabric/utilities" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.@microsoft/rush" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.lerna" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.just-task" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspace.npm.beachball" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.bower" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.yeoman.code.ext" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.cordova.high" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, @@ -187,7 +216,8 @@ export class WorkspaceStatsService implements IWorkspaceStatsService { "workspace.py.pydocumentdb" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.py.botbuilder-core" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.py.botbuilder-schema" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.botframework-connector" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } + "workspace.py.botframework-connector" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + } */ From 5c955e9da1ce83c5b56d308042740c4e773755eb Mon Sep 17 00:00:00 2001 From: Sana Ajani Date: Fri, 26 Jul 2019 14:55:47 -0700 Subject: [PATCH 683/710] distro --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 709608cbc69..6c721dbd92e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "7a8caddf61783ec1867857444d613a317aca500a", + "distro": "f02652facc899106dfbf5a5aab1f1f6061cf3778", "author": { "name": "Microsoft Corporation" }, @@ -158,4 +158,4 @@ "windows-mutex": "0.3.0", "windows-process-tree": "0.2.4" } -} \ No newline at end of file +} From 28b3ae7b0cda7992acf9f389713120061f8bc6f2 Mon Sep 17 00:00:00 2001 From: Sana Ajani Date: Fri, 26 Jul 2019 15:11:30 -0700 Subject: [PATCH 684/710] clean up --- .../contrib/stats/electron-browser/workspaceStatsService.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts b/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts index ff776387035..ef0dc08081c 100644 --- a/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts +++ b/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts @@ -216,9 +216,7 @@ export class WorkspaceStatsService implements IWorkspaceStatsService { "workspace.py.pydocumentdb" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.py.botbuilder-core" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspace.py.botbuilder-schema" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspace.py.botframework-connector" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - - + "workspace.py.botframework-connector" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } } */ private resolveWorkspaceTags(configuration: IWindowConfiguration, participant?: (rootFiles: string[]) => void): Promise { @@ -504,4 +502,4 @@ export class WorkspaceStatsService implements IWorkspaceStatsService { private searchArray(arr: string[], regEx: RegExp): boolean | undefined { return arr.some(v => v.search(regEx) > -1) || undefined; } -} \ No newline at end of file +} From 6bb5e193f94b26eb7fe4121e23e5fdf06dd600f5 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 26 Jul 2019 15:30:31 -0700 Subject: [PATCH 685/710] start -> open, exit -> close, remove exit code --- .../src/singlefolder-tests/terminal.test.ts | 16 +++---- .../workspace.tasks.test.ts | 9 ++-- src/vs/vscode.proposed.d.ts | 48 ++++++++++--------- .../api/node/extHostTerminalService.ts | 19 ++++---- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts index ee5f7505d6c..dc281a06fd5 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts @@ -266,8 +266,8 @@ suite('window namespace tests', () => { }); const pty: Pseudoterminal = { onDidWrite: new EventEmitter().event, - start: () => {}, - shutdown: () => {} + open: () => {}, + close: () => {} }; window.createTerminal({ name: 'c', pty }); }); @@ -293,8 +293,8 @@ suite('window namespace tests', () => { const writeEmitter = new EventEmitter(); const pty: Pseudoterminal = { onDidWrite: writeEmitter.event, - start: () => startResolve(), - shutdown: () => {} + open: () => startResolve(), + close: () => {} }; const terminal = window.createTerminal({ name: 'foo', pty }); }); @@ -306,7 +306,7 @@ suite('window namespace tests', () => { }); const pty: Pseudoterminal = { onDidWrite: new EventEmitter().event, - start: (dimensions) => { + open: (dimensions) => { ok(dimensions!.columns > 0); ok(dimensions!.rows > 0); const reg3 = window.onDidCloseTerminal(() => { @@ -315,7 +315,7 @@ suite('window namespace tests', () => { }); terminal.dispose(); }, - shutdown: () => {} + close: () => {} }; const terminal = window.createTerminal({ name: 'foo', pty }); }); @@ -343,8 +343,8 @@ suite('window namespace tests', () => { const pty: Pseudoterminal = { onDidWrite: writeEmitter.event, onDidOverrideDimensions: overrideDimensionsEmitter.event, - start: () => {}, - shutdown: () => {} + open: () => {}, + close: () => {} }; const terminal = window.createTerminal({ name: 'foo', pty }); }); diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts index 56559d6aacc..daef120762c 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts @@ -36,16 +36,17 @@ suite('workspace-namespace', () => { }; const writeEmitter = new vscode.EventEmitter(); const execution = new vscode.CustomExecution2((): Thenable => { - return Promise.resolve({ + const pty: vscode.Pseudoterminal = { onDidWrite: writeEmitter.event, - start: () => { + open: () => { writeEmitter.fire('testing\r\n'); }, - shutdown: () => { + close: () => { taskProvider.dispose(); done(); } - }); + }; + return Promise.resolve(pty); }); const task = new vscode.Task2(kind, vscode.TaskScope.Workspace, taskName, taskType, execution); result.push(task); diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 198c96af53c..8eac40ea882 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -968,8 +968,8 @@ declare module 'vscode' { * const writeEmitter = new vscode.EventEmitter(); * const pty: vscode.Pseudoterminal = { * onDidWrite: writeEmitter.event, - * start: () => writeEmitter.fire('\x1b[31mHello world\x1b[0m'), - * shutdown: () => {} + * open: () => writeEmitter.fire('\x1b[31mHello world\x1b[0m'), + * close: () => {} * }; * vscode.window.createTerminal({ name: 'My terminal', pty }); * ``` @@ -994,13 +994,13 @@ declare module 'vscode' { * const pty: vscode.Pseudoterminal = { * onDidWrite: writeEmitter.event, * onDidOverrideDimensions: dimensionsEmitter.event, - * start: () => { + * open: () => { * dimensionsEmitter.fire({ * columns: 20, * rows: 10 * }); * }, - * shutdown: () => {} + * close: () => {} * }; * vscode.window.createTerminal({ name: 'My terminal', pty }); * ``` @@ -1008,37 +1008,40 @@ declare module 'vscode' { onDidOverrideDimensions?: Event; /** - * An event that when fired will exit the process with an exit code, this will behave the - * same for an extension treminal as when a regular process exits with an exit code. Note - * that exit codes must be positive numbers, when negative the exit code will be forced to - * `1`. + * An event that when fired will signal that the pty is closed and dispose of the terminal. * - * **Example:** Exit with an exit code of `0` if the y key is pressed, otherwise `1`. + * **Example:** Exit the terminal when "y" is pressed, otherwise show a notification. * ```typescript * const writeEmitter = new vscode.EventEmitter(); - * const exitEmitter = new vscode.EventEmitter(); + * const closeEmitter = new vscode.EventEmitter(); * const pty: vscode.Pseudoterminal = { * onDidWrite: writeEmitter.event, - * start: () => writeEmitter.fire('Press y to exit successfully'), - * shutdown: () => {} - * handleInput: data => exitEmitter.fire(data === 'y' ? 0 : 1) + * onDidClose: closeEmitter.event, + * open: () => writeEmitter.fire('Press y to exit successfully'), + * close: () => {} + * handleInput: { + * if (data !== 'y') { + * vscode.window.showInformationMessage('Something went wrong'); + * } + * data => closeEmitter.fire(); + * } * }; * vscode.window.createTerminal({ name: 'Exit example', pty }); */ - onDidExit?: Event; + onDidClose?: Event; /** - * Implement to handle when the pty is ready to start firing events. + * Implement to handle when the pty is open and ready to start firing events. * * @param initialDimensions The dimensions of the terminal, this will be undefined if the * terminal panel has not been opened before this is called. */ - start(initialDimensions: TerminalDimensions | undefined): void; + open(initialDimensions: TerminalDimensions | undefined): void; /** - * Implement to handle when the terminal shuts down by an act of the user. + * Implement to handle when the terminal is closed by an act of the user. */ - shutdown(): void; + close(): void; /** * Implement to handle incoming keystrokes in the terminal or when an extension calls @@ -1053,8 +1056,8 @@ declare module 'vscode' { * const writeEmitter = new vscode.EventEmitter(); * const pty: vscode.Pseudoterminal = { * onDidWrite: writeEmitter.event, - * start: () => {}, - * shutdown: () => {}, + * open: () => {}, + * close: () => {}, * handleInput: data => writeEmitter.fire(data === '\r' ? '\r\n' : data) * }; * vscode.window.createTerminal({ name: 'Local echo', pty }); @@ -1184,9 +1187,8 @@ declare module 'vscode' { /** * The callback used to execute the task. Cancellation should be handled using - * [Pseudoterminal.shutdown](#Pseudoterminal.shutdown). When the task is complete, - * [Pseudoterminal.onDidExit](#Pseudoterminal.onDidExit) should be fired with the exit code - * with '0' for success and a non-zero value for failure. + * [Pseudoterminal.close](#Pseudoterminal.close). When the task is complete fire + * [Pseudoterminal.onDidClose](#Pseudoterminal.onDidClose). */ callback: (thisArg?: any) => Thenable; } diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 7b5df64321c..c42c0736bb7 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -793,8 +793,8 @@ class ExtHostPseudoterminal implements ITerminalChildProcess { ) { this._queueDisposables = []; this._queueDisposables.push(this._pty.onDidWrite(e => this._queuedEvents.push({ emitter: this._onProcessData, data: e }))); - if (this._pty.onDidExit) { - this._queueDisposables.push(this._pty.onDidExit(e => this._queuedEvents.push({ emitter: this._onProcessExit, data: e }))); + if (this._pty.onDidClose) { + this._queueDisposables.push(this._pty.onDidClose(e => this._queuedEvents.push({ emitter: this._onProcessExit, data: 0 }))); } if (this._pty.onDidOverrideDimensions) { this._queueDisposables.push(this._pty.onDidOverrideDimensions(e => this._queuedEvents.push({ emitter: this._onProcessOverrideDimensions, data: e ? { cols: e.columns, rows: e.rows } : undefined }))); @@ -802,8 +802,8 @@ class ExtHostPseudoterminal implements ITerminalChildProcess { } shutdown(): void { - if (this._pty.shutdown) { - this._pty.shutdown(); + if (this._pty.close) { + this._pty.close(); } } @@ -839,18 +839,15 @@ class ExtHostPseudoterminal implements ITerminalChildProcess { // Attach the real listeners this._pty.onDidWrite(e => this._onProcessData.fire(e)); - if (this._pty.onDidExit) { - this._pty.onDidExit(e => { - // Ensure only positive exit codes are returned - this._onProcessExit.fire(e >= 0 ? e : 1); - }); + if (this._pty.onDidClose) { + this._pty.onDidClose(e => this._onProcessExit.fire(0)); } if (this._pty.onDidOverrideDimensions) { this._pty.onDidOverrideDimensions(e => this._onProcessOverrideDimensions.fire(e ? { cols: e.columns, rows: e.rows } : e)); } - if (this._pty.start) { - this._pty.start(initialDimensions); + if (this._pty.open) { + this._pty.open(initialDimensions); } } } From b9cb543e70d865f3529818d073c7d23942527096 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 27 Jul 2019 00:30:21 +0200 Subject: [PATCH 686/710] Update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c721dbd92e..704ac9da679 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "f02652facc899106dfbf5a5aab1f1f6061cf3778", + "distro": "7224ab1f6e8484664148ab7362432b49c653d047", "author": { "name": "Microsoft Corporation" }, From e2888839ec1572300c7770032e72b4d32ee6e393 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 26 Jul 2019 16:47:43 -0700 Subject: [PATCH 687/710] Don't throw out ext host proc requests on slow remotes Fixes microsoft/vscode-remote-release#1031 --- .../api/node/extHostTerminalService.ts | 16 ++++----- .../terminal/common/terminalService.ts | 36 ++++++++++++++----- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index c42c0736bb7..58734d0827d 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -310,9 +310,9 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { private _logService: ILogService ) { this._proxy = mainContext.getProxy(MainContext.MainThreadTerminalService); - this.updateLastActiveWorkspace(); - this.updateVariableResolver(); - this.registerListeners(); + this._updateLastActiveWorkspace(); + this._updateVariableResolver(); + this._registerListeners(); } public createTerminal(name?: string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal { @@ -532,19 +532,19 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { return env; } - private registerListeners(): void { - this._extHostDocumentsAndEditors.onDidChangeActiveTextEditor(() => this.updateLastActiveWorkspace()); - this._extHostWorkspace.onDidChangeWorkspace(() => this.updateVariableResolver()); + private _registerListeners(): void { + this._extHostDocumentsAndEditors.onDidChangeActiveTextEditor(() => this._updateLastActiveWorkspace()); + this._extHostWorkspace.onDidChangeWorkspace(() => this._updateVariableResolver()); } - private updateLastActiveWorkspace(): void { + private _updateLastActiveWorkspace(): void { const activeEditor = this._extHostDocumentsAndEditors.activeEditor(); if (activeEditor) { this._lastActiveWorkspace = this._extHostWorkspace.getWorkspaceFolder(activeEditor.document.uri) as IWorkspaceFolder; } } - private async updateVariableResolver(): Promise { + private async _updateVariableResolver(): Promise { const configProvider = await this._extHostConfiguration.getConfigProvider(); const workspaceFolders = await this._extHostWorkspace.getWorkspaceFolders2(); this._variableResolver = new ExtHostVariableResolverService(workspaceFolders || [], this._extHostDocumentsAndEditors, configProvider); diff --git a/src/vs/workbench/contrib/terminal/common/terminalService.ts b/src/vs/workbench/contrib/terminal/common/terminalService.ts index 1bb31239d69..8bf6a5bfa5b 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalService.ts @@ -20,11 +20,15 @@ import { escapeNonWindowsPath } from 'vs/workbench/contrib/terminal/common/termi import { isWindows, isMacintosh, OperatingSystem } from 'vs/base/common/platform'; import { basename } from 'vs/base/common/path'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; -import { timeout } from 'vs/base/common/async'; import { IOpenFileRequest } from 'vs/platform/windows/common/windows'; import { IPickOptions, IQuickPickItem, IQuickInputService } from 'vs/platform/quickinput/common/quickInput'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; +interface IExtHostReadyEntry { + promise: Promise; + resolve: () => void; +} + export abstract class TerminalService implements ITerminalService { public _serviceBrand: any; @@ -38,7 +42,7 @@ export abstract class TerminalService implements ITerminalService { return this._terminalTabs.reduce((p, c) => p.concat(c.terminalInstances), []); } private _findState: FindReplaceState; - private _extHostsReady: { [authority: string]: boolean } = {}; + private _extHostsReady: { [authority: string]: IExtHostReadyEntry | undefined } = {}; private _activeTabIndex: number; public get activeTabIndex(): number { return this._activeTabIndex; } @@ -133,13 +137,11 @@ export abstract class TerminalService implements ITerminalService { public requestSpawnExtHostProcess(proxy: ITerminalProcessExtHostProxy, shellLaunchConfig: IShellLaunchConfig, activeWorkspaceRootUri: URI, cols: number, rows: number, isWorkspaceShellAllowed: boolean): void { this._extensionService.whenInstalledExtensionsRegistered().then(async () => { - // Wait for the remoteAuthority to be ready (and listening for events) before proceeding + // Wait for the remoteAuthority to be ready (and listening for events) before firing + // the event to spawn the ext host process const conn = this._remoteAgentService.getConnection(); const remoteAuthority = conn ? conn.remoteAuthority : 'null'; - let retries = 0; - while (!this._extHostsReady[remoteAuthority] && ++retries < 50) { - await timeout(100); - } + await this._whenExtHostReady(remoteAuthority); this._onInstanceRequestSpawnExtHostProcess.fire({ proxy, shellLaunchConfig, activeWorkspaceRootUri, cols, rows, isWorkspaceShellAllowed }); }); } @@ -148,8 +150,24 @@ export abstract class TerminalService implements ITerminalService { this._onInstanceRequestStartExtensionTerminal.fire({ proxy, cols, rows }); } - public extHostReady(remoteAuthority: string): void { - this._extHostsReady[remoteAuthority] = true; + public async extHostReady(remoteAuthority: string): Promise { + this._createExtHostReadyEntry(remoteAuthority); + this._extHostsReady[remoteAuthority]!.resolve(); + } + + private async _whenExtHostReady(remoteAuthority: string): Promise { + this._createExtHostReadyEntry(remoteAuthority); + return this._extHostsReady[remoteAuthority]!.promise; + } + + private _createExtHostReadyEntry(remoteAuthority: string): void { + if (this._extHostsReady[remoteAuthority]) { + return; + } + + let resolve!: () => void; + const promise = new Promise(r => resolve = r); + this._extHostsReady[remoteAuthority] = { promise, resolve }; } private _onBeforeShutdown(): boolean | Promise { From 17d9194a408046ee41d11ecb0048a25b57210610 Mon Sep 17 00:00:00 2001 From: Pine Wu Date: Fri, 26 Jul 2019 18:35:16 -0700 Subject: [PATCH 688/710] Update css service --- extensions/css-language-features/server/package.json | 2 +- .../css-language-features/server/src/cssServerMain.ts | 6 +++--- extensions/css-language-features/server/yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions/css-language-features/server/package.json b/extensions/css-language-features/server/package.json index d1913a26acf..c6e8600d2ae 100644 --- a/extensions/css-language-features/server/package.json +++ b/extensions/css-language-features/server/package.json @@ -9,7 +9,7 @@ }, "main": "./out/cssServerMain", "dependencies": { - "vscode-css-languageservice": "^4.0.3-next.0", + "vscode-css-languageservice": "^4.0.3-next.1", "vscode-languageserver": "^5.3.0-next.8" }, "devDependencies": { diff --git a/extensions/css-language-features/server/src/cssServerMain.ts b/extensions/css-language-features/server/src/cssServerMain.ts index f762bde09c4..0bfd886c310 100644 --- a/extensions/css-language-features/server/src/cssServerMain.ts +++ b/extensions/css-language-features/server/src/cssServerMain.ts @@ -121,9 +121,9 @@ connection.onInitialize((params: InitializeParams): InitializeResult => { scopedSettingsSupport = !!getClientCapability('workspace.configuration', false); foldingRangeLimit = getClientCapability('textDocument.foldingRange.rangeLimit', Number.MAX_VALUE); - languageServices.css = getCSSLanguageService({ customDataProviders, fileSystemProvider }); - languageServices.scss = getSCSSLanguageService({ customDataProviders, fileSystemProvider }); - languageServices.less = getLESSLanguageService({ customDataProviders, fileSystemProvider }); + languageServices.css = getCSSLanguageService({ customDataProviders, fileSystemProvider, clientCapabilities: params.capabilities }); + languageServices.scss = getSCSSLanguageService({ customDataProviders, fileSystemProvider, clientCapabilities: params.capabilities }); + languageServices.less = getLESSLanguageService({ customDataProviders, fileSystemProvider, clientCapabilities: params.capabilities }); const capabilities: ServerCapabilities = { // Tell the client that the server works in FULL text document sync mode diff --git a/extensions/css-language-features/server/yarn.lock b/extensions/css-language-features/server/yarn.lock index 3537a3d2ecd..d93eec392c7 100644 --- a/extensions/css-language-features/server/yarn.lock +++ b/extensions/css-language-features/server/yarn.lock @@ -781,10 +781,10 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -vscode-css-languageservice@^4.0.3-next.0: - version "4.0.3-next.0" - resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.0.tgz#ba96894cf2a0c86c744a1274590f27e55ea60f58" - integrity sha512-ku58Y5jDFNfDicv2AAhgu1edgfGcRZPwlKu6EBK2ck/O/Vco7Zy64FDoClJghcYBhJiDs7sy2q/UtQD0IoGbRw== +vscode-css-languageservice@^4.0.3-next.1: + version "4.0.3-next.1" + resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.1.tgz#e89d01ce0d79b3e6c2642f5e3ad73cb8160d38d9" + integrity sha512-Zrm5TeraVUJ8vRikWhFt259dQu+WK+Ie3K5UA8BB4kqcanoM+1mcnIt8fPkTXlZLbiEWElrkJ9yuYbDNkufeBg== dependencies: vscode-languageserver-types "^3.15.0-next.2" vscode-nls "^4.1.1" From 54fefb8d7835bc8c931835960282089f1d136bde Mon Sep 17 00:00:00 2001 From: Pine Wu Date: Fri, 26 Jul 2019 19:49:31 -0700 Subject: [PATCH 689/710] Update html & css service --- .../server/package.json | 4 ++-- .../server/src/htmlServerMain.ts | 2 +- .../server/src/modes/cssMode.ts | 5 ++--- .../server/src/modes/languageModes.ts | 22 +++++++++---------- .../server/src/test/completions.test.ts | 3 ++- .../server/src/test/folding.test.ts | 3 ++- .../server/src/test/formatting.test.ts | 3 ++- .../server/src/utils/documentContext.ts | 3 +-- .../html-language-features/server/yarn.lock | 16 +++++++------- 9 files changed, 30 insertions(+), 31 deletions(-) diff --git a/extensions/html-language-features/server/package.json b/extensions/html-language-features/server/package.json index 087fbaec82b..95a97f1110f 100644 --- a/extensions/html-language-features/server/package.json +++ b/extensions/html-language-features/server/package.json @@ -9,8 +9,8 @@ }, "main": "./out/htmlServerMain", "dependencies": { - "vscode-css-languageservice": "^4.0.3-next.0", - "vscode-html-languageservice": "^3.0.3", + "vscode-css-languageservice": "^4.0.3-next.1", + "vscode-html-languageservice": "^3.0.4-next.0", "vscode-languageserver": "^5.3.0-next.8", "vscode-languageserver-types": "3.15.0-next.2", "vscode-nls": "^4.1.1", diff --git a/extensions/html-language-features/server/src/htmlServerMain.ts b/extensions/html-language-features/server/src/htmlServerMain.ts index 7ca71d16760..01b43d9a9ba 100644 --- a/extensions/html-language-features/server/src/htmlServerMain.ts +++ b/extensions/html-language-features/server/src/htmlServerMain.ts @@ -96,7 +96,7 @@ connection.onInitialize((params: InitializeParams): InitializeResult => { get folders() { return workspaceFolders; } }; - languageModes = getLanguageModes(initializationOptions ? initializationOptions.embeddedLanguages : { css: true, javascript: true }, workspace, providers); + languageModes = getLanguageModes(initializationOptions ? initializationOptions.embeddedLanguages : { css: true, javascript: true }, workspace, params.capabilities, providers); documents.onDidClose(e => { languageModes.onDocumentRemoved(e.document); diff --git a/extensions/html-language-features/server/src/modes/cssMode.ts b/extensions/html-language-features/server/src/modes/cssMode.ts index 168c7ceffa0..6e60c32d87c 100644 --- a/extensions/html-language-features/server/src/modes/cssMode.ts +++ b/extensions/html-language-features/server/src/modes/cssMode.ts @@ -5,13 +5,12 @@ import { LanguageModelCache, getLanguageModelCache } from '../languageModelCache'; import { TextDocument, Position, Range, CompletionList } from 'vscode-languageserver-types'; -import { getCSSLanguageService, Stylesheet, FoldingRange } from 'vscode-css-languageservice'; +import { Stylesheet, FoldingRange, LanguageService as CSSLanguageService } from 'vscode-css-languageservice'; import { LanguageMode, Workspace } from './languageModes'; import { HTMLDocumentRegions, CSS_STYLE_RULE } from './embeddedSupport'; import { Color } from 'vscode-languageserver'; -export function getCSSMode(documentRegions: LanguageModelCache, workspace: Workspace): LanguageMode { - let cssLanguageService = getCSSLanguageService(); +export function getCSSMode(cssLanguageService: CSSLanguageService, documentRegions: LanguageModelCache, workspace: Workspace): LanguageMode { let embeddedCSSDocuments = getLanguageModelCache(10, 60, document => documentRegions.get(document).getEmbeddedDocument('css')); let cssStylesheets = getLanguageModelCache(10, 60, document => cssLanguageService.parseStylesheet(document)); diff --git a/extensions/html-language-features/server/src/modes/languageModes.ts b/extensions/html-language-features/server/src/modes/languageModes.ts index b44b2442420..d07e0bd80f6 100644 --- a/extensions/html-language-features/server/src/modes/languageModes.ts +++ b/extensions/html-language-features/server/src/modes/languageModes.ts @@ -3,18 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { getLanguageService as getHTMLLanguageService, DocumentContext, IHTMLDataProvider, SelectionRange } from 'vscode-html-languageservice'; -import { - CompletionItem, Location, SignatureHelp, Definition, TextEdit, TextDocument, Diagnostic, DocumentLink, Range, - Hover, DocumentHighlight, CompletionList, Position, FormattingOptions, SymbolInformation, FoldingRange -} from 'vscode-languageserver-types'; -import { ColorInformation, ColorPresentation, Color, WorkspaceFolder } from 'vscode-languageserver'; - +import { getCSSLanguageService } from 'vscode-css-languageservice'; +import { ClientCapabilities, DocumentContext, getLanguageService as getHTMLLanguageService, IHTMLDataProvider, SelectionRange } from 'vscode-html-languageservice'; +import { Color, ColorInformation, ColorPresentation, WorkspaceFolder } from 'vscode-languageserver'; +import { CompletionItem, CompletionList, Definition, Diagnostic, DocumentHighlight, DocumentLink, FoldingRange, FormattingOptions, Hover, Location, Position, Range, SignatureHelp, SymbolInformation, TextDocument, TextEdit } from 'vscode-languageserver-types'; import { getLanguageModelCache, LanguageModelCache } from '../languageModelCache'; -import { getDocumentRegions, HTMLDocumentRegions } from './embeddedSupport'; import { getCSSMode } from './cssMode'; -import { getJavaScriptMode } from './javascriptMode'; +import { getDocumentRegions, HTMLDocumentRegions } from './embeddedSupport'; import { getHTMLMode } from './htmlMode'; +import { getJavaScriptMode } from './javascriptMode'; export { ColorInformation, ColorPresentation, Color }; @@ -66,8 +63,9 @@ export interface LanguageModeRange extends Range { attributeValue?: boolean; } -export function getLanguageModes(supportedLanguages: { [languageId: string]: boolean; }, workspace: Workspace, customDataProviders?: IHTMLDataProvider[]): LanguageModes { - const htmlLanguageService = getHTMLLanguageService({ customDataProviders }); +export function getLanguageModes(supportedLanguages: { [languageId: string]: boolean; }, workspace: Workspace, clientCapabilities: ClientCapabilities, customDataProviders?: IHTMLDataProvider[]): LanguageModes { + const htmlLanguageService = getHTMLLanguageService({ customDataProviders, clientCapabilities }); + const cssLanguageService = getCSSLanguageService({ clientCapabilities }); let documentRegions = getLanguageModelCache(10, 60, document => getDocumentRegions(htmlLanguageService, document)); @@ -77,7 +75,7 @@ export function getLanguageModes(supportedLanguages: { [languageId: string]: boo let modes = Object.create(null); modes['html'] = getHTMLMode(htmlLanguageService, workspace); if (supportedLanguages['css']) { - modes['css'] = getCSSMode(documentRegions, workspace); + modes['css'] = getCSSMode(cssLanguageService, documentRegions, workspace); } if (supportedLanguages['javascript']) { modes['javascript'] = getJavaScriptMode(documentRegions); diff --git a/extensions/html-language-features/server/src/test/completions.test.ts b/extensions/html-language-features/server/src/test/completions.test.ts index de056ed3c1e..aaba72add6d 100644 --- a/extensions/html-language-features/server/src/test/completions.test.ts +++ b/extensions/html-language-features/server/src/test/completions.test.ts @@ -9,6 +9,7 @@ import { URI } from 'vscode-uri'; import { TextDocument, CompletionList, CompletionItemKind } from 'vscode-languageserver-types'; import { getLanguageModes } from '../modes/languageModes'; import { WorkspaceFolder } from 'vscode-languageserver'; +import { ClientCapabilities } from 'vscode-html-languageservice'; export interface ItemDescription { label: string; @@ -58,7 +59,7 @@ export function testCompletionFor(value: string, expected: { count?: number, ite let document = TextDocument.create(uri, 'html', 0, value); let position = document.positionAt(offset); - const languageModes = getLanguageModes({ css: true, javascript: true }, workspace); + const languageModes = getLanguageModes({ css: true, javascript: true }, workspace, ClientCapabilities.LATEST); const mode = languageModes.getModeAtPosition(document, position)!; let list = mode.doComplete!(document, position); diff --git a/extensions/html-language-features/server/src/test/folding.test.ts b/extensions/html-language-features/server/src/test/folding.test.ts index 3ce2816185b..e19555d568d 100644 --- a/extensions/html-language-features/server/src/test/folding.test.ts +++ b/extensions/html-language-features/server/src/test/folding.test.ts @@ -8,6 +8,7 @@ import * as assert from 'assert'; import { TextDocument } from 'vscode-languageserver'; import { getFoldingRanges } from '../modes/htmlFolding'; import { getLanguageModes } from '../modes/languageModes'; +import { ClientCapabilities } from 'vscode-css-languageservice'; interface ExpectedIndentRange { startLine: number; @@ -21,7 +22,7 @@ function assertRanges(lines: string[], expected: ExpectedIndentRange[], message? settings: {}, folders: [{ name: 'foo', uri: 'test://foo' }] }; - let languageModes = getLanguageModes({ css: true, javascript: true }, workspace); + let languageModes = getLanguageModes({ css: true, javascript: true }, workspace, ClientCapabilities.LATEST); let actual = getFoldingRanges(languageModes, document, nRanges, null); let actualRanges = []; diff --git a/extensions/html-language-features/server/src/test/formatting.test.ts b/extensions/html-language-features/server/src/test/formatting.test.ts index 702aa76da6c..8c59c75e017 100644 --- a/extensions/html-language-features/server/src/test/formatting.test.ts +++ b/extensions/html-language-features/server/src/test/formatting.test.ts @@ -11,6 +11,7 @@ import { getLanguageModes } from '../modes/languageModes'; import { TextDocument, Range, FormattingOptions } from 'vscode-languageserver-types'; import { format } from '../modes/formatting'; +import { ClientCapabilities } from 'vscode-html-languageservice'; suite('HTML Embedded Formatting', () => { @@ -19,7 +20,7 @@ suite('HTML Embedded Formatting', () => { settings: options, folders: [{ name: 'foo', uri: 'test://foo' }] }; - var languageModes = getLanguageModes({ css: true, javascript: true }, workspace); + var languageModes = getLanguageModes({ css: true, javascript: true }, workspace, ClientCapabilities.LATEST); let rangeStartOffset = value.indexOf('|'); let rangeEndOffset; diff --git a/extensions/html-language-features/server/src/utils/documentContext.ts b/extensions/html-language-features/server/src/utils/documentContext.ts index 71f9a3591be..6c391064fae 100644 --- a/extensions/html-language-features/server/src/utils/documentContext.ts +++ b/extensions/html-language-features/server/src/utils/documentContext.ts @@ -35,9 +35,8 @@ export function getDocumentContext(documentUri: string, workspaceFolders: Worksp try { return url.resolve(base, ref); } catch { - return undefined; + return ''; } - }, }; } diff --git a/extensions/html-language-features/server/yarn.lock b/extensions/html-language-features/server/yarn.lock index c386ce0bbb9..9ea59b6077c 100644 --- a/extensions/html-language-features/server/yarn.lock +++ b/extensions/html-language-features/server/yarn.lock @@ -229,19 +229,19 @@ supports-color@5.4.0: dependencies: has-flag "^3.0.0" -vscode-css-languageservice@^4.0.3-next.0: - version "4.0.3-next.0" - resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.0.tgz#ba96894cf2a0c86c744a1274590f27e55ea60f58" - integrity sha512-ku58Y5jDFNfDicv2AAhgu1edgfGcRZPwlKu6EBK2ck/O/Vco7Zy64FDoClJghcYBhJiDs7sy2q/UtQD0IoGbRw== +vscode-css-languageservice@^4.0.3-next.1: + version "4.0.3-next.1" + resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.3-next.1.tgz#e89d01ce0d79b3e6c2642f5e3ad73cb8160d38d9" + integrity sha512-Zrm5TeraVUJ8vRikWhFt259dQu+WK+Ie3K5UA8BB4kqcanoM+1mcnIt8fPkTXlZLbiEWElrkJ9yuYbDNkufeBg== dependencies: vscode-languageserver-types "^3.15.0-next.2" vscode-nls "^4.1.1" vscode-uri "^2.0.3" -vscode-html-languageservice@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-3.0.3.tgz#0aeae18a59000e317447ea34965f72680a2140ef" - integrity sha512-U+upM3gHp3HaF3wXAnUduA6IDKcz6frWS/dTAju3cZVIyZwOLBBFElQVlLH0ycHyMzqUFrjvdv+kEyPAEWfQ/g== +vscode-html-languageservice@^3.0.4-next.0: + version "3.0.4-next.0" + resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-3.0.4-next.0.tgz#d4f5a103b94753a19b374158212fe734dbe670e8" + integrity sha512-5Z5ITtokWt/zuPKemKEXfC+4XHoQryBAZVAcTwpAel2qqueUwGqjd5ZrVy/2x5GZAdZAipl0BvsTTMkOBS1BFQ== dependencies: vscode-languageserver-types "^3.15.0-next.2" vscode-nls "^4.1.1" From 5ec81e4739ab5f862e113bf20222c6d690f1937a Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 26 Jul 2019 20:45:55 -0700 Subject: [PATCH 690/710] Format proxy setting descriptions --- src/vs/platform/request/common/request.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/request/common/request.ts b/src/vs/platform/request/common/request.ts index ed6c2611166..31e3c314242 100644 --- a/src/vs/platform/request/common/request.ts +++ b/src/vs/platform/request/common/request.ts @@ -90,7 +90,7 @@ Registry.as(Extensions.Configuration) 'http.proxy': { type: 'string', pattern: '^https?://([^:]*(:[^@]*)?@)?([^:]+)(:\\d+)?/?$|^$', - description: localize('proxy', "The proxy setting to use. If not set will be taken from the http_proxy and https_proxy environment variables.") + markdownDescription: localize('proxy', "The proxy setting to use. If not set, will be inherited from the `http_proxy` and `https_proxy` environment variables.") }, 'http.proxyStrictSSL': { type: 'boolean', @@ -100,7 +100,7 @@ Registry.as(Extensions.Configuration) 'http.proxyAuthorization': { type: ['null', 'string'], default: null, - description: localize('proxyAuthorization', "The value to send as the 'Proxy-Authorization' header for every network request.") + markdownDescription: localize('proxyAuthorization', "The value to send as the `Proxy-Authorization` header for every network request.") }, 'http.proxySupport': { type: 'string', From 1a204b892dc5f5ed6cd5e9d1acfbe9cfe7b65325 Mon Sep 17 00:00:00 2001 From: Tony Xia Date: Sat, 27 Jul 2019 23:27:52 +1000 Subject: [PATCH 691/710] Fixed the wrong method name --- src/vs/base/browser/ui/checkbox/checkbox.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/browser/ui/checkbox/checkbox.ts b/src/vs/base/browser/ui/checkbox/checkbox.ts index 8ec96513dd2..723f64dc4fa 100644 --- a/src/vs/base/browser/ui/checkbox/checkbox.ts +++ b/src/vs/base/browser/ui/checkbox/checkbox.ts @@ -65,7 +65,7 @@ export class CheckboxActionViewItem extends BaseActionViewItem { } } - dipsose(): void { + dispose(): void { this.disposables.dispose(); super.dispose(); } From 52f0c468ae2beaebe67222cc9df4191e36fb7e18 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sat, 27 Jul 2019 19:52:15 -0700 Subject: [PATCH 692/710] Fix hang when deleting many files that are in search results Fix #77754 --- .../contrib/search/browser/replaceService.ts | 12 +- .../search/browser/search.contribution.ts | 2 +- .../contrib/search/browser/searchActions.ts | 8 +- .../search/browser/searchResultsView.ts | 18 +-- .../contrib/search/browser/searchView.ts | 17 +-- .../contrib/search/common/searchModel.ts | 128 +++++++++++------- .../search/test/browser/searchActions.test.ts | 2 +- .../search/test/common/searchModel.test.ts | 2 +- .../search/test/common/searchResult.test.ts | 43 ++++-- 9 files changed, 138 insertions(+), 94 deletions(-) diff --git a/src/vs/workbench/contrib/search/browser/replaceService.ts b/src/vs/workbench/contrib/search/browser/replaceService.ts index 71d38344f4c..ff9c9bacaf1 100644 --- a/src/vs/workbench/contrib/search/browser/replaceService.ts +++ b/src/vs/workbench/contrib/search/browser/replaceService.ts @@ -67,7 +67,7 @@ class ReplacePreviewModel extends Disposable { resolve(replacePreviewUri: URI): Promise { const fileResource = toFileResource(replacePreviewUri); - const fileMatch = this.searchWorkbenchService.searchModel.searchResult.matches().filter(match => match.resource().toString() === fileResource.toString())[0]; + const fileMatch = this.searchWorkbenchService.searchModel.searchResult.matches().filter(match => match.resource.toString() === fileResource.toString())[0]; return this.textModelResolverService.createModelReference(fileResource).then(ref => { ref = this._register(ref); const sourceModel = ref.object.textEditorModel; @@ -112,8 +112,8 @@ export class ReplaceService implements IReplaceService { const fileMatch = element instanceof Match ? element.parent() : element; return this.editorService.openEditor({ - leftResource: fileMatch.resource(), - rightResource: toReplaceResource(fileMatch.resource()), + leftResource: fileMatch.resource, + rightResource: toReplaceResource(fileMatch.resource), label: nls.localize('fileReplaceChanges', "{0} ↔ {1} (Replace Preview)", fileMatch.name(), fileMatch.name()), options: { preserveFocus, @@ -139,8 +139,8 @@ export class ReplaceService implements IReplaceService { } updateReplacePreview(fileMatch: FileMatch, override: boolean = false): Promise { - const replacePreviewUri = toReplaceResource(fileMatch.resource()); - return Promise.all([this.textModelResolverService.createModelReference(fileMatch.resource()), this.textModelResolverService.createModelReference(replacePreviewUri)]) + const replacePreviewUri = toReplaceResource(fileMatch.resource); + return Promise.all([this.textModelResolverService.createModelReference(fileMatch.resource), this.textModelResolverService.createModelReference(replacePreviewUri)]) .then(([sourceModelRef, replaceModelRef]) => { const sourceModel = sourceModelRef.object.textEditorModel; const replaceModel = replaceModelRef.object.textEditorModel; @@ -200,7 +200,7 @@ export class ReplaceService implements IReplaceService { private createEdit(match: Match, text: string, resource: URI | null = null): ResourceTextEdit { const fileMatch: FileMatch = match.parent(); const resourceEdit: ResourceTextEdit = { - resource: resource !== null ? resource : fileMatch.resource(), + resource: resource !== null ? resource : fileMatch.resource, edits: [{ range: match.range(), text: text diff --git a/src/vs/workbench/contrib/search/browser/search.contribution.ts b/src/vs/workbench/contrib/search/browser/search.contribution.ts index 49878f159b1..8d827d437d3 100644 --- a/src/vs/workbench/contrib/search/browser/search.contribution.ts +++ b/src/vs/workbench/contrib/search/browser/search.contribution.ts @@ -219,7 +219,7 @@ CommandsRegistry.registerCommand({ const viewletService = accessor.get(IViewletService); const explorerService = accessor.get(IExplorerService); const contextService = accessor.get(IWorkspaceContextService); - const uri = fileMatch.resource(); + const uri = fileMatch.resource; viewletService.openViewlet(VIEWLET_ID_FILES, false).then((viewlet: ExplorerViewlet) => { if (uri && contextService.isInsideWorkspace(uri)) { diff --git a/src/vs/workbench/contrib/search/browser/searchActions.ts b/src/vs/workbench/contrib/search/browser/searchActions.ts index 0d2d44cb5a1..ca96a4cd1ee 100644 --- a/src/vs/workbench/contrib/search/browser/searchActions.ts +++ b/src/vs/workbench/contrib/search/browser/searchActions.ts @@ -654,14 +654,14 @@ export class ReplaceAction extends AbstractSearchAndReplaceAction { } private hasSameParent(element: RenderableMatch): boolean { - return element && element instanceof Match && element.parent().resource() === this.element.parent().resource(); + return element && element instanceof Match && element.parent().resource === this.element.parent().resource; } private hasToOpenFile(): boolean { const activeEditor = this.editorService.activeEditor; const file = activeEditor ? activeEditor.getResource() : undefined; if (file) { - return file.toString() === this.element.parent().resource().toString(); + return file.toString() === this.element.parent().resource.toString(); } return false; } @@ -674,7 +674,7 @@ function uriToClipboardString(resource: URI): string { export const copyPathCommand: ICommandHandler = async (accessor, fileMatch: FileMatch | FolderMatch) => { const clipboardService = accessor.get(IClipboardService); - const text = uriToClipboardString(fileMatch.resource()); + const text = uriToClipboardString(fileMatch.resource); await clipboardService.writeText(text); }; @@ -712,7 +712,7 @@ function fileMatchToString(fileMatch: FileMatch, maxMatches: number): { text: st .slice(0, maxMatches) .map(match => matchToString(match, 2)); return { - text: `${uriToClipboardString(fileMatch.resource())}${lineDelimiter}${matchTextRows.join(lineDelimiter)}`, + text: `${uriToClipboardString(fileMatch.resource)}${lineDelimiter}${matchTextRows.join(lineDelimiter)}`, count: matchTextRows.length }; } diff --git a/src/vs/workbench/contrib/search/browser/searchResultsView.ts b/src/vs/workbench/contrib/search/browser/searchResultsView.ts index 4e79b687d46..7635f1eac29 100644 --- a/src/vs/workbench/contrib/search/browser/searchResultsView.ts +++ b/src/vs/workbench/contrib/search/browser/searchResultsView.ts @@ -115,11 +115,11 @@ export class FolderMatchRenderer extends Disposable implements ITreeRenderer, index: number, templateData: IFolderMatchTemplate): void { const folderMatch = node.element; if (folderMatch.hasResource()) { - const workspaceFolder = this.contextService.getWorkspaceFolder(folderMatch.resource()); - if (workspaceFolder && resources.isEqual(workspaceFolder.uri, folderMatch.resource())) { - templateData.label.setFile(folderMatch.resource(), { fileKind: FileKind.ROOT_FOLDER, hidePath: true }); + const workspaceFolder = this.contextService.getWorkspaceFolder(folderMatch.resource); + if (workspaceFolder && resources.isEqual(workspaceFolder.uri, folderMatch.resource)) { + templateData.label.setFile(folderMatch.resource, { fileKind: FileKind.ROOT_FOLDER, hidePath: true }); } else { - templateData.label.setFile(folderMatch.resource(), { fileKind: FileKind.FOLDER }); + templateData.label.setFile(folderMatch.resource, { fileKind: FileKind.FOLDER }); } } else { templateData.label.setLabel(nls.localize('searchFolderMatch.other.label', "Other files")); @@ -185,8 +185,8 @@ export class FileMatchRenderer extends Disposable implements ITreeRenderer, index: number, templateData: IFileMatchTemplate): void { const fileMatch = node.element; - templateData.el.setAttribute('data-resource', fileMatch.resource().toString()); - templateData.label.setFile(fileMatch.resource(), { hideIcon: false }); + templateData.el.setAttribute('data-resource', fileMatch.resource.toString()); + templateData.label.setFile(fileMatch.resource, { hideIcon: false }); const count = fileMatch.count(); templateData.badge.setCount(count); templateData.badge.setTitleFormat(count > 1 ? nls.localize('searchMatches', "{0} matches found", count) : nls.localize('searchMatch', "{0} match found", count)); @@ -316,7 +316,7 @@ export class SearchAccessibilityProvider implements IAccessibilityProvider { const element = elements[0]; return element instanceof FileMatch ? - resources.basename(element.resource()) : + resources.basename(element.resource) : undefined; } @@ -370,7 +370,7 @@ export class SearchDND implements ITreeDragAndDrop { const elements = (data as ElementsDragAndDropData).elements; const resources: URI[] = elements .filter(e => e instanceof FileMatch) - .map((fm: FileMatch) => fm.resource()); + .map((fm: FileMatch) => fm.resource); if (resources.length) { // Apply some datatransfer types to allow for dragging the element outside of the application diff --git a/src/vs/workbench/contrib/search/browser/searchView.ts b/src/vs/workbench/contrib/search/browser/searchView.ts index c175024c0eb..7ea63d9cbc2 100644 --- a/src/vs/workbench/contrib/search/browser/searchView.ts +++ b/src/vs/workbench/contrib/search/browser/searchView.ts @@ -896,13 +896,13 @@ export class SearchView extends ViewletPanel { 0 : dom.getTotalHeight(this.messagesElement); - const searchResultContainerSize = this.size.height - + const searchResultContainerHeight = this.size.height - messagesSize - dom.getTotalHeight(this.searchWidgetsContainerElement); - this.resultsElement.style.height = searchResultContainerSize + 'px'; + this.resultsElement.style.height = searchResultContainerHeight + 'px'; - this.tree.layout(searchResultContainerSize, this.size.width); + this.tree.layout(searchResultContainerHeight, this.size.width); } protected layoutBody(height: number, width: number): void { @@ -1542,7 +1542,7 @@ export class SearchView extends ViewletPanel { open(element: FileMatchOrMatch, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): Promise { const selection = this.getSelectionFrom(element); - const resource = element instanceof Match ? element.parent().resource() : (element).resource(); + const resource = element instanceof Match ? element.parent().resource : (element).resource; return this.editorService.openEditor({ resource: resource, options: { @@ -1600,7 +1600,7 @@ export class SearchView extends ViewletPanel { if (!this.untitledEditorService.isDirty(resource)) { const matches = this.viewModel.searchResult.matches(); for (let i = 0, len = matches.length; i < len; i++) { - if (resource.toString() === matches[i].resource().toString()) { + if (resource.toString() === matches[i].resource.toString()) { this.viewModel.searchResult.remove(matches[i]); } } @@ -1614,11 +1614,8 @@ export class SearchView extends ViewletPanel { const matches = this.viewModel.searchResult.matches(); - for (let i = 0, len = matches.length; i < len; i++) { - if (e.contains(matches[i].resource(), FileChangeType.DELETED)) { - this.viewModel.searchResult.remove(matches[i]); - } - } + const changedMatches = matches.filter(m => e.contains(m.resource, FileChangeType.DELETED)); + this.viewModel.searchResult.remove(changedMatches); } getActions(): IAction[] { diff --git a/src/vs/workbench/contrib/search/common/searchModel.ts b/src/vs/workbench/contrib/search/common/searchModel.ts index 5f8ba902bd9..9c4d170c1d5 100644 --- a/src/vs/workbench/contrib/search/common/searchModel.ts +++ b/src/vs/workbench/contrib/search/common/searchModel.ts @@ -146,7 +146,7 @@ export class Match { } } -export class FileMatch extends Disposable { +export class FileMatch extends Disposable implements IFileMatch { private static readonly _CURRENT_FIND_MATCH = ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, @@ -309,7 +309,7 @@ export class FileMatch extends Disposable { } id(): string { - return this.resource().toString(); + return this.resource.toString(); } parent(): BaseFolderMatch { @@ -357,12 +357,12 @@ export class FileMatch extends Disposable { return this.matches().length; } - resource(): URI { + get resource(): URI { return this._resource; } name(): string { - return getBaseLabel(this.resource()); + return getBaseLabel(this.resource); } add(match: Match, trigger?: boolean) { @@ -432,7 +432,7 @@ export class BaseFolderMatch extends Disposable { return this._id; } - resource(): URI | null { + get resource(): URI | null { return this._resource; } @@ -441,7 +441,7 @@ export class BaseFolderMatch extends Disposable { } name(): string { - return getBaseLabel(withNullAsUndefined(this.resource())) || ''; + return getBaseLabel(withNullAsUndefined(this.resource)) || ''; } parent(): SearchResult { @@ -494,8 +494,8 @@ export class BaseFolderMatch extends Disposable { this._onChange.fire({ elements: changed, removed: true }); } - remove(match: FileMatch): void { - this.doRemove(match); + remove(matches: FileMatch | FileMatch[]): void { + this.doRemove(matches); } replace(match: FileMatch): Promise { @@ -530,7 +530,7 @@ export class BaseFolderMatch extends Disposable { private onFileChange(fileMatch: FileMatch): void { let added: boolean = false; let removed: boolean = false; - if (!this._fileMatches.has(fileMatch.resource())) { + if (!this._fileMatches.has(fileMatch.resource)) { this.doAdd(fileMatch); added = true; } @@ -545,22 +545,28 @@ export class BaseFolderMatch extends Disposable { } private doAdd(fileMatch: FileMatch): void { - this._fileMatches.set(fileMatch.resource(), fileMatch); - if (this._unDisposedFileMatches.has(fileMatch.resource())) { - this._unDisposedFileMatches.delete(fileMatch.resource()); + this._fileMatches.set(fileMatch.resource, fileMatch); + if (this._unDisposedFileMatches.has(fileMatch.resource)) { + this._unDisposedFileMatches.delete(fileMatch.resource); } } - private doRemove(fileMatch: FileMatch, dispose: boolean = true, trigger: boolean = true): void { - this._fileMatches.delete(fileMatch.resource()); - if (dispose) { - fileMatch.dispose(); - } else { - this._unDisposedFileMatches.set(fileMatch.resource(), fileMatch); + private doRemove(fileMatches: FileMatch | FileMatch[], dispose: boolean = true, trigger: boolean = true): void { + if (!Array.isArray(fileMatches)) { + fileMatches = [fileMatches]; + } + + for (let match of fileMatches) { + this._fileMatches.delete(match.resource); + if (dispose) { + match.dispose(); + } else { + this._unDisposedFileMatches.set(match.resource, match); + } } if (trigger) { - this._onChange.fire({ elements: [fileMatch], removed: true }); + this._onChange.fire({ elements: fileMatches, removed: true }); } } @@ -590,7 +596,7 @@ export class FolderMatch extends BaseFolderMatch { super(_resource, _id, _index, _query, _parent, _searchModel, replaceService, instantiationService); } - resource(): URI { + get resource(): URI { return this._resource!; } } @@ -605,7 +611,7 @@ export function searchMatchComparer(elementA: RenderableMatch, elementB: Rendera } if (elementA instanceof FileMatch && elementB instanceof FileMatch) { - return elementA.resource().fsPath.localeCompare(elementB.resource().fsPath) || elementA.name().localeCompare(elementB.name()); + return elementA.resource.fsPath.localeCompare(elementB.resource.fsPath) || elementA.name().localeCompare(elementB.name()); } if (elementA instanceof Match && elementB instanceof Match) { @@ -652,7 +658,7 @@ export class SearchResult extends Disposable { .map(fq => fq.folder) .map((resource, index) => this.createFolderMatch(resource, resource.toString(), index, query)); - this._folderMatches.forEach(fm => this._folderMatchesMap.set(fm.resource().toString(), fm)); + this._folderMatches.forEach(fm => this._folderMatchesMap.set(fm.resource.toString(), fm)); this._otherFilesMatch = this.createOtherFilesFolderMatch('otherFiles', this._folderMatches.length + 1, query); this._query = query; @@ -686,26 +692,9 @@ export class SearchResult extends Disposable { add(allRaw: IFileMatch[], silent: boolean = false): void { // Split up raw into a list per folder so we can do a batch add per folder. - const rawPerFolder = new ResourceMap(); - const otherFileMatches: IFileMatch[] = []; - this._folderMatches.forEach(fm => rawPerFolder.set(fm.resource(), [])); - allRaw.forEach(rawFileMatch => { - const folderMatch = this.getFolderMatch(rawFileMatch.resource); - if (!folderMatch) { - // foldermatch was previously removed by user or disposed for some reason - return; - } - - const resource = folderMatch.resource(); - if (resource) { - rawPerFolder.get(resource)!.push(rawFileMatch); - } else { - otherFileMatches.push(rawFileMatch); - } - }); - - rawPerFolder.forEach((raw) => { + const { byFolder, other } = this.groupFilesByFolder(allRaw); + byFolder.forEach(raw => { if (!raw.length) { return; } @@ -716,7 +705,7 @@ export class SearchResult extends Disposable { } }); - this._otherFilesMatch!.add(otherFileMatches, silent); + this._otherFilesMatch!.add(other, silent); } clear(): void { @@ -724,16 +713,31 @@ export class SearchResult extends Disposable { this.disposeMatches(); } - remove(match: FileMatch | FolderMatch): void { - if (match instanceof FileMatch) { - this.getFolderMatch(match.resource()).remove(match); - } else { - match.clear(); + remove(matches: FileMatch | FileMatch[]): void { + if (!Array.isArray(matches)) { + matches = [matches]; + } + + const { byFolder, other } = this.groupFilesByFolder(matches); + byFolder.forEach(matches => { + if (!matches.length) { + return; + } + + this.getFolderMatch(matches[0].resource).remove(matches); + }); + + if (other.length) { + this.getFolderMatch(other[0].resource).remove(other); } } + removeFolder(match: FolderMatch): void { + match.clear(); + } + replace(match: FileMatch): Promise { - return this.getFolderMatch(match.resource()).replace(match); + return this.getFolderMatch(match.resource).replace(match); } replaceAll(progress: IProgress): Promise { @@ -807,7 +811,7 @@ export class SearchResult extends Disposable { if (this._showHighlights && selectedMatch) { // TS? this._rangeHighlightDecorations.highlightRange( - (selectedMatch).parent().resource(), + (selectedMatch).parent().resource, (selectedMatch).range() ); } else { @@ -830,6 +834,32 @@ export class SearchResult extends Disposable { }); } + private groupFilesByFolder(fileMatches: IFileMatch[]): { byFolder: ResourceMap, other: IFileMatch[] } { + const rawPerFolder = new ResourceMap(); + const otherFileMatches: IFileMatch[] = []; + this._folderMatches.forEach(fm => rawPerFolder.set(fm.resource, [])); + + fileMatches.forEach(rawFileMatch => { + const folderMatch = this.getFolderMatch(rawFileMatch.resource); + if (!folderMatch) { + // foldermatch was previously removed by user or disposed for some reason + return; + } + + const resource = folderMatch.resource; + if (resource) { + rawPerFolder.get(resource)!.push(rawFileMatch); + } else { + otherFileMatches.push(rawFileMatch); + } + }); + + return { + byFolder: rawPerFolder, + other: otherFileMatches + }; + } + private disposeMatches(): void { this.folderMatches().forEach(folderMatch => folderMatch.dispose()); this._folderMatches = []; diff --git a/src/vs/workbench/contrib/search/test/browser/searchActions.test.ts b/src/vs/workbench/contrib/search/test/browser/searchActions.test.ts index 8f63fa9eb07..a2eb0ba8458 100644 --- a/src/vs/workbench/contrib/search/test/browser/searchActions.test.ts +++ b/src/vs/workbench/contrib/search/test/browser/searchActions.test.ts @@ -155,4 +155,4 @@ suite('Search Actions', () => { instantiationService.stub(IConfigurationService, new TestConfigurationService()); return instantiationService.createInstance(ModelServiceImpl); } -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/contrib/search/test/common/searchModel.test.ts b/src/vs/workbench/contrib/search/test/common/searchModel.test.ts index d1438b530b7..ba00d3b20a1 100644 --- a/src/vs/workbench/contrib/search/test/common/searchModel.test.ts +++ b/src/vs/workbench/contrib/search/test/common/searchModel.test.ts @@ -130,7 +130,7 @@ suite('SearchModel', () => { const actual = testObject.searchResult.matches(); assert.equal(2, actual.length); - assert.equal('file://c:/1', actual[0].resource().toString()); + assert.equal('file://c:/1', actual[0].resource.toString()); let actuaMatches = actual[0].matches(); assert.equal(2, actuaMatches.length); diff --git a/src/vs/workbench/contrib/search/test/common/searchResult.test.ts b/src/vs/workbench/contrib/search/test/common/searchResult.test.ts index 64f09791842..b1a771cf4d0 100644 --- a/src/vs/workbench/contrib/search/test/common/searchResult.test.ts +++ b/src/vs/workbench/contrib/search/test/common/searchResult.test.ts @@ -55,12 +55,12 @@ suite('SearchResult', () => { test('File Match', function () { let fileMatch = aFileMatch('folder/file.txt'); assert.equal(fileMatch.matches(), 0); - assert.equal(fileMatch.resource().toString(), 'file:///folder/file.txt'); + assert.equal(fileMatch.resource.toString(), 'file:///folder/file.txt'); assert.equal(fileMatch.name(), 'file.txt'); fileMatch = aFileMatch('file.txt'); assert.equal(fileMatch.matches(), 0); - assert.equal(fileMatch.resource().toString(), 'file:///file.txt'); + assert.equal(fileMatch.resource.toString(), 'file:///file.txt'); assert.equal(fileMatch.name(), 'file.txt'); }); @@ -156,7 +156,7 @@ suite('SearchResult', () => { const actual = testObject.matches(); assert.equal(1, actual.length); - assert.equal('file://c:/', actual[0].resource().toString()); + assert.equal('file://c:/', actual[0].resource.toString()); const actuaMatches = actual[0].matches(); assert.equal(3, actuaMatches.length); @@ -186,7 +186,7 @@ suite('SearchResult', () => { const actual = testObject.matches(); assert.equal(2, actual.length); - assert.equal('file://c:/1', actual[0].resource().toString()); + assert.equal('file://c:/1', actual[0].resource.toString()); let actuaMatches = actual[0].matches(); assert.equal(2, actuaMatches.length); @@ -228,13 +228,30 @@ suite('SearchResult', () => { testObject.add([ aRawMatch('file://c:/1', new TextSearchMatch('preview 1', lineOneRange))]); - const objectRoRemove = testObject.matches()[0]; + const objectToRemove = testObject.matches()[0]; testObject.onChange(target); - testObject.remove(objectRoRemove); + testObject.remove(objectToRemove); assert.ok(target.calledOnce); - assert.deepEqual([{ elements: [objectRoRemove], removed: true }], target.args[0]); + assert.deepEqual([{ elements: [objectToRemove], removed: true }], target.args[0]); + }); + + test('remove array triggers change event', function () { + const target = sinon.spy(); + const testObject = aSearchResult(); + testObject.add([ + aRawMatch('file://c:/1', + new TextSearchMatch('preview 1', lineOneRange)), + aRawMatch('file://c:/2', + new TextSearchMatch('preview 2', lineOneRange))]); + const arrayToRemove = testObject.matches(); + testObject.onChange(target); + + testObject.remove(arrayToRemove); + + assert.ok(target.calledOnce); + assert.deepEqual([{ elements: arrayToRemove, removed: true }], target.args[0]); }); test('remove triggers change event', function () { @@ -243,13 +260,13 @@ suite('SearchResult', () => { testObject.add([ aRawMatch('file://c:/1', new TextSearchMatch('preview 1', lineOneRange))]); - const objectRoRemove = testObject.matches()[0]; + const objectToRemove = testObject.matches()[0]; testObject.onChange(target); - testObject.remove(objectRoRemove); + testObject.remove(objectToRemove); assert.ok(target.calledOnce); - assert.deepEqual([{ elements: [objectRoRemove], removed: true }], target.args[0]); + assert.deepEqual([{ elements: [objectToRemove], removed: true }], target.args[0]); }); test('Removing all line matches and adding back will add file back to result', function () { @@ -290,13 +307,13 @@ suite('SearchResult', () => { aRawMatch('file://c:/1', new TextSearchMatch('preview 1', lineOneRange))]); testObject.onChange(target); - const objectRoRemove = testObject.matches()[0]; + const objectToRemove = testObject.matches()[0]; - testObject.replace(objectRoRemove); + testObject.replace(objectToRemove); return voidPromise.then(() => { assert.ok(target.calledOnce); - assert.deepEqual([{ elements: [objectRoRemove], removed: true }], target.args[0]); + assert.deepEqual([{ elements: [objectToRemove], removed: true }], target.args[0]); }); }); From 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sun, 28 Jul 2019 21:48:54 +0530 Subject: [PATCH 693/710] Fix #77088 --- src/vs/workbench/browser/parts/views/views.ts | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/browser/parts/views/views.ts b/src/vs/workbench/browser/parts/views/views.ts index ddf297c0264..439d508bde0 100644 --- a/src/vs/workbench/browser/parts/views/views.ts +++ b/src/vs/workbench/browser/parts/views/views.ts @@ -238,6 +238,9 @@ export class ContributableViewsModel extends Disposable { private _onDidMove = this._register(new Emitter<{ from: IViewDescriptorRef; to: IViewDescriptorRef; }>()); readonly onDidMove: Event<{ from: IViewDescriptorRef; to: IViewDescriptorRef; }> = this._onDidMove.event; + private _onDidChangeViewState = this._register(new Emitter()); + protected readonly onDidChangeViewState: Event = this._onDidChangeViewState.event; + constructor( container: ViewContainer, viewsService: IViewsService, @@ -301,8 +304,11 @@ export class ContributableViewsModel extends Disposable { } setCollapsed(id: string, collapsed: boolean): void { - const { state } = this.find(id); - state.collapsed = collapsed; + const { index, state, viewDescriptor } = this.find(id); + if (state.collapsed !== collapsed) { + state.collapsed = collapsed; + this._onDidChangeViewState.fire({ viewDescriptor, index }); + } } getSize(id: string): number | undefined { @@ -316,8 +322,11 @@ export class ContributableViewsModel extends Disposable { } setSize(id: string, size: number): void { - const { state } = this.find(id); - state.size = size; + const { index, state, viewDescriptor } = this.find(id); + if (state.size !== size) { + state.size = size; + this._onDidChangeViewState.fire({ viewDescriptor, index }); + } } move(from: string, to: string): void { @@ -474,12 +483,15 @@ export class PersistentContributableViewsModel extends ContributableViewsModel { this.hiddenViewsStorageId = hiddenViewsStorageId; this.storageService = storageService; - this._register(this.onDidAdd(viewDescriptorRefs => this.saveVisibilityStates(viewDescriptorRefs.map(r => r.viewDescriptor)))); - this._register(this.onDidRemove(viewDescriptorRefs => this.saveVisibilityStates(viewDescriptorRefs.map(r => r.viewDescriptor)))); - this._register(this.storageService.onWillSaveState(() => this.saveViewsStates())); + this._register(Event.any( + this.onDidAdd, + this.onDidRemove, + Event.map(this.onDidMove, ({ from, to }) => [from, to]), + Event.map(this.onDidChangeViewState, viewDescriptorRef => [viewDescriptorRef])) + (viewDescriptorRefs => this.saveViewsStates(viewDescriptorRefs.map(r => r.viewDescriptor)))); } - private saveViewsStates(): void { + private saveViewsStates(viewDescriptors: IViewDescriptor[]): void { const storedViewsStates: { [id: string]: { collapsed: boolean, size?: number, order?: number } } = {}; let hasState = false; @@ -496,6 +508,8 @@ export class PersistentContributableViewsModel extends ContributableViewsModel { } else { this.storageService.remove(this.viewletStateStorageId, StorageScope.WORKSPACE); } + + this.saveVisibilityStates(viewDescriptors); } private saveVisibilityStates(viewDescriptors: IViewDescriptor[]): void { @@ -725,4 +739,4 @@ export function createFileIconThemableTreeContainerScope(container: HTMLElement, return themeService.onDidFileIconThemeChange(onDidChangeFileIconTheme); } -registerSingleton(IViewsService, ViewsService); \ No newline at end of file +registerSingleton(IViewsService, ViewsService); From 3802a986823977ec472fc993854e1a753037fc8f Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sun, 28 Jul 2019 14:45:44 -0700 Subject: [PATCH 694/710] Fix settings search text flowing under result count Fix #78063 --- .../preferences/browser/settingsEditor2.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts b/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts index 70f8cfc7188..0d080e7d577 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts @@ -132,6 +132,7 @@ export class SettingsEditor2 extends BaseEditor { private tocFocusedElement: SettingsTreeGroupElement | null; private settingsTreeScrollTop = 0; + private dimension: DOM.Dimension; constructor( @ITelemetryService telemetryService: ITelemetryService, @@ -279,10 +280,11 @@ export class SettingsEditor2 extends BaseEditor { } layout(dimension: DOM.Dimension): void { + this.dimension = dimension; this.layoutTrees(dimension); - const innerWidth = dimension.width - 24 * 2; // 24px padding on left and right - const monacoWidth = (innerWidth > 1000 ? 1000 : innerWidth) - 10; + const innerWidth = Math.min(1000, dimension.width) - 24 * 2; // 24px padding on left and right; + const monacoWidth = innerWidth - 10 - this.countElement.clientWidth - 12; // minus padding inside inputbox, countElement width, extra padding before countElement this.searchWidget.layout({ height: 20, width: monacoWidth }); DOM.toggleClass(this.rootElement, 'mid-width', dimension.width < 1000 && dimension.width >= 600); @@ -1231,7 +1233,11 @@ export class SettingsEditor2 extends BaseEditor { : 'none'; if (!this.searchResultModel) { - this.countElement.style.display = 'none'; + if (this.countElement.style.display !== 'none') { + this.countElement.style.display = 'none'; + this.layout(this.dimension); + } + DOM.removeClass(this.rootElement, 'no-results'); return; } @@ -1244,7 +1250,10 @@ export class SettingsEditor2 extends BaseEditor { default: this.countElement.innerText = localize('moreThanOneResult', "{0} Settings Found", count); } - this.countElement.style.display = 'block'; + if (this.countElement.style.display !== 'block') { + this.countElement.style.display = 'block'; + this.layout(this.dimension); + } DOM.toggleClass(this.rootElement, 'no-results', count === 0); } } From 2063f654858dd3d7cb97735dbc032a44af6897eb Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 Jul 2019 10:50:33 +0530 Subject: [PATCH 695/710] Fix #76881 --- .../browser/parts/views/customView.ts | 6 +++--- .../browser/parts/views/panelViewlet.ts | 19 +++++++++++++++---- src/vs/workbench/common/views.ts | 3 ++- .../contrib/debug/browser/breakpointsView.ts | 6 ++++-- .../contrib/debug/browser/callStackView.ts | 2 +- .../debug/browser/loadedScriptsView.ts | 2 +- .../contrib/debug/browser/variablesView.ts | 6 ++++-- .../debug/browser/watchExpressionsView.ts | 4 +++- .../extensions/browser/extensionsViews.ts | 7 +++++-- .../contrib/files/browser/views/emptyView.ts | 6 ++++-- .../files/browser/views/explorerView.ts | 2 +- .../files/browser/views/openEditorsView.ts | 2 +- .../contrib/outline/browser/outlinePanel.ts | 2 +- .../contrib/scm/browser/scmViewlet.ts | 4 ++-- .../contrib/search/browser/searchView.ts | 2 +- 15 files changed, 48 insertions(+), 25 deletions(-) diff --git a/src/vs/workbench/browser/parts/views/customView.ts b/src/vs/workbench/browser/parts/views/customView.ts index ab1ad41a50b..53a104e4273 100644 --- a/src/vs/workbench/browser/parts/views/customView.ts +++ b/src/vs/workbench/browser/parts/views/customView.ts @@ -13,7 +13,7 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions'; import { ContextAwareMenuEntryActionViewItem, createAndFillInActionBarActions, createAndFillInContextMenuActions } from 'vs/platform/actions/browser/menuEntryActionViewItem'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { IViewsService, ITreeView, ITreeItem, TreeItemCollapsibleState, ITreeViewDataProvider, TreeViewItemHandleArg, ITreeViewDescriptor, IViewsRegistry, ViewContainer, ITreeItemLabel, Extensions } from 'vs/workbench/common/views'; +import { ITreeView, ITreeItem, TreeItemCollapsibleState, ITreeViewDataProvider, TreeViewItemHandleArg, ITreeViewDescriptor, IViewsRegistry, ViewContainer, ITreeItemLabel, Extensions } from 'vs/workbench/common/views'; import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { INotificationService } from 'vs/platform/notification/common/notification'; @@ -56,9 +56,9 @@ export class CustomTreeViewPanel extends ViewletPanel { @IKeybindingService keybindingService: IKeybindingService, @IContextMenuService contextMenuService: IContextMenuService, @IConfigurationService configurationService: IConfigurationService, - @IViewsService viewsService: IViewsService, + @IContextKeyService contextKeyService: IContextKeyService, ) { - super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: options.title }, keybindingService, contextMenuService, configurationService); + super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: options.title }, keybindingService, contextMenuService, configurationService, contextKeyService); const { treeView } = (Registry.as(Extensions.ViewsRegistry).getView(options.id)); this.treeView = treeView; this._register(this.treeView.onDidChangeActions(() => this.updateActions(), this)); diff --git a/src/vs/workbench/browser/parts/views/panelViewlet.ts b/src/vs/workbench/browser/parts/views/panelViewlet.ts index 6c2671e227f..ef9dbe0d75f 100644 --- a/src/vs/workbench/browser/parts/views/panelViewlet.ts +++ b/src/vs/workbench/browser/parts/views/panelViewlet.ts @@ -26,8 +26,9 @@ import { PanelView, IPanelViewOptions, IPanelOptions, Panel } from 'vs/base/brow import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; -import { IView } from 'vs/workbench/common/views'; +import { IView, FocusedViewContext } from 'vs/workbench/common/views'; import { IStorageService } from 'vs/platform/storage/common/storage'; +import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; export interface IPanelColors extends IColorMapping { dropBackground?: ColorIdentifier; @@ -58,6 +59,8 @@ export abstract class ViewletPanel extends Panel implements IView { protected _onDidChangeTitleArea = this._register(new Emitter()); readonly onDidChangeTitleArea: Event = this._onDidChangeTitleArea.event; + private focusedViewContextKey: IContextKey; + private _isVisible: boolean = false; readonly id: string; readonly title: string; @@ -71,13 +74,15 @@ export abstract class ViewletPanel extends Panel implements IView { options: IViewletPanelOptions, @IKeybindingService protected keybindingService: IKeybindingService, @IContextMenuService protected contextMenuService: IContextMenuService, - @IConfigurationService protected readonly configurationService: IConfigurationService + @IConfigurationService protected readonly configurationService: IConfigurationService, + @IContextKeyService contextKeyService: IContextKeyService ) { super(options); this.id = options.id; this.title = options.title; this.actionRunner = options.actionRunner; + this.focusedViewContextKey = FocusedViewContext.bindTo(contextKeyService); } setVisible(visible: boolean): void { @@ -112,8 +117,14 @@ export abstract class ViewletPanel extends Panel implements IView { const focusTracker = trackFocus(this.element); this._register(focusTracker); - this._register(focusTracker.onDidFocus(() => this._onDidFocus.fire())); - this._register(focusTracker.onDidBlur(() => this._onDidBlur.fire())); + this._register(focusTracker.onDidFocus(() => { + this.focusedViewContextKey.set(this.id); + this._onDidFocus.fire(); + })); + this._register(focusTracker.onDidBlur(() => { + this.focusedViewContextKey.reset(); + this._onDidBlur.fire(); + })); } protected renderHeader(container: HTMLElement): void { diff --git a/src/vs/workbench/common/views.ts b/src/vs/workbench/common/views.ts index 51139cefce6..6f5386ee4a8 100644 --- a/src/vs/workbench/common/views.ts +++ b/src/vs/workbench/common/views.ts @@ -6,7 +6,7 @@ import { Command } from 'vs/editor/common/modes'; import { UriComponents } from 'vs/base/common/uri'; import { Event, Emitter } from 'vs/base/common/event'; -import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { ContextKeyExpr, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ITreeViewDataProvider } from 'vs/workbench/common/views'; import { localize } from 'vs/nls'; import { IViewlet } from 'vs/workbench/common/viewlet'; @@ -21,6 +21,7 @@ import { IMarkdownString } from 'vs/base/common/htmlContent'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; export const TEST_VIEW_CONTAINER_ID = 'workbench.view.extension.test'; +export const FocusedViewContext = new RawContextKey('focusedView', ''); export namespace Extensions { export const ViewContainersRegistry = 'workbench.registry.view.containers'; diff --git a/src/vs/workbench/contrib/debug/browser/breakpointsView.ts b/src/vs/workbench/contrib/debug/browser/breakpointsView.ts index 9114575d433..87094b93ebc 100644 --- a/src/vs/workbench/contrib/debug/browser/breakpointsView.ts +++ b/src/vs/workbench/contrib/debug/browser/breakpointsView.ts @@ -30,6 +30,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService'; import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/views/panelViewlet'; import { ILabelService } from 'vs/platform/label/common/label'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; const $ = dom.$; @@ -56,9 +57,10 @@ export class BreakpointsView extends ViewletPanel { @IThemeService private readonly themeService: IThemeService, @IEditorService private readonly editorService: IEditorService, @IContextViewService private readonly contextViewService: IContextViewService, - @IConfigurationService configurationService: IConfigurationService + @IConfigurationService configurationService: IConfigurationService, + @IContextKeyService contextKeyService: IContextKeyService, ) { - super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section") }, keybindingService, contextMenuService, configurationService); + super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section") }, keybindingService, contextMenuService, configurationService, contextKeyService); this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize(); this._register(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange())); diff --git a/src/vs/workbench/contrib/debug/browser/callStackView.ts b/src/vs/workbench/contrib/debug/browser/callStackView.ts index e8eac6f7d23..142460a504c 100644 --- a/src/vs/workbench/contrib/debug/browser/callStackView.ts +++ b/src/vs/workbench/contrib/debug/browser/callStackView.ts @@ -60,7 +60,7 @@ export class CallStackView extends ViewletPanel { @IMenuService menuService: IMenuService, @IContextKeyService readonly contextKeyService: IContextKeyService, ) { - super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService, configurationService); + super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService, configurationService, contextKeyService); this.callStackItemType = CONTEXT_CALLSTACK_ITEM_TYPE.bindTo(contextKeyService); this.contributedContextMenu = menuService.createMenu(MenuId.DebugCallStackContext, contextKeyService); diff --git a/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts b/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts index ef9f3cb5d37..70a962e46ec 100644 --- a/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts +++ b/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts @@ -402,7 +402,7 @@ export class LoadedScriptsView extends ViewletPanel { @IDebugService private readonly debugService: IDebugService, @ILabelService private readonly labelService: ILabelService ) { - super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('loadedScriptsSection', "Loaded Scripts Section") }, keybindingService, contextMenuService, configurationService); + super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('loadedScriptsSection', "Loaded Scripts Section") }, keybindingService, contextMenuService, configurationService, contextKeyService); this.loadedScriptsItemType = CONTEXT_LOADED_SCRIPTS_ITEM_TYPE.bindTo(contextKeyService); } diff --git a/src/vs/workbench/contrib/debug/browser/variablesView.ts b/src/vs/workbench/contrib/debug/browser/variablesView.ts index 581042b38cc..71559c50d3c 100644 --- a/src/vs/workbench/contrib/debug/browser/variablesView.ts +++ b/src/vs/workbench/contrib/debug/browser/variablesView.ts @@ -29,6 +29,7 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { FuzzyScore, createMatches } from 'vs/base/common/filters'; import { HighlightedLabel, IHighlight } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; const $ = dom.$; let forgetScopes = true; @@ -49,9 +50,10 @@ export class VariablesView extends ViewletPanel { @IKeybindingService keybindingService: IKeybindingService, @IConfigurationService configurationService: IConfigurationService, @IInstantiationService private readonly instantiationService: IInstantiationService, - @IClipboardService private readonly clipboardService: IClipboardService + @IClipboardService private readonly clipboardService: IClipboardService, + @IContextKeyService contextKeyService: IContextKeyService ) { - super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService, configurationService); + super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService, configurationService, contextKeyService); // Use scheduler to prevent unnecessary flashing this.onFocusStackFrameScheduler = new RunOnceScheduler(() => { diff --git a/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts b/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts index 970b8abfa7d..7b0430d2504 100644 --- a/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts +++ b/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts @@ -29,6 +29,7 @@ import { ElementsDragAndDropData } from 'vs/base/browser/ui/list/listView'; import { FuzzyScore } from 'vs/base/common/filters'; import { IHighlight } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel'; import { variableSetEmitter, VariablesRenderer } from 'vs/workbench/contrib/debug/browser/variablesView'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024; @@ -45,8 +46,9 @@ export class WatchExpressionsView extends ViewletPanel { @IKeybindingService keybindingService: IKeybindingService, @IInstantiationService private readonly instantiationService: IInstantiationService, @IConfigurationService configurationService: IConfigurationService, + @IContextKeyService contextKeyService: IContextKeyService, ) { - super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('watchExpressionsSection', "Watch Expressions Section") }, keybindingService, contextMenuService, configurationService); + super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('watchExpressionsSection', "Watch Expressions Section") }, keybindingService, contextMenuService, configurationService, contextKeyService); this.onWatchExpressionsUpdatedScheduler = new RunOnceScheduler(() => { this.needsRefresh = false; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts index 2e889a62b7f..f9bf9ad4458 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts @@ -47,6 +47,7 @@ import { CancelablePromise, createCancelablePromise } from 'vs/base/common/async import { isUIExtension } from 'vs/workbench/services/extensions/common/extensionsUtil'; import { IProductService } from 'vs/platform/product/common/product'; import { SeverityIcon } from 'vs/platform/severityIcon/common/severityIcon'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; class ExtensionsViewState extends Disposable implements IExtensionsViewState { @@ -101,8 +102,9 @@ export class ExtensionsListView extends ViewletPanel { @IWorkbenchThemeService private readonly workbenchThemeService: IWorkbenchThemeService, @IExtensionManagementServerService protected readonly extensionManagementServerService: IExtensionManagementServerService, @IProductService protected readonly productService: IProductService, + @IContextKeyService contextKeyService: IContextKeyService, ) { - super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: options.title }, keybindingService, contextMenuService, configurationService); + super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: options.title }, keybindingService, contextMenuService, configurationService, contextKeyService); this.server = options.server; } @@ -849,9 +851,10 @@ export class ServerExtensionsView extends ExtensionsListView { @IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService, @IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService, @IProductService productService: IProductService, + @IContextKeyService contextKeyService: IContextKeyService, ) { options.server = server; - super(options, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, editorService, tipsService, telemetryService, configurationService, contextService, experimentService, workbenchThemeService, extensionManagementServerService, productService); + super(options, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, editorService, tipsService, telemetryService, configurationService, contextService, experimentService, workbenchThemeService, extensionManagementServerService, productService, contextKeyService); this._register(onDidChangeTitle(title => this.updateTitle(title))); } diff --git a/src/vs/workbench/contrib/files/browser/views/emptyView.ts b/src/vs/workbench/contrib/files/browser/views/emptyView.ts index 66b56e6c22a..fddb247aa63 100644 --- a/src/vs/workbench/contrib/files/browser/views/emptyView.ts +++ b/src/vs/workbench/contrib/files/browser/views/emptyView.ts @@ -25,6 +25,7 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/ import { ILabelService } from 'vs/platform/label/common/label'; import { Schemas } from 'vs/base/common/network'; import { isWeb } from 'vs/base/common/platform'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; export class EmptyView extends ViewletPanel { @@ -44,9 +45,10 @@ export class EmptyView extends ViewletPanel { @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, @IConfigurationService configurationService: IConfigurationService, @IWorkbenchEnvironmentService private environmentService: IWorkbenchEnvironmentService, - @ILabelService private labelService: ILabelService + @ILabelService private labelService: ILabelService, + @IContextKeyService contextKeyService: IContextKeyService ) { - super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService, configurationService); + super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService, configurationService, contextKeyService); this._register(this.contextService.onDidChangeWorkbenchState(() => this.setLabels())); this._register(this.labelService.onDidChangeFormatters(() => this.setLabels())); } diff --git a/src/vs/workbench/contrib/files/browser/views/explorerView.ts b/src/vs/workbench/contrib/files/browser/views/explorerView.ts index fe6751e85db..9b464d453c9 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerView.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerView.ts @@ -90,7 +90,7 @@ export class ExplorerView extends ViewletPanel { @IClipboardService private clipboardService: IClipboardService, @IFileService private readonly fileService: IFileService ) { - super({ ...(options as IViewletPanelOptions), id: ExplorerView.ID, ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService, configurationService); + super({ ...(options as IViewletPanelOptions), id: ExplorerView.ID, ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService, configurationService, contextKeyService); this.resourceContext = instantiationService.createInstance(ResourceContextKey); this._register(this.resourceContext); diff --git a/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts b/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts index 5ed1a09eb84..893ea55f5be 100644 --- a/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts @@ -80,7 +80,7 @@ export class OpenEditorsView extends ViewletPanel { super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize({ key: 'openEditosrSection', comment: ['Open is an adjective'] }, "Open Editors Section"), - }, keybindingService, contextMenuService, configurationService); + }, keybindingService, contextMenuService, configurationService, contextKeyService); this.structuralRefreshDelay = 0; this.listRefreshScheduler = new RunOnceScheduler(() => { diff --git a/src/vs/workbench/contrib/outline/browser/outlinePanel.ts b/src/vs/workbench/contrib/outline/browser/outlinePanel.ts index 74c1efc7e98..fd070d880eb 100644 --- a/src/vs/workbench/contrib/outline/browser/outlinePanel.ts +++ b/src/vs/workbench/contrib/outline/browser/outlinePanel.ts @@ -266,7 +266,7 @@ export class OutlinePanel extends ViewletPanel { @IContextKeyService contextKeyService: IContextKeyService, @IContextMenuService contextMenuService: IContextMenuService, ) { - super(options, keybindingService, contextMenuService, configurationService); + super(options, keybindingService, contextMenuService, configurationService, contextKeyService); this._outlineViewState.restore(this._storageService); this._contextKeyFocused = OutlineViewFocused.bindTo(contextKeyService); this._contextKeyFiltered = OutlineViewFiltered.bindTo(contextKeyService); diff --git a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts index e3d7a922c78..ce2d9b72428 100644 --- a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts +++ b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts @@ -234,7 +234,7 @@ export class MainPanel extends ViewletPanel { @IMenuService private readonly menuService: IMenuService, @IConfigurationService configurationService: IConfigurationService ) { - super(options, keybindingService, contextMenuService, configurationService); + super(options, keybindingService, contextMenuService, configurationService, contextKeyService); } protected renderBody(container: HTMLElement): void { @@ -733,7 +733,7 @@ export class RepositoryPanel extends ViewletPanel { @IContextKeyService contextKeyService: IContextKeyService, @IMenuService protected menuService: IMenuService ) { - super(options, keybindingService, contextMenuService, configurationService); + super(options, keybindingService, contextMenuService, configurationService, contextKeyService); this.menus = instantiationService.createInstance(SCMMenus, this.repository.provider); this._register(this.menus); diff --git a/src/vs/workbench/contrib/search/browser/searchView.ts b/src/vs/workbench/contrib/search/browser/searchView.ts index 7ea63d9cbc2..2daad95ca68 100644 --- a/src/vs/workbench/contrib/search/browser/searchView.ts +++ b/src/vs/workbench/contrib/search/browser/searchView.ts @@ -154,7 +154,7 @@ export class SearchView extends ViewletPanel { @IKeybindingService keybindingService: IKeybindingService, @IStorageService storageService: IStorageService, ) { - super({ ...(options as IViewletPanelOptions), id: VIEW_ID, ariaHeaderLabel: nls.localize('searchView', "Search") }, keybindingService, contextMenuService, configurationService); + super({ ...(options as IViewletPanelOptions), id: VIEW_ID, ariaHeaderLabel: nls.localize('searchView', "Search") }, keybindingService, contextMenuService, configurationService, contextKeyService); this.viewletVisible = Constants.SearchViewVisibleKey.bindTo(contextKeyService); this.viewletFocused = Constants.SearchViewFocusedKey.bindTo(contextKeyService); From 2cf9baf3c5416604b8d212c14cf6ac91ddab2775 Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Mon, 29 Jul 2019 06:31:35 +0000 Subject: [PATCH 696/710] fixes #78010 --- src/vs/workbench/browser/layout.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 7950b273c23..59228e58235 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -763,6 +763,12 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi this.state.panel.position = Position.RIGHT; } } + + // Reset workbench state if corrupted + if (workbenchGrid.getNeighborViews(this.titleBarPartView, Direction.Right).length > 0 || + workbenchGrid.getNeighborViews(this.titleBarPartView, Direction.Left).length > 0) { + workbenchGrid = undefined; + } } catch (err) { console.error(err); } @@ -849,8 +855,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi statusBarInGrid = true; } - if (!titlebarInGrid && getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') { + if (!titlebarInGrid) { this.workbenchGrid.addView(this.titleBarPartView, Sizing.Split, this.editorPartView, Direction.Up); + titlebarInGrid = true; } From f113daf58d291bf1abdaac34846370609adb7d32 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 Jul 2019 11:16:56 +0530 Subject: [PATCH 697/710] fix tests --- .../extensions/test/electron-browser/extensionsViews.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts index 90db9e85e98..cf2b6c79522 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts @@ -44,6 +44,8 @@ import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedPr import { ExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService'; import { IProductService } from 'vs/platform/product/common/product'; import { ILabelService } from 'vs/platform/label/common/label'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService'; suite('ExtensionsListView Tests', () => { @@ -93,6 +95,7 @@ suite('ExtensionsListView Tests', () => { instantiationService.stub(IExtensionManagementService, 'onUninstallExtension', uninstallEvent.event); instantiationService.stub(IExtensionManagementService, 'onDidUninstallExtension', didUninstallEvent.event); instantiationService.stub(IRemoteAgentService, RemoteAgentService); + instantiationService.stub(IContextKeyService, MockContextKeyService); instantiationService.stub(IExtensionManagementServerService, new class extends ExtensionManagementServerService { private _localExtensionManagementServer: IExtensionManagementServer = { extensionManagementService: instantiationService.get(IExtensionManagementService), label: 'local', authority: 'vscode-local' }; From a5b9ba65d6743d3e2be4d9b6ec1794b0df3d4390 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 29 Jul 2019 08:55:05 +0200 Subject: [PATCH 698/710] fixes #77940 --- src/vs/workbench/contrib/scm/browser/scmViewlet.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts index a2ec1e87436..00e6d9356ce 100644 --- a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts +++ b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts @@ -495,6 +495,7 @@ class ResourceRenderer implements IListRenderer const icon = theme.type === LIGHT ? resource.decorations.icon : resource.decorations.iconDark; template.fileLabel.setFile(resource.sourceUri, { fileDecorations: { colors: false, badges: !icon, data: resource.decorations } }); + template.actionBar.clear(); template.actionBar.context = resource; const disposables = new DisposableStore(); From a70abbbfb107b45d105776d7a2282a60c5eacc0d Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Mon, 29 Jul 2019 07:11:56 +0000 Subject: [PATCH 699/710] make editor snappable --- src/vs/workbench/browser/layout.ts | 9 +++++++++ src/vs/workbench/browser/parts/editor/editorPart.ts | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 59228e58235..d334b0cef87 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -789,6 +789,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi this.setPanelHidden(!visible, true); })); + this._register((this.editorPartView as PanelPart).onDidVisibilityChange((visible) => { + this.setEditorHidden(!visible, true); + })); + this._register(this.lifecycleService.onBeforeShutdown(beforeShutdownEvent => { beforeShutdownEvent.veto(new Promise((resolve) => { const grid = this.workbenchGrid as SerializableGrid; @@ -1164,6 +1168,11 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi } else { size.width = this.state.panel.sizeBeforeMaximize; } + + // Unhide the editor if needed + if (this.state.editor.hidden) { + this.setEditorHidden(false); + } } this.workbenchGrid.resizeView(this.panelPartView, size); diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 14ea050a1b9..3d456d54ecc 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -111,6 +111,9 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro private _onDidSizeConstraintsChange = this._register(new Relay<{ width: number; height: number; } | undefined>()); get onDidSizeConstraintsChange(): Event<{ width: number; height: number; } | undefined> { return Event.any(this.onDidSetGridWidget.event, this._onDidSizeConstraintsChange.event); } + private _onDidVisibilityChange = this._register(new Emitter()); + readonly onDidVisibilityChange: Event = this._onDidVisibilityChange.event; + //#endregion private readonly workspaceMemento: MementoObject; @@ -743,6 +746,8 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro get minimumHeight(): number { return this.centeredLayoutWidget.minimumHeight; } get maximumHeight(): number { return this.centeredLayoutWidget.maximumHeight; } + readonly snap = true; + get onDidChange(): Event { return this.centeredLayoutWidget.onDidChange; } readonly priority: LayoutPriority = LayoutPriority.High; @@ -986,6 +991,10 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro //#endregion + setVisible(visible: boolean): void { + this._onDidVisibilityChange.fire(visible); + } + toJSON(): object { return { type: Parts.EDITOR_PART From 980ad1ce090d58fdac487ad376612ae6e2f23134 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 29 Jul 2019 09:29:29 +0200 Subject: [PATCH 700/710] [josn] use latest ClientCapabilities --- extensions/json-language-features/server/src/jsonServerMain.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/json-language-features/server/src/jsonServerMain.ts b/extensions/json-language-features/server/src/jsonServerMain.ts index 27e29a96764..ba1c7a18518 100644 --- a/extensions/json-language-features/server/src/jsonServerMain.ts +++ b/extensions/json-language-features/server/src/jsonServerMain.ts @@ -14,7 +14,7 @@ import * as fs from 'fs'; import { URI } from 'vscode-uri'; import * as URL from 'url'; import { formatError, runSafe, runSafeAsync } from './utils/runner'; -import { JSONDocument, JSONSchema, getLanguageService, DocumentLanguageSettings, SchemaConfiguration } from 'vscode-json-languageservice'; +import { JSONDocument, JSONSchema, getLanguageService, DocumentLanguageSettings, SchemaConfiguration, ClientCapabilities } from 'vscode-json-languageservice'; import { getLanguageModelCache } from './languageModelCache'; interface ISchemaAssociations { @@ -103,6 +103,7 @@ function getSchemaRequestService(handledSchemas: { [schema: string]: boolean }) let languageService = getLanguageService({ workspaceContext, contributions: [], + clientCapabilities: ClientCapabilities.LATEST }); // Create a text document manager. From 70f5805cfe6f65d2d78f023f336df4deaf4ac555 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 29 Jul 2019 10:45:06 +0200 Subject: [PATCH 701/710] fixes #77550 --- src/vs/platform/windows/common/windows.ts | 2 +- src/vs/platform/windows/electron-browser/windowsService.ts | 6 +++--- src/vs/platform/windows/electron-main/windowsService.ts | 4 ++-- src/vs/workbench/api/browser/mainThreadConsole.ts | 2 +- src/vs/workbench/browser/web.simpleservices.ts | 2 +- .../services/extensions/electron-browser/extensionHost.ts | 2 +- src/vs/workbench/test/workbenchTestServices.ts | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 9af1792f70c..0339be71c36 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -156,7 +156,7 @@ export interface IWindowsService { openExtensionDevelopmentHostWindow(args: ParsedArgs, env: IProcessEnvironment): Promise; getWindows(): Promise<{ id: number; workspace?: IWorkspaceIdentifier; folderUri?: ISingleFolderWorkspaceIdentifier; title: string; filename?: string; }[]>; getWindowCount(): Promise; - log(severity: string, ...messages: string[]): Promise; + log(severity: string, args: string[]): Promise; showItemInFolder(path: URI): Promise; getActiveWindowId(): Promise; diff --git a/src/vs/platform/windows/electron-browser/windowsService.ts b/src/vs/platform/windows/electron-browser/windowsService.ts index 34ec58fc49a..228dfd98ba2 100644 --- a/src/vs/platform/windows/electron-browser/windowsService.ts +++ b/src/vs/platform/windows/electron-browser/windowsService.ts @@ -226,8 +226,8 @@ export class WindowsService implements IWindowsService { return this.channel.call('getWindowCount'); } - log(severity: string, ...messages: string[]): Promise { - return this.channel.call('log', [severity, messages]); + log(severity: string, args: string[]): Promise { + return this.channel.call('log', [severity, args]); } showItemInFolder(path: URI): Promise { @@ -257,4 +257,4 @@ export class WindowsService implements IWindowsService { resolveProxy(windowId: number, url: string): Promise { return Promise.resolve(this.channel.call('resolveProxy', [windowId, url])); } -} \ No newline at end of file +} diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 910c4e8d594..c33bbb42b8a 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -334,7 +334,7 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH return this.windowsMainService.getWindows().length; } - async log(severity: string, ...messages: string[]): Promise { + async log(severity: string, args: string[]): Promise { let consoleFn = console.log; switch (severity) { @@ -349,7 +349,7 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH break; } - consoleFn(...messages); + consoleFn.call(console, ...args); } async showItemInFolder(resource: URI): Promise { diff --git a/src/vs/workbench/api/browser/mainThreadConsole.ts b/src/vs/workbench/api/browser/mainThreadConsole.ts index 160f9f0b773..1d7a7723404 100644 --- a/src/vs/workbench/api/browser/mainThreadConsole.ts +++ b/src/vs/workbench/api/browser/mainThreadConsole.ts @@ -40,7 +40,7 @@ export class MainThreadConsole implements MainThreadConsoleShape { // Log on main side if running tests from cli if (this._isExtensionDevTestFromCli) { - this._windowsService.log(entry.severity, ...parse(entry).args); + this._windowsService.log(entry.severity, parse(entry).args); } // Broadcast to other windows if we are in development mode diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index d450e7da4f3..3a5be568517 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -791,7 +791,7 @@ export class SimpleWindowsService implements IWindowsService { return Promise.resolve(this.windowCount); } - log(_severity: string, ..._messages: string[]): Promise { + log(_severity: string, _args: string[]): Promise { return Promise.resolve(); } diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts index 4d11f6a9459..923130c9ee3 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts @@ -434,7 +434,7 @@ export class ExtensionHostProcessWorker implements IExtensionHostStarter { // Log on main side if running tests from cli if (this._isExtensionDevTestFromCli) { - this._windowsService.log(entry.severity, ...parse(entry).args); + this._windowsService.log(entry.severity, parse(entry).args); } // Broadcast to other windows if we are in development mode diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 153fc2bbae5..48ebaf8e296 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -1477,7 +1477,7 @@ export class TestWindowsService implements IWindowsService { return Promise.resolve(this.windowCount); } - log(_severity: string, ..._messages: string[]): Promise { + log(_severity: string, _args: string[]): Promise { return Promise.resolve(); } From 7291ef2b4479410dec5e9846bae038a05a9dcd52 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 Jul 2019 14:20:51 +0530 Subject: [PATCH 702/710] Fix #76922 --- src/vs/workbench/browser/parts/views/views.ts | 167 +++++++++++------- 1 file changed, 101 insertions(+), 66 deletions(-) diff --git a/src/vs/workbench/browser/parts/views/views.ts b/src/vs/workbench/browser/parts/views/views.ts index 439d508bde0..ca709d3bd91 100644 --- a/src/vs/workbench/browser/parts/views/views.ts +++ b/src/vs/workbench/browser/parts/views/views.ts @@ -12,7 +12,7 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IContextKeyService, IContextKeyChangeEvent, IReadableSet, IContextKey, RawContextKey, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { Event, Emitter } from 'vs/base/common/event'; import { sortedDiff, firstIndex, move, isNonEmptyArray } from 'vs/base/common/arrays'; -import { isUndefinedOrNull } from 'vs/base/common/types'; +import { isUndefinedOrNull, isUndefined } from 'vs/base/common/types'; import { MenuId, MenuRegistry, ICommandAction } from 'vs/platform/actions/common/actions'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { localize } from 'vs/nls'; @@ -205,9 +205,9 @@ class ViewDescriptorCollection extends Disposable implements IViewDescriptorColl } export interface IViewState { - visibleGlobal: boolean; - visibleWorkspace: boolean; - collapsed: boolean; + visibleGlobal: boolean | undefined; + visibleWorkspace: boolean | undefined; + collapsed: boolean | undefined; order?: number; size?: number; } @@ -287,7 +287,7 @@ export class ContributableViewsModel extends Disposable { } if (visible) { - this._onDidAdd.fire([{ index: visibleIndex, viewDescriptor, size: state.size, collapsed: state.collapsed }]); + this._onDidAdd.fire([{ index: visibleIndex, viewDescriptor, size: state.size, collapsed: !!state.collapsed }]); } else { this._onDidRemove.fire([{ index: visibleIndex, viewDescriptor }]); } @@ -300,7 +300,7 @@ export class ContributableViewsModel extends Disposable { throw new Error(`Unknown view ${id}`); } - return state.collapsed; + return !!state.collapsed; } setCollapsed(id: string, collapsed: boolean): void { @@ -354,7 +354,7 @@ export class ContributableViewsModel extends Disposable { if (!viewState) { throw new Error(`Unknown view ${viewDescriptor.id}`); } - return viewDescriptor.workspace ? viewState.visibleWorkspace : viewState.visibleGlobal; + return viewDescriptor.workspace ? !!viewState.visibleWorkspace : !!viewState.visibleGlobal; } private find(id: string): { index: number, visibleIndex: number, viewDescriptor: IViewDescriptor, state: IViewState } { @@ -444,7 +444,7 @@ export class ContributableViewsModel extends Disposable { const state = this.viewStates.get(viewDescriptor.id)!; if (this.isViewDescriptorVisible(viewDescriptor)) { - toAdd.push({ index: startIndex++, viewDescriptor, size: state.size, collapsed: state.collapsed }); + toAdd.push({ index: startIndex++, viewDescriptor, size: state.size, collapsed: !!state.collapsed }); } } } @@ -461,10 +461,23 @@ export class ContributableViewsModel extends Disposable { } } +interface IStoredWorkspaceViewState { + collapsed: boolean; + isHidden: boolean; + size?: number; + order?: number; +} + +interface IStoredGlobalViewState { + id: string; + isHidden: boolean; + order?: number; +} + export class PersistentContributableViewsModel extends ContributableViewsModel { - private viewletStateStorageId: string; - private readonly hiddenViewsStorageId: string; + private readonly workspaceViewsStateStorageId: string; + private readonly globalViewsStateStorageId: string; private storageService: IStorageService; @@ -474,13 +487,13 @@ export class PersistentContributableViewsModel extends ContributableViewsModel { @IViewsService viewsService: IViewsService, @IStorageService storageService: IStorageService, ) { - const hiddenViewsStorageId = `${viewletStateStorageId}.hidden`; - const viewStates = PersistentContributableViewsModel.loadViewsStates(viewletStateStorageId, hiddenViewsStorageId, storageService); + const globalViewsStateStorageId = `${viewletStateStorageId}.hidden`; + const viewStates = PersistentContributableViewsModel.loadViewsStates(viewletStateStorageId, globalViewsStateStorageId, storageService); super(container, viewsService, viewStates); - this.viewletStateStorageId = viewletStateStorageId; - this.hiddenViewsStorageId = hiddenViewsStorageId; + this.workspaceViewsStateStorageId = viewletStateStorageId; + this.globalViewsStateStorageId = globalViewsStateStorageId; this.storageService = storageService; this._register(Event.any( @@ -492,84 +505,106 @@ export class PersistentContributableViewsModel extends ContributableViewsModel { } private saveViewsStates(viewDescriptors: IViewDescriptor[]): void { - const storedViewsStates: { [id: string]: { collapsed: boolean, size?: number, order?: number } } = {}; + this.saveWorkspaceViewsStates(); + this.saveGlobalViewsStates(); + } + + private saveWorkspaceViewsStates(): void { + const storedViewsStates: { [id: string]: IStoredWorkspaceViewState } = {}; let hasState = false; for (const viewDescriptor of this.viewDescriptors) { const viewState = this.viewStates.get(viewDescriptor.id); if (viewState) { - storedViewsStates[viewDescriptor.id] = { collapsed: viewState.collapsed, size: viewState.size, order: viewState.order }; + storedViewsStates[viewDescriptor.id] = { + collapsed: !!viewState.collapsed, + isHidden: !viewState.visibleWorkspace, + size: viewState.size, + order: viewDescriptor.workspace && viewState ? viewState.order : undefined + }; hasState = true; } } if (hasState) { - this.storageService.store(this.viewletStateStorageId, JSON.stringify(storedViewsStates), StorageScope.WORKSPACE); + this.storageService.store(this.workspaceViewsStateStorageId, JSON.stringify(storedViewsStates), StorageScope.WORKSPACE); } else { - this.storageService.remove(this.viewletStateStorageId, StorageScope.WORKSPACE); - } - - this.saveVisibilityStates(viewDescriptors); - } - - private saveVisibilityStates(viewDescriptors: IViewDescriptor[]): void { - const globalViews: IViewDescriptor[] = viewDescriptors.filter(v => !v.workspace); - const workspaceViews: IViewDescriptor[] = viewDescriptors.filter(v => v.workspace); - if (globalViews.length) { - this.saveVisibilityStatesInScope(globalViews, StorageScope.GLOBAL); - } - if (workspaceViews.length) { - this.saveVisibilityStatesInScope(workspaceViews, StorageScope.WORKSPACE); + this.storageService.remove(this.workspaceViewsStateStorageId, StorageScope.WORKSPACE); } } - private saveVisibilityStatesInScope(viewDescriptors: IViewDescriptor[], scope: StorageScope): void { - const storedViewsVisibilityStates = PersistentContributableViewsModel.loadViewsVisibilityState(this.hiddenViewsStorageId, this.storageService, scope); - for (const viewDescriptor of viewDescriptors) { - if (viewDescriptor.canToggleVisibility) { - const viewState = this.viewStates.get(viewDescriptor.id); - storedViewsVisibilityStates.set(viewDescriptor.id, { id: viewDescriptor.id, isHidden: viewState ? (scope === StorageScope.GLOBAL ? !viewState.visibleGlobal : !viewState.visibleWorkspace) : false }); - } + private saveGlobalViewsStates(): void { + const storedViewsVisibilityStates = PersistentContributableViewsModel.loadGlobalViewsState(this.globalViewsStateStorageId, this.storageService, StorageScope.GLOBAL); + for (const viewDescriptor of this.viewDescriptors) { + const viewState = this.viewStates.get(viewDescriptor.id); + storedViewsVisibilityStates.set(viewDescriptor.id, { + id: viewDescriptor.id, + isHidden: viewState && viewDescriptor.canToggleVisibility ? !viewState.visibleGlobal : false, + order: !viewDescriptor.workspace && viewState ? viewState.order : undefined + }); } - this.storageService.store(this.hiddenViewsStorageId, JSON.stringify(values(storedViewsVisibilityStates)), scope); + this.storageService.store(this.globalViewsStateStorageId, JSON.stringify(values(storedViewsVisibilityStates)), StorageScope.GLOBAL); } - private static loadViewsStates(viewletStateStorageId: string, hiddenViewsStorageId: string, storageService: IStorageService): Map { + + private static loadViewsStates(workspaceViewsStateStorageId: string, globalViewsStateStorageId: string, storageService: IStorageService): Map { const viewStates = new Map(); - const storedViewsStates = JSON.parse(storageService.get(viewletStateStorageId, StorageScope.WORKSPACE, '{}')); - const globalVisibilityStates = this.loadViewsVisibilityState(hiddenViewsStorageId, storageService, StorageScope.GLOBAL); - const workspaceVisibilityStates = this.loadViewsVisibilityState(hiddenViewsStorageId, storageService, StorageScope.WORKSPACE); + const workspaceViewsStates = <{ [id: string]: IStoredWorkspaceViewState }>JSON.parse(storageService.get(workspaceViewsStateStorageId, StorageScope.WORKSPACE, '{}')); + for (const id of Object.keys(workspaceViewsStates)) { + const workspaceViewState = workspaceViewsStates[id]; + viewStates.set(id, { + visibleGlobal: undefined, + visibleWorkspace: isUndefined(workspaceViewState.isHidden) ? undefined : !workspaceViewState.isHidden, + collapsed: workspaceViewState.collapsed, + order: workspaceViewState.order + }); + } - for (const { id, isHidden } of values(globalVisibilityStates)) { - const viewState = storedViewsStates[id]; - if (viewState) { - viewStates.set(id, { ...viewState, ...{ visibleGlobal: !isHidden } }); - } else { - // New workspace - viewStates.set(id, { ...{ visibleGlobal: !isHidden } }); + // Migrate to `viewletStateStorageId` + const workspaceVisibilityStates = this.loadGlobalViewsState(globalViewsStateStorageId, storageService, StorageScope.WORKSPACE); + if (workspaceVisibilityStates.size > 0) { + for (const { id, isHidden } of values(workspaceVisibilityStates)) { + let viewState = viewStates.get(id); + // Not migrated to `viewletStateStorageId` + if (viewState) { + if (isUndefined(viewState.visibleWorkspace)) { + viewState.visibleWorkspace = !isHidden; + } + } else { + viewStates.set(id, { + collapsed: undefined, + visibleGlobal: undefined, + visibleWorkspace: !isHidden, + }); + } } + storageService.remove(globalViewsStateStorageId, StorageScope.WORKSPACE); } - for (const { id, isHidden } of values(workspaceVisibilityStates)) { - const viewState = storedViewsStates[id]; + + const globalViewsStates = this.loadGlobalViewsState(globalViewsStateStorageId, storageService, StorageScope.GLOBAL); + for (const { id, isHidden, order } of values(globalViewsStates)) { + let viewState = viewStates.get(id); if (viewState) { - viewStates.set(id, { ...viewState, ...{ visibleWorkspace: !isHidden } }); + viewState.visibleGlobal = !isHidden; + if (!isUndefined(order)) { + viewState.order = order; + } } else { - // New workspace - viewStates.set(id, { ...{ visibleWorkspace: !isHidden } }); - } - } - for (const id of Object.keys(storedViewsStates)) { - if (!viewStates.has(id)) { - viewStates.set(id, { ...storedViewsStates[id] }); + viewStates.set(id, { + visibleGlobal: !isHidden, + order, + collapsed: undefined, + visibleWorkspace: undefined, + }); } } return viewStates; } - private static loadViewsVisibilityState(hiddenViewsStorageId: string, storageService: IStorageService, scope: StorageScope): Map { - const storedVisibilityStates = >JSON.parse(storageService.get(hiddenViewsStorageId, scope, '[]')); + private static loadGlobalViewsState(globalViewsStateStorageId: string, storageService: IStorageService, scope: StorageScope): Map { + const storedValue = >JSON.parse(storageService.get(globalViewsStateStorageId, scope, '[]')); let hasDuplicates = false; - const storedViewsVisibilityStates = storedVisibilityStates.reduce((result, storedState) => { + const storedGlobalViewsState = storedValue.reduce((result, storedState) => { if (typeof storedState === 'string' /* migration */) { hasDuplicates = hasDuplicates || result.has(storedState); result.set(storedState, { id: storedState, isHidden: true }); @@ -578,13 +613,13 @@ export class PersistentContributableViewsModel extends ContributableViewsModel { result.set(storedState.id, storedState); } return result; - }, new Map()); + }, new Map()); if (hasDuplicates) { - storageService.store(hiddenViewsStorageId, JSON.stringify(values(storedViewsVisibilityStates)), scope); + storageService.store(globalViewsStateStorageId, JSON.stringify(values(storedGlobalViewsState)), scope); } - return storedViewsVisibilityStates; + return storedGlobalViewsState; } } From f515c229c98f8362adc88f67138afb5367f8a25c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 29 Jul 2019 10:54:48 +0200 Subject: [PATCH 703/710] make edit-builder throw when used after finalized, #78066 --- .../src/singlefolder-tests/editor.test.ts | 23 +++++++++++++++++++ .../workbench/api/common/extHostTextEditor.ts | 18 +++++++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts index 80ad28ddf57..9b6c6d82897 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts @@ -195,4 +195,27 @@ suite('editor tests', () => { ); }); }); + + test('throw when using invalid edit', async function () { + + await withRandomFileEditor('foo', editor => { + + return new Promise((resolve, reject) => { + + editor.edit(edit => { + edit.insert(new Position(0, 0), 'bar'); + setTimeout(() => { + try { + edit.insert(new Position(0, 0), 'bar'); + reject(new Error('expected error')); + } catch (err) { + assert.ok(true); + resolve(); + } + }, 0); + }); + }); + }); + + }); }); diff --git a/src/vs/workbench/api/common/extHostTextEditor.ts b/src/vs/workbench/api/common/extHostTextEditor.ts index f97da57cf53..fa10d30014b 100644 --- a/src/vs/workbench/api/common/extHostTextEditor.ts +++ b/src/vs/workbench/api/common/extHostTextEditor.ts @@ -51,21 +51,21 @@ export class TextEditorEdit { private readonly _document: vscode.TextDocument; private readonly _documentVersionId: number; - private _collectedEdits: ITextEditOperation[]; - private _setEndOfLine: EndOfLine | undefined; private readonly _undoStopBefore: boolean; private readonly _undoStopAfter: boolean; + private _collectedEdits: ITextEditOperation[] = []; + private _setEndOfLine: EndOfLine | undefined = undefined; + private _finalized: boolean = false; constructor(document: vscode.TextDocument, options: { undoStopBefore: boolean; undoStopAfter: boolean; }) { this._document = document; this._documentVersionId = document.version; - this._collectedEdits = []; - this._setEndOfLine = undefined; this._undoStopBefore = options.undoStopBefore; this._undoStopAfter = options.undoStopAfter; } finalize(): IEditData { + this._finalized = true; return { documentVersionId: this._documentVersionId, edits: this._collectedEdits, @@ -75,7 +75,14 @@ export class TextEditorEdit { }; } + private _throwIfFinalized() { + if (this._finalized) { + throw new Error('Edit is only valid while callback runs'); + } + } + replace(location: Position | Range | Selection, value: string): void { + this._throwIfFinalized(); let range: Range | null = null; if (location instanceof Position) { @@ -90,10 +97,12 @@ export class TextEditorEdit { } insert(location: Position, value: string): void { + this._throwIfFinalized(); this._pushEdit(new Range(location, location), value, true); } delete(location: Range | Selection): void { + this._throwIfFinalized(); let range: Range | null = null; if (location instanceof Range) { @@ -115,6 +124,7 @@ export class TextEditorEdit { } setEndOfLine(endOfLine: EndOfLine): void { + this._throwIfFinalized(); if (endOfLine !== EndOfLine.LF && endOfLine !== EndOfLine.CRLF) { throw illegalArgument('endOfLine'); } From 4c3769071459718f89bd48fa3b6e806c83cf3336 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 29 Jul 2019 11:42:01 +0200 Subject: [PATCH 704/710] fix #78022 --- .../editor/contrib/referenceSearch/referenceSearch.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/vs/editor/contrib/referenceSearch/referenceSearch.ts b/src/vs/editor/contrib/referenceSearch/referenceSearch.ts index 22fb4882f5d..97d8aa5dbf0 100644 --- a/src/vs/editor/contrib/referenceSearch/referenceSearch.ts +++ b/src/vs/editor/contrib/referenceSearch/referenceSearch.ts @@ -27,6 +27,7 @@ import { CommandsRegistry, ICommandHandler } from 'vs/platform/commands/common/c import { URI } from 'vs/base/common/uri'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; import { CancellationToken } from 'vs/base/common/cancellation'; +import { coalesce, flatten } from 'vs/base/common/arrays'; export const defaultReferenceSearchOptions: RequestOptions = { getMetaTitle(model) { @@ -287,15 +288,7 @@ export function provideReferences(model: ITextModel, position: Position, token: }); }); - return Promise.all(promises).then(references => { - let result: Location[] = []; - for (let ref of references) { - if (ref) { - result.push(...ref); - } - } - return result; - }); + return Promise.all(promises).then(references => flatten(coalesce(references))); } registerDefaultLanguageCommand('_executeReferenceProvider', (model, position) => provideReferences(model, position, CancellationToken.None)); From fcb2e50b093000d2a4803067306f23e5d263a201 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 Jul 2019 15:41:51 +0530 Subject: [PATCH 705/710] fix #78062 --- .../workbench/contrib/extensions/common/extensionQuery.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/common/extensionQuery.ts b/src/vs/workbench/contrib/extensions/common/extensionQuery.ts index 445e23db188..6c5a2505331 100644 --- a/src/vs/workbench/contrib/extensions/common/extensionQuery.ts +++ b/src/vs/workbench/contrib/extensions/common/extensionQuery.ts @@ -12,12 +12,13 @@ export class Query { } static suggestions(query: string): string[] { - const commands = ['installed', 'outdated', 'enabled', 'disabled', 'builtin', 'recommended', 'sort', 'category', 'tag', 'ext']; + const commands = ['installed', 'outdated', 'enabled', 'disabled', 'builtin', 'recommended', 'sort', 'category', 'tag', 'ext', 'id']; const subcommands = { 'sort': ['installs', 'rating', 'name'], 'category': ['"programming languages"', 'snippets', 'linters', 'themes', 'debuggers', 'formatters', 'keymaps', '"scm providers"', 'other', '"extension packs"', '"language packs"'], 'tag': [''], - 'ext': [''] + 'ext': [''], + 'id': [''] }; let queryContains = (substr: string) => query.indexOf(substr) > -1; @@ -77,4 +78,4 @@ export class Query { equals(other: Query): boolean { return this.value === other.value && this.sortBy === other.sortBy; } -} \ No newline at end of file +} From c429b412c67f3e3882017bcc094ac1319258e9f9 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 29 Jul 2019 12:22:28 +0200 Subject: [PATCH 706/710] grid: should not allow call to getNeighborViews before first layout --- src/vs/base/browser/ui/grid/grid.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vs/base/browser/ui/grid/grid.ts b/src/vs/base/browser/ui/grid/grid.ts index d2cc4ee6ff5..d584e513cdb 100644 --- a/src/vs/base/browser/ui/grid/grid.ts +++ b/src/vs/base/browser/ui/grid/grid.ts @@ -217,6 +217,8 @@ export class Grid extends Disposable { get element(): HTMLElement { return this.gridview.element; } + private didLayout = false; + constructor(view: T, options: IGridOptions = {}) { super(); this.gridview = new GridView(options); @@ -237,6 +239,7 @@ export class Grid extends Disposable { layout(width: number, height: number): void { this.gridview.layout(width, height); + this.didLayout = true; } hasView(view: T): boolean { @@ -344,6 +347,10 @@ export class Grid extends Disposable { } getNeighborViews(view: T, direction: Direction, wrap: boolean = false): T[] { + if (!this.didLayout) { + throw new Error('Can\'t call getNeighborViews before first layout'); + } + const location = this.getViewLocation(view); const root = this.getViews(); const node = getGridNode(root, location); From 600c7db75a2723ad6af571e6208009aac4843f77 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 29 Jul 2019 12:22:43 +0200 Subject: [PATCH 707/710] grid: do not layout views until deserialization is complete --- src/vs/base/browser/ui/grid/grid.ts | 7 ++++- src/vs/base/browser/ui/grid/gridview.ts | 39 ++++++++++++++++++------- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/vs/base/browser/ui/grid/grid.ts b/src/vs/base/browser/ui/grid/grid.ts index d584e513cdb..eb8476e1b8b 100644 --- a/src/vs/base/browser/ui/grid/grid.ts +++ b/src/vs/base/browser/ui/grid/grid.ts @@ -7,7 +7,7 @@ import 'vs/css!./gridview'; import { Orientation } from 'vs/base/browser/ui/sash/sash'; import { Disposable } from 'vs/base/common/lifecycle'; import { tail2 as tail, equals } from 'vs/base/common/arrays'; -import { orthogonal, IView as IGridViewView, GridView, Sizing as GridViewSizing, Box, IGridViewStyles, IViewSize } from './gridview'; +import { orthogonal, IView as IGridViewView, GridView, Sizing as GridViewSizing, Box, IGridViewStyles, IViewSize, ILayoutController, LayoutController } from './gridview'; import { Event } from 'vs/base/common/event'; import { InvisibleSizing } from 'vs/base/browser/ui/splitview/splitview'; @@ -197,6 +197,7 @@ export interface IGridOptions { readonly styles?: IGridStyles; readonly proportionalLayout?: boolean; readonly firstViewVisibleCachedSize?: number; + readonly layoutController?: ILayoutController; } export class Grid extends Disposable { @@ -534,6 +535,9 @@ export class SerializableGrid extends Grid { throw new Error('Invalid serialized state, first leaf not found'); } + const layoutController = new LayoutController(false); + options = { ...options, layoutController }; + if (typeof firstLeaf.cachedVisibleSize === 'number') { options = { ...options, firstViewVisibleCachedSize: firstLeaf.cachedVisibleSize }; } @@ -543,6 +547,7 @@ export class SerializableGrid extends Grid { result.restoreViews(firstLeaf.view, orientation, root); result.initialLayoutContext = { width, height, root }; + layoutController.isLayoutEnabled = true; return result; } diff --git a/src/vs/base/browser/ui/grid/gridview.ts b/src/vs/base/browser/ui/grid/gridview.ts index f6e65de3a14..81a6950a65b 100644 --- a/src/vs/base/browser/ui/grid/gridview.ts +++ b/src/vs/base/browser/ui/grid/gridview.ts @@ -67,9 +67,18 @@ const defaultStyles: IGridViewStyles = { separatorBorder: Color.transparent }; +export interface ILayoutController { + readonly isLayoutEnabled: boolean; +} + +export class LayoutController implements ILayoutController { + constructor(public isLayoutEnabled: boolean) { } +} + export interface IGridViewOptions { - styles?: IGridViewStyles; - proportionalLayout?: boolean; // default true + readonly styles?: IGridViewStyles; + readonly proportionalLayout?: boolean; // default true + readonly layoutController?: ILayoutController; } class BranchNode implements ISplitView, IDisposable { @@ -466,7 +475,8 @@ class LeafNode implements ISplitView, IDisposable { constructor( readonly view: IView, readonly orientation: Orientation, - orthogonalSize: number = 0 + readonly layoutController: ILayoutController, + orthogonalSize: number ) { this._orthogonalSize = orthogonalSize; @@ -536,7 +546,10 @@ class LeafNode implements ISplitView, IDisposable { layout(size: number): void { this._size = size; - return this.view.layout(this.width, this.height, orthogonal(this.orientation)); + + if (this.layoutController.isLayoutEnabled) { + this.view.layout(this.width, this.height, orthogonal(this.orientation)); + } } setVisible(visible: boolean): void { @@ -553,7 +566,10 @@ class LeafNode implements ISplitView, IDisposable { orthogonalLayout(size: number): void { this._orthogonalSize = size; - return this.view.layout(this.width, this.height, orthogonal(this.orientation)); + + if (this.layoutController.isLayoutEnabled) { + this.view.layout(this.width, this.height, orthogonal(this.orientation)); + } } dispose(): void { } @@ -584,7 +600,7 @@ function flipNode(node: T, size: number, orthogonalSize: number) return result as T; } else { - return new LeafNode((node as LeafNode).view, orthogonal(node.orientation), orthogonalSize) as T; + return new LeafNode((node as LeafNode).view, orthogonal(node.orientation), (node as LeafNode).layoutController, orthogonalSize) as T; } } @@ -644,11 +660,14 @@ export class GridView implements IDisposable { private _onDidChange = new Relay(); readonly onDidChange = this._onDidChange.event; + private layoutController: LayoutController; + constructor(options: IGridViewOptions = {}) { this.element = $('.monaco-grid-view'); this.styles = options.styles || defaultStyles; this.proportionalLayout = typeof options.proportionalLayout !== 'undefined' ? !!options.proportionalLayout : true; this.root = new BranchNode(Orientation.VERTICAL, this.styles, this.proportionalLayout); + this.layoutController = options.layoutController || new LayoutController(true); } style(styles: IGridViewStyles): void { @@ -670,7 +689,7 @@ export class GridView implements IDisposable { const [pathToParent, parent] = this.getNode(rest); if (parent instanceof BranchNode) { - const node = new LeafNode(view, orthogonal(parent.orientation), parent.orthogonalSize); + const node = new LeafNode(view, orthogonal(parent.orientation), this.layoutController, parent.orthogonalSize); parent.addChild(node, size, index); } else { @@ -690,14 +709,14 @@ export class GridView implements IDisposable { grandParent.addChild(newParent, parent.size, parentIndex); newParent.orthogonalLayout(parent.orthogonalSize); - const newSibling = new LeafNode(parent.view, grandParent.orientation, parent.size); + const newSibling = new LeafNode(parent.view, grandParent.orientation, this.layoutController, parent.size); newParent.addChild(newSibling, newSiblingSize, 0); if (typeof size !== 'number' && size.type === 'split') { size = Sizing.Split(0); } - const node = new LeafNode(view, grandParent.orientation, parent.size); + const node = new LeafNode(view, grandParent.orientation, this.layoutController, parent.size); newParent.addChild(node, size, index); } } @@ -759,7 +778,7 @@ export class GridView implements IDisposable { grandParent.addChild(child, child.size, parentIndex + i); } } else { - const newSibling = new LeafNode(sibling.view, orthogonal(sibling.orientation), sibling.size); + const newSibling = new LeafNode(sibling.view, orthogonal(sibling.orientation), this.layoutController, sibling.size); grandParent.addChild(newSibling, sibling.orthogonalSize, parentIndex); } From d0a5544ac2a6d047f425b779106e49b6ad7bd16b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 29 Jul 2019 12:23:03 +0200 Subject: [PATCH 708/710] workbench: remove "corruption" detection, fix position detection --- src/vs/workbench/browser/layout.ts | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index d334b0cef87..cfbafeba3f6 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -27,7 +27,7 @@ import { IWindowService, MenuBarVisibility, getTitleBarStyle } from 'vs/platform import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; -import { Sizing, Direction, Grid, SerializableGrid, ISerializableView, ISerializedGrid } from 'vs/base/browser/ui/grid/grid'; +import { Sizing, Direction, Grid, SerializableGrid, ISerializableView, ISerializedGrid, GridBranchNode, GridLeafNode, isGridBranchNode } from 'vs/base/browser/ui/grid/grid'; import { WorkbenchLegacyLayout } from 'vs/workbench/browser/legacyLayout'; import { IDimension } from 'vs/platform/layout/browser/layoutService'; import { Part } from 'vs/workbench/browser/part'; @@ -749,26 +749,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi try { workbenchGrid = SerializableGrid.deserialize(parsedGrid, { fromJSON }, { proportionalLayout: false }); - // Set some layout state - this.state.sideBar.position = Position.LEFT; - for (let view of workbenchGrid.getNeighborViews(this.sideBarPartView, Direction.Right)) { - if (view === this.activityBarPartView) { - this.state.sideBar.position = Position.RIGHT; - } - } - - this.state.panel.position = Position.BOTTOM; - for (let view of workbenchGrid.getNeighborViews(this.panelPartView, Direction.Left)) { - if (view === this.editorPartView) { - this.state.panel.position = Position.RIGHT; - } - } - - // Reset workbench state if corrupted - if (workbenchGrid.getNeighborViews(this.titleBarPartView, Direction.Right).length > 0 || - workbenchGrid.getNeighborViews(this.titleBarPartView, Direction.Left).length > 0) { - workbenchGrid = undefined; - } + const root = workbenchGrid.getViews(); + const middleSection = root.children[1] as GridBranchNode; + this.state.sideBar.position = (middleSection.children[0] as GridLeafNode).view === this.activityBarPartView ? Position.LEFT : Position.RIGHT; + this.state.panel.position = isGridBranchNode(middleSection.children[2]) ? Position.BOTTOM : Position.RIGHT; } catch (err) { console.error(err); } From 98fa77a679fbd1095d05c0fcb381d6e9b775d743 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 29 Jul 2019 13:06:03 +0200 Subject: [PATCH 709/710] Remove multiline comment auto closing pair for C++ Part of #77008 --- extensions/cpp/language-configuration.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/cpp/language-configuration.json b/extensions/cpp/language-configuration.json index fcf971bc11f..d430c4d1518 100644 --- a/extensions/cpp/language-configuration.json +++ b/extensions/cpp/language-configuration.json @@ -13,8 +13,7 @@ { "open": "{", "close": "}" }, { "open": "(", "close": ")" }, { "open": "'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "\"", "close": "\"", "notIn": ["string"] }, - { "open": "/**", "close": " */", "notIn": ["string", "comment"] } + { "open": "\"", "close": "\"", "notIn": ["string"] } ], "surroundingPairs": [ ["{", "}"], @@ -30,4 +29,4 @@ "end": "^\\s*#pragma\\s+endregion\\b" } } -} \ No newline at end of file +} From aba0aba9e7d68a6077a179c744b7f4ebaaf033af Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 Jul 2019 16:47:38 +0530 Subject: [PATCH 710/710] Fix #77882 --- .../workbench/contrib/markers/browser/markersPanelActions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/markers/browser/markersPanelActions.ts b/src/vs/workbench/contrib/markers/browser/markersPanelActions.ts index 92fd3b3c925..f2747c02b15 100644 --- a/src/vs/workbench/contrib/markers/browser/markersPanelActions.ts +++ b/src/vs/workbench/contrib/markers/browser/markersPanelActions.ts @@ -159,6 +159,7 @@ export class MarkersFilterActionViewItem extends BaseActionViewItem { toggleLayout(small: boolean) { if (this.container) { DOM.toggleClass(this.container, 'small', small); + this.adjustInputBox(); } } @@ -247,7 +248,7 @@ export class MarkersFilterActionViewItem extends BaseActionViewItem { } private adjustInputBox(): void { - this.filterInputBox.inputElement.style.paddingRight = (DOM.getTotalWidth(this.controlsContainer) || 20) + 'px'; + this.filterInputBox.inputElement.style.paddingRight = DOM.hasClass(this.container, 'small') || DOM.hasClass(this.filterBadge, 'hidden') ? '25px' : '150px'; } // Action toolbar is swallowing some keys for action items which should not be for an input box