Skip to content

Add "Find Class" action to the layout spy - #2400

Open
vogella wants to merge 2 commits into
eclipse-pde:masterfrom
vogella:layout-spy-find-class
Open

Add "Find Class" action to the layout spy#2400
vogella wants to merge 2 commits into
eclipse-pde:masterfrom
vogella:layout-spy-find-class

Conversation

@vogella

@vogella vogella commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Adds a Find Class button to the layout spy. It hides the spy, lets the user click any control, and then shows the owning e4 application-model element and its implementing class in a copyable field.

Reported for the clicked control:

  • model element type and id
  • implementing class (getObject()), unwrapping 3.x CompatibilityPart to reveal the real view/editor class
  • contribution URI and contributing bundle
  • for plain JFace dialogs (no model element): the shell and shell-data class

Resolution uses the e4 SWT renderer widget-data key modelElement (AbstractPartRenderer.OWNING_ME); no new bundle dependencies (MUIElement/MContribution come from the already-required org.eclipse.e4.ui.model.workbench).

Note

Stacked on #2388 (shares LayoutSpyDialog). Review/merge #2388 first; this branch already contains its changes and the diff narrows to this feature once #2388 lands.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Test Results

  129 files  ±0    129 suites  ±0   33m 58s ⏱️ - 1m 20s
3 523 tests ±0  3 469 ✅ ±0   54 💤 ±0  0 ❌ ±0 
9 372 runs  ±0  9 242 ✅ ±0  130 💤 ±0  0 ❌ ±0 

Results for commit 88a23fe. ± Comparison against base commit 509c57f.

♻️ This comment has been updated with latest results.

@vogella
vogella force-pushed the layout-spy-find-class branch from 9ce7e6a to 2cd94fe Compare July 7, 2026 14:24
@vogella
vogella force-pushed the layout-spy-find-class branch from 2cd94fe to 6e99b9f Compare July 30, 2026 17:09
@vogella
vogella marked this pull request as ready for review July 30, 2026 17:43
vogella and others added 2 commits August 2, 2026 20:17
Replace the single-level child table and the up/down navigation with a
TreeViewer that shows the full SWT control hierarchy, so ancestors,
siblings and descendants are visible at once and any node can be selected
directly. The layout and diagnostics panels are driven by the tree
selection: the layout panel shows the selected control's own layout and
the diagnostics panel shows its geometry.

The diagnostics output now also reports monitor zoom, display DPI, the
size in device pixels and the font, and warns when a size does not map to
whole device pixels or when the control sits on a monitor whose zoom
differs from its shell. This makes the spy usable for analysing HiDPI and
per-monitor scaling problems, not just plain layout issues.

A context menu on the tree copies the diagnostics of the selected node
and its children to the clipboard, mirroring the CSS spy, so the data can
be pasted into bug reports.
Adds a "Find Class" button that hides the spy, lets the user click any
control, and then reports the owning e4 application-model element and its
implementing class (contribution URI and bundle), unwrapping 3.x
compatibility parts to reveal the real view/editor class.

Reuses the shell-hiding behaviour of Select Control so the workbench
window is not hidden when the spy runs as a part.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vogella
vogella force-pushed the layout-spy-find-class branch from 6e99b9f to 88a23fe Compare August 2, 2026 18:17
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