mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 19:48:37 -05:00
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -14,7 +14,6 @@ import { toErrorMessage } from 'vs/base/common/errorMessage';
|
||||
import product from 'vs/platform/node/product';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import pkg from 'vs/platform/node/package';
|
||||
import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService';
|
||||
import { Workbench, IWorkbenchStartedInfo } from 'vs/workbench/electron-browser/workbench';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { NullTelemetryService, configurationTelemetry, combinedAppender, LogAppender } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||
@@ -76,7 +75,7 @@ import { HashService } from 'vs/workbench/services/hash/node/hashService';
|
||||
import { IHashService } from 'vs/workbench/services/hash/common/hashService';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { DelegatingStorageService } from 'vs/platform/storage/node/storageService';
|
||||
import { StorageService } from 'vs/platform/storage/node/storageService';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { WORKBENCH_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { LocalizationsChannelClient } from 'vs/platform/localizations/node/localizationsIpc';
|
||||
@@ -88,7 +87,7 @@ import { NotificationService } from 'vs/workbench/services/notification/common/n
|
||||
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { DialogService } from 'vs/workbench/services/dialogs/electron-browser/dialogService';
|
||||
import { DialogChannel } from 'vs/platform/dialogs/node/dialogIpc';
|
||||
import { EventType, addDisposableListener, addClass, scheduleAtNextAnimationFrame } from 'vs/base/browser/dom';
|
||||
import { EventType, addDisposableListener, scheduleAtNextAnimationFrame, addClasses } from 'vs/base/browser/dom';
|
||||
import { IRemoteAgentService } from 'vs/workbench/services/remote/node/remoteAgentService';
|
||||
import { RemoteAgentService } from 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
@@ -97,14 +96,17 @@ import { SearchHistoryService } from 'vs/workbench/services/search/node/searchHi
|
||||
import { ExtensionManagementServerService } from 'vs/workbench/services/extensions/node/extensionManagementServerService';
|
||||
import { ExtensionGalleryService } from 'vs/platform/extensionManagement/node/extensionGalleryService';
|
||||
import { LogLevelSetterChannel } from 'vs/platform/log/node/logIpc';
|
||||
import { ILabelService, LabelService } from 'vs/platform/label/common/label';
|
||||
import { ILabelService } from 'vs/platform/label/common/label';
|
||||
import { IDownloadService } from 'vs/platform/download/common/download';
|
||||
import { DownloadService } from 'vs/platform/download/node/downloadService';
|
||||
import { DownloadServiceChannel } from 'vs/platform/download/node/downloadIpc';
|
||||
import { TextResourcePropertiesService } from 'vs/workbench/services/textfile/electron-browser/textResourcePropertiesService';
|
||||
import { MulitExtensionManagementService } from 'vs/platform/extensionManagement/node/multiExtensionManagement';
|
||||
import { MultiExtensionManagementService } from 'vs/platform/extensionManagement/node/multiExtensionManagement';
|
||||
import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver';
|
||||
import { RemoteAuthorityResolverService } from 'vs/platform/remote/electron-browser/remoteAuthorityResolverService';
|
||||
import { IMarkerDecorationsService } from 'vs/editor/common/services/markersDecorationService';
|
||||
import { MarkerDecorationsService } from 'vs/editor/common/services/markerDecorationsServiceImpl';
|
||||
import { LabelService } from 'vs/workbench/services/label/common/labelService';
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
import { FileTelemetryService } from 'sql/workbench/services/telemetry/node/fileTelemetryService';
|
||||
@@ -117,19 +119,19 @@ export interface ICoreServices {
|
||||
configurationService: IConfigurationService;
|
||||
environmentService: IEnvironmentService;
|
||||
logService: ILogService;
|
||||
storageService: DelegatingStorageService;
|
||||
storageService: StorageService;
|
||||
}
|
||||
|
||||
/**
|
||||
* The workbench shell contains the workbench with a rich header containing navigation and the activity bar.
|
||||
* With the Shell being the top level element in the page, it is also responsible for driving the layouting.
|
||||
*/
|
||||
export class WorkbenchShell extends Disposable {
|
||||
export class Shell extends Disposable {
|
||||
|
||||
private readonly _onWillShutdown = this._register(new Emitter<WillShutdownEvent>());
|
||||
get onWillShutdown(): Event<WillShutdownEvent> { return this._onWillShutdown.event; }
|
||||
|
||||
private storageService: DelegatingStorageService;
|
||||
private storageService: StorageService;
|
||||
private environmentService: IEnvironmentService;
|
||||
private logService: ILogService;
|
||||
private configurationService: IConfigurationService;
|
||||
@@ -227,7 +229,7 @@ export class WorkbenchShell extends Disposable {
|
||||
} catch (error) {
|
||||
handleStartupError(this.logService, error);
|
||||
|
||||
return void 0;
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,31 +315,41 @@ export class WorkbenchShell extends Disposable {
|
||||
const globalStorageInitDurationMain = perf.getDuration('main:willInitGlobalStorage', 'main:didInitGlobalStorage');
|
||||
const globalStorageInitDuratioRenderer = perf.getDuration('willInitGlobalStorage', 'didInitGlobalStorage');
|
||||
const workspaceStorageInitDuration = perf.getDuration('willInitWorkspaceStorage', 'didInitWorkspaceStorage');
|
||||
const workspaceStorageFileExistsDuration = perf.getDuration('willCheckWorkspaceStorageExists', 'didCheckWorkspaceStorageExists');
|
||||
const workspaceStorageMigrationDuration = perf.getDuration('willMigrateWorkspaceStorageKeys', 'didMigrateWorkspaceStorageKeys');
|
||||
const workbenchLoadDuration = perf.getDuration('willLoadWorkbenchMain', 'didLoadWorkbenchMain');
|
||||
const localStorageDuration = perf.getDuration('willReadLocalStorage', 'didReadLocalStorage');
|
||||
|
||||
// Handle errors (avoid duplicates to reduce spam)
|
||||
const loggedStorageErrors = new Set<string>();
|
||||
this._register(this.storageService.storage.onWorkspaceStorageError(error => {
|
||||
this._register(this.storageService.onWorkspaceStorageError(error => {
|
||||
const errorStr = `${error}`;
|
||||
|
||||
if (!loggedStorageErrors.has(errorStr)) {
|
||||
loggedStorageErrors.add(errorStr);
|
||||
|
||||
/* __GDPR__
|
||||
"sqliteStorageError<NUMBER>" : {
|
||||
"sqliteStorageError5" : {
|
||||
"appReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workbenchReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceSchemaTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"globalReadTimeMain" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"globalReadTimeRenderer" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceReadTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workbenchRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"storageError": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||
}
|
||||
*/
|
||||
|
||||
/* __GDPR__
|
||||
"sqliteStorageError<NUMBER>" : {
|
||||
"appReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workbenchReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceExistsTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceMigrationTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceSchemaTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"globalReadTimeMain" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"globalReadTimeRenderer" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceReadTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"localStorageTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workbenchRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
@@ -347,16 +359,13 @@ export class WorkbenchShell extends Disposable {
|
||||
this.telemetryService.publicLog('sqliteStorageError5', {
|
||||
'appReadyTime': appReadyDuration,
|
||||
'workbenchReadyTime': workbenchReadyDuration,
|
||||
'workspaceExistsTime': workspaceStorageFileExistsDuration,
|
||||
'workspaceMigrationTime': workspaceStorageMigrationDuration,
|
||||
'workspaceRequireTime': workspaceStorageRequireDuration,
|
||||
'workspaceSchemaTime': workspaceStorageSchemaDuration,
|
||||
'globalReadTimeMain': globalStorageInitDurationMain,
|
||||
'globalReadTimeRenderer': globalStorageInitDuratioRenderer,
|
||||
'workspaceReadTime': workspaceStorageInitDuration,
|
||||
'localStorageTime': localStorageDuration,
|
||||
'workbenchRequireTime': workbenchLoadDuration,
|
||||
'workspaceKeys': this.storageService.storage.getSize(StorageScope.WORKSPACE),
|
||||
'workspaceKeys': this.storageService.getSize(StorageScope.WORKSPACE),
|
||||
'startupKind': this.lifecycleService.startupKind,
|
||||
'storageError': errorStr
|
||||
});
|
||||
@@ -364,7 +373,7 @@ export class WorkbenchShell extends Disposable {
|
||||
}));
|
||||
|
||||
|
||||
if (this.storageService.storage.hasErrors) {
|
||||
if (this.storageService.hasErrors) {
|
||||
return; // do not log performance numbers when errors occured
|
||||
}
|
||||
|
||||
@@ -373,17 +382,29 @@ export class WorkbenchShell extends Disposable {
|
||||
}
|
||||
|
||||
/* __GDPR__
|
||||
"sqliteStorageTimers<NUMBER>" : {
|
||||
"sqliteStorageTimers5" : {
|
||||
"appReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workbenchReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceSchemaTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"globalReadTimeMain" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"globalReadTimeRenderer" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceReadTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workbenchRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
||||
}
|
||||
*/
|
||||
|
||||
/* __GDPR__
|
||||
"sqliteStorageTimers<NUMBER>" : {
|
||||
"appReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workbenchReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceExistsTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceMigrationTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceSchemaTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"globalReadTimeMain" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"globalReadTimeRenderer" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceReadTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"localStorageTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workbenchRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"workspaceKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
||||
"startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
||||
@@ -392,16 +413,13 @@ export class WorkbenchShell extends Disposable {
|
||||
this.telemetryService.publicLog('sqliteStorageTimers5', {
|
||||
'appReadyTime': appReadyDuration,
|
||||
'workbenchReadyTime': workbenchReadyDuration,
|
||||
'workspaceExistsTime': workspaceStorageFileExistsDuration,
|
||||
'workspaceMigrationTime': workspaceStorageMigrationDuration,
|
||||
'workspaceRequireTime': workspaceStorageRequireDuration,
|
||||
'workspaceSchemaTime': workspaceStorageSchemaDuration,
|
||||
'globalReadTimeMain': globalStorageInitDurationMain,
|
||||
'globalReadTimeRenderer': globalStorageInitDuratioRenderer,
|
||||
'workspaceReadTime': workspaceStorageInitDuration,
|
||||
'localStorageTime': localStorageDuration,
|
||||
'workbenchRequireTime': workbenchLoadDuration,
|
||||
'workspaceKeys': this.storageService.storage.getSize(StorageScope.WORKSPACE),
|
||||
'workspaceKeys': this.storageService.getSize(StorageScope.WORKSPACE),
|
||||
'startupKind': this.lifecycleService.startupKind
|
||||
});
|
||||
}
|
||||
@@ -411,7 +429,7 @@ export class WorkbenchShell extends Disposable {
|
||||
serviceCollection.set(IWorkspaceContextService, this.contextService);
|
||||
serviceCollection.set(IConfigurationService, this.configurationService);
|
||||
serviceCollection.set(IEnvironmentService, this.environmentService);
|
||||
serviceCollection.set(ILabelService, new SyncDescriptor(LabelService));
|
||||
serviceCollection.set(ILabelService, new SyncDescriptor(LabelService, undefined, true));
|
||||
serviceCollection.set(ILogService, this._register(this.logService));
|
||||
serviceCollection.set(IStorageService, this.storageService);
|
||||
|
||||
@@ -430,14 +448,15 @@ export class WorkbenchShell extends Disposable {
|
||||
serviceCollection.set(IWindowService, new SyncDescriptor(WindowService, [this.configuration.windowId, this.configuration]));
|
||||
|
||||
const sharedProcess = (<IWindowsService>serviceCollection.get(IWindowsService)).whenSharedProcessReady()
|
||||
.then(() => connectNet(this.environmentService.sharedIPCHandle, `window:${this.configuration.windowId}`));
|
||||
.then(() => connectNet(this.environmentService.sharedIPCHandle, `window:${this.configuration.windowId}`))
|
||||
.then(client => {
|
||||
client.registerChannel('dialog', instantiationService.createInstance(DialogChannel));
|
||||
|
||||
sharedProcess.then(client => {
|
||||
client.registerChannel('dialog', instantiationService.createInstance(DialogChannel));
|
||||
});
|
||||
return client;
|
||||
});
|
||||
|
||||
// Hash
|
||||
serviceCollection.set(IHashService, new SyncDescriptor(HashService));
|
||||
serviceCollection.set(IHashService, new SyncDescriptor(HashService, undefined, true));
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
if (this.environmentService.args['perf-test']) {
|
||||
@@ -478,9 +497,9 @@ export class WorkbenchShell extends Disposable {
|
||||
serviceCollection.set(ILifecycleService, lifecycleService);
|
||||
this.lifecycleService = lifecycleService;
|
||||
|
||||
serviceCollection.set(IRequestService, new SyncDescriptor(RequestService));
|
||||
serviceCollection.set(IDownloadService, new SyncDescriptor(DownloadService));
|
||||
serviceCollection.set(IExtensionGalleryService, new SyncDescriptor(ExtensionGalleryService));
|
||||
serviceCollection.set(IRequestService, new SyncDescriptor(RequestService, undefined, true));
|
||||
serviceCollection.set(IDownloadService, new SyncDescriptor(DownloadService, undefined, true));
|
||||
serviceCollection.set(IExtensionGalleryService, new SyncDescriptor(ExtensionGalleryService, undefined, true));
|
||||
|
||||
const remoteAuthorityResolverService = new RemoteAuthorityResolverService();
|
||||
serviceCollection.set(IRemoteAuthorityResolverService, remoteAuthorityResolverService);
|
||||
@@ -498,7 +517,7 @@ export class WorkbenchShell extends Disposable {
|
||||
const extensionManagementChannel = getDelayedChannel(sharedProcess.then(c => c.getChannel('extensions')));
|
||||
const extensionManagementChannelClient = new ExtensionManagementChannelClient(extensionManagementChannel);
|
||||
serviceCollection.set(IExtensionManagementServerService, new SyncDescriptor(ExtensionManagementServerService, [extensionManagementChannelClient]));
|
||||
serviceCollection.set(IExtensionManagementService, new SyncDescriptor(MulitExtensionManagementService));
|
||||
serviceCollection.set(IExtensionManagementService, new SyncDescriptor(MultiExtensionManagementService));
|
||||
|
||||
const extensionEnablementService = this._register(instantiationService.createInstance(ExtensionEnablementService));
|
||||
serviceCollection.set(IExtensionEnablementService, extensionEnablementService);
|
||||
@@ -508,9 +527,10 @@ export class WorkbenchShell extends Disposable {
|
||||
this.themeService = instantiationService.createInstance(WorkbenchThemeService, document.body);
|
||||
serviceCollection.set(IWorkbenchThemeService, this.themeService);
|
||||
|
||||
serviceCollection.set(ICommandService, new SyncDescriptor(CommandService));
|
||||
serviceCollection.set(ICommandService, new SyncDescriptor(CommandService, undefined, true));
|
||||
|
||||
serviceCollection.set(IMarkerService, new SyncDescriptor(MarkerService, undefined, true));
|
||||
|
||||
serviceCollection.set(IMarkerService, new SyncDescriptor(MarkerService));
|
||||
|
||||
serviceCollection.set(IModeService, new SyncDescriptor(WorkbenchModeServiceImpl));
|
||||
|
||||
@@ -518,11 +538,13 @@ export class WorkbenchShell extends Disposable {
|
||||
|
||||
serviceCollection.set(ITextResourcePropertiesService, new SyncDescriptor(TextResourcePropertiesService));
|
||||
|
||||
serviceCollection.set(IModelService, new SyncDescriptor(ModelServiceImpl));
|
||||
serviceCollection.set(IModelService, new SyncDescriptor(ModelServiceImpl, undefined, true));
|
||||
|
||||
serviceCollection.set(IMarkerDecorationsService, new SyncDescriptor(MarkerDecorationsService));
|
||||
|
||||
serviceCollection.set(IEditorWorkerService, new SyncDescriptor(EditorWorkerServiceImpl));
|
||||
|
||||
serviceCollection.set(IUntitledEditorService, new SyncDescriptor(UntitledEditorService));
|
||||
serviceCollection.set(IUntitledEditorService, new SyncDescriptor(UntitledEditorService, undefined, true));
|
||||
|
||||
serviceCollection.set(ITextMateService, new SyncDescriptor(TextMateService));
|
||||
|
||||
@@ -534,7 +556,7 @@ export class WorkbenchShell extends Disposable {
|
||||
|
||||
serviceCollection.set(ICodeEditorService, new SyncDescriptor(CodeEditorService));
|
||||
|
||||
serviceCollection.set(IOpenerService, new SyncDescriptor(OpenerService));
|
||||
serviceCollection.set(IOpenerService, new SyncDescriptor(OpenerService, undefined, true));
|
||||
|
||||
serviceCollection.set(IIntegrityService, new SyncDescriptor(IntegrityServiceImpl));
|
||||
|
||||
@@ -562,7 +584,7 @@ export class WorkbenchShell extends Disposable {
|
||||
});
|
||||
|
||||
// Shell Class for CSS Scoping
|
||||
addClass(this.container, 'monaco-shell');
|
||||
addClasses(this.container, 'monaco-shell', platform.isWindows ? 'windows' : platform.isLinux ? 'linux' : 'mac');
|
||||
|
||||
// Create Contents
|
||||
this.renderContents();
|
||||
|
||||
Reference in New Issue
Block a user