From 461affb92d0c54cf57070314474eecee3502cbea Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Mon, 3 Dec 2018 18:09:36 +0100 Subject: [PATCH] finalize tracker API; fixes #62843 --- src/vs/vscode.d.ts | 50 +++++++++++++++++++++++++++++++++++ src/vs/vscode.proposed.d.ts | 52 ------------------------------------- 2 files changed, 50 insertions(+), 52 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index d8990e049a8..d11dbdcb026 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -8490,6 +8490,47 @@ declare module 'vscode' { createDebugAdapterDescriptor(session: DebugSession, executable: DebugAdapterExecutable | undefined): ProviderResult; } + /** + * A Debug Adapter Tracker is a means to track the communication between VS Code and a Debug Adapter. + */ + export interface DebugAdapterTracker { + /** + * A session with the debug adapter is about to be started. + */ + onWillStartSession?(): void; + /** + * The debug adapter is about to receive a Debug Adapter Protocol message from VS Code. + */ + onWillReceiveMessage?(message: any): void; + /** + * The debug adapter has sent a Debug Adapter Protocol message to VS Code. + */ + onDidSendMessage?(message: any): void; + /** + * The debug adapter session is about to be stopped. + */ + onWillStopSession?(): void; + /** + * An error with the debug adapter has occured. + */ + onError?(error: Error): void; + /** + * The debug adapter has exited with the given exit code or signal. + */ + onExit?(code: number | undefined, signal: string | undefined): void; + } + + export interface DebugAdapterTrackerFactory { + /** + * The method 'createDebugAdapterTracker' is called at the start of a debug session in order + * to return a "tracker" object that provides read-access to the communication between VS Code and a debug adapter. + * + * @param session The [debug session](#DebugSession) for which the debug adapter tracker will be used. + * @return A [debug adapter tracker](#DebugAdapterTracker) or undefined. + */ + createDebugAdapterTracker(session: DebugSession): ProviderResult; + } + /** * Represents the debug console. */ @@ -8661,6 +8702,15 @@ declare module 'vscode' { */ export function registerDebugAdapterDescriptorFactory(debugType: string, factory: DebugAdapterDescriptorFactory): Disposable; + /** + * Register a debug adapter tracker factory for the given debug type. + * + * @param debugType The debug type for which the factory is registered or '*' for matching all debug types. + * @param factory The [debug adapter tracker factory](#DebugAdapterTrackerFactory) to register. + * @return A [disposable](#Disposable) that unregisters this factory when being disposed. + */ + export function registerDebugAdapterTrackerFactory(debugType: string, factory: DebugAdapterTrackerFactory): Disposable; + /** * Start debugging by using either a named launch or named compound configuration, * or by directly passing a [DebugConfiguration](#DebugConfiguration). diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 5af66d4492b..aecee3852c8 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -523,58 +523,6 @@ declare module 'vscode' { //#region André: debug - /** - * A Debug Adapter Tracker is a means to track the communication between VS Code and a Debug Adapter. - */ - export interface DebugAdapterTracker { - /** - * A session with the debug adapter is about to be started. - */ - onWillStartSession?(): void; - /** - * The debug adapter is about to receive a Debug Adapter Protocol message from VS Code. - */ - onWillReceiveMessage?(message: any): void; - /** - * The debug adapter has sent a Debug Adapter Protocol message to VS Code. - */ - onDidSendMessage?(message: any): void; - /** - * The debug adapter session is about to be stopped. - */ - onWillStopSession?(): void; - /** - * An error with the debug adapter has occured. - */ - onError?(error: Error): void; - /** - * The debug adapter has exited with the given exit code or signal. - */ - onExit?(code: number | undefined, signal: string | undefined): void; - } - - export interface DebugAdapterTrackerFactory { - /** - * The method 'createDebugAdapterTracker' is called at the start of a debug session in order - * to return a "tracker" object that provides read-access to the communication between VS Code and a debug adapter. - * - * @param session The [debug session](#DebugSession) for which the debug adapter tracker will be used. - * @return A [debug adapter tracker](#DebugAdapterTracker) or undefined. - */ - createDebugAdapterTracker(session: DebugSession): ProviderResult; - } - - export namespace debug { - /** - * Register a debug adapter tracker factory for the given debug type. - * - * @param debugType The debug type for which the factory is registered or '*' for matching all debug types. - * @param factory The [debug adapter tracker factory](#DebugAdapterTrackerFactory) to register. - * @return A [disposable](#Disposable) that unregisters this factory when being disposed. - */ - export function registerDebugAdapterTrackerFactory(debugType: string, factory: DebugAdapterTrackerFactory): Disposable; - } - // deprecated export interface DebugAdapterTracker {