-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
Cleanup editor group context keys #212955
Conversation
Also, I need to make sure it's correctly handled when the active group changes which is not the case currently. I wonder if we can solve this from the EditorPart. It could listen on active group change and then set the global contextkeys to the scoped ones. Not sure its possible in a nice way... Otherwise, the editor group view just needs to rerun |
Yeah you need to keep track of active group changes and then go over all context keys that have been bound and ask for the scoped context key value to update the global one. Btw |
Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
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 think bind
works fine now for context keys that are bound within the group, but what if someone calls bind
and passes in the active group, the key would only be bound for that active group and not the other groups.
So maybe bind
needs to work differently: you are not passing in the editor group, but just the key. And then EditorParts
makes sure to set the key properly when editor groups change, add or remove?
That is why |
* cleanup editor group context keys * Update src/vs/workbench/browser/parts/editor/editorPart.ts Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com> * context key on parts * Update global context keys * remove scoped keys on group removal * cleanup --------- Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
This pull request includes changes to clean up the editor group context keys.