Skip to content

Commit ff80ce6

Browse files
authored
Remove custom jupyter notebook migration logic (microsoft#163362)
This migration should have taken place so I don't think we need this code anymore
1 parent 1bca8df commit ff80ce6

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { NotebookEditorInput } from 'vs/workbench/contrib/notebook/common/notebo
1515
import { IWebviewService, WebviewContentOptions, WebviewContentPurpose, WebviewExtensionDescription, WebviewOptions } from 'vs/workbench/contrib/webview/browser/webview';
1616
import { DeserializedWebview, restoreWebviewContentOptions, restoreWebviewOptions, reviveWebviewExtensionDescription, SerializedWebview, SerializedWebviewOptions, WebviewEditorInputSerializer } from 'vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer';
1717
import { IWebviewWorkbenchService } from 'vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService';
18-
import { IEditorResolverService } from 'vs/workbench/services/editor/common/editorResolverService';
1918
import { IWorkingCopyBackupMeta } from 'vs/workbench/services/workingCopy/common/workingCopy';
2019
import { IWorkingCopyBackupService } from 'vs/workbench/services/workingCopy/common/workingCopyBackup';
2120
import { IWorkingCopyEditorService } from 'vs/workbench/services/workingCopy/common/workingCopyEditorService';
@@ -58,7 +57,6 @@ export class CustomEditorInputSerializer extends WebviewEditorInputSerializer {
5857
@IWebviewWorkbenchService webviewWorkbenchService: IWebviewWorkbenchService,
5958
@IInstantiationService private readonly _instantiationService: IInstantiationService,
6059
@IWebviewService private readonly _webviewService: IWebviewService,
61-
@IEditorResolverService private readonly _editorResolverService: IEditorResolverService
6260
) {
6361
super(webviewWorkbenchService);
6462
}
@@ -92,12 +90,6 @@ export class CustomEditorInputSerializer extends WebviewEditorInputSerializer {
9290
serializedEditorInput: string
9391
): CustomEditorInput {
9492
const data = this.fromJson(JSON.parse(serializedEditorInput));
95-
if (data.viewType === 'jupyter.notebook.ipynb') {
96-
const editorAssociation = this._editorResolverService.getAssociationsForResource(data.editorResource);
97-
if (!editorAssociation.find(association => association.viewType === 'jupyter.notebook.ipynb')) {
98-
return NotebookEditorInput.create(this._instantiationService, data.editorResource, 'jupyter-notebook', { _backupId: data.backupId, startDirty: data.dirty }) as any;
99-
}
100-
}
10193

10294
const webview = reviveWebview(this._webviewService, data);
10395
const customInput = this._instantiationService.createInstance(CustomEditorInput, { resource: data.editorResource, viewType: data.viewType, id: data.id }, webview, { startsDirty: data.dirty, backupId: data.backupId });
@@ -131,7 +123,6 @@ export class ComplexCustomWorkingCopyEditorHandler extends Disposable implements
131123
@IInstantiationService private readonly _instantiationService: IInstantiationService,
132124
@IWorkingCopyEditorService private readonly _workingCopyEditorService: IWorkingCopyEditorService,
133125
@IWorkingCopyBackupService private readonly _workingCopyBackupService: IWorkingCopyBackupService,
134-
@IEditorResolverService private readonly _editorResolverService: IEditorResolverService,
135126
@IWebviewService private readonly _webviewService: IWebviewService,
136127
@ICustomEditorService _customEditorService: ICustomEditorService // DO NOT REMOVE (needed on startup to register overrides properly)
137128
) {
@@ -177,13 +168,6 @@ export class ComplexCustomWorkingCopyEditorHandler extends Disposable implements
177168
}
178169

179170
const backupData = backup.meta;
180-
if (backupData.viewType === 'jupyter.notebook.ipynb') {
181-
const editorAssociation = this._editorResolverService.getAssociationsForResource(URI.revive(backupData.editorResource));
182-
if (!editorAssociation.find(association => association.viewType === 'jupyter.notebook.ipynb')) {
183-
return NotebookEditorInput.create(this._instantiationService, URI.revive(backupData.editorResource), 'jupyter-notebook', { startDirty: !!backupData.backupId, _backupId: backupData.backupId, _workingCopy: workingCopy }) as any;
184-
}
185-
}
186-
187171
const id = backupData.webview.id;
188172
const extension = reviveWebviewExtensionDescription(backupData.extension?.id, backupData.extension?.location);
189173
const webview = reviveWebview(this._webviewService, {

0 commit comments

Comments
 (0)