Skip to content

Refresh resources before sync check in DeleteResourcesProcessor#4046

Open
vogella wants to merge 2 commits into
eclipse-platform:masterfrom
vogella:lv/delete-resources-honor-lightweight-auto-refresh
Open

Refresh resources before sync check in DeleteResourcesProcessor#4046
vogella wants to merge 2 commits into
eclipse-platform:masterfrom
vogella:lv/delete-resources-honor-lightweight-auto-refresh

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Jun 1, 2026

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

vogella and others added 2 commits June 1, 2026 13:41
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
@eclipse-platform-bot
Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.ltk.core.refactoring/META-INF/MANIFEST.MF

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 patch
From 83ec6bdebf5a1cc40994b1da9b29b819d742f91c Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Mon, 1 Jun 2026 11:47:11 +0000
Subject: [PATCH] Version bump(s) for 4.41 stream


diff --git a/bundles/org.eclipse.ltk.core.refactoring/META-INF/MANIFEST.MF b/bundles/org.eclipse.ltk.core.refactoring/META-INF/MANIFEST.MF
index 9f0f659919..0933dc953b 100644
--- a/bundles/org.eclipse.ltk.core.refactoring/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ltk.core.refactoring/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.ltk.core.refactoring
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ltk.core.refactoring; singleton:=true
-Bundle-Version: 3.15.200.qualifier
+Bundle-Version: 3.15.300.qualifier
 Bundle-Activator: org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
-- 
2.54.0

Further information are available in Common Build Issues - Missing version increments.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Test Results

   864 files  ±0     864 suites  ±0   54m 4s ⏱️ + 1m 23s
 7 990 tests ±0   7 747 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 424 runs  ±0  19 769 ✅ ±0  655 💤 ±0  0 ❌ ±0 

Results for commit 629fa12. ± Comparison against base commit ff1f1b7.

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.

Delete resource does not honor the "Refresh on access" preference

2 participants