Merge from vscode 709a07d51919d3266ca71699c6ddfb2d3547c0e1 (#6575)

This commit is contained in:
Chris LaFreniere
2019-08-02 21:06:44 -07:00
committed by GitHub
parent 402b50c03b
commit 62d2fb534d
103 changed files with 726 additions and 374 deletions

View File

@@ -263,6 +263,11 @@ export abstract class AbstractExtensionService extends Disposable implements IEx
return 0;
}
public async setRemoteEnvironment(env: { [key: string]: string | null }): Promise<void> {
await this._extensionHostProcessManagers
.map(manager => manager.setRemoteEnvironment(env));
}
//#endregion
// --- impl

View File

@@ -290,6 +290,15 @@ export class ExtensionHostProcessManager extends Disposable {
}
return proxy.$deltaExtensions(toAdd, toRemove);
}
public async setRemoteEnvironment(env: { [key: string]: string | null }): Promise<void> {
const proxy = await this._getExtensionHostProcessProxy();
if (!proxy) {
return;
}
return proxy.$setRemoteEnvironment(env);
}
}
const colorTables = [

View File

@@ -229,6 +229,12 @@ export interface IExtensionService {
*/
stopExtensionHost(): void;
/**
* Modify the environment of the remote extension host
* @param env New properties for the remote extension host
*/
setRemoteEnvironment(env: { [key: string]: string | null }): Promise<void>;
_logOrShowMessage(severity: Severity, msg: string): void;
_activateById(extensionId: ExtensionIdentifier, activationEvent: string): Promise<void>;
_onWillActivateExtension(extensionId: ExtensionIdentifier): void;
@@ -278,6 +284,7 @@ export class NullExtensionService implements IExtensionService {
restartExtensionHost(): void { }
startExtensionHost(): void { }
stopExtensionHost(): void { }
async setRemoteEnvironment(_env: { [key: string]: string | null }): Promise<void> { }
canAddExtension(): boolean { return false; }
canRemoveExtension(): boolean { return false; }
_logOrShowMessage(_severity: Severity, _msg: string): void { }

View File

@@ -71,7 +71,6 @@ export class RemoteExtensionHostClient extends Disposable implements IExtensionH
public start(): Promise<IMessagePassingProtocol> {
const options: IConnectionOptions = {
isBuilt: this._environmentService.isBuilt,
commit: this._productService.commit,
socketFactory: this._socketFactory,
addressProvider: {