Expose the layout spy through the PDE spy infrastructure#2383
Merged
Conversation
b9bc988 to
c7ef213
Compare
c7ef213 to
14a6407
Compare
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.
14a6407 to
883e55a
Compare
There was a problem hiding this comment.
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
LayoutSpyDialogto support both standalone-shell and hosted-composite construction. - Register the new spy part via
plugin.xmland update bundle metadata (version +jakarta.annotationimport).
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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+F9key binding, so it can still be opened on top of blocking (modal) dialogs, where a regular spy part cannot be shown. To support both,LayoutSpyDialogwas refactored so its UI builds into either its own shell or a hosting composite, and the newLayoutSpyParthosts it inside the spy window. The spy part registers no shortcut, so the layout spy keeps its single global keystroke.