Skip to content

Commit

Permalink
Refresh option only available for projects #1904
Browse files Browse the repository at this point in the history
Returns functionality whereby open projects _and_ non-project resources get the 'refresh' contextual menu (option was removed for non-project resources via the fix @ eclipse-platform/eclipse.platform#876 ).
  • Loading branch information
DaveCarpeneto authored and mickaelistria committed Jun 26, 2024
1 parent 160dfa8 commit d6c128e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ public void fillContextMenu(IMenuManager menu) {
buildAction.selectionChanged(selection);
menu.appendToGroup(ICommonMenuConstants.GROUP_BUILD, buildAction);
}
// To refresh, even if one project is open
if (hasOpenProjects) {
// Add the 'refresh' item if any selection is either (a) an open project, or (b)
// a non-project selection (so the 'refresh' item is not shown if all selections
// are closed projects)
if (hasOpenProjects || !isProjectSelection) {
refreshAction.selectionChanged(selection);
menu.appendToGroup(ICommonMenuConstants.GROUP_BUILD, refreshAction);
}
Expand Down

0 comments on commit d6c128e

Please sign in to comment.