-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Stub implementation of proposed API for multiDocumentHighlightProvider. #13248
Conversation
b9ffa35
to
d692875
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one suggestion.
@@ -916,6 +917,10 @@ export function createAPIFactory( | |||
registerDocumentHighlightProvider(selector: theia.DocumentSelector, provider: theia.DocumentHighlightProvider): theia.Disposable { | |||
return languagesExt.registerDocumentHighlightProvider(selector, provider, pluginToPluginInfo(plugin)); | |||
}, | |||
/** @stubbed proposed API */ | |||
registerMultiDocumentHighlightProvider(selector: theia.DocumentSelector, provider: theia.MultiDocumentHighlightProvider): theia.Disposable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to make this work in the future, we should mark it with @monaco-uplift
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this annotation here:
* @monaco-uplift: wait until API is available in Monaco API (1.85.0+) |
Should I also add it to this doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I try to do as few changes to the api.d.ts files we take from VS Code because it makes it easier to maintain them, IMO (diff, etc.). Unless this is a general convention, I would prefer the @monaco-uplift
annotatio where we put the stub implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explanation, @tsmaeder.
I have rebased and updated my changes, as this is a trivial fix and there was the usual conflict with the changelog. The monaco uplift annotation has been moved to plugin-context file.
d692875
to
abccbce
Compare
fix eclipse-theia#13232 Contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>
abccbce
to
559382d
Compare
Wrong formatting, I pushed an updated version. |
What it does
This PR stubs the proposed API multiDocumentHighlightProvider introduced in VS Code 1.85. This API cannot be implemented before a new monaco upgrade (at least 1.85 version).
Fixes #13232
Contributed on behalf of STMicroelectronics
How to test
Promise rejection not handled in one second: TypeError: s.languages.registerMultiDocumentHighlightProvider is not a function , reason: TypeError: s.languages.registerMultiDocumentHighlightProvider is not a function plugin-host.js:2976 With stack trace: TypeError: s.languages.registerMultiDocumentHighlightProvider is not a function at Object.$6b (/home/remi/.theia/deployedPlugins/typescript-language-features-1.85.1/extension/dist/extension.js:2:328653) at /home/remi/.theia/deployedPlugins/typescript-language-features-1.85.1/extension/dist/extension.js:2:423494 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Promise.all (index 6) at async f.m (/home/remi/.theia/deployedPlugins/typescript-language-features-1.85.1/extension/dist/extension.js:2:422900)
Follow-ups
Implement the feature once monaco upgrade >= 1.85 is done.
Review checklist
Reminder for reviewers