File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -562,8 +562,6 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
562562 return { typeId : this . getTypeId ( ) } ;
563563 }
564564
565- abstract resolve ( ) : Promise < IEditorModel | null > ;
566-
567565 isReadonly ( ) : boolean {
568566 return true ;
569567 }
@@ -580,6 +578,10 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
580578 return false ;
581579 }
582580
581+ async resolve ( ) : Promise < IEditorModel | null > {
582+ return null ;
583+ }
584+
583585 async save ( group : GroupIdentifier , options ?: ISaveOptions ) : Promise < IEditorInput | undefined > {
584586 return this ;
585587 }
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { URI } from 'vs/base/common/uri';
88import { localize } from 'vs/nls' ;
99import { EditorInput } from 'vs/workbench/common/editor' ;
1010import { IExtension } from 'vs/workbench/contrib/extensions/common/extensions' ;
11+ import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil' ;
1112
1213export class ExtensionsInput extends EditorInput {
1314
@@ -34,26 +35,15 @@ export class ExtensionsInput extends EditorInput {
3435 return localize ( 'extensionsInputName' , "Extension: {0}" , this . extension . displayName ) ;
3536 }
3637
37- async resolve ( ) : Promise < null > {
38- return null ;
39- }
40-
4138 supportsSplitEditor ( ) : boolean {
4239 return false ;
4340 }
4441
4542 matches ( other : unknown ) : boolean {
46- if ( super . matches ( other ) === true ) {
43+ if ( super . matches ( other ) ) {
4744 return true ;
4845 }
4946
50- if ( ! ( other instanceof ExtensionsInput ) ) {
51- return false ;
52- }
53-
54- const otherExtensionInput = other as ExtensionsInput ;
55-
56- // TODO@joao is this correct?
57- return this . extension === otherExtensionInput . extension ;
47+ return other instanceof ExtensionsInput && areSameExtensions ( this . extension . identifier , other . extension . identifier ) ;
5848 }
5949}
Original file line number Diff line number Diff line change @@ -33,14 +33,6 @@ export class RuntimeExtensionsInput extends EditorInput {
3333 return nls . localize ( 'extensionsInputName' , "Running Extensions" ) ;
3434 }
3535
36- matches ( other : unknown ) : boolean {
37- return other instanceof RuntimeExtensionsInput ;
38- }
39-
40- async resolve ( ) : Promise < null > {
41- return null ;
42- }
43-
4436 supportsSplitEditor ( ) : boolean {
4537 return false ;
4638 }
@@ -50,4 +42,8 @@ export class RuntimeExtensionsInput extends EditorInput {
5042 this . dispose ( ) ; // Only dispose if not opened anymore because all runtime extensions inputs are shared
5143 }
5244 }
45+
46+ matches ( other : unknown ) : boolean {
47+ return other instanceof RuntimeExtensionsInput ;
48+ }
5349}
You can’t perform that action at this time.
0 commit comments