mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
- We missed implementing matches functionality. This is required in order to skip reopening of the notebook
This commit is contained in:
@@ -177,4 +177,20 @@ export class NotebookInput extends EditorInput {
|
|||||||
setDirty(isDirty: boolean): void {
|
setDirty(isDirty: boolean): void {
|
||||||
this._model.setDirty(isDirty);
|
this._model.setDirty(isDirty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public matches(otherInput: any): boolean {
|
||||||
|
if (super.matches(otherInput) === true) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (otherInput instanceof NotebookInput) {
|
||||||
|
const otherNotebookEditorInput = <NotebookInput>otherInput;
|
||||||
|
|
||||||
|
// Compare by resource
|
||||||
|
return otherNotebookEditorInput.notebookUri.toString() === this.notebookUri.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user