Skip to content

Commit

Permalink
Refresh is disabled if closed projects are included eclipse-platform#876
Browse files Browse the repository at this point in the history


Refreshing all open projects, even if closed projects are included.

Fixes: eclipse-platform/eclipse.platform#876
  • Loading branch information
Dinesh0723 committed Dec 20, 2023
1 parent 44efc1d commit 687737c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,9 @@ protected boolean updateSelection(IStructuredSelection selection) {
if (!super.updateSelection(selection) || selection.isEmpty()) {
return false;
}
if (getSelectedResources().size() > 1) {
return true;
}
for (IResource r : getSelectedResources()) {
if (!r.isAccessible()) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ public void fillContextMenu(IMenuManager menu) {
buildAction.selectionChanged(selection);
menu.appendToGroup(ICommonMenuConstants.GROUP_BUILD, buildAction);
}
if (!hasClosedProjects) {
// To refresh, even if one project is open
if (hasOpenProjects) {
refreshAction.selectionChanged(selection);
menu.appendToGroup(ICommonMenuConstants.GROUP_BUILD, refreshAction);
}
Expand Down

0 comments on commit 687737c

Please sign in to comment.