diff --git a/src/bpmn-editor.ts b/src/bpmn-editor.ts index 2cbf15b..7c04b17 100644 --- a/src/bpmn-editor.ts +++ b/src/bpmn-editor.ts @@ -351,14 +351,10 @@ export class BpmnEditor implements vscode.CustomEditorProvider { document.onDidDispose(() => disposeAll(listeners)); - // track documents across rename and deletion + // track documents this.documents.add(uri, document); - document.onDidRename(e => { - this.documents.rename(e.oldUri, e.newUri); - }); - document.onDidDispose(() => this.documents.remove(document.uri)); return document; @@ -540,18 +536,6 @@ class DocumentCollection { return this._documents.delete(key); } - rename(oldUri: vscode.Uri, newUri: vscode.Uri) { - - const document = this.get(oldUri); - - if (!document) { - throw new Error('document not found'); - } - - this.remove(oldUri); - this.add(newUri, document); - } - add(uri: vscode.Uri, document: BpmnDocument) { if (this.get(uri)) {