@@ -15,7 +15,6 @@ import { NotebookEditorInput } from 'vs/workbench/contrib/notebook/common/notebo
15
15
import { IWebviewService , WebviewContentOptions , WebviewContentPurpose , WebviewExtensionDescription , WebviewOptions } from 'vs/workbench/contrib/webview/browser/webview' ;
16
16
import { DeserializedWebview , restoreWebviewContentOptions , restoreWebviewOptions , reviveWebviewExtensionDescription , SerializedWebview , SerializedWebviewOptions , WebviewEditorInputSerializer } from 'vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer' ;
17
17
import { IWebviewWorkbenchService } from 'vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService' ;
18
- import { IEditorResolverService } from 'vs/workbench/services/editor/common/editorResolverService' ;
19
18
import { IWorkingCopyBackupMeta } from 'vs/workbench/services/workingCopy/common/workingCopy' ;
20
19
import { IWorkingCopyBackupService } from 'vs/workbench/services/workingCopy/common/workingCopyBackup' ;
21
20
import { IWorkingCopyEditorService } from 'vs/workbench/services/workingCopy/common/workingCopyEditorService' ;
@@ -58,7 +57,6 @@ export class CustomEditorInputSerializer extends WebviewEditorInputSerializer {
58
57
@IWebviewWorkbenchService webviewWorkbenchService : IWebviewWorkbenchService ,
59
58
@IInstantiationService private readonly _instantiationService : IInstantiationService ,
60
59
@IWebviewService private readonly _webviewService : IWebviewService ,
61
- @IEditorResolverService private readonly _editorResolverService : IEditorResolverService
62
60
) {
63
61
super ( webviewWorkbenchService ) ;
64
62
}
@@ -92,12 +90,6 @@ export class CustomEditorInputSerializer extends WebviewEditorInputSerializer {
92
90
serializedEditorInput : string
93
91
) : CustomEditorInput {
94
92
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
- }
101
93
102
94
const webview = reviveWebview ( this . _webviewService , data ) ;
103
95
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
131
123
@IInstantiationService private readonly _instantiationService : IInstantiationService ,
132
124
@IWorkingCopyEditorService private readonly _workingCopyEditorService : IWorkingCopyEditorService ,
133
125
@IWorkingCopyBackupService private readonly _workingCopyBackupService : IWorkingCopyBackupService ,
134
- @IEditorResolverService private readonly _editorResolverService : IEditorResolverService ,
135
126
@IWebviewService private readonly _webviewService : IWebviewService ,
136
127
@ICustomEditorService _customEditorService : ICustomEditorService // DO NOT REMOVE (needed on startup to register overrides properly)
137
128
) {
@@ -177,13 +168,6 @@ export class ComplexCustomWorkingCopyEditorHandler extends Disposable implements
177
168
}
178
169
179
170
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
-
187
171
const id = backupData . webview . id ;
188
172
const extension = reviveWebviewExtensionDescription ( backupData . extension ?. id , backupData . extension ?. location ) ;
189
173
const webview = reviveWebview ( this . _webviewService , {
0 commit comments