Merge from vscode 3d67364fbfcf676d93be64f949e9b33e7f1b969e (#5028)

This commit is contained in:
Anthony Dresser
2019-04-14 22:29:14 -07:00
committed by GitHub
parent 6dbf757385
commit 57242a2e13
210 changed files with 4898 additions and 3018 deletions

View File

@@ -56,6 +56,16 @@ export abstract class AbstractRemoteAgentService extends Disposable implements I
return Promise.resolve(undefined);
}
disableTelemetry(): Promise<void> {
const connection = this.getConnection();
if (connection) {
const client = new RemoteExtensionEnvironmentChannelClient(connection.getChannel('remoteextensionsenvironment'));
return client.disableTelemetry();
}
return Promise.resolve(undefined);
}
}
export class RemoteAgentConnection extends Disposable implements IRemoteAgentConnection {
@@ -125,7 +135,7 @@ class RemoteConnectionFailureNotificationContribution implements IWorkbenchContr
) {
// Let's cover the case where connecting to fetch the remote extension info fails
remoteAgentService.getEnvironment(true)
.then(undefined, err => notificationService.error(nls.localize('connectionError', "Failed to connect to the remote extension host agent (Error: {0})", err ? err.message : '')));
.then(undefined, err => notificationService.error(nls.localize('connectionError', "Failed to connect to the remote extension host server (Error: {0})", err ? err.message : '')));
}
}

View File

@@ -28,7 +28,6 @@ export interface IRemoteAgentEnvironmentDTO {
userHome: UriComponents;
extensions: IExtensionDescription[];
os: platform.OperatingSystem;
syncExtensions: boolean;
}
export class RemoteExtensionEnvironmentChannelClient {
@@ -54,8 +53,7 @@ export class RemoteExtensionEnvironmentChannelClient {
globalStorageHome: URI.revive(data.globalStorageHome),
userHome: URI.revive(data.userHome),
extensions: data.extensions.map(ext => { (<any>ext).extensionLocation = URI.revive(ext.extensionLocation); return ext; }),
os: data.os,
syncExtensions: data.syncExtensions
os: data.os
};
});
}
@@ -63,4 +61,8 @@ export class RemoteExtensionEnvironmentChannelClient {
getDiagnosticInfo(options: IDiagnosticInfoOptions): Promise<IDiagnosticInfo> {
return this.channel.call<IDiagnosticInfo>('getDiagnosticInfo', options);
}
disableTelemetry(): Promise<void> {
return this.channel.call<void>('disableTelemetry');
}
}

View File

@@ -19,6 +19,7 @@ export interface IRemoteAgentService {
getConnection(): IRemoteAgentConnection | null;
getEnvironment(bail?: boolean): Promise<IRemoteAgentEnvironment | null>;
getDiagnosticInfo(options: IDiagnosticInfoOptions): Promise<IDiagnosticInfo | undefined>;
disableTelemetry(): Promise<void>;
}
export interface IRemoteAgentConnection {