Initial VS Code 1.19 source merge (#571)

* Initial 1.19 xcopy

* Fix yarn build

* Fix numerous build breaks

* Next batch of build break fixes

* More build break fixes

* Runtime breaks

* Additional post merge fixes

* Fix windows setup file

* Fix test failures.

* Update license header blocks to refer to source eula
This commit is contained in:
Karl Burtram
2018-01-28 23:37:17 -08:00
committed by GitHub
parent 9a1ac20710
commit 251ae01c3e
8009 changed files with 93378 additions and 35634 deletions

View File

@@ -8,6 +8,7 @@ import Severity from 'vs/base/common/severity';
import { TPromise } from 'vs/base/common/winjs.base';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { IExtensionPoint } from 'vs/platform/extensions/common/extensionsRegistry';
import Event from 'vs/base/common/event';
export interface IExtensionDescription {
readonly id: string;
@@ -26,9 +27,16 @@ export interface IExtensionDescription {
readonly main?: string;
readonly contributes?: { [point: string]: any; };
readonly keywords?: string[];
readonly repository?: {
url: string;
};
enableProposedApi?: boolean;
}
export const MANIFEST_CACHE_FOLDER = 'CachedExtensions';
export const USER_MANIFEST_CACHE_FILE = 'user';
export const BUILTIN_MANIFEST_CACHE_FILE = 'builtin';
export const IExtensionService = createDecorator<IExtensionService>('extensionService');
export interface IMessage {
@@ -41,19 +49,63 @@ export interface IMessage {
export interface IExtensionsStatus {
messages: IMessage[];
activationTimes: ActivationTimes;
runtimeErrors: Error[];
}
export class ActivationTimes {
public readonly startup: boolean;
public readonly codeLoadingTime: number;
public readonly activateCallTime: number;
public readonly activateResolvedTime: number;
/**
* e.g.
* ```
* {
* startTime: 1511954813493000,
* endTime: 1511954835590000,
* deltas: [ 100, 1500, 123456, 1500, 100000 ],
* ids: [ 'idle', 'self', 'extension1', 'self', 'idle' ]
* }
* ```
*/
export interface IExtensionHostProfile {
/**
* Profiling start timestamp in microseconds.
*/
startTime: number;
/**
* Profiling end timestamp in microseconds.
*/
endTime: number;
/**
* Duration of segment in microseconds.
*/
deltas: number[];
/**
* Segment identifier: extension id or one of the four known strings.
*/
ids: ProfileSegmentId[];
constructor(startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number) {
this.startup = startup;
this.codeLoadingTime = codeLoadingTime;
this.activateCallTime = activateCallTime;
this.activateResolvedTime = activateResolvedTime;
/**
* Get the information as a .cpuprofile.
*/
data: object;
/**
* Get the aggregated time per segmentId
*/
getAggregatedTimes(): Map<ProfileSegmentId, number>;
}
/**
* Extension id or one of the four known program states.
*/
export type ProfileSegmentId = string | 'idle' | 'program' | 'gc' | 'self';
export class ActivationTimes {
constructor(
public readonly startup: boolean,
public readonly codeLoadingTime: number,
public readonly activateCallTime: number,
public readonly activateResolvedTime: number,
public readonly activationEvent: string
) {
}
}
@@ -67,18 +119,40 @@ export class ExtensionPointContribution<T> {
}
}
export interface IExtensionHostInformation {
inspectPort: number;
}
export interface IExtensionService {
_serviceBrand: any;
/**
* TODO@Ben: Delete this and use `whenInstalledExtensionsRegistered`
* An event emitted when extensions are registered after their extension points got handled.
*
* This event will also fire on startup to signal the installed extensions.
*
* @returns the extensions that got registered
*/
onDidRegisterExtensions: Event<IExtensionDescription[]>;
/**
* @event
* Fired when extensions status changes.
* The event contains the ids of the extensions that have changed.
*/
onDidChangeExtensionsStatus: Event<string[]>;
/**
* Send an activation event and activate interested extensions.
*/
activateByEvent(activationEvent: string): TPromise<void>;
/**
* Block on this signal any interactions with extensions.
* An promise that resolves when the installed extensions are registered after
* their extension points got handled.
*/
onReady(): TPromise<boolean>;
whenInstalledExtensionsRegistered(): TPromise<boolean>;
/**
* Return all registered extensions
@@ -96,9 +170,9 @@ export interface IExtensionService {
getExtensionsStatus(): { [id: string]: IExtensionsStatus };
/**
* Get information about extension activation times.
* Begin an extension host process profile session.
*/
getExtensionsActivationTimes(): { [id: string]: ActivationTimes; };
startExtensionHostProfile(): TPromise<ProfileSession>;
/**
* Restarts the extension host.
@@ -114,4 +188,13 @@ export interface IExtensionService {
* Stops the extension host.
*/
stopExtensionHost(): void;
/**
*
*/
getExtensionHostInformation(): IExtensionHostInformation;
}
export interface ProfileSession {
stop(): TPromise<IExtensionHostProfile>;
}