Merge from vscode 2f984aad710215f4e4684a035bb02f55d1a9e2cc (#9819)

This commit is contained in:
Anthony Dresser
2020-04-01 00:44:39 -07:00
committed by GitHub
parent 0e27aaa61f
commit 0bfbdc62ed
247 changed files with 5402 additions and 3311 deletions

View File

@@ -12,7 +12,6 @@ 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';
export class BrowserWindowConfiguration implements IWindowConfiguration {
@@ -69,6 +68,7 @@ interface IExtensionHostDebugEnvironment {
isExtensionDevelopment: boolean;
extensionDevelopmentLocationURI?: URI[];
extensionTestsLocationURI?: URI;
extensionEnabledProposedApi?: string[];
}
export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironmentService {
@@ -156,6 +156,14 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
return this._extensionHostDebugEnvironment.extensionTestsLocationURI;
}
get extensionEnabledProposedApi(): string[] | undefined {
if (!this._extensionHostDebugEnvironment) {
this._extensionHostDebugEnvironment = this.resolveExtensionHostDebugEnvironment();
}
return this._extensionHostDebugEnvironment.extensionEnabledProposedApi;
}
@memoize
get webviewExternalEndpoint(): string {
// TODO: get fallback from product.json
@@ -184,7 +192,7 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
constructor(readonly options: IBrowserWorkbenchEnvironmentConstructionOptions) {
if (options.workspaceProvider && Array.isArray(options.workspaceProvider.payload)) {
this.payload = serializableToMap(options.workspaceProvider.payload);
this.payload = new Map(options.workspaceProvider.payload);
}
}
@@ -216,6 +224,9 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
extensionHostDebugEnvironment.params.port = parseInt(value);
extensionHostDebugEnvironment.params.break = true;
break;
case 'enableProposedApi':
extensionHostDebugEnvironment.extensionEnabledProposedApi = [];
break;
}
}
}