1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 07:05:24 +02:00

[187709] don't show monitor and show in table actions for leafs (even if they are disabled)

This commit is contained in:
David McKnight 2007-05-31 11:02:44 +00:00
parent 3f1720b18f
commit 01c26f45ed

View file

@ -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);