Skip to content

Report a missing layout in the layout spy output - #2422

Open
vogella wants to merge 1 commit into
eclipse-pde:masterfrom
vogella:layout-spy-null-layout
Open

Report a missing layout in the layout spy output#2422
vogella wants to merge 1 commit into
eclipse-pde:masterfrom
vogella:layout-spy-null-layout

Conversation

@vogella

@vogella vogella commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

The layout section of the layout spy stayed empty for composites that have no layout, both in the details panel and in the copied widget tree. That looks like a broken spy rather than like a statement about the widget, so it now prints getLayout() == null, mirroring the getLayoutData() == null line right above it. For leaf controls the section is dropped completely instead of repeating "not a Composite" for every label and button in a tree dump.

While in there: the truncation check for grid layouts intersected the parent bounds with themselves instead of with the child bounds, so the intersection always matched and the warnings about missing grab flags could never be shown.

The layout section of the widget details and of the copied widget tree
stayed empty for composites without a layout, which reads like a defect
in the spy rather than like information about the widget. Print
getLayout() == null instead, mirroring the getLayoutData() == null line
right above it, and leave the section out entirely for leaf controls,
where it only repeated that the control is not a composite.

Also fix the truncation check for grid layouts, which intersected the
parent bounds with themselves instead of with the child bounds. The
intersection was therefore always equal to the child rectangle and the
warnings about missing grab flags could never appear.
@github-actions

Copy link
Copy Markdown

Test Results

  129 files  +    4    129 suites  +4   37m 48s ⏱️ + 8m 40s
3 534 tests ±    0  3 480 ✅ +    1   54 💤 ± 0  0 ❌  - 1 
9 405 runs  +2 139  9 275 ✅ +2 116  130 💤 +24  0 ❌  - 1 

Results for commit 7771088. ± Comparison against base commit ae96885.

@vogella

vogella commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

#2425

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.

1 participant