returnTPromise.wrapError(`Unexpected model for ResourceInput: ${this.resource}`);// TODO@Ben eventually also files should be supported, but we guard due to the dangerous dispose of the model in dispose()
}
this.cachedModel=model;
constunbind=model.onDispose(()=>{
this.cachedModel=null;// make sure we do not dispose model again
unbind.dispose();
this.dispose();
});
// TODO@Joao this should never happen
model.onDispose(()=>this.dispose());
returnthis.cachedModel;
returnmodel;
});
}
publicmatches(otherInput:any):boolean{
matches(otherInput:any):boolean{
if(super.matches(otherInput)===true){
returntrue;
}
...
...
@@ -110,10 +107,10 @@ export class ResourceEditorInput extends EditorInput {