Skip to content

Conversation

@lucas-koehler
Copy link
Contributor

@lucas-koehler lucas-koehler commented Sep 28, 2022

What it does

  • Extend theia.d.ts with optional method resolveTreeItem in TreeDataProvider
  • Add infrastructure on ext side to resolve tree items
  • Add resolvable tree view node classes
  • Add resolvement for tooltips and commands
  • Align TreeViewItem and TreeViewNode tooltip property type to include MarkdownString

Fixes #11147

Contributed on behalf of STMicroelectronics

Signed-off-by: Lucas Koehler lkoehler@eclipsesource.com

How to test

  • Download the test extension here
    • See this release and find the code that implements TreeDataProvider.resolveTreeItem here
  • The extension adds a view TEST VIEW to the explorer. The a element subtree resolves tooltips and commands while the b element subtree has both given as part of the original tree items.
    image
  • Hover over a and b sub(elements): Tooltips should be shown for both.
  • Click elements to show a notification including the element id. Same for using space or Enter on selected entries
TreeDataProvider-resolveTreeItem.mp4

Review checklist

Reminder for reviewers

@lucas-koehler lucas-koehler force-pushed the gh-11147-TreeDataProvider-resolveTreeItem branch from 2cbea66 to aecffad Compare September 28, 2022 15:51
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks quite good! I can confirm that the extension and the new API works as expected.

@lucas-koehler lucas-koehler force-pushed the gh-11147-TreeDataProvider-resolveTreeItem branch from aecffad to edfb8ab Compare October 14, 2022 08:27
@lucas-koehler
Copy link
Contributor Author

lucas-koehler commented Oct 14, 2022

@msujew Thank you very much for the review and the suggestions :) I incorporated them and rebased onto the current master.

Edit: The 3PP License Check seems to have failed because of a missing access token:

ERROR: Please setup an Eclipse Foundation Gitlab Personal Access Token to run the license check in "review" mode
ERROR: It should be set in an environment variable named "DASH_LICENSES_PAT"

@lucas-koehler lucas-koehler requested review from msujew and removed request for vince-fugnitto October 14, 2022 08:28
@vince-fugnitto
Copy link
Member

vince-fugnitto commented Oct 14, 2022

Edit: The 3PP License Check seems to have failed because of a missing access token:

@lucas-koehler rebasing the pull-request again should fix the license check errors you encountered thanks to #11770.

Does the pull-request ultimately close #11147? (at the moment the issue is not properly linked)

* Extend `theia.d.ts` with optional method `resolveTreeItem` in `TreeDataProvider`
* Add infrastructure on ext side to resolve tree items
* Add resolvable tree view node classes
* Add resolvement for tooltips and commands
* Align TreeViewItem and TreeViewNode tooltip property type to include `MarkdownString`

Implements eclipse-theia#11147

Contributed on behalf of STMicroelectronics

Signed-off-by: Lucas Koehler <lkoehler@eclipsesource.com>
@lucas-koehler lucas-koehler force-pushed the gh-11147-TreeDataProvider-resolveTreeItem branch from edfb8ab to bed1265 Compare October 14, 2022 14:16
@lucas-koehler
Copy link
Contributor Author

@vince-fugnitto Thanks for the hint. Yes, this closes #11147 . I adapted the PR message accordingly.

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

  • Items are resolved using the API as expected
  • Aligns the TreeDataProvider API to the newest version of vscode
@JonasHelming JonasHelming merged commit a6c02c4 into eclipse-theia:master Oct 14, 2022
@vince-fugnitto vince-fugnitto added the vscode issues related to VSCode compatibility label Oct 14, 2022
@vince-fugnitto vince-fugnitto added this to the 1.31.0 milestone Oct 27, 2022
@msujew msujew mentioned this pull request Nov 15, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vscode issues related to VSCode compatibility

4 participants