Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A queued move notification can be dropped if its destination is moved or deleted before the UI job runs, leaving the editor attached to a nonexistent file without a follow-up notification.
1 open issue
What changed in this PR
This PR aims to prevent stale file notifications from changing or closing connected editors when a move or deletion is undone before notification dispatch.
Changes:
- Dispatch move notifications only when the original file is absent and the destination exists.
- Dispatch deletion notifications only when the original file remains absent.
| File | Description |
|---|---|
| plugins/org.eclipse.fordiac.ide.model.ui/src/org/eclipse/fordiac/ide/model/ui/editors/FileLibraryElementProvider.java | Adds file-existence checks before dispatching move and deletion notifications. |
Review effort: Balanced
Test Results (pull_request) 155 files 155 suites 1m 53s ⏱️ Results for commit f47316a. ♻️ This comment has been updated with latest results. |
The UI job used to dispatch updates for moved or deleted files could deliver stale notifications in case of separate resource changed deltas. This could happen when immediately undoing a failed refactoring before the UI job for the original resource change had a chance to run. The stale update would then cause the editor to change its input to a non-existent file or close unnecessarily. This handles move and delete updates where the original file still exists as content changes and moves where neither source not destination exist as deletions. Consecutive moves will close the editor instead of attempting to follow along multiple resource changes. Restored files will not trigger any additional dialogs.
mx990
force-pushed
the
editor-file-move-fix
branch
from
November 27, 2026 18:30
5979722 to
f47316a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The UI job used to dispatch updates for moved or deleted files could deliver stale notifications in case of separate resource changed deltas. This could happen when immediately undoing a failed refactoring before the UI job for the original resource change had a chance to run. The stale update would then cause the editor to change its input to a non-existent file or close unnecessarily.
This handles move and delete updates where the original file still exists as content changes and moves where neither source nor destination exist as deletions. Consecutive moves will close the editor instead of attempting to follow along multiple resource changes. Restored files will not trigger any additional dialogs.