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:
parent
3f1720b18f
commit
01c26f45ed
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue