eclipse-platform / eclipse.platform.ui

Eclipse Platform
https://projects.eclipse.org/projects/eclipse.platform
Eclipse Public License 2.0
81 stars 189 forks source link

Refresh option not available for some resources that are not closed projects #2538

Open DaveCarpeneto opened 3 days ago

DaveCarpeneto commented 3 days ago

Issue was introduced in Eclipse IDE for Java Developers, Version: 2024-03 (4.31.0), Build id: 20240307-1437 ( https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2024-03/R/eclipse-java-2024-03-R-win32-x86_64.zip )

This situation is NOT seen in the previous quarterly release (Version: 2023-12 (4.30.0), Build id: 20231201-2043), and I don't see anything mentioned regarding this functionality @ https://eclipse.dev/eclipse/news/4.31/ .

The code change that caused this was https://github.com/eclipse-platform/eclipse.platform.ui/pull/1438. I submitted an initial fix for this @ https://github.com/eclipse-platform/eclipse.platform.ui/pull/2003 , however that fix did not cover all cases.

I'm using Eclipse on Windows.

Steps to reproduce

A plugin that I work on has a view that extends org.eclipse.ui.navigator.CommonNavigator . In previous versions this provided 'Refresh (F5)' in the contextual menu for any resource. However now the menu option only exists for projects, but not other resources.

Fairly easy to trigger / reproduce. Plug-in Spy tells me the following for the menu entry I'm talking about here:

oldEclipseOScript

Community

DaveCarpeneto commented 3 days ago

Proposed fix: https://github.com/eclipse-platform/eclipse.platform.ui/pull/2539

The contextual "Refresh" option is now presented if anything is selected that is not a closed project (put another way: the "Refresh" option is only omitted if all selections are closed projects).