Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vscode] Support FoldingRangeProvider#onDidChangeFoldingRanges events #11127

Closed
Tracked by #9863
planger opened this issue May 11, 2022 · 2 comments · Fixed by #11696
Closed
Tracked by #9863

[vscode] Support FoldingRangeProvider#onDidChangeFoldingRanges events #11127

planger opened this issue May 11, 2022 · 2 comments · Fixed by #11696
Assignees
Labels
vscode issues related to VSCode compatibility

Comments

@planger
Copy link
Contributor

planger commented May 11, 2022

Feature Description:

Support plugins contributing a FoldingRangeProvider to optionally signal via onDidChangeFoldingRanges that the folding ranges from this provider have changed, see https://code.visualstudio.com/api/references/vscode-api#FoldingRangeProvider

@vince-fugnitto vince-fugnitto added the vscode issues related to VSCode compatibility label May 11, 2022
@JonasHelming JonasHelming self-assigned this May 31, 2022
@JonasHelming
Copy link
Contributor

we will have a look at this

@ndoschek
Copy link
Contributor

Hi @Gozzim!
Thanks for your PR! To test this, we could have a look at the existing TestFoldingRangeProvider unit tests in vscode.
We could add a similar test to Theia and add the newly added optional event to the TestFoldingRangeProvider class.
Then we could test the event behavior in a similar manner as in other unit tests, e.g. in debug.test.ts or terminal.test.ts.

Alternatively, you could create and register a test implementation for a FoldingRangeProvider (or extend an existing one) because as far as I can see, onDidChangeFoldingRanges is not used anywhere yet.
With this test implementation a message notification could be fired if the folding ranges change for example.
Then you could provide the test implementation code in the PR for the tester/reviewer.

If possible however, I would go for adding a test for it. If I can help you out with something, just ping me again :)

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
Projects
None yet
4 participants