-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
use scratchpad for IW working copy #184757
Conversation
194c951
to
1eb0bf0
Compare
This reverts commit f5e494e.
14e73bd
to
d788479
Compare
I am not deep in any of the code of this PR, is there something specifically you want me to review here? Otherwise I would yield for Pung. |
@bpasero - mostly the change in editor registration and usage of the editor service resolver, though I think I have it pretty figured out. Plus you added the 👀, so I figured you wanted to review |
this._contributedEditorDisposables.add(editorRegistration); | ||
let editorRegistration: IDisposable | undefined; | ||
// Don't overwrite editor contributions if they come from elsewhere | ||
if (!info.externalEditor) { |
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 wonder if we can have better name to indicate that we only want to register the notebook provider info (for resolving notebook model) but we don't want to register an editor.
Actually @bpasero, there is a remaining issue that I will probably want your review on, but I didn't manage to get it done today: When closing without hot exit:
|
@amunger is that something for a follow up issue or blocking this PR? if its not blocking then maybe we can do that in a new issue to get this change rolling?
I think my expectation for a reverted scratchpad is that it disposes because there is no other state to revert to. And when it does, we would drop the backup as well: vscode/src/vs/workbench/services/workingCopy/common/workingCopyBackupTracker.ts Lines 122 to 135 in 1eabca5
Looking at the code, that should already happen today: vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.ts Lines 303 to 306 in 1eabca5
Maybe we need to add a new option for |
it would definitely make sense to put it in a separate change, so I'll follow up with that fix after this is merged |
save as
will save and re-open as an ipynb*.interactive
to prevent overwriting the interactive contributionseditorService.OpenEditor
to adopt the editor resolver, rather than creating theeditorInput
ourselves