Skip to content

Lay out the hosted view of a shown trim stack without a resize hack - #4492

Merged
akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:trimstack-layout-hosted-view
Oct 19, 2026
Merged

akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:trimstack-layout-hosted-view

Conversation

@akurtakov

Copy link
Copy Markdown
Member

Commit 04a1460 ("Fix for Bug 434062 - [Perspectives] Console View "clipped" when switching Perspectives") made TrimStack shrink the CTabFolder by one pixel when showing a minimized stack, so that the resulting resize would lay out the hosted view at the right size. This left the folder one pixel narrower until the next layout and relied on a bounds change to trigger the layout.

The CTabFolder is now laid out explicitly, including its children, after the host pane is laid out, so the hosted view fills the folder even when the folder keeps its bounds while the view was laid out elsewhere, e.g. in another perspective.

The new TrimStackTest covers showing a stack again after its part was resized.

Commit 04a1460 ("Fix for Bug 434062 -
[Perspectives] Console View "clipped" when switching Perspectives")
made TrimStack shrink the CTabFolder by one pixel when showing a
minimized stack, so that the resulting resize would lay out the hosted
view at the right size. This left the folder one pixel narrower until
the next layout and relied on a bounds change to trigger the layout.

The CTabFolder is now laid out explicitly, including its children, after
the host pane is laid out, so the hosted view fills the folder even when
the folder keeps its bounds while the view was laid out elsewhere, e.g.
in another perspective. TrimStackTest covers showing a stack again after
its part was resized.

Assisted-by: Anthropic Claude Code (claude-opus-5-5)
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   867 files  ±0     867 suites  ±0   51m 53s ⏱️ + 5m 34s
 8 464 tests +1   8 222 ✅ +1  242 💤 ±0  0 ❌ ±0 
21 270 runs  +3  20 587 ✅ +3  683 💤 ±0  0 ❌ ±0 

Results for commit 5542e30. ± Comparison against base commit a370483.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review found no blocking issues in the focused layout change or regression test; tests were not executed.

0 open findings

What changed in this PR

Replaces the minimized-stack resize workaround with explicit layout so hosted views fill their available space without changing folder bounds.

Changes:

  • Explicitly lays out the tab folder and its children after the host pane.
  • Adds and registers a regression test for showing a stack after its part was resized.
File Description
tests/​org.eclipse.e4.ui.workbench.addons.swt.test/​src/​org/​eclipse/​e4/​ui/​workbench/​addons/​minmax/​TrimStackTest.java Tests hosted-view sizing when showing a stack again.
tests/​org.eclipse.e4.ui.workbench.addons.swt.test/​src/​org/​eclipse/​e4/​ui/​workbench/​addons/​AllTests.java Registers the regression test.
bundles/​org.eclipse.e4.ui.workbench.addons.swt/​src/​org/​eclipse/​e4/​ui/​workbench/​addons/​minmax/​TrimStack.java Replaces one-pixel shrinking with explicit layout.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@akurtakov
akurtakov merged commit b1ceff5 into eclipse-platform:master Oct 19, 2026
18 checks passed
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.

2 participants