Merge from vscode cfc1ab4c5f816765b91fb7ead3c3427a7c8581a3

This commit is contained in:
ADS Merger
2020-03-11 04:19:23 +00:00
parent 16fab722d5
commit 4c3e48773d
880 changed files with 20441 additions and 11232 deletions

View File

@@ -4,22 +4,17 @@
*--------------------------------------------------------------------------------------------*/
import { Schemas } from 'vs/base/common/network';
import { ExportData } from 'vs/base/common/performance';
import { IProcessEnvironment } from 'vs/base/common/platform';
import { joinPath } from 'vs/base/common/resources';
import { URI } from 'vs/base/common/uri';
import { generateUuid } from 'vs/base/common/uuid';
import { BACKUPS, IExtensionHostDebugParams } from 'vs/platform/environment/common/environment';
import { LogLevel } from 'vs/platform/log/common/log';
import { IPath, IPathsToWaitFor, IWindowConfiguration } from 'vs/platform/windows/common/windows';
import { ISingleFolderWorkspaceIdentifier, IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
import { IPath, IWindowConfiguration } from 'vs/platform/windows/common/windows';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IWorkbenchConstructionOptions } from 'vs/workbench/workbench.web.api';
import product from 'vs/platform/product/common/product';
import { serializableToMap } from 'vs/base/common/map';
import { memoize } from 'vs/base/common/decorators';
// TODO@ben remove properties that are node/electron only
export class BrowserWindowConfiguration implements IWindowConfiguration {
constructor(
@@ -28,8 +23,6 @@ export class BrowserWindowConfiguration implements IWindowConfiguration {
private readonly environment: IWorkbenchEnvironmentService
) { }
//#region PROPERLY CONFIGURED IN DESKTOP + WEB
@memoize
get sessionId(): string { return generateUuid(); }
@@ -54,44 +47,10 @@ export class BrowserWindowConfiguration implements IWindowConfiguration {
return undefined;
}
// Currently unsupported in web
// Currently unsupported in web but should look into support
get filesToDiff(): IPath[] | undefined { return undefined; }
//#endregion
//#region TODO MOVE TO NODE LAYER
_!: any[];
windowId!: number;
mainPid!: number;
logLevel!: LogLevel;
appRoot!: string;
execPath!: string;
backupPath?: string;
nodeCachedDataDir?: string;
userEnv!: IProcessEnvironment;
workspace?: IWorkspaceIdentifier;
folderUri?: ISingleFolderWorkspaceIdentifier;
zoomLevel?: number;
fullscreen?: boolean;
maximized?: boolean;
highContrast?: boolean;
accessibilitySupport?: boolean;
partsSplashPath?: string;
isInitialStartup?: boolean;
perfEntries!: ExportData;
filesToWait?: IPathsToWaitFor;
//#endregion
highContrast = false;
_ = [];
private getCookieValue(name: string): string | undefined {
const m = document.cookie.match('(^|[^;]+)\\s*' + name + '\\s*=\\s*([^;]+)'); // See https://stackoverflow.com/a/25490531
@@ -116,7 +75,14 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
_serviceBrand: undefined;
//#region PROPERLY CONFIGURED IN DESKTOP + WEB
private _configuration: IWindowConfiguration | undefined = undefined;
get configuration(): IWindowConfiguration {
if (!this._configuration) {
this._configuration = new BrowserWindowConfiguration(this.options, this.payload, this);
}
return this._configuration;
}
@memoize
get isBuilt(): boolean { return !!product.commit; }
@@ -209,71 +175,14 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
return this.webviewExternalEndpoint.replace('{{uuid}}', '*');
}
// Currently not configurable in web
// Currently unsupported in web but should look into support
get disableExtensions() { return false; }
get extensionsPath(): string | undefined { return undefined; }
get verbose(): boolean { return false; }
get disableUpdates(): boolean { return false; }
get logExtensionHostCommunication(): boolean { return false; }
//#endregion
//#region TODO MOVE TO NODE LAYER
private _configuration: IWindowConfiguration | undefined = undefined;
get configuration(): IWindowConfiguration {
if (!this._configuration) {
this._configuration = new BrowserWindowConfiguration(this.options, this.payload, this);
}
return this._configuration;
}
args = { _: [] };
wait!: boolean;
status!: boolean;
log?: string;
mainIPCHandle!: string;
sharedIPCHandle!: string;
nodeCachedDataDir?: string;
disableCrashReporter!: boolean;
driverHandle?: string;
driverVerbose!: boolean;
installSourcePath!: string;
builtinExtensionsPath!: string;
globalStorageHome!: string;
workspaceStorageHome!: string;
backupWorkspacesPath!: string;
machineSettingsHome!: URI;
machineSettingsResource!: URI;
userHome!: string;
userDataPath!: string;
appRoot!: string;
appSettingsHome!: URI;
execPath!: string;
cliPath!: string;
//#endregion
//#region TODO ENABLE IN WEB
galleryMachineIdResource?: URI;
//#endregion
private payload: Map<string, string> | undefined;
constructor(readonly options: IBrowserWorkbenchEnvironmentConstructionOptions) {
@@ -316,4 +225,35 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
return extensionHostDebugEnvironment;
}
//#region TODO MOVE TO NODE LAYER
args = { _: [] };
mainIPCHandle!: string;
sharedIPCHandle!: string;
nodeCachedDataDir?: string;
driverHandle?: string;
driverVerbose!: boolean;
installSourcePath!: string;
builtinExtensionsPath!: string;
globalStorageHome!: string;
workspaceStorageHome!: string;
backupWorkspacesPath!: string;
machineSettingsResource!: URI;
userHome!: string;
userDataPath!: string;
appRoot!: string;
appSettingsHome!: URI;
execPath!: string;
//#endregion
}