Skip to content

Remove try/catch workaround in BreakpointLabelAction - #3001

Open
ravnskjaer wants to merge 1 commit into
eclipse-platform:masterfrom
ravnskjaer:remove-breakpoint-label-workaround
Open

ravnskjaer wants to merge 1 commit into
eclipse-platform:masterfrom
ravnskjaer:remove-breakpoint-label-workaround

Conversation

@ravnskjaer

Copy link
Copy Markdown

Follow-up to eclipse-platform/eclipse.platform.swt#3628, which fixes eclipse-platform/eclipse.platform.swt#2749.

Removes the try/catch workaround in BreakpointLabelAction.computeInlineEditorBounds(), which is no longer needed now that TreeItem.getBounds() no longer throws on Cocoa.

Verified manually on macOS Tahoe 26.6.2 (Apple M1) with SWT containing eclipse-platform/eclipse.platform.swt#3628: editing a breakpoint label with a custom font works without the workaround.

The workaround in computeInlineEditorBounds() caught the
ArrayIndexOutOfBoundsException thrown by TreeItem.getBounds() on
macOS. That exception is fixed in SWT by
eclipse-platform/eclipse.platform.swt#3628
(included in I-builds from I20261007-2300 onwards), so the workaround
is no longer needed.

Follow-up to eclipse-platform/eclipse.platform.swt#2749
@@ -112,27 +112,11 @@ public void keyPressed(KeyEvent e) {

private static Rectangle computeInlineEditorBounds(TreeItem treeItem) {
Rectangle bounds;

@SougandhS SougandhS Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please inline this variable

Suggested change
Rectangle bounds;
Rectangle bounds = treeItem.getBounds();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Mac] TreeItem.getBounds() throws ArrayIndexOutOfBoundsException for labelled breakpoints with custom fonts

2 participants