mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 19:18:32 -05:00
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:
@@ -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>;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import Severity from 'vs/base/common/severity';
|
||||
import { IMessage, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
||||
import { Extensions, IJSONContributionRegistry } from 'vs/platform/jsonschemas/common/jsonContributionRegistry';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { EXTENSION_IDENTIFIER_PATTERN } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
|
||||
const hasOwnProperty = Object.hasOwnProperty;
|
||||
const schemaRegistry = <IJSONContributionRegistry>Registry.as(Extensions.JSONContribution);
|
||||
@@ -198,6 +199,16 @@ const schema: IJSONSchema = {
|
||||
description: nls.localize('vscode.extension.activationEvents.onDebug', 'An activation event emitted whenever a user is about to start debugging or about to setup debug configurations.'),
|
||||
body: 'onDebug'
|
||||
},
|
||||
{
|
||||
label: 'onDebugInitialConfigurations',
|
||||
description: nls.localize('vscode.extension.activationEvents.onDebugInitialConfigurations', 'An activation event emitted whenever a "launch.json" needs to be created (and all provideDebugConfigurations methods need to be called).'),
|
||||
body: 'onDebugInitialConfigurations'
|
||||
},
|
||||
{
|
||||
label: 'onDebugResolve',
|
||||
description: nls.localize('vscode.extension.activationEvents.onDebugResolve', 'An activation event emitted whenever a debug session with the specific type is about to be launched (and a corresponding resolveDebugConfiguration method needs to be called).'),
|
||||
body: 'onDebugResolve:${6:type}'
|
||||
},
|
||||
{
|
||||
label: 'workspaceContains',
|
||||
description: nls.localize('vscode.extension.activationEvents.workspaceContains', 'An activation event emitted whenever a folder is opened that contains at least a file matching the specified glob pattern.'),
|
||||
@@ -243,7 +254,8 @@ const schema: IJSONSchema = {
|
||||
type: 'array',
|
||||
uniqueItems: true,
|
||||
items: {
|
||||
type: 'string'
|
||||
type: 'string',
|
||||
pattern: EXTENSION_IDENTIFIER_PATTERN
|
||||
}
|
||||
},
|
||||
scripts: {
|
||||
|
||||
Reference in New Issue
Block a user