From 62ea960353a3d95f67b16f4dc076566cb44eaef8 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 21 Oct 2019 18:31:37 +0200 Subject: [PATCH] API: Finalize env.uiKind (fixes #82883) --- src/vs/vscode.d.ts | 23 ++++++++++++++ src/vs/vscode.proposed.d.ts | 30 ------------------- .../workbench/api/common/extHost.api.impl.ts | 1 - 3 files changed, 23 insertions(+), 31 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 9bdca45676899..2c54a4628023c 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -6177,6 +6177,22 @@ declare module 'vscode' { writeText(value: string): Thenable; } + /** + * Possible kinds of UI that can use extensions. + */ + export enum UIKind { + + /** + * Extensions are accessed from a desktop application. + */ + Desktop = 1, + + /** + * Extensions are accessed from a web browser. + */ + Web = 2 + } + /** * Namespace describing the environment the editor runs in. */ @@ -6235,6 +6251,13 @@ declare module 'vscode' { */ export const shell: string; + /** + * The UI kind property indicates from which UI extensions + * are accessed from. For example, extensions could be accessed + * from a desktop application or a web browser. + */ + export const uiKind: UIKind; + /** * Opens an *external* item, e.g. a http(s) or mailto-link, using the * default application. diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 70bfb4bee4532..a262be9e1375e 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1039,36 +1039,6 @@ declare module 'vscode' { //#endregion - // #region Ben - UIKind - - /** - * Possible kinds of UI that can use extensions. - */ - export enum UIKind { - - /** - * Extensions are accessed from a desktop application. - */ - Desktop = 1, - - /** - * Extensions are accessed from a web browser. - */ - Web = 2 - } - - export namespace env { - - /** - * The UI kind property indicates from which UI extensions - * are accessed from. For example, extensions could be accessed - * from a desktop application or a web browser. - */ - export const uiKind: UIKind; - } - - //#endregion - //#region Custom editors, mjbvz export interface WebviewEditor extends WebviewPanel { diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 138a0d1228465..e5b5d50ff01b2 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -255,7 +255,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I return getRemoteName(initData.remote.authority); }, get uiKind() { - checkProposedApiEnabled(extension); return initData.uiKind; } };