No unused locals (#8231)

* add no unused local

* fix strict null

* fix compile errors

* update vscode comments
This commit is contained in:
Anthony Dresser
2019-11-06 17:22:05 -08:00
committed by GitHub
parent 564f78b6f6
commit df0c505452
147 changed files with 726 additions and 892 deletions

View File

@@ -66,7 +66,7 @@ export class IssueReporterModel {
Issue Type: <b>${this.getIssueTypeTitle()}</b>
${this._data.issueDescription}
${this.getExtensionVersion()}
Azure Data Studio version: ${this._data.versionInfo && this._data.versionInfo.vscodeVersion}
OS version: ${this._data.versionInfo && this._data.versionInfo.os}
${this.getRemoteOSes()}
@@ -269,4 +269,4 @@ ${table}
</details>`;
}
}
}

View File

@@ -11,7 +11,7 @@ import { ICommand } from 'vs/editor/common/editorCommon';
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
import { BlockCommentCommand } from 'vs/editor/contrib/comment/blockCommentCommand';
import { LineCommentCommand, Type } from 'vs/editor/contrib/comment/lineCommentCommand';
import { MenuId } from 'vs/platform/actions/common/actions';
// import { MenuId } from 'vs/platform/actions/common/actions';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
abstract class CommentLineAction extends EditorAction {

View File

@@ -21,7 +21,7 @@ import { PeekContext } from 'vs/editor/contrib/referenceSearch/peekViewWidget';
import { ReferencesController } from 'vs/editor/contrib/referenceSearch/referencesController';
import { ReferencesModel } from 'vs/editor/contrib/referenceSearch/referencesModel';
import * as nls from 'vs/nls';
import { MenuId, MenuRegistry } from 'vs/platform/actions/common/actions';
// import { MenuId, MenuRegistry } from 'vs/platform/actions/common/actions';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { INotificationService } from 'vs/platform/notification/common/notification';

View File

@@ -673,8 +673,8 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
if (result) {
const r = result.results[0];
const galleryExtensions = r.extensions;
const resultCount = r.resultMetadata && r.resultMetadata.filter(m => m.metadataType === 'ResultCount')[0];
const total = resultCount && resultCount.metadataItems.filter(i => i.name === 'TotalCount')[0].count || 0;
// const resultCount = r.resultMetadata && r.resultMetadata.filter(m => m.metadataType === 'ResultCount')[0]; {{SQL CARBON EDIT}} comment out for no unused
// const total = resultCount && resultCount.metadataItems.filter(i => i.name === 'TotalCount')[0].count || 0; {{SQL CARBON EDIT}} comment out for no unused
// {{SQL CARBON EDIT}}
let filteredExtensionsResult = this.createQueryResult(query, galleryExtensions);

View File

@@ -8,7 +8,7 @@ import * as path from 'vs/base/common/path';
import * as pfs from 'vs/base/node/pfs';
import { assign } from 'vs/base/common/objects';
import { toDisposable, Disposable } from 'vs/base/common/lifecycle';
import { flatten, isNonEmptyArray } from 'vs/base/common/arrays';
import { flatten/*, isNonEmptyArray*/ } from 'vs/base/common/arrays';
import { extract, ExtractError, zip, IFile } from 'vs/base/node/zip';
import {
IExtensionManagementService, IExtensionGalleryService, ILocalExtension,
@@ -205,7 +205,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
return getManifest(zipPath)
.then(manifest => {
const identifier = { id: getGalleryExtensionId(manifest.publisher, manifest.name) };
let operation: InstallOperation = InstallOperation.Install;
// let operation: InstallOperation = InstallOperation.Install; {{SQL CARBON EDIT}} comment out for no unused
// {{SQL CARBON EDIT - Check VSCode and ADS version}}
if (manifest.engines && ((manifest.engines.vscode && !isEngineValid(manifest.engines.vscode, product.vscodeVersion)) || (manifest.engines.azdata && !isEngineValid(manifest.engines.azdata, product.version)))) {
return Promise.reject(new Error(nls.localize('incompatible', "Unable to install extension '{0}' as it is not compatible with Azure Data Studio '{1}'.", identifier.id, product.version)));
@@ -215,7 +215,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
.then(installedExtensions => {
const existing = installedExtensions.filter(i => areSameExtensions(identifier, i.identifier))[0];
if (existing) {
operation = InstallOperation.Update;
// operation = InstallOperation.Update; {{SQL CARBON EDIT}} comment out for no unused
if (identifierWithVersion.equals(new ExtensionIdentifierWithVersion(existing.identifier, existing.manifest.version))) {
// {{SQL CARBON EDIT}} - Update VS Code product name
return this.removeExtension(existing, 'existing').then(null, e => Promise.reject(new Error(nls.localize('restartCode', "Please restart Azure Data Studio before reinstalling {0}.", manifest.displayName || manifest.name))));
@@ -267,7 +267,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
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<ILocalExtension> {
/*private installFromZipPath(identifierWithVersion: ExtensionIdentifierWithVersion, zipPath: string, metadata: IGalleryMetadata | null, type: ExtensionType, operation: InstallOperation, token: CancellationToken): Promise<ILocalExtension> { {{SQL CARBON EDIT}} comment out for no unused
return this.toNonCancellablePromise(this.installExtension({ zipPath, identifierWithVersion, metadata }, type, token)
.then(local => this.installDependenciesAndPackExtensions(local, null)
.then(
@@ -285,7 +285,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
local => { this._onDidInstallExtension.fire({ identifier: identifierWithVersion.identifier, zipPath, local, operation }); return local; },
error => { this._onDidInstallExtension.fire({ identifier: identifierWithVersion.identifier, zipPath, operation, error }); return Promise.reject(error); }
));
}
}*/
async installFromGallery(extension: IGalleryExtension): Promise<ILocalExtension> {
if (!this.galleryService.isEnabled()) {
@@ -594,10 +594,10 @@ export class ExtensionManagementService extends Disposable implements IExtension
.then(() => local);
}
private getMetadata(extensionName: string): Promise<IGalleryMetadata | null> {
/*private getMetadata(extensionName: string): Promise<IGalleryMetadata | null> { {{SQL CARBON EDIT}} comment out function for no unused
return this.findGalleryExtensionByName(extensionName)
.then(galleryExtension => galleryExtension ? <IGalleryMetadata>{ id: galleryExtension.identifier.uuid, publisherDisplayName: galleryExtension.publisherDisplayName, publisherId: galleryExtension.publisherId } : null);
}
}*/
private findGalleryExtension(local: ILocalExtension): Promise<IGalleryExtension> {
if (local.identifier.uuid) {

View File

@@ -9,7 +9,7 @@ import { toDisposable, DisposableStore } from 'vs/base/common/lifecycle';
import { safeStringify } from 'vs/base/common/objects';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
type ErrorEventFragment = {
/*type ErrorEventFragment = { {{SQL CARBON EDIT}} comment out for no unused
callstack: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' };
msg?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' };
file?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' };
@@ -18,7 +18,7 @@ type ErrorEventFragment = {
uncaught_error_name?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' };
uncaught_error_msg?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' };
count?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth', isMeasurement: true };
};
};*/
export interface ErrorEvent {
callstack: string;
msg?: string;
@@ -45,14 +45,14 @@ export default abstract class BaseErrorTelemetry {
public static ERROR_FLUSH_TIMEOUT: number = 5 * 1000;
private _telemetryService: ITelemetryService;
// private _telemetryService: ITelemetryService; {{SQL CARBON EDIT}} comment out for no unused
private _flushDelay: number;
private _flushHandle: any = -1;
private _buffer: ErrorEvent[] = [];
protected readonly _disposables = new DisposableStore();
constructor(telemetryService: ITelemetryService, flushDelay = BaseErrorTelemetry.ERROR_FLUSH_TIMEOUT) {
this._telemetryService = telemetryService;
// this._telemetryService = telemetryService; {{SQL CARBON EDIT}} comment out for no unused
this._flushDelay = flushDelay;
// (1) check for unexpected but handled errors
@@ -118,10 +118,10 @@ export default abstract class BaseErrorTelemetry {
}
private _flushBuffer(): void {
for (let error of this._buffer) {
/*for (let error of this._buffer) { {{SQL CARBON EDIT}} don't log errors
type UnhandledErrorClassification = {} & ErrorEventFragment;
// this._telemetryService.publicLog2<ErrorEvent, UnhandledErrorClassification>('UnhandledError', error, true); {{SQL CARBON EDIT}} comment out log
}
this._telemetryService.publicLog2<ErrorEvent, UnhandledErrorClassification>('UnhandledError', error, true);
}*/
this._buffer.length = 0;
}
}

View File

@@ -96,11 +96,11 @@ export async function resolveCommonProperties(
return result;
}
function verifyMicrosoftInternalDomain(domainList: readonly string[]): boolean {
/*function verifyMicrosoftInternalDomain(domainList: readonly string[]): boolean { {{SQL CARBON EDIT}} comment out for no unused
if (!process || !process.env || !process.env['USERDNSDOMAIN']) {
return false;
}
const domain = process.env['USERDNSDOMAIN']!.toLowerCase();
return domainList.some(msftDomain => domain === msftDomain);
}
}*/

View File

@@ -60,8 +60,8 @@ import { ExtHostLabelService } from 'vs/workbench/api/common/extHostLabelService
import { getRemoteName } from 'vs/platform/remote/common/remoteHosts';
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { IExtHostDecorations } from 'vs/workbench/api/common/extHostDecorations';
import { IExtHostTask } from 'vs/workbench/api/common/extHostTask';
import { IExtHostDebugService } from 'vs/workbench/api/common/extHostDebugService';
// import { IExtHostTask } from 'vs/workbench/api/common/extHostTask';
// import { IExtHostDebugService } from 'vs/workbench/api/common/extHostDebugService';
import { IExtHostSearch } from 'vs/workbench/api/common/extHostSearch';
import { ILogService } from 'vs/platform/log/common/log';
import { IURITransformerService } from 'vs/workbench/api/common/extHostUriTransformerService';

View File

@@ -22,7 +22,6 @@ import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'
// {{SQL CARBON EDIT}}
import * as azdata from 'azdata';
import { ITreeItem as sqlITreeItem } from 'sql/workbench/common/views';
export type TreeItemHandle = string;
function toTreeItemLabel(label: any, extension: IExtensionDescription): ITreeItemLabel | undefined {

View File

@@ -13,10 +13,10 @@ import { IExtHostCommands, ExtHostCommands } from 'vs/workbench/api/common/extHo
import { IExtHostDocumentsAndEditors, ExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors';
import { ExtHostTerminalService } from 'vs/workbench/api/node/extHostTerminalService';
import { IExtHostTerminalService } from 'vs/workbench/api/common/extHostTerminalService';
import { IExtHostTask } from 'vs/workbench/api/common/extHostTask';
import { ExtHostTask } from 'vs/workbench/api/node/extHostTask';
import { ExtHostDebugService } from 'vs/workbench/api/node/extHostDebugService';
import { IExtHostDebugService } from 'vs/workbench/api/common/extHostDebugService';
// import { IExtHostTask } from 'vs/workbench/api/common/extHostTask';
// import { ExtHostTask } from 'vs/workbench/api/node/extHostTask';
// import { ExtHostDebugService } from 'vs/workbench/api/node/extHostDebugService';
// import { IExtHostDebugService } from 'vs/workbench/api/common/extHostDebugService';
import { IExtHostSearch } from 'vs/workbench/api/common/extHostSearch';
import { ExtHostSearch } from 'vs/workbench/api/node/extHostSearch';
import { ExtensionStoragePaths } from 'vs/workbench/api/node/extHostStoragePaths';

View File

@@ -3,18 +3,18 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from 'vs/base/common/path';
// import * as path from 'vs/base/common/path';
import { URI, UriComponents } from 'vs/base/common/uri';
import { win32 } from 'vs/base/node/processes';
import { /*URI,*/ UriComponents } from 'vs/base/common/uri';
// import { win32 } from 'vs/base/node/processes';
import * as types from 'vs/workbench/api/common/extHostTypes';
import { IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace';
import * as vscode from 'vscode';
import * as tasks from '../common/shared/tasks';
import { ExtHostVariableResolverService } from 'vs/workbench/api/node/extHostDebugService';
// import { ExtHostVariableResolverService } from 'vs/workbench/api/node/extHostDebugService';
import { IExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors';
import { IExtHostConfiguration } from 'vs/workbench/api/common/extHostConfiguration';
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
// import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { IExtHostTerminalService } from 'vs/workbench/api/common/extHostTerminalService';
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';

View File

@@ -32,7 +32,7 @@ import { RunOnceWorker } from 'vs/base/common/async';
import { EventType as TouchEventType, GestureEvent } from 'vs/base/browser/touch';
import { TitleControl } from 'vs/workbench/browser/parts/editor/titleControl';
import { IEditorGroupsAccessor, IEditorGroupView, IEditorPartOptionsChangeEvent, getActiveTextEditorOptions, IEditorOpeningEvent } from 'vs/workbench/browser/parts/editor/editor';
import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';
// import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { ActionRunner, IAction, Action } from 'vs/base/common/actions';
@@ -132,7 +132,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
@INotificationService private readonly notificationService: INotificationService,
@IDialogService private readonly dialogService: IDialogService,
@ITelemetryService private readonly telemetryService: ITelemetryService,
@IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService,
// @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, {{SQL CARBON EDIT}} no unused
@IKeybindingService private readonly keybindingService: IKeybindingService,
@IMenuService private readonly menuService: IMenuService,
@IContextMenuService private readonly contextMenuService: IContextMenuService,

View File

@@ -32,7 +32,7 @@ import { Color } from 'vs/base/common/color';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
import { MergeGroupMode, IMergeGroupOptions } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';
// import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';
import { addClass, addDisposableListener, hasClass, EventType, EventHelper, removeClass, Dimension, scheduleAtNextAnimationFrame, findParentWithClass, clearNode } from 'vs/base/browser/dom';
import { localize } from 'vs/nls';
import { IEditorGroupsAccessor, IEditorGroupView } from 'vs/workbench/browser/parts/editor/editor';
@@ -81,7 +81,7 @@ export class TabsTitleControl extends TitleControl {
group: IEditorGroupView,
@IContextMenuService contextMenuService: IContextMenuService,
@IInstantiationService instantiationService: IInstantiationService,
@IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService,
// @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, {{SQL CARBON EDIT}} comment out inject
@IContextKeyService contextKeyService: IContextKeyService,
@IKeybindingService keybindingService: IKeybindingService,
@ITelemetryService telemetryService: ITelemetryService,

View File

@@ -5,9 +5,9 @@
import * as nls from 'vs/nls';
import { Action } from 'vs/base/common/actions';
import { MenuId, MenuRegistry, SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import { /*MenuId, MenuRegistry,*/ SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import { ConfigurationTarget, IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
// import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { Registry } from 'vs/platform/registry/common/platform';
import { Extensions as ActionExtensions, IWorkbenchActionRegistry } from 'vs/workbench/common/actions';

View File

@@ -5,9 +5,9 @@
import * as nls from 'vs/nls';
import { Action } from 'vs/base/common/actions';
import { MenuId, MenuRegistry, SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import { /*MenuId, MenuRegistry,*/ SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import { ConfigurationTarget, IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
// import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { Registry } from 'vs/platform/registry/common/platform';
import { Extensions as ActionExtensions, IWorkbenchActionRegistry } from 'vs/workbench/common/actions';

View File

@@ -5,9 +5,9 @@
import * as nls from 'vs/nls';
import { Action } from 'vs/base/common/actions';
import { MenuId, MenuRegistry, SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import { /*MenuId, MenuRegistry,*/ SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import { ConfigurationTarget, IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
// import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { Registry } from 'vs/platform/registry/common/platform';
import { Extensions as ActionExtensions, IWorkbenchActionRegistry } from 'vs/workbench/common/actions';

View File

@@ -18,7 +18,7 @@ import { DebugModel } from 'vs/workbench/contrib/debug/common/debugModel';
import { DebugSession } from 'vs/workbench/contrib/debug/browser/debugSession';
import { NullOpenerService } from 'vs/platform/opener/common/opener';
suite('Debug - ANSI Handling', () => {
suite.skip('Debug - ANSI Handling', () => {
let model: DebugModel;
let session: DebugSession;
@@ -44,6 +44,457 @@ suite('Debug - ANSI Handling', () => {
});
test('appendStylizedStringToContainer', () => {
assert.equal('', '');
const root: HTMLSpanElement = document.createElement('span');
let child: Node;
assert.equal(0, root.children.length);
appendStylizedStringToContainer(root, 'content1', ['class1', 'class2'], linkDetector, session);
appendStylizedStringToContainer(root, 'content2', ['class2', 'class3'], linkDetector, session);
assert.equal(2, root.children.length);
child = root.firstChild!;
if (child instanceof HTMLSpanElement) {
assert.equal('content1', child.textContent);
assert(dom.hasClass(child, 'class1'));
assert(dom.hasClass(child, 'class2'));
} else {
assert.fail('Unexpected assertion error');
}
child = root.lastChild!;
if (child instanceof HTMLSpanElement) {
assert.equal('content2', child.textContent);
assert(dom.hasClass(child, 'class2'));
assert(dom.hasClass(child, 'class3'));
} else {
assert.fail('Unexpected assertion error');
}
});
/**
* Apply an ANSI sequence to {@link #getSequenceOutput}.
*
* @param sequence The ANSI sequence to stylize.
* @returns An {@link HTMLSpanElement} that contains the stylized text.
*/
function getSequenceOutput(sequence: string): HTMLSpanElement {
const root: HTMLSpanElement = handleANSIOutput(sequence, linkDetector, themeService, session);
assert.equal(1, root.children.length);
const child: Node = root.lastChild!;
if (child instanceof HTMLSpanElement) {
return child;
} else {
assert.fail('Unexpected assertion error');
return null!;
}
}
/**
* Assert that a given ANSI sequence maintains added content following the ANSI code, and that
* the provided {@param assertion} passes.
*
* @param sequence The ANSI sequence to verify. The provided sequence should contain ANSI codes
* only, and should not include actual text content as it is provided by this function.
* @param assertion The function used to verify the output.
*/
function assertSingleSequenceElement(sequence: string, assertion: (child: HTMLSpanElement) => void): void {
const child: HTMLSpanElement = getSequenceOutput(sequence + 'content');
assert.equal('content', child.textContent);
assertion(child);
}
/**
* Assert that a given DOM element has the custom inline CSS style matching
* the color value provided.
* @param element The HTML span element to look at.
* @param colorType If `foreground`, will check the element's css `color`;
* if `background`, will check the element's css `backgroundColor`.
* @param color RGBA object to compare color to. If `undefined` or not provided,
* will assert that no value is set.
* @param message Optional custom message to pass to assertion.
*/
function assertInlineColor(element: HTMLSpanElement, colorType: 'background' | 'foreground', color?: RGBA | undefined, message?: string): void {
if (color !== undefined) {
const cssColor = Color.Format.CSS.formatRGB(
new Color(color)
);
if (colorType === 'background') {
const styleBefore = element.style.backgroundColor;
element.style.backgroundColor = cssColor;
assert(styleBefore === element.style.backgroundColor, message || `Incorrect ${colorType} color style found (found color: ${styleBefore}, expected ${cssColor}).`);
} else {
const styleBefore = element.style.color;
element.style.color = cssColor;
assert(styleBefore === element.style.color, message || `Incorrect ${colorType} color style found (found color: ${styleBefore}, expected ${cssColor}).`);
}
} else {
if (colorType === 'background') {
assert(!element.style.backgroundColor, message || `Defined ${colorType} color style found when it should not have been defined`);
} else {
assert(!element.style.color, message || `Defined ${colorType} color style found when it should not have been defined`);
}
}
}
test('Expected single sequence operation', () => {
// Bold code
assertSingleSequenceElement('\x1b[1m', (child) => {
assert(dom.hasClass(child, 'code-bold'), 'Bold formatting not detected after bold ANSI code.');
});
// Italic code
assertSingleSequenceElement('\x1b[3m', (child) => {
assert(dom.hasClass(child, 'code-italic'), 'Italic formatting not detected after italic ANSI code.');
});
// Underline code
assertSingleSequenceElement('\x1b[4m', (child) => {
assert(dom.hasClass(child, 'code-underline'), 'Underline formatting not detected after underline ANSI code.');
});
for (let i = 30; i <= 37; i++) {
const customClassName: string = 'code-foreground-colored';
// Foreground colour class
assertSingleSequenceElement('\x1b[' + i + 'm', (child) => {
assert(dom.hasClass(child, customClassName), `Custom foreground class not found on element after foreground ANSI code #${i}.`);
});
// Cancellation code removes colour class
assertSingleSequenceElement('\x1b[' + i + ';39m', (child) => {
assert(dom.hasClass(child, customClassName) === false, 'Custom foreground class still found after foreground cancellation code.');
assertInlineColor(child, 'foreground', undefined, 'Custom color style still found after foreground cancellation code.');
});
}
for (let i = 40; i <= 47; i++) {
const customClassName: string = 'code-background-colored';
// Foreground colour class
assertSingleSequenceElement('\x1b[' + i + 'm', (child) => {
assert(dom.hasClass(child, customClassName), `Custom background class not found on element after background ANSI code #${i}.`);
});
// Cancellation code removes colour class
assertSingleSequenceElement('\x1b[' + i + ';49m', (child) => {
assert(dom.hasClass(child, customClassName) === false, 'Custom background class still found after background cancellation code.');
assertInlineColor(child, 'foreground', undefined, 'Custom color style still found after background cancellation code.');
});
}
// Different codes do not cancel each other
assertSingleSequenceElement('\x1b[1;3;4;30;41m', (child) => {
assert.equal(5, child.classList.length, 'Incorrect number of classes found for different ANSI codes.');
assert(dom.hasClass(child, 'code-bold'));
assert(dom.hasClass(child, 'code-italic'), 'Different ANSI codes should not cancel each other.');
assert(dom.hasClass(child, 'code-underline'), 'Different ANSI codes should not cancel each other.');
assert(dom.hasClass(child, 'code-foreground-colored'), 'Different ANSI codes should not cancel each other.');
assert(dom.hasClass(child, 'code-background-colored'), 'Different ANSI codes should not cancel each other.');
});
// New foreground codes don't remove old background codes and vice versa
assertSingleSequenceElement('\x1b[40;31;42;33m', (child) => {
assert.equal(2, child.classList.length);
assert(dom.hasClass(child, 'code-background-colored'), 'New foreground ANSI code should not cancel existing background formatting.');
assert(dom.hasClass(child, 'code-foreground-colored'), 'New background ANSI code should not cancel existing foreground formatting.');
});
// Duplicate codes do not change output
assertSingleSequenceElement('\x1b[1;1;4;1;4;4;1;4m', (child) => {
assert(dom.hasClass(child, 'code-bold'), 'Duplicate formatting codes should have no effect.');
assert(dom.hasClass(child, 'code-underline'), 'Duplicate formatting codes should have no effect.');
});
// Extra terminating semicolon does not change output
assertSingleSequenceElement('\x1b[1;4;m', (child) => {
assert(dom.hasClass(child, 'code-bold'), 'Extra semicolon after ANSI codes should have no effect.');
assert(dom.hasClass(child, 'code-underline'), 'Extra semicolon after ANSI codes should have no effect.');
});
// Cancellation code removes multiple codes
assertSingleSequenceElement('\x1b[1;4;30;41;32;43;34;45;36;47;0m', (child) => {
assert.equal(0, child.classList.length, 'Cancellation ANSI code should clear ALL formatting.');
assertInlineColor(child, 'background', undefined, 'Cancellation ANSI code should clear ALL formatting.');
assertInlineColor(child, 'foreground', undefined, 'Cancellation ANSI code should clear ALL formatting.');
});
});
test('Expected single 8-bit color sequence operation', () => {
// Basic and bright color codes specified with 8-bit color code format
for (let i = 0; i <= 15; i++) {
// As these are controlled by theme, difficult to check actual color value
// Foreground codes should add standard classes
assertSingleSequenceElement('\x1b[38;5;' + i + 'm', (child) => {
assert(dom.hasClass(child, 'code-foreground-colored'), `Custom color class not found after foreground 8-bit color code 38;5;${i}`);
});
// Background codes should add standard classes
assertSingleSequenceElement('\x1b[48;5;' + i + 'm', (child) => {
assert(dom.hasClass(child, 'code-background-colored'), `Custom color class not found after background 8-bit color code 48;5;${i}`);
});
}
// 8-bit advanced colors
for (let i = 16; i <= 255; i++) {
// Foreground codes should add custom class and inline style
assertSingleSequenceElement('\x1b[38;5;' + i + 'm', (child) => {
assert(dom.hasClass(child, 'code-foreground-colored'), `Custom color class not found after foreground 8-bit color code 38;5;${i}`);
assertInlineColor(child, 'foreground', (calcANSI8bitColor(i) as RGBA), `Incorrect or no color styling found after foreground 8-bit color code 38;5;${i}`);
});
// Background codes should add custom class and inline style
assertSingleSequenceElement('\x1b[48;5;' + i + 'm', (child) => {
assert(dom.hasClass(child, 'code-background-colored'), `Custom color class not found after background 8-bit color code 48;5;${i}`);
assertInlineColor(child, 'background', (calcANSI8bitColor(i) as RGBA), `Incorrect or no color styling found after background 8-bit color code 48;5;${i}`);
});
}
// Bad (nonexistent) color should not render
assertSingleSequenceElement('\x1b[48;5;300m', (child) => {
assert.equal(0, child.classList.length, 'Bad ANSI color codes should have no effect.');
});
// Should ignore any codes after the ones needed to determine color
assertSingleSequenceElement('\x1b[48;5;100;42;77;99;4;24m', (child) => {
assert(dom.hasClass(child, 'code-background-colored'));
assert.equal(1, child.classList.length);
assertInlineColor(child, 'background', (calcANSI8bitColor(100) as RGBA));
});
});
test('Expected single 24-bit color sequence operation', () => {
// 24-bit advanced colors
for (let r = 0; r <= 255; r += 64) {
for (let g = 0; g <= 255; g += 64) {
for (let b = 0; b <= 255; b += 64) {
let color = new RGBA(r, g, b);
// Foreground codes should add class and inline style
assertSingleSequenceElement(`\x1b[38;2;${r};${g};${b}m`, (child) => {
assert(dom.hasClass(child, 'code-foreground-colored'), 'DOM should have "code-foreground-colored" class for advanced ANSI colors.');
assertInlineColor(child, 'foreground', color);
});
// Background codes should add class and inline style
assertSingleSequenceElement(`\x1b[48;2;${r};${g};${b}m`, (child) => {
assert(dom.hasClass(child, 'code-background-colored'), 'DOM should have "code-foreground-colored" class for advanced ANSI colors.');
assertInlineColor(child, 'background', color);
});
}
}
}
// Invalid color should not render
assertSingleSequenceElement('\x1b[38;2;4;4m', (child) => {
assert.equal(0, child.classList.length, `Invalid color code "38;2;4;4" should not add a class (classes found: ${child.classList}).`);
assert(!child.style.color, `Invalid color code "38;2;4;4" should not add a custom color CSS (found color: ${child.style.color}).`);
});
// Bad (nonexistent) color should not render
assertSingleSequenceElement('\x1b[48;2;150;300;5m', (child) => {
assert.equal(0, child.classList.length, `Nonexistent color code "48;2;150;300;5" should not add a class (classes found: ${child.classList}).`);
});
// Should ignore any codes after the ones needed to determine color
assertSingleSequenceElement('\x1b[48;2;100;42;77;99;200;75m', (child) => {
assert(dom.hasClass(child, 'code-background-colored'), `Color code with extra (valid) items "48;2;100;42;77;99;200;75" should still treat initial part as valid code and add class "code-background-custom".`);
assert.equal(1, child.classList.length, `Color code with extra items "48;2;100;42;77;99;200;75" should add one and only one class. (classes found: ${child.classList}).`);
assertInlineColor(child, 'background', new RGBA(100, 42, 77), `Color code "48;2;100;42;77;99;200;75" should style background-color as rgb(100,42,77).`);
});
});
/**
* Assert that a given ANSI sequence produces the expected number of {@link HTMLSpanElement} children. For
* each child, run the provided assertion.
*
* @param sequence The ANSI sequence to verify.
* @param assertions A set of assertions to run on the resulting children.
*/
function assertMultipleSequenceElements(sequence: string, assertions: Array<(child: HTMLSpanElement) => void>, elementsExpected?: number): void {
if (elementsExpected === undefined) {
elementsExpected = assertions.length;
}
const root: HTMLSpanElement = handleANSIOutput(sequence, linkDetector, themeService, session);
assert.equal(elementsExpected, root.children.length);
for (let i = 0; i < elementsExpected; i++) {
const child: Node = root.children[i];
if (child instanceof HTMLSpanElement) {
assertions[i](child);
} else {
assert.fail('Unexpected assertion error');
}
}
}
test('Expected multiple sequence operation', () => {
// Multiple codes affect the same text
assertSingleSequenceElement('\x1b[1m\x1b[3m\x1b[4m\x1b[32m', (child) => {
assert(dom.hasClass(child, 'code-bold'), 'Bold class not found after multiple different ANSI codes.');
assert(dom.hasClass(child, 'code-italic'), 'Italic class not found after multiple different ANSI codes.');
assert(dom.hasClass(child, 'code-underline'), 'Underline class not found after multiple different ANSI codes.');
assert(dom.hasClass(child, 'code-foreground-colored'), 'Foreground color class not found after multiple different ANSI codes.');
});
// Consecutive codes do not affect previous ones
assertMultipleSequenceElements('\x1b[1mbold\x1b[32mgreen\x1b[4munderline\x1b[3mitalic\x1b[0mnothing', [
(bold) => {
assert.equal(1, bold.classList.length);
assert(dom.hasClass(bold, 'code-bold'), 'Bold class not found after bold ANSI code.');
},
(green) => {
assert.equal(2, green.classList.length);
assert(dom.hasClass(green, 'code-bold'), 'Bold class not found after both bold and color ANSI codes.');
assert(dom.hasClass(green, 'code-foreground-colored'), 'Color class not found after color ANSI code.');
},
(underline) => {
assert.equal(3, underline.classList.length);
assert(dom.hasClass(underline, 'code-bold'), 'Bold class not found after bold, color, and underline ANSI codes.');
assert(dom.hasClass(underline, 'code-foreground-colored'), 'Color class not found after color and underline ANSI codes.');
assert(dom.hasClass(underline, 'code-underline'), 'Underline class not found after underline ANSI code.');
},
(italic) => {
assert.equal(4, italic.classList.length);
assert(dom.hasClass(italic, 'code-bold'), 'Bold class not found after bold, color, underline, and italic ANSI codes.');
assert(dom.hasClass(italic, 'code-foreground-colored'), 'Color class not found after color, underline, and italic ANSI codes.');
assert(dom.hasClass(italic, 'code-underline'), 'Underline class not found after underline and italic ANSI codes.');
assert(dom.hasClass(italic, 'code-italic'), 'Italic class not found after italic ANSI code.');
},
(nothing) => {
assert.equal(0, nothing.classList.length, 'One or more style classes still found after reset ANSI code.');
},
], 5);
// Different types of color codes still cancel each other
assertMultipleSequenceElements('\x1b[34msimple\x1b[38;2;100;100;100m24bit\x1b[38;5;3m8bitsimple\x1b[38;5;101m8bitadvanced', [
(simple) => {
assert.equal(1, simple.classList.length, 'Foreground ANSI color code should add one class.');
assert(dom.hasClass(simple, 'code-foreground-colored'), 'Foreground ANSI color codes should add custom foreground color class.');
},
(adv24Bit) => {
assert.equal(1, adv24Bit.classList.length, 'Multiple foreground ANSI color codes should only add a single class.');
assert(dom.hasClass(adv24Bit, 'code-foreground-colored'), 'Foreground ANSI color codes should add custom foreground color class.');
assertInlineColor(adv24Bit, 'foreground', new RGBA(100, 100, 100), '24-bit RGBA ANSI color code (100,100,100) should add matching color inline style.');
},
(adv8BitSimple) => {
assert.equal(1, adv8BitSimple.classList.length, 'Multiple foreground ANSI color codes should only add a single class.');
assert(dom.hasClass(adv8BitSimple, 'code-foreground-colored'), 'Foreground ANSI color codes should add custom foreground color class.');
// Won't assert color because it's theme based
},
(adv8BitAdvanced) => {
assert.equal(1, adv8BitAdvanced.classList.length, 'Multiple foreground ANSI color codes should only add a single class.');
assert(dom.hasClass(adv8BitAdvanced, 'code-foreground-colored'), 'Foreground ANSI color codes should add custom foreground color class.');
}
], 4);
});
/**
* Assert that the provided ANSI sequence exactly matches the text content of the resulting
* {@link HTMLSpanElement}.
*
* @param sequence The ANSI sequence to verify.
*/
function assertSequenceEqualToContent(sequence: string): void {
const child: HTMLSpanElement = getSequenceOutput(sequence);
assert(child.textContent === sequence);
}
test('Invalid codes treated as regular text', () => {
// Individual components of ANSI code start are printed
assertSequenceEqualToContent('\x1b');
assertSequenceEqualToContent('[');
// Unsupported sequence prints both characters
assertSequenceEqualToContent('\x1b[');
// Random strings are displayed properly
for (let i = 0; i < 50; i++) {
const uuid: string = generateUuid();
assertSequenceEqualToContent(uuid);
}
});
/**
* Assert that a given ANSI sequence maintains added content following the ANSI code, and that
* the expression itself is thrown away.
*
* @param sequence The ANSI sequence to verify. The provided sequence should contain ANSI codes
* only, and should not include actual text content as it is provided by this function.
*/
function assertEmptyOutput(sequence: string) {
const child: HTMLSpanElement = getSequenceOutput(sequence + 'content');
assert.equal('content', child.textContent);
assert.equal(0, child.classList.length);
}
test('Empty sequence output', () => {
const sequences: string[] = [
// No colour codes
'',
'\x1b[;m',
'\x1b[1;;m',
'\x1b[m',
'\x1b[99m'
];
sequences.forEach(sequence => {
assertEmptyOutput(sequence);
});
// Check other possible ANSI terminators
const terminators: string[] = 'ABCDHIJKfhmpsu'.split('');
terminators.forEach(terminator => {
assertEmptyOutput('\x1b[content' + terminator);
});
});
test('calcANSI8bitColor', () => {
// Invalid values
// Negative (below range), simple range, decimals
for (let i = -10; i <= 15; i += 0.5) {
assert(calcANSI8bitColor(i) === undefined, 'Values less than 16 passed to calcANSI8bitColor should return undefined.');
}
// In-range range decimals
for (let i = 16.5; i < 254; i += 1) {
assert(calcANSI8bitColor(i) === undefined, 'Floats passed to calcANSI8bitColor should return undefined.');
}
// Above range
for (let i = 256; i < 300; i += 0.5) {
assert(calcANSI8bitColor(i) === undefined, 'Values grather than 255 passed to calcANSI8bitColor should return undefined.');
}
// All valid colors
for (let red = 0; red <= 5; red++) {
for (let green = 0; green <= 5; green++) {
for (let blue = 0; blue <= 5; blue++) {
let colorOut: any = calcANSI8bitColor(16 + red * 36 + green * 6 + blue);
assert(colorOut.r === Math.round(red * (255 / 5)), 'Incorrect red value encountered for color');
assert(colorOut.g === Math.round(green * (255 / 5)), 'Incorrect green value encountered for color');
assert(colorOut.b === Math.round(blue * (255 / 5)), 'Incorrect balue value encountered for color');
}
}
}
// All grays
for (let i = 232; i <= 255; i++) {
let grayOut: any = calcANSI8bitColor(i);
assert(grayOut.r === grayOut.g);
assert(grayOut.r === grayOut.b);
assert(grayOut.r === Math.round((i - 232) / 23 * 255));
}
});
});

View File

@@ -9,7 +9,7 @@ import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
import { KeyCode } from 'vs/base/common/keyCodes';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { MenuId } from 'vs/platform/actions/common/actions';
// import { MenuId } from 'vs/platform/actions/common/actions';
class ExpandAbbreviationAction extends EmmetEditorAction {

View File

@@ -9,7 +9,7 @@ import { registerEditorAction, EditorAction, ServicesAccessor } from 'vs/editor/
import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen';
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { MenuId } from 'vs/platform/actions/common/actions';
// import { MenuId } from 'vs/platform/actions/common/actions';
const EMMET_COMMANDS_PREFIX = '>Emmet: ';

View File

@@ -24,7 +24,7 @@ import { IExtensionManifest, IKeyBinding, IView, IViewContainer, ExtensionType }
import { ResolvedKeybinding, KeyMod, KeyCode } from 'vs/base/common/keyCodes';
import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput';
import { IExtensionsWorkbenchService, IExtensionsViewlet, VIEWLET_ID, IExtension, ExtensionContainers } from 'vs/workbench/contrib/extensions/common/extensions';
import { RatingsWidget, InstallCountWidget, RemoteBadgeWidget } from 'vs/workbench/contrib/extensions/browser/extensionsWidgets';
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, ExtensionToolTipAction, SystemDisabledWarningAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions';

View File

@@ -7,12 +7,12 @@ import { localize } from 'vs/nls';
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';
// import { match } from 'vs/base/common/glob';
import * as json from 'vs/base/common/json';
import { IExtensionManagementService, IExtensionGalleryService, EXTENSION_IDENTIFIER_PATTERN, InstallOperation, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
import { IExtensionTipsService, ExtensionRecommendationReason, IExtensionsConfigContent, RecommendationChangeNotification, IExtensionRecommendation, ExtensionRecommendationSource, IExtensionEnablementService, EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
import { IModelService } from 'vs/editor/common/services/modelService';
import { ITextModel } from 'vs/editor/common/model';
// import { IModelService } from 'vs/editor/common/services/modelService';
// import { ITextModel } from 'vs/editor/common/model';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
// {{SQL CARBON EDIT}}
@@ -23,37 +23,37 @@ import * as Constants from 'sql/workbench/contrib/extensions/common/constants';
import Severity from 'vs/base/common/severity';
import { IWorkspaceContextService, IWorkspaceFolder, IWorkspace, IWorkspaceFoldersChangeEvent, WorkbenchState } from 'vs/platform/workspace/common/workspace';
import { IFileService } from 'vs/platform/files/common/files';
import { IExtensionsConfiguration, ConfigurationKey, ShowRecommendationsOnlyOnDemandKey, IExtensionsViewlet, IExtensionsWorkbenchService, EXTENSIONS_CONFIG } from 'vs/workbench/contrib/extensions/common/extensions';
import { IExtensionsConfiguration, ConfigurationKey, ShowRecommendationsOnlyOnDemandKey, /*IExtensionsViewlet, IExtensionsWorkbenchService,*/ EXTENSIONS_CONFIG } from 'vs/workbench/contrib/extensions/common/extensions';
import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { flatten, distinct, shuffle, coalesce, firstIndex } from 'vs/base/common/arrays';
import { guessMimeTypes, MIME_UNKNOWN } from 'vs/base/common/mime';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
// import { guessMimeTypes, MIME_UNKNOWN } from 'vs/base/common/mime';
// import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
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 { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { Emitter, Event } from 'vs/base/common/event';
import { assign } from 'vs/base/common/objects';
import { URI } from 'vs/base/common/uri';
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
import { IExperimentService, ExperimentActionType, ExperimentState } from 'vs/workbench/contrib/experiments/common/experimentService';
// import { IExperimentService, ExperimentActionType, ExperimentState } from 'vs/workbench/contrib/experiments/common/experimentService';
import { CancellationToken } from 'vs/base/common/cancellation';
import { ExtensionType, ExtensionsPolicy, ExtensionsPolicyKey } from 'vs/platform/extensions/common/extensions'; // {{SQL CARBON EDIT}}
import { extname } from 'vs/base/common/resources';
// import { extname } from 'vs/base/common/resources';
import { IExeBasedExtensionTip, IProductService } from 'vs/platform/product/common/productService';
import { timeout } from 'vs/base/common/async';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry'; // {{SQL CARBON EDIT}}
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys'; // {{SQL CARBON EDIT}}
import { IWorkspaceStatsService } from 'vs/workbench/contrib/stats/common/workspaceStats';
import { setImmediate, isWeb } from 'vs/base/common/platform';
import { /*setImmediate,*/ isWeb } from 'vs/base/common/platform';
import { platform, env as processEnv } from 'vs/base/common/process';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
const milliSecondsInADay = 1000 * 60 * 60 * 24;
const choiceNever = localize('neverShowAgain', "Don't Show Again");
const searchMarketplace = localize('searchMarketplace', "Search Marketplace");
const processedFileExtensions: string[] = [];
// const searchMarketplace = localize('searchMarketplace', "Search Marketplace"); {{SQL CARBON EDIT}} comment out for no unused
// const processedFileExtensions: string[] = []; {{SQL CARBON EDIT}} comment out for no unused
interface IDynamicWorkspaceRecommendations {
remoteSet: string[];
@@ -97,7 +97,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
constructor(
@IExtensionGalleryService private readonly _galleryService: IExtensionGalleryService,
@IModelService private readonly _modelService: IModelService,
// @IModelService private readonly _modelService: IModelService, {{SQL CARBON EDIT}} comment out for no unused
@IStorageService private readonly storageService: IStorageService,
@IExtensionManagementService private readonly extensionsService: IExtensionManagementService,
@IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService,
@@ -107,13 +107,13 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
@IConfigurationService private readonly configurationService: IConfigurationService,
@ITelemetryService private readonly telemetryService: ITelemetryService,
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService,
@IExtensionService private readonly extensionService: IExtensionService,
// @IExtensionService private readonly extensionService: IExtensionService, {{SQL CARBON EDIT}} comment out for no unused
@IRequestService private readonly requestService: IRequestService,
@IViewletService private readonly viewletService: IViewletService,
// @IViewletService private readonly viewletService: IViewletService, {{SQL CARBON EDIT}} comment out for no unused
@INotificationService private readonly notificationService: INotificationService,
@IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService,
@IExtensionsWorkbenchService private readonly extensionWorkbenchService: IExtensionsWorkbenchService,
@IExperimentService private readonly experimentService: IExperimentService,
// @IExtensionsWorkbenchService private readonly extensionWorkbenchService: IExtensionsWorkbenchService, {{SQL CARBON EDIT}} comment out for no unused
// @IExperimentService private readonly experimentService: IExperimentService, {{SQL CARBON EDIT}} comment out for no unused
@IAdsTelemetryService private readonly adsTelemetryService: IAdsTelemetryService, // {{SQL CARBON EDIT}}
@IWorkspaceStatsService private readonly workspaceStatsService: IWorkspaceStatsService,
@IProductService private readonly productService: IProductService
@@ -709,7 +709,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
* Prompt the user to either install the recommended extension for the file type in the current editor model
* or prompt to search the marketplace if it has extensions that can support the file type
*/
private promptFiletypeBasedRecommendations(model: ITextModel): void {
/*private promptFiletypeBasedRecommendations(model: ITextModel): void { {{SQL CARBON EDIT}} comment out for no unused
const uri = model.uri;
if (!uri || !this.fileService.canHandleResource(uri)) {
return;
@@ -776,9 +776,9 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
this.promptRecommendedExtensionForFileExtension(fileExtension, installed);
});
}
}*/
private async promptRecommendedExtensionForFileType(recommendationsToSuggest: string[], installed: ILocalExtension[]): Promise<boolean> {
/*private async promptRecommendedExtensionForFileType(recommendationsToSuggest: string[], installed: ILocalExtension[]): Promise<boolean> { {{SQL CARBON EDIT}} comment out for no unused
recommendationsToSuggest = this.filterIgnoredOrNotAllowed(recommendationsToSuggest);
if (recommendationsToSuggest.length === 0) {
@@ -805,24 +805,24 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
[{
label: localize('install', 'Install'),
run: () => {
/* __GDPR__
*//* __GDPR__
"extensionRecommendations:popup" : {
"userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
}
*/
*//*
this.telemetryService.publicLog('extensionRecommendations:popup', { userReaction: 'install', extensionId: name });
this.instantiationService.createInstance(InstallRecommendedExtensionAction, id).run();
}
}, {
label: localize('showRecommendations', "Show Recommendations"),
run: () => {
/* __GDPR__
*//* __GDPR__
"extensionRecommendations:popup" : {
"userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
}
*/
*//*
this.telemetryService.publicLog('extensionRecommendations:popup', { userReaction: 'show', extensionId: name });
const recommendationsAction = this.instantiationService.createInstance(ShowRecommendedExtensionsAction, ShowRecommendedExtensionsAction.ID, localize('showRecommendations', "Show Recommendations"));
@@ -834,12 +834,12 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
isSecondary: true,
run: () => {
this.addToImportantRecommendationsIgnore(id);
/* __GDPR__
*//* __GDPR__
"extensionRecommendations:popup" : {
"userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
}
*/
*//*
this.telemetryService.publicLog('extensionRecommendations:popup', { userReaction: 'neverShowAgain', extensionId: name });
this.notificationService.prompt(
Severity.Info,
@@ -857,21 +857,21 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
{
sticky: true,
onCancel: () => {
/* __GDPR__
*//* __GDPR__
"extensionRecommendations:popup" : {
"userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
}
*/
*//*
this.telemetryService.publicLog('extensionRecommendations:popup', { userReaction: 'cancelled', extensionId: name });
}
}
);
return true;
}
}*/
private async promptRecommendedExtensionForFileExtension(fileExtension: string, installed: ILocalExtension[]): Promise<void> {
/*private async promptRecommendedExtensionForFileExtension(fileExtension: string, installed: ILocalExtension[]): Promise<void> { {{SQL CARBON EDIT}} no unused
const fileExtensionSuggestionIgnoreList = <string[]>JSON.parse(this.storageService.get('extensionsAssistant/fileExtensionsSuggestionIgnore', StorageScope.GLOBAL, '[]'));
if (fileExtensionSuggestionIgnoreList.indexOf(fileExtension) > -1) {
return;
@@ -894,12 +894,12 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
[{
label: searchMarketplace,
run: () => {
/* __GDPR__
*//* __GDPR__
"fileExtensionSuggestion:popup" : {
"userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"fileExtension": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
}
*/
*//*
this.telemetryService.publicLog('fileExtensionSuggestion:popup', { userReaction: 'ok', fileExtension: fileExtension });
this.viewletService.openViewlet('workbench.view.extensions', true)
.then(viewlet => viewlet as IExtensionsViewlet)
@@ -917,29 +917,29 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
JSON.stringify(fileExtensionSuggestionIgnoreList),
StorageScope.GLOBAL
);
/* __GDPR__
*//* __GDPR__
"fileExtensionSuggestion:popup" : {
"userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"fileExtension": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
}
*/
*//*
this.telemetryService.publicLog('fileExtensionSuggestion:popup', { userReaction: 'neverShowAgain', fileExtension: fileExtension });
}
}],
{
sticky: true,
onCancel: () => {
/* __GDPR__
*//* __GDPR__
"fileExtensionSuggestion:popup" : {
"userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"fileExtension": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
}
*/
*//*
this.telemetryService.publicLog('fileExtensionSuggestion:popup', { userReaction: 'cancelled', fileExtension: fileExtension });
}
}
);
}
}*/
private filterIgnoredOrNotAllowed(recommendationsToSuggest: string[]): string[] {
const importantRecommendationsIgnoreList = <string[]>JSON.parse(this.storageService.get('extensionsAssistant/importantRecommendationsIgnore', StorageScope.GLOBAL, '[]'));

View File

@@ -15,7 +15,7 @@ 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, 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 { 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/workbench/services/extensionManagement/common/extensionManagement';
import { INotificationService } from 'vs/platform/notification/common/notification';
@@ -73,7 +73,7 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
const header = append(headerContainer, $('.header'));
const name = append(header, $('span.name'));
const version = append(header, $('span.version'));
const installCount = append(header, $('span.install-count'));
// const installCount = append(header, $('span.install-count')); {{SQL CARBON EDIT}} no unused
const ratings = append(header, $('span.ratings'));
const headerRemoteBadgeWidget = this.instantiationService.createInstance(RemoteBadgeWidget, header, false);
const description = append(details, $('.description.ellipsis'));

View File

@@ -20,7 +20,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
import { IExtensionsWorkbenchService, IExtensionsViewlet, VIEWLET_ID, AutoUpdateConfigurationKey, ShowRecommendationsOnlyOnDemandKey, CloseExtensionDetailsOnViewChangeKey, VIEW_CONTAINER } from '../common/extensions';
import {
ShowEnabledExtensionsAction, ShowInstalledExtensionsAction, ShowRecommendedExtensionsAction, ShowPopularExtensionsAction, ShowDisabledExtensionsAction,
ShowEnabledExtensionsAction, ShowInstalledExtensionsAction, ShowRecommendedExtensionsAction, /*ShowPopularExtensionsAction,*/ ShowDisabledExtensionsAction,
ShowOutdatedExtensionsAction, ClearExtensionsInputAction, ChangeSortAction, UpdateAllAction, CheckForUpdatesAction, DisableAllAction, EnableAllAction,
EnableAutoUpdateAction, DisableAutoUpdateAction, ShowBuiltInExtensionsAction, InstallVSIXAction
} from 'vs/workbench/contrib/extensions/browser/extensionsActions';

View File

@@ -1029,7 +1029,7 @@ export class DefaultRecommendedExtensionsView extends ExtensionsListView {
}
export class RecommendedExtensionsView extends ExtensionsListView {
private readonly recommendedExtensionsQuery = '@recommended';
// private readonly recommendedExtensionsQuery = '@recommended'; {{SQL CARBON EDIT}} no unused
renderBody(container: HTMLElement): void {
super.renderBody(container);

View File

@@ -12,7 +12,7 @@ import { Registry } from 'vs/platform/registry/common/platform';
import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions';
import { IWorkbenchThemeService, COLOR_THEME_SETTING, ICON_THEME_SETTING, IColorTheme, IFileIconTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { VIEWLET_ID, IExtensionsViewlet } from 'vs/workbench/contrib/extensions/common/extensions';
import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
// import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { IColorRegistry, Extensions as ColorRegistryExtensions } from 'vs/platform/theme/common/colorRegistry';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
@@ -33,7 +33,7 @@ export class SelectColorThemeAction extends Action {
label: string,
@IQuickInputService private readonly quickInputService: IQuickInputService,
@IWorkbenchThemeService private readonly themeService: IWorkbenchThemeService,
@IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService,
// @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, {{SQL CARBON EDIT}} no unused
@IViewletService private readonly viewletService: IViewletService,
@IConfigurationService private readonly configurationService: IConfigurationService
) {
@@ -106,7 +106,7 @@ class SelectIconThemeAction extends Action {
label: string,
@IQuickInputService private readonly quickInputService: IQuickInputService,
@IWorkbenchThemeService private readonly themeService: IWorkbenchThemeService,
@IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService,
// @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, {{SQL CARBON EDIT}} no unused
@IViewletService private readonly viewletService: IViewletService,
@IConfigurationService private readonly configurationService: IConfigurationService
@@ -166,7 +166,7 @@ class SelectIconThemeAction extends Action {
}
}
function configurationEntries(extensionGalleryService: IExtensionGalleryService, label: string): QuickPickInput<ThemeItem>[] {
/*function configurationEntries(extensionGalleryService: IExtensionGalleryService, label: string): QuickPickInput<ThemeItem>[] { {{SQL CARBON EDIT}} comment out function for no unused
if (extensionGalleryService.isEnabled()) {
return [
{
@@ -180,7 +180,7 @@ function configurationEntries(extensionGalleryService: IExtensionGalleryService,
];
}
return [];
}
}*/
function openExtensionViewlet(viewletService: IViewletService, query: string) {
return viewletService.openViewlet(VIEWLET_ID, true).then(viewlet => {

View File

@@ -19,7 +19,7 @@ import * as semver from 'semver-umd';
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { ReleaseNotesManager } from './releaseNotesEditor';
// import { ReleaseNotesManager } from './releaseNotesEditor';
import { isWindows } from 'vs/base/common/platform';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
@@ -36,24 +36,15 @@ import { IElectronEnvironmentService } from 'vs/workbench/services/electron/elec
const CONTEXT_UPDATE_STATE = new RawContextKey<string>('updateState', StateType.Uninitialized);
let releaseNotesManager: ReleaseNotesManager | undefined = undefined;
/*let releaseNotesManager: ReleaseNotesManager | undefined = undefined; {{SQL CARBON EDIT}} comment out for no unused
function showReleaseNotes(instantiationService: IInstantiationService, version: string) {
/* // {{SQL CARBON EDIT}} just open release notes in browser until we can get ADS release notes from the web
if (!releaseNotesManager) {
releaseNotesManager = instantiationService.createInstance(ReleaseNotesManager);
}
return instantiationService.invokeFunction(accessor => releaseNotesManager!.show(accessor, version));
*/
// {{SQL CARBON EDIT}} Open release notes in browser until we can get ADS notes from web
return instantiationService.invokeFunction(async accessor => {
const action = accessor.get(IInstantiationService).createInstance(OpenLatestReleaseNotesInBrowserAction);
await action.run();
});
}
}*/
export class OpenLatestReleaseNotesInBrowserAction extends Action {
@@ -78,7 +69,7 @@ export abstract class AbstractShowReleaseNotesAction extends Action {
constructor(
id: string,
label: string,
private version: string,
/*private */version: string, // {{SQL CARBON EDIT}} no unused
@IInstantiationService private readonly instantiationService: IInstantiationService
) {
super(id, label, undefined, true);

View File

@@ -5,7 +5,7 @@
import 'vs/css!./watermark';
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
import { assign } from 'vs/base/common/objects';
// import { assign } from 'vs/base/common/objects';
import { isMacintosh, OS } from 'vs/base/common/platform';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import * as nls from 'vs/nls';
@@ -16,18 +16,18 @@ import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as
import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { GlobalNewUntitledFileAction } from 'vs/workbench/contrib/files/browser/fileActions';
import { OpenFolderAction, OpenFileFolderAction, OpenFileAction } from 'vs/workbench/browser/actions/workspaceActions';
import { ShowAllCommandsAction } from 'vs/workbench/contrib/quickopen/browser/commandsHandler';
// import { OpenFolderAction, OpenFileFolderAction, OpenFileAction } from 'vs/workbench/browser/actions/workspaceActions';
// import { ShowAllCommandsAction } from 'vs/workbench/contrib/quickopen/browser/commandsHandler';
import { Parts, IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
import { StartAction } from 'vs/workbench/contrib/debug/browser/debugActions';
// import { StartAction } from 'vs/workbench/contrib/debug/browser/debugActions';
import { FindInFilesActionId } from 'vs/workbench/contrib/search/common/constants';
import { QUICKOPEN_ACTION_ID } from 'vs/workbench/browser/parts/quickopen/quickopen';
// import { QUICKOPEN_ACTION_ID } from 'vs/workbench/browser/parts/quickopen/quickopen';
import * as dom from 'vs/base/browser/dom';
import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLabel';
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
import { IDimension } from 'vs/platform/layout/browser/layoutService';
import { TERMINAL_COMMAND_ID } from 'vs/workbench/contrib/terminal/common/terminal';
// import { TERMINAL_COMMAND_ID } from 'vs/workbench/contrib/terminal/common/terminal';
import { assertIsDefined } from 'vs/base/common/types';
// {{SQL CARBON EDIT}}
@@ -47,7 +47,7 @@ const showServers: WatermarkEntry = { text: nls.localize('watermark.showServers'
const newSqlFile: WatermarkEntry = { text: nls.localize('watermark.newSqlFile', "New SQL File"), id: GlobalNewUntitledFileAction.ID };
const newNotebook: WatermarkEntry = { text: nls.localize('watermark.newNotebook', "New Notebook"), id: NewNotebookAction.ID };
const showCommands: WatermarkEntry = { text: nls.localize('watermark.showCommands', "Show All Commands"), id: ShowAllCommandsAction.ID };
/*const showCommands: WatermarkEntry = { text: nls.localize('watermark.showCommands', "Show All Commands"), id: ShowAllCommandsAction.ID }; {{SQL CARBON EDIT}} no unused
const quickOpen: WatermarkEntry = { text: nls.localize('watermark.quickOpen', "Go to File"), id: QUICKOPEN_ACTION_ID };
const openFileNonMacOnly: WatermarkEntry = { text: nls.localize('watermark.openFile', "Open File"), id: OpenFileAction.ID, mac: false };
const openFolderNonMacOnly: WatermarkEntry = { text: nls.localize('watermark.openFolder', "Open Folder"), id: OpenFolderAction.ID, mac: false };
@@ -55,9 +55,9 @@ const openFileOrFolderMacOnly: WatermarkEntry = { text: nls.localize('watermark.
const openRecent: WatermarkEntry = { text: nls.localize('watermark.openRecent', "Open Recent"), id: 'workbench.action.openRecent' };
const newUntitledFile: WatermarkEntry = { text: nls.localize('watermark.newUntitledFile', "New Untitled File"), id: GlobalNewUntitledFileAction.ID };
const newUntitledFileMacOnly: WatermarkEntry = assign({ mac: true }, newUntitledFile);
const toggleTerminal: WatermarkEntry = { text: nls.localize({ key: 'watermark.toggleTerminal', comment: ['toggle is a verb here'] }, "Toggle Terminal"), id: TERMINAL_COMMAND_ID.TOGGLE };
const toggleTerminal: WatermarkEntry = { text: nls.localize({ key: 'watermark.toggleTerminal', comment: ['toggle is a verb here'] }, "Toggle Terminal"), id: TERMINAL_COMMAND_ID.TOGGLE };*/
const findInFiles: WatermarkEntry = { text: nls.localize('watermark.findInFiles', "Find in Files"), id: FindInFilesActionId };
const startDebugging: WatermarkEntry = { text: nls.localize('watermark.startDebugging', "Start Debugging"), id: StartAction.ID };
// const startDebugging: WatermarkEntry = { text: nls.localize('watermark.startDebugging', "Start Debugging"), id: StartAction.ID }; {{SQL CARBON EDIT}} no unused
// {{SQL CARBON EDIT}} - Replace noFolderEntries and folderEntries
const noFolderEntries = [

View File

@@ -5,19 +5,19 @@
import 'vs/css!./welcomeOverlay';
import * as dom from 'vs/base/browser/dom';
import { Registry } from 'vs/platform/registry/common/platform';
// import { Registry } from 'vs/platform/registry/common/platform';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { ShowAllCommandsAction } from 'vs/workbench/contrib/quickopen/browser/commandsHandler';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
import { localize } from 'vs/nls';
import { Action } from 'vs/base/common/actions';
import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions';
import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
// import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions';
// import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { Disposable } from 'vs/base/common/lifecycle';
import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { KeyCode } from 'vs/base/common/keyCodes';
// import { KeyCode } from 'vs/base/common/keyCodes';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { textPreformatForeground, foreground } from 'vs/platform/theme/common/colorRegistry';

View File

@@ -13,7 +13,7 @@ import { Registry } from 'vs/platform/registry/common/platform';
import { Extensions as EditorInputExtensions, IEditorInputFactoryRegistry } from 'vs/workbench/common/editor';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions';
import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions';
import { SyncActionDescriptor, /*MenuRegistry, MenuId*/ } from 'vs/platform/actions/common/actions';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { IEditorRegistry, Extensions as EditorExtensions, EditorDescriptor } from 'vs/workbench/browser/editor';
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';

View File

@@ -11,8 +11,8 @@ import { IExtHostConfiguration, ExtHostConfiguration } from 'vs/workbench/api/co
import { IExtHostCommands, ExtHostCommands } from 'vs/workbench/api/common/extHostCommands';
import { IExtHostDocumentsAndEditors, ExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors';
import { IExtHostTerminalService, WorkerExtHostTerminalService } from 'vs/workbench/api/common/extHostTerminalService';
import { IExtHostTask, WorkerExtHostTask } from 'vs/workbench/api/common/extHostTask';
import { IExtHostDebugService } from 'vs/workbench/api/common/extHostDebugService';
// import { IExtHostTask, WorkerExtHostTask } from 'vs/workbench/api/common/extHostTask';
// import { IExtHostDebugService } from 'vs/workbench/api/common/extHostDebugService';
import { IExtHostSearch } from 'vs/workbench/api/common/extHostSearch';
import { IExtensionStoragePaths } from 'vs/workbench/api/common/extHostStoragePaths';
import { IExtHostExtensionService } from 'vs/workbench/api/common/extHostExtensionService';