Skip to content

Conversation

@isc-bsaviano
Copy link
Contributor

This PR fixes #1675 by moving the UI refresh code to an onDidSaveTextDocument event handler. This resolves the timing issue because the handler is always called after the save and compile is complete.

*/
public needsUpdate(uriString: string): boolean {
if (this._needsUpdate.has(uriString)) {
this._needsUpdate.delete(uriString);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if deletion from the _needsUpdate private Set should be done by a different method, As things stand we can't discover if a document needs to be updated without also implying we've updated it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this intentionally because I wanted the flag to always be cleared after it was checked the first time. It should only be checked once immediately after the write, and should be cleared even if the update failed somehow. I should harden this to always clear the _needsUpdate entry for the URI before any writeFile call so old values that are never checked can't survive between saves.

@isc-bsaviano isc-bsaviano merged commit 55edbdb into intersystems-community:master Dec 2, 2025
5 checks passed
@isc-bsaviano isc-bsaviano deleted the fix-1675 branch December 2, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Saving & Compiling is not refreshing the class in the editor

2 participants