-
Notifications
You must be signed in to change notification settings - Fork 29.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
Editor override: provide a way to override the editor input as part of createEditorInput #100281
Comments
After discussion with @lramos15 I have updated the proposal. I am convinced that everything around resolving editors can happen in |
Adding notes from our sync up:
|
@lramos15 maybe this one can be closed now, I think my original concern is addressed, we only override now from within the editor service. I do not think that |
Alright, sounds good 👍 |
Today our editor override works very late as part of the
openEditor
. This has a couple of issues:openEditor
calls from within the overrideopenEditor
call is never disposedopenEditor
might get a very unexpected result from what was originally passed inIf we had a way to override the editor at the level of where the input is created things would be cleaner.
Proposal:
editorGroupView#openEditor
altogether, instead the rule is that theEditorInput
that is passed into a group for opening is the correct oneIEditorService
with support for converting aURI
into aEditorInput
including custom editors, this can easily be added to the existingIEditorService#createEditorInput
methodURI
into theEditorInput
override
option that will bring up a picker to pick a custom editor (this essentially moves the picker logic fromopenEditorWith
intoIEditorService
IEditorService.replaceEditors(activeEditor, { resource: activeEditor.resource, options: { override: <show picker> })
everything should just workfileInputFactory
andcustomInputFactory
into one so that we just have 1 way of resolving an editor input from a resource and not 2The text was updated successfully, but these errors were encountered: