From e37a269c19496adfa32abb68186a0172a822a93b Mon Sep 17 00:00:00 2001 From: Lucas Koehler Date: Mon, 13 Jun 2022 16:11:26 +0200 Subject: [PATCH] plugin: Remove obsolete, proposed `TreeItem2` and `TreeItemLabel` Remove `TreeItem2` and `TreeItemLabel` from proposed plugin api because all properties are now supported and aligned with VS Code by `TreeItem` and `TreeItemLabel` in `theia.d.ts` Contributed on behalf of STMicroelectronics Signed-off-by: Lucas Koehler --- CHANGELOG.md | 1 + .../plugin-ext/src/plugin/plugin-context.ts | 1 - packages/plugin/src/theia-proposed.d.ts | 35 ------------------- 3 files changed, 1 insertion(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 791a0cdf011af..f10fc8da3258d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ - [process] removed the deprecated getters `input`, `output` and `errorOutput` [#11185](https://github.com/eclipse-theia/theia/pull/11185) - [workspace] removed deprecated `getDefaultWorkspacePath` [#11185](https://github.com/eclipse-theia/theia/pull/11185) - [vsx-registry] removed deprecated `VSXExtensionsCommands` re-export [#11185](https://github.com/eclipse-theia/theia/pull/11185) +- [plugin] Remove `TreeItem2` from proposed plugin API. `TreeItem` can be used instead. [#11288](https://github.com/eclipse-theia/theia/pull/11288) - Contributed on behalf of STMicroelectronics ## v1.26.0 - 5/26/2022 diff --git a/packages/plugin-ext/src/plugin/plugin-context.ts b/packages/plugin-ext/src/plugin/plugin-context.ts index 91dd775f2360f..132c2619575d3 100644 --- a/packages/plugin-ext/src/plugin/plugin-context.ts +++ b/packages/plugin-ext/src/plugin/plugin-context.ts @@ -991,7 +991,6 @@ export function createAPIFactory( TextDocumentSaveReason, CodeAction, TreeItem, - TreeItem2: TreeItem, TreeItemCollapsibleState, SymbolKind, SymbolTag, diff --git a/packages/plugin/src/theia-proposed.d.ts b/packages/plugin/src/theia-proposed.d.ts index afafde265a630..2ee7b00a4ffd5 100644 --- a/packages/plugin/src/theia-proposed.d.ts +++ b/packages/plugin/src/theia-proposed.d.ts @@ -321,41 +321,6 @@ export module '@theia/plugin' { // #endregion - // #region Tree View - // copied from https://github.com/microsoft/vscode/blob/3ea5c9ddbebd8ec68e3b821f9c39c3ec785fde97/src/vs/vscode.proposed.d.ts#L1447-L1476 - /** - * Label describing the [Tree item](#TreeItem) - */ - export interface TreeItemLabel { - - /** - * A human-readable string describing the [Tree item](#TreeItem). - */ - label: string; - - /** - * Ranges in the label to highlight. A range is defined as a tuple of two number where the - * first is the inclusive start index and the second the exclusive end index - */ - // TODO highlights?: [number, number][]; - - } - - export class TreeItem2 extends TreeItem { - /** - * Label describing this item. When `falsy`, it is derived from [resourceUri](#TreeItem.resourceUri). - */ - label?: string | TreeItemLabel | /* for compilation */ any; - - /** - * @param label Label describing this item - * @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. - * Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None) - */ - constructor(label: TreeItemLabel, collapsibleState?: TreeItemCollapsibleState); - } - // #endregion - // #region search in workspace /** * The parameters of a query for text search.