@@ -53,7 +53,6 @@ export class MultiDiffEditorInput extends EditorInput implements ILanguageSuppor
53
53
}
54
54
55
55
public static fromSerialized ( data : ISerializedMultiDiffEditorInput , instantiationService : IInstantiationService ) : MultiDiffEditorInput {
56
- console . log ( 'inside of fromSerialized' ) ;
57
56
return instantiationService . createInstance (
58
57
MultiDiffEditorInput ,
59
58
URI . parse ( data . multiDiffSourceUri ) ,
@@ -90,7 +89,6 @@ export class MultiDiffEditorInput extends EditorInput implements ILanguageSuppor
90
89
@IMultiDiffSourceResolverService private readonly _multiDiffSourceResolverService : IMultiDiffSourceResolverService ,
91
90
@ITextFileService private readonly _textFileService : ITextFileService ,
92
91
) {
93
- console . log ( 'isTransient from the constructor : ' , isTransient ) ;
94
92
super ( ) ;
95
93
96
94
this . _register ( autorun ( ( reader ) => {
@@ -365,19 +363,18 @@ interface ISerializedMultiDiffEditorInput {
365
363
}
366
364
367
365
export class MultiDiffEditorSerializer implements IEditorSerializer {
366
+
367
+ // TODO@bpasero , @aiday-mar: following should be removed
368
368
canSerialize ( editor : EditorInput ) : boolean {
369
- console . log ( 'inside of can serialize' ) ;
370
- console . log ( 'editor instanceof MultiDiffEditorInput && !editor.isTransient : ' , editor instanceof MultiDiffEditorInput && ! editor . isTransient ) ;
371
369
return editor instanceof MultiDiffEditorInput && ! editor . isTransient ;
372
370
}
373
371
374
372
serialize ( editor : MultiDiffEditorInput ) : string | undefined {
375
- console . log ( 'inside of serialize' ) ;
376
- return JSON . stringify ( editor . serialize ( ) ) ;
373
+ const shouldSerialize = editor instanceof MultiDiffEditorInput && ! editor . isTransient ;
374
+ return shouldSerialize ? JSON . stringify ( editor . serialize ( ) ) : undefined ;
377
375
}
378
376
379
377
deserialize ( instantiationService : IInstantiationService , serializedEditor : string ) : EditorInput | undefined {
380
- console . log ( 'inside of deserialize' ) ;
381
378
try {
382
379
const data = parse ( serializedEditor ) as ISerializedMultiDiffEditorInput ;
383
380
return MultiDiffEditorInput . fromSerialized ( data , instantiationService ) ;
0 commit comments