Refresh resources before sync check in DeleteResourcesProcessor#4046
Open
vogella wants to merge 2 commits into
Open
Refresh resources before sync check in DeleteResourcesProcessor#4046vogella wants to merge 2 commits into
vogella wants to merge 2 commits into
Conversation
When the workspace "Refresh on access" preference (Preferences > General > Workspace > "Refresh on access", backed by ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH) is enabled, refresh each resource before checking IResource.isSynchronized in DeleteResourcesProcessor. Without this, the Delete Resources refactoring wizard reports "is not in sync with" warnings even though the user explicitly opted into refresh on access. The refresh runs under a child progress monitor so it stays cancelable, and a failed refresh degrades to the existing out-of-sync warning rather than aborting the condition check. Fixes eclipse-platform#3982
Contributor
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
Contributor
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 Delete Resources refactoring wizard reported "is not in sync with" warnings for files that were changed outside Eclipse, even when the user had enabled the "Refresh on access" workspace preference. The sync check used
IResource.isSynchronized, which only compares timestamps and never triggers the lazy refresh that the preference promises.When the preference (
PREF_LIGHTWEIGHT_AUTO_REFRESH) is enabled, each accessible resource is now refreshed before the sync check, so the spurious warnings no longer appear. The refresh runs under a child progress monitor so it stays cancelable, and a failed refresh degrades to the existing out-of-sync warning instead of aborting the condition check.Fixes #3982