mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 03:53:21 +02:00
Added separator to Compile/User Action dynamic menu's.
This commit is contained in:
parent
2261632a16
commit
a8535007a9
3 changed files with 15 additions and 9 deletions
|
@ -42,15 +42,15 @@
|
|||
<extension point="org.eclipse.ui.menus">
|
||||
<menuContribution locationURI="popup:org.eclipse.rse.ui.view.systemView">
|
||||
<menu id="org.eclipse.rse.ui.useractions.compile.menu"
|
||||
label="%DynamicLabel.CompileActionNode"
|
||||
mnemonic="useractions.dynamiccompilemenu.mnemonic">
|
||||
label="%DynamicLabel.CompileActionNode">
|
||||
<dynamic class="org.eclipse.rse.useractions.ui.compile.SystemDynamicCompileMenu"
|
||||
id="org.eclipse.ui.rse.ui.views.dynamiccompilemenu">
|
||||
</dynamic>
|
||||
<visibleWhen>
|
||||
<with
|
||||
variable="activeMenuSelection">
|
||||
<iterate>
|
||||
<iterate
|
||||
ifEmpty="false">
|
||||
<adapt
|
||||
type="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
|
||||
</adapt>
|
||||
|
@ -59,15 +59,15 @@
|
|||
</visibleWhen>
|
||||
</menu>
|
||||
<menu id="org.eclipse.rse.ui.useractions.useraction.menu"
|
||||
label="%DynamicLabel.UserActionNode"
|
||||
mnemonic="useractions.dynamicuseractionmenu.mnemonic">
|
||||
label="%DynamicLabel.UserActionNode">
|
||||
<dynamic class="org.eclipse.rse.useractions.ui.uda.SystemDynamicUserActionMenu"
|
||||
id="org.eclipse.ui.rse.ui.views.dynamicuseractionmenu">
|
||||
</dynamic>
|
||||
<visibleWhen>
|
||||
<with
|
||||
variable="activeMenuSelection">
|
||||
<iterate>
|
||||
<iterate
|
||||
ifEmpty="false">
|
||||
<adapt
|
||||
type="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
|
||||
</adapt>
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.eclipse.core.runtime.IAdaptable;
|
|||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.ActionContributionItem;
|
||||
import org.eclipse.jface.action.IContributionItem;
|
||||
import org.eclipse.jface.action.Separator;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.rse.core.RSECorePlugin;
|
||||
|
@ -126,13 +127,15 @@ public class SystemDynamicCompileMenu extends CompoundContributionItem
|
|||
// add a separator before Work With Compile Commands... menu item
|
||||
//ourSubMenu.add(new Separator());
|
||||
// add Work With Commands... action
|
||||
if (returnedItemList.size() > 0)
|
||||
returnedItemList.add(new Separator());
|
||||
|
||||
// Here's where you would dynamically generate your list
|
||||
SystemWorkWithCompileCommandsAction workWithCompileCommandAction = new SystemWorkWithCompileCommandsAction(shell, true, subsystem, compileManager);
|
||||
workWithCompileCommandAction.setSelection(selection);
|
||||
TestContribution testContribution = new TestContribution(workWithCompileCommandAction);
|
||||
returnedItemList.add(testContribution);
|
||||
IContributionItem[] list = (IContributionItem[])returnedItemList.toArray(new ActionContributionItem[]{});
|
||||
IContributionItem[] list = (IContributionItem[])returnedItemList.toArray(new IContributionItem[]{});
|
||||
//String[] array = (String[])arrayList.toArray(new String[]{});
|
||||
//SystemCascadingCompileAction promptAction = new SystemCascadingCompileAction(null, true);
|
||||
//list[0] = new TestContribution(/*promptAction*/);
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.eclipse.core.runtime.IAdaptable;
|
|||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.ActionContributionItem;
|
||||
import org.eclipse.jface.action.IContributionItem;
|
||||
import org.eclipse.jface.action.Separator;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.rse.core.RSECorePlugin;
|
||||
|
@ -109,7 +110,9 @@ public class SystemDynamicUserActionMenu extends CompoundContributionItem
|
|||
// add a separator before Work With Compile Commands... menu item
|
||||
//ourSubMenu.add(new Separator());
|
||||
// add Work With Commands... action
|
||||
|
||||
if (returnedItemList.size() > 0)
|
||||
returnedItemList.add(new Separator());
|
||||
|
||||
SystemWorkWithUDAsAction wwAction;
|
||||
wwAction = new SystemWorkWithUDAsAction(shell, systemUDActionSubsystem.getSubsystem(), systemUDActionSubsystem);
|
||||
wwAction.setText(SystemUDAResources.RESID_WORKWITH_UDAS_ACTION_LABEL);
|
||||
|
@ -119,7 +122,7 @@ public class SystemDynamicUserActionMenu extends CompoundContributionItem
|
|||
UserActionContribution userActionContribution = new UserActionContribution(wwAction);
|
||||
returnedItemList.add(userActionContribution);
|
||||
|
||||
IContributionItem[] list = (IContributionItem[])returnedItemList.toArray(new ActionContributionItem[]{});
|
||||
IContributionItem[] list = (IContributionItem[])returnedItemList.toArray(new IContributionItem[]{});
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue