JeremyYao commented on PR #1463:
URL: https://github.com/apache/daffodil-vscode/pull/1463#issuecomment-3402953151
> The hook for disposing when the panel is disposed it required. This is
because the Data Editor "extension" is a single instance while each Data Editor
tab that's open is an individual component with the editor extension.
>
> So with these changes, if the panel is closed then it will not properly
dispose of the content that's instantiated from the editor extension.
I'm confused.
I removed the
```Typescript
this.panel.onDidDispose(async () => {
await this.dispose()
await removeActiveSession(this.omegaSessionId)
})
```
in the constructor of the DataEditorClient object,
but in the open() function, which appears to construct a new
DataEditorClient() object
the following code snippet exists
```
panel.onDidDispose(async () => {
const pathKey = path.resolve(editor.fileToEdit).toLowerCase()
OPEN_EDITORS.delete(pathKey)
await removeActiveSession(editor.sessionId())
await editor.dispose()
})
```
which also seems to set the panel's onDidDispose callback function?
So was it intentional to have two onDidDispose() callbacks attached to the
panel?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]