From 01c26f45ed482683615ad6fe5389fdeeb9c36f95 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Thu, 31 May 2007 11:02:44 +0000 Subject: [PATCH] [187709] don't show monitor and show in table actions for leafs (even if they are disabled) --- .../UI/org/eclipse/rse/internal/ui/view/SystemView.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java index c165cdb1dbd..ae75b1d99de 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java @@ -860,6 +860,7 @@ public class SystemView extends SafeTreeViewer Object selectedObject = selection.getFirstElement(); ISystemViewElementAdapter adapter = getViewAdapter(selectedObject); + boolean hasChildren = adapter.hasChildren((IAdaptable)selectedObject); if (!selectionIsRemoteObject) { GoIntoAction goIntoAction = getGoIntoAction(); @@ -868,7 +869,7 @@ public class SystemView extends SafeTreeViewer if (singleSelection) { // dkm - first find out if the selection will have children // only add this action if there are children - if (adapter.hasChildren((IAdaptable)selectedObject)) + if (hasChildren) { menu.appendToGroup(ISystemContextMenuConstants.GROUP_GOTO, goIntoAction); } @@ -882,7 +883,7 @@ public class SystemView extends SafeTreeViewer } } - if (showGenericShowInTableAction()) { + if (showGenericShowInTableAction() && hasChildren) { SystemShowInTableAction showInTableAction = getShowInTableAction(); showInTableAction.setSelection(selection); menu.appendToGroup(getOpenToPerspectiveAction().getContextMenuGroup(), showInTableAction);