mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Project Explorer: insert separator between default build group and CDT additions
This commit is contained in:
parent
6d90042969
commit
27d2f5dc5e
2 changed files with 6 additions and 4 deletions
|
@ -1824,6 +1824,7 @@
|
|||
</actionProvider>
|
||||
<actionProvider
|
||||
class="org.eclipse.cdt.internal.ui.navigator.CNavigatorBuildActionProvider"
|
||||
dependsOn="org.eclipse.ui.navigator.resources.ResourceMgmtActions"
|
||||
id="org.eclipse.cdt.ui.navigator.actions.build">
|
||||
<enablement>
|
||||
<instanceof value="org.eclipse.cdt.core.model.ICElement"/>
|
||||
|
|
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.internal.ui.navigator;
|
|||
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.cview.CViewMessages;
|
||||
import org.eclipse.core.resources.ICommand;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
@ -22,6 +21,7 @@ import org.eclipse.core.runtime.CoreException;
|
|||
import org.eclipse.core.runtime.IAdaptable;
|
||||
import org.eclipse.jface.action.GroupMarker;
|
||||
import org.eclipse.jface.action.IMenuManager;
|
||||
import org.eclipse.jface.action.Separator;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IActionBars;
|
||||
|
@ -29,6 +29,8 @@ import org.eclipse.ui.IViewPart;
|
|||
import org.eclipse.ui.actions.BuildAction;
|
||||
import org.eclipse.ui.navigator.ICommonMenuConstants;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.cview.CViewMessages;
|
||||
|
||||
/**
|
||||
* Common Navigator compatible clone of {@link org.eclipse.cdt.internal.ui.cview.BuildGroup}.
|
||||
* <p>
|
||||
|
@ -106,14 +108,13 @@ public class CNavigatorBuildActionGroup extends AbstractCNavigatorActionGroup {
|
|||
}
|
||||
}
|
||||
|
||||
menu.insertAfter(ICommonMenuConstants.GROUP_BUILD, new GroupMarker(BUILD_GROUP_MARKER));
|
||||
|
||||
if (!selection.isEmpty() && isProjectSelection && hasBuilder) {
|
||||
fCleanAction.selectionChanged(selection);
|
||||
if (fCleanAction.isEnabled()) {
|
||||
menu.appendToGroup(BUILD_GROUP_MARKER, fCleanAction);
|
||||
menu.appendToGroup(ICommonMenuConstants.GROUP_BUILD, fCleanAction);
|
||||
}
|
||||
}
|
||||
menu.appendToGroup(ICommonMenuConstants.GROUP_BUILD, new Separator(BUILD_GROUP_MARKER));
|
||||
menu.appendToGroup(BUILD_GROUP_MARKER, new GroupMarker(BUILD_GROUP_MARKER_END));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue