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

@@ -10,6 +10,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
import { IExtensionPoint } from 'vs/workbench/services/extensions/common/extensionsRegistry';
import { ExtensionIdentifier, IExtension, ExtensionType, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc';
export const nullExtensionDescription = Object.freeze(<IExtensionDescription>{
identifier: new ExtensionIdentifier('nullExtensionDescription'),
@@ -82,6 +83,14 @@ export interface IExtensionHostProfile {
getAggregatedTimes(): Map<ProfileSegmentId, number>;
}
export interface IExtensionHostStarter {
readonly onCrashed: Event<[number, string | null]>;
start(): Promise<IMessagePassingProtocol> | null;
getInspectPort(): number | undefined;
dispose(): void;
}
/**
* Extension id or one of the four known program states.
*/
@@ -116,11 +125,10 @@ export interface IWillActivateEvent {
}
export interface IResponsiveStateChangeEvent {
target: ICpuProfilerTarget;
isResponsive: boolean;
}
export interface IExtensionService extends ICpuProfilerTarget {
export interface IExtensionService {
_serviceBrand: any;
/**
@@ -200,7 +208,8 @@ export interface IExtensionService extends ICpuProfilerTarget {
getExtensionsStatus(): { [id: string]: IExtensionsStatus };
/**
* Return the inspect port or 0.
* Return the inspect port or `0`, the latter means inspection
* is not possible.
*/
getInspectPort(): number;
@@ -227,19 +236,6 @@ export interface IExtensionService extends ICpuProfilerTarget {
_onExtensionHostExit(code: number): void;
}
export interface ICpuProfilerTarget {
/**
* Check if the extension host can be profiled.
*/
canProfileExtensionHost(): boolean;
/**
* Begin an extension host process profile session.
*/
startExtensionHostProfile(): Promise<ProfileSession>;
}
export interface ProfileSession {
stop(): Promise<IExtensionHostProfile>;
}
@@ -277,9 +273,7 @@ export class NullExtensionService implements IExtensionService {
getExtension() { return Promise.resolve(undefined); }
readExtensionPointContributions<T>(_extPoint: IExtensionPoint<T>): Promise<ExtensionPointContribution<T>[]> { return Promise.resolve(Object.create(null)); }
getExtensionsStatus(): { [id: string]: IExtensionsStatus; } { return Object.create(null); }
canProfileExtensionHost(): boolean { return false; }
getInspectPort(): number { return 0; }
startExtensionHostProfile(): Promise<ProfileSession> { return Promise.resolve(Object.create(null)); }
restartExtensionHost(): void { }
startExtensionHost(): void { }
stopExtensionHost(): void { }