Community
Participate
Working Groups
Build Identifier: Version: Indigo Release Build id: 20110615-0604 Based on its title, this looks like a reopen of https://bugs.eclipse.org/bugs/show_bug.cgi?id=232370 :: "Refresh including a closed project doesn't refresh". When any closed project is selected, Refresh is disabled, F5 does nothing. This is a request for the Refresh action to ignore closed projects and proceed to refresh all open projects. There would seem to be no harm in ignoring closed projects during a refresh. Other discussions on this topic: http://stackoverflow.com/a/2518466/452210 http://stackoverflow.com/a/1212650/452210 Reproducible: Always Steps to Reproduce: 1. Open org.eclipse.ui.navigator.resources.ProjectExplorer window. 2. Select any two project where one project is closed. 3. Observe that Refresh is no longer available from the context menu, and F5 does nothing.
I have the same problem. I often want to refresh my entire workspace. I use ctrl+a to select all projects, but then I can't use refresh, as the closed projects prevent this. I have to unselect the closed ones, and only then I can refresh. Since I often have about half my projects closed, refreshing the workspace becomes rather frustrating. Ignoring closed projects (and perhaps other items that disallow refresh) would be nice.
By the way, there is a way to refresh the entire workspace, even if you have closed projects. It is a bit of a hidden feature: see bug 58770, comment 2 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=58770#c2).
See also bug 109966.
Pull request https://github.com/eclipse/eclipse.platform.ui/pull/2 Proposal is to change RefreshAction.updateSelection() to no longer delegate to WorkspaceAction.updateSelection(), which rejects when there is a non-accessible (closed) resources. Also ResourceMgmtActionProvider changes such that RefreshAction is added provided at least one project is open (was no projects closed). One alternative to removing the delegation to WorkspaceAction.updateSelection() would be to copy-down its logic and add special processing for IProject so that non-project resources are not impacted. It this necessary?
(In reply to comment #0) > Build Identifier: Version: Indigo Release Build id: 20110615-0604 > > Based on its title, this looks like a reopen of > https://bugs.eclipse.org/bugs/show_bug.cgi?id=232370 :: "Refresh including a > closed project doesn't refresh". That bug is not related. It is about working sets and the Package Explorer. What is requested in this bug never worked. (In reply to comment #4) > Pull request https://github.com/eclipse/eclipse.platform.ui/pull/2 The patch touches the right locations but it should only enable the RefreshAction if at least 1 project is open (like in the ResourceMgmtActionProvider). Also, can you please add your credentials to the copyright notice, e.g. Dani Megert <dani@eclipse.org> - this is a bug - https://bugs.eclipse.org/nr And, to make this bug self-contained, please attach a patch here. This also implicitly makes you accept the EPL. Ah, and for the 'Package Explorer' see bug 109966.
Created attachment 228807 [details] patch to R3_8_maintenance Here's an updated patch. I've swapped !hasClosedProjects for hasOpenProjects, and instead of checking IResource.isAccessible() directly, a new method WorkspaceAction.updateSelected(IResource resource) is introduced, which defaults to IResource.isAccessible(). RefreshAction overrides this to allow any IProject instance to not block Refresh, even if it is closed. This makes the behaviour consistent for Project Explorer and Navigator views: as long as an open project is selected, Refresh is available. I checked your other bug-reference for Package Explorer (this is a view I don't use very often) - my current branch is based on R3_8_maintenance, so I didn't have relevant commits dcacd5c,8c1be65,9d94870, but when I pull those in Package Explorer then also behaves the same. Brett
Comment on attachment 228807 [details] patch to R3_8_maintenance The fix is not good. It has at least two problems: - Refresh is no longer in the context menu of folders and files - The Refresh action is still enabled even the selection only contains closed projects
We can review another patch updated with Dani's last comments. PW
Would be nice to see this resolved along with https://bugs.eclipse.org/bugs/show_bug.cgi?id=515797 ..
(In reply to Justin Dolezy from comment #9) > Would be nice to see this resolved along with > https://bugs.eclipse.org/bugs/show_bug.cgi?id=515797 .. A high quality Gerrit change is welcome.
This is probably one of the MOST annoying bugs in the Eclipse IDE. I'd really like to se a fix for this issue. Workaround so far has been to remove all closed bundles in my working sets. This will re-enable "Refresh" in the context menu. It's not ideal, but it sort of works.