Skip to content

Expose the layout spy through the PDE spy infrastructure#2383

Merged
vogella merged 1 commit into
eclipse-pde:masterfrom
vogella:layout-spy-as-spy-part
Jun 29, 2026
Merged

Expose the layout spy through the PDE spy infrastructure#2383
vogella merged 1 commit into
eclipse-pde:masterfrom
vogella:layout-spy-as-spy-part

Conversation

@vogella

@vogella vogella commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

The SWT layout spy is now also available through the PDE spy infrastructure: it shows up in the PDE spies window and the Window menu alongside the other spies, so it is discoverable rather than only reachable via a key binding.

It remains callable independently through its existing command and the M1+M2+M3+F9 key binding, so it can still be opened on top of blocking (modal) dialogs, where a regular spy part cannot be shown. To support both, LayoutSpyDialog was refactored so its UI builds into either its own shell or a hosting composite, and the new LayoutSpyPart hosts it inside the spy window. The spy part registers no shortcut, so the layout spy keeps its single global keystroke.

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

Test Results

  129 files  ±0    129 suites  ±0   34m 41s ⏱️ - 2m 22s
3 527 tests ±0  3 473 ✅ ±0   54 💤 ±0  0 ❌ ±0 
9 384 runs  ±0  9 254 ✅ ±0  130 💤 ±0  0 ❌ ±0 

Results for commit 883e55a. ± Comparison against base commit 5da4977.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the layout-spy-as-spy-part branch from b9bc988 to c7ef213 Compare June 24, 2026 14:18
@vogella vogella marked this pull request as ready for review June 24, 2026 17:24
@vogella vogella force-pushed the layout-spy-as-spy-part branch from c7ef213 to 14a6407 Compare June 25, 2026 06:29
Contribute the SWT layout spy as a spyPart so it appears in the PDE
spies window and menu next to the other spies, while keeping the
existing command and the M1+M2+M3+F9 key binding so it can still be
opened on top of blocking dialogs where a spy part cannot be shown.

LayoutSpyDialog can now build its contents into any composite, which
lets the new LayoutSpyPart host it inside the spy window. The spy part
registers no shortcut, so the layout spy keeps its single global
keystroke.

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.

Pull request overview

This PR makes the SWT Layout Spy discoverable by exposing it as a PDE spy part (appearing in the PDE spies window / Window menu), while keeping the existing standalone command + keybinding for use on modal dialogs. To support both entry points, LayoutSpyDialog is refactored to build its UI either into its own shell or into a provided hosting Composite, and a new LayoutSpyPart hosts it in the PDE spy infrastructure.

Changes:

  • Add a new PDE spy part (LayoutSpyPart) that embeds the Layout Spy UI in the spy window.
  • Refactor LayoutSpyDialog to support both standalone-shell and hosted-composite construction.
  • Register the new spy part via plugin.xml and update bundle metadata (version + jakarta.annotation import).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
ui/org.eclipse.tools.layout.spy/src/org/eclipse/tools/layout/spy/internal/parts/LayoutSpyPart.java New PDE spy part that creates the hosted Layout Spy UI.
ui/org.eclipse.tools.layout.spy/src/org/eclipse/tools/layout/spy/internal/dialogs/LayoutSpyDialog.java Refactor to support embedding into a hosting composite in addition to the standalone dialog shell.
ui/org.eclipse.tools.layout.spy/plugin.xml Register Layout Spy as a PDE spy part (no shortcut) alongside existing command/binding.
ui/org.eclipse.tools.layout.spy/META-INF/MANIFEST.MF Bump bundle version and add jakarta.annotation import for @PostConstruct.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vogella vogella merged commit 6202ee1 into eclipse-pde:master Jun 29, 2026
19 checks passed
@vogella vogella deleted the layout-spy-as-spy-part branch June 29, 2026 06:12
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