Skip to content

Commit 165589f

Browse files
committed
Small fixes for "inline editor label" in Breakpoints view
- Set label background to avoid overlapping text if theming is disabled. - Trim inline editor text to avoid "invisible" breakpoints Fixes #2262
1 parent f1cbc1c commit 165589f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointLabelAction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public void run(IAction action) {
8585
label.setText(ActionMessages.BreakpointLabelDialog);
8686
label.setBounds(bounds.x, bounds.y - 20, label.computeSize(SWT.DEFAULT, SWT.DEFAULT).x,
8787
label.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
88+
label.setBackground(tree.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
8889

8990
Text inlineEditor = new Text(tree.getParent(), SWT.BORDER);
9091
inlineEditor.setBounds(bounds.x, bounds.y, bounds.width, bounds.height);
@@ -106,7 +107,7 @@ public void keyPressed(KeyEvent e) {
106107
inlineEditor.dispose();
107108
label.dispose();
108109
} else if (e.keyCode == SWT.CR) {
109-
String newLabel = inlineEditor.getText();
110+
String newLabel = inlineEditor.getText().strip();
110111
if (!newLabel.isEmpty() && !newLabel.equals(current)) {
111112
try {
112113
breakpoint.setBreakpointLabel(newLabel);

0 commit comments

Comments
 (0)