Skip to content

Commit 8940a4f

Browse files
committed
Show 'Find' context only for valid expressions
Make 'Find' context in Expressions view appears only when valid expressions exist.
1 parent 3e8e40e commit 8940a4f

File tree

1 file changed

+4
-2
lines changed
  • debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression

1 file changed

+4
-2
lines changed

debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2020 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -80,7 +80,9 @@ protected void configureToolBar(IToolBarManager tbm) {
8080
protected void fillContextMenu(IMenuManager menu) {
8181
menu.add(new Separator(IDebugUIConstants.EMPTY_EXPRESSION_GROUP));
8282
menu.add(new Separator(IDebugUIConstants.EXPRESSION_GROUP));
83-
menu.add(getAction(FIND_ACTION));
83+
if (DebugPlugin.getDefault().getExpressionManager().getExpressions().length > 0) {
84+
menu.add(getAction(FIND_ACTION));
85+
}
8486
ChangeVariableValueAction changeValueAction = (ChangeVariableValueAction)getAction("ChangeVariableValue"); //$NON-NLS-1$
8587
if (changeValueAction.isApplicable()) {
8688
menu.add(changeValueAction);

0 commit comments

Comments
 (0)