|
1 | 1 | /******************************************************************************* |
2 | | - * Copyright (c) 2000, 2020 IBM Corporation and others. |
| 2 | + * Copyright (c) 2000, 2025 IBM Corporation and others. |
3 | 3 | * |
4 | 4 | * This program and the accompanying materials |
5 | 5 | * are made available under the terms of the Eclipse Public License 2.0 |
|
23 | 23 | import org.eclipse.debug.core.ILaunch; |
24 | 24 | import org.eclipse.debug.core.model.IDebugElement; |
25 | 25 | import org.eclipse.debug.core.model.IWatchExpression; |
| 26 | +import org.eclipse.debug.internal.ui.DebugPluginImages; |
26 | 27 | import org.eclipse.debug.internal.ui.IDebugHelpContextIds; |
27 | 28 | import org.eclipse.debug.internal.ui.actions.expressions.EditWatchExpressinInPlaceAction; |
28 | 29 | import org.eclipse.debug.internal.ui.actions.expressions.PasteWatchExpressionsAction; |
@@ -80,13 +81,18 @@ protected void configureToolBar(IToolBarManager tbm) { |
80 | 81 | protected void fillContextMenu(IMenuManager menu) { |
81 | 82 | menu.add(new Separator(IDebugUIConstants.EMPTY_EXPRESSION_GROUP)); |
82 | 83 | menu.add(new Separator(IDebugUIConstants.EXPRESSION_GROUP)); |
83 | | - menu.add(getAction(FIND_ACTION)); |
| 84 | + IAction action; |
| 85 | + if (DebugPlugin.getDefault().getExpressionManager().getExpressions().length > 0) { |
| 86 | + action = getAction(FIND_ACTION); |
| 87 | + action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_FIND_ACTION)); |
| 88 | + menu.add(action); |
| 89 | + } |
84 | 90 | ChangeVariableValueAction changeValueAction = (ChangeVariableValueAction)getAction("ChangeVariableValue"); //$NON-NLS-1$ |
85 | 91 | if (changeValueAction.isApplicable()) { |
86 | 92 | menu.add(changeValueAction); |
87 | 93 | } |
88 | 94 | menu.add(new Separator()); |
89 | | - IAction action = new AvailableLogicalStructuresAction(this); |
| 95 | + action = new AvailableLogicalStructuresAction(this); |
90 | 96 | if (action.isEnabled()) { |
91 | 97 | menu.add(action); |
92 | 98 | } |
|
0 commit comments