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
editor service cleanup #127287
editor service cleanup #127287
Conversation
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.
Changes look good to me.
-
Should we have tests for replaceEditors? I don't suspect it to be much different than
openEditor
as they follow the same path for the most part but it might be good to cover the three avenues. -
Should activation be mixed into the
IEditorInputWithOptions
if present and then we reduce the return signature ofdoResolveEditor
disposables.add(accessor.editorOverrideService.registerEditor( | ||
'*.editor-service-override-tests', | ||
{ id: 'editorServiceOverrideTests', label: 'Label', priority: RegisteredEditorPriority.exclusive }, | ||
{ canHandleDiff: true }, |
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.
Not super related to this PR but what yours thoughts on abandoning canHandledDiff
since we don't have a canHandleUntitled
as we just check for the factory function.
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.
Yeah awesome idea, please do that 👍
I opened #127305 for test coverage in
We cannot, because not every call returns an editor with options. |
This is a follow up cleanup and some fixes for editor service, will leave comments inline to explain.
High level:
doResolveEditor
much simpler, explicitly returnEditorActivation
but only use it fromopenEditor
method as we used to