Skip to content

Commit

Permalink
plugin: Remove obsolete, proposed TreeItem2 and TreeItemLabel
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
lucas-koehler committed Jun 13, 2022
1 parent 925bbce commit e37a269
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 36 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion packages/plugin-ext/src/plugin/plugin-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,6 @@ export function createAPIFactory(
TextDocumentSaveReason,
CodeAction,
TreeItem,
TreeItem2: TreeItem,
TreeItemCollapsibleState,
SymbolKind,
SymbolTag,
Expand Down
35 changes: 0 additions & 35 deletions packages/plugin/src/theia-proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e37a269

Please sign in to comment.