Skip to content

Commit 1504ac6

Browse files
deepika-uelsazac
authored andcommitted
In Project Explorer view,added a separator after the 'Refresh' command
Fixes #267
1 parent e6eb975 commit 1504ac6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2006, 2018 IBM Corporation and others.
2+
* Copyright (c) 2006, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -32,6 +32,7 @@
3232
import org.eclipse.core.runtime.Status;
3333
import org.eclipse.core.runtime.jobs.ISchedulingRule;
3434
import org.eclipse.jface.action.IMenuManager;
35+
import org.eclipse.jface.action.Separator;
3536
import org.eclipse.jface.resource.ImageDescriptor;
3637
import org.eclipse.jface.viewers.IStructuredSelection;
3738
import org.eclipse.jface.viewers.StructuredViewer;
@@ -147,6 +148,7 @@ public void fillContextMenu(IMenuManager menu) {
147148
if (hasOpenProjects || selectionContainsNonProject) {
148149
refreshAction.selectionChanged(selection);
149150
menu.appendToGroup(ICommonMenuConstants.GROUP_BUILD, refreshAction);
151+
menu.appendToGroup(ICommonMenuConstants.GROUP_BUILD, new Separator());
150152
}
151153
if (hasClosedProjects) {
152154
openProjectAction.selectionChanged(selection);

tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/resources/ResourceMgmtActionProviderTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024 Dave Carpeneto and others.
2+
* Copyright (c) 2025 Dave Carpeneto and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -211,7 +211,7 @@ private void checkMenuHasCorrectContributions(boolean... actions) {
211211
*/
212212
private boolean menuHasContribution(String contribution) {
213213
for (IContributionItem thisItem : manager.getItems()) {
214-
if (thisItem.getId().equals(contribution)) {
214+
if (thisItem.getId() != null && thisItem.getId().equals(contribution)) {
215215
return true;
216216
}
217217
}

0 commit comments

Comments
 (0)