Skip to content

Commit

Permalink
API: Finalize env.uiKind (fixes #82883)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Oct 21, 2019
1 parent ed31ffc commit 62ea960
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 31 deletions.
23 changes: 23 additions & 0 deletions src/vs/vscode.d.ts
Expand Up @@ -6177,6 +6177,22 @@ declare module 'vscode' {
writeText(value: string): Thenable<void>;
}

/**
* 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.
*/
Expand Down Expand Up @@ -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.
Expand Down
30 changes: 0 additions & 30 deletions src/vs/vscode.proposed.d.ts
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion src/vs/workbench/api/common/extHost.api.impl.ts
Expand Up @@ -255,7 +255,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return getRemoteName(initData.remote.authority);
},
get uiKind() {
checkProposedApiEnabled(extension);
return initData.uiKind;
}
};
Expand Down

0 comments on commit 62ea960

Please sign in to comment.