Skip to content

Commit 7a98ae6

Browse files
committed
In Project Explorer view,added a separator after the 'Refresh' command
Fixes #267
1 parent cda7fe2 commit 7a98ae6

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

bundles/org.eclipse.ui.navigator.resources/META-INF/MANIFEST.MF

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %Plugin.name
44
Bundle-SymbolicName: org.eclipse.ui.navigator.resources; singleton:=true
5-
Bundle-Version: 3.9.600.qualifier
5+
Bundle-Version: 3.9.700.qualifier
66
Bundle-Activator: org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorPlugin
77
Bundle-Vendor: %Plugin.providerName
88
Bundle-Localization: plugin

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)