chore - remove ExtHostNotebookEditor#uri and use document.uri instead

This commit is contained in:
Johannes Rieken
2020-09-09 12:24:56 +02:00
parent 82ac7bacf3
commit cfe2bb233e
2 changed files with 8 additions and 11 deletions

View File

@@ -529,7 +529,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
const uriStr = URI.revive(uriComponents).toString();
let editor: { editor: ExtHostNotebookEditor; } | undefined;
this._editors.forEach(e => {
if (e.editor.uri.toString() === uriStr) {
if (e.editor.document.uri.toString() === uriStr) {
editor = e;
}
});
@@ -619,9 +619,8 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
}
const editor = new ExtHostNotebookEditor(
document.notebookDocument.viewType,
editorId,
revivedUri,
document.notebookDocument.viewType,
this._proxy,
webComm.contentProviderComm,
document
@@ -656,7 +655,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
}
for (const e of this._editors.values()) {
if (e.editor.uri.toString() === revivedUri.toString()) {
if (e.editor.document.uri.toString() === revivedUri.toString()) {
e.editor.dispose();
this._editors.delete(e.editor.id);
editorChanged = true;