From ec5b0498651bde043ec357a8f36d475cc0880cfc Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Tue, 4 Jul 2017 16:36:59 +0200 Subject: [PATCH] make proposed Debug API official; fixes #30096 --- src/vs/vscode.d.ts | 63 +++++++++++++++++++ src/vs/vscode.proposed.d.ts | 63 ------------------- src/vs/workbench/api/node/extHost.api.impl.ts | 8 +-- 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 798aca698c1..8d6a7554e5d 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -5317,6 +5317,69 @@ declare module 'vscode' { export function createSourceControl(id: string, label: string): SourceControl; } + /** + * Configuration for a debug session. + */ + export interface DebugConfiguration { + /** + * The type for the debug session. + */ + type: string; + + /** + * An optional name for the debug session. + */ + name?: string; + + /** + * The request type of the debug session. + */ + request: string; + + /** + * Additional debug type specific properties. + */ + [key: string]: any; + } + + /** + * A debug session. + */ + export interface DebugSession { + + /** + * The debug session's type from the debug configuration. + */ + readonly type: string; + + /** + * The debug session's name from the debug configuration. + */ + readonly name: string; + + /** + * Send a custom request to the debug adapter. + */ + customRequest(command: string, args?: any): Thenable; + } + + /** + * Namespace for dealing with debug sessions. + */ + export namespace debug { + + /** + * An [event](#Event) which fires when a debug session has terminated. + */ + export const onDidTerminateDebugSession: Event; + + /** + * Create a new debug session based on the given configuration. + * @param configuration + */ + export function createDebugSession(configuration: DebugConfiguration): Thenable; + } + /** * Namespace for dealing with installed extensions. Extensions are represented * by an [extension](#Extension)-interface which allows to reflect on them. diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 6a1baf8a169..6b3227a6cff 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -189,67 +189,4 @@ declare module 'vscode' { */ onData(callback: (data: string) => any): void; } - - /** - * Namespace for dealing with debug sessions. - */ - export namespace debug { - - /** - * An [event](#Event) which fires when a debug session has terminated. - */ - export const onDidTerminateDebugSession: Event; - - /** - * Create a new debug session based on the given launchConfig. - * @param launchConfig - */ - export function createDebugSession(launchConfig: DebugConfiguration): Thenable; - } - - /** - * Configuration for a debug session. - */ - export interface DebugConfiguration { - /** - * The type for the debug session. - */ - type: string; - - /** - * An optional name for the debug session. - */ - name?: string; - - /** - * The request type of the debug session. - */ - request: string; - - /** - * Additional debug type specific properties. - */ - [key: string]: any; - } - - /** - * A debug session. - */ - export interface DebugSession { - - /** - * The debug session's type from the debug configuration. - */ - readonly type: string; - - /** - * The debug session's name from the debug configuration. - */ - readonly name: string; - - /** - * Send a custom request to the debug adapter. - */ - customRequest(command: string, args?: any): Thenable; - } } diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 8e78a58bc46..56c79673a9b 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -463,12 +463,12 @@ export function createApiFactory( // namespace: debug const debug: typeof vscode.debug = { - createDebugSession: proposedApiFunction(extension, (config: vscode.DebugConfiguration) => { + createDebugSession(config: vscode.DebugConfiguration) { return extHostDebugService.createDebugSession(config); - }), - onDidTerminateDebugSession: proposedApiFunction(extension, (listener, thisArg?, disposables?) => { + }, + onDidTerminateDebugSession(listener, thisArg?, disposables?) { return extHostDebugService.onDidTerminateDebugSession(listener, thisArg, disposables); - }) + } }; -- GitLab