Skip to content

M3: repair shared JFace viewer delta dispatch and iterative tree lookup - #27

Merged
hsoliwal merged 16 commits into
masterfrom
m3/jface-all-viewers-core-repair-20261021
Oct 23, 2026
Merged

hsoliwal merged 16 commits into
masterfrom
m3/jface-all-viewers-core-repair-20261021

Conversation

@hsoliwal

@hsoliwal hsoliwal commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Goal

Fix the common JFace viewer infrastructure used by all table, tree and list viewers before converting the remaining Eclipse views to the Problems-view-style single-model event/delta pipeline. This is a scoped core repair, not a claim that every leaf view is converted.

Changes

  • M3Viewers.post: stop reading viewer.getControl(), control.isDisposed() and control.getDisplay() from worker threads; choose a Display first and do all viewer/widget access on its UI thread. Add an explicit owning-Display overload for non-default displays.
  • M3Viewers.flush: check Display.getCurrent() before accessing the viewer/control; existing non-UI flush stays a no-op.
  • M3ViewerDelta.append: freeze the source operation count; append(this) now terminates and appends one original snapshot in order, without per-operation objects.
  • AbstractTreeViewer + M3ViewerPaths: opt-in A5, non-hashed recursive tree search becomes a child-array + primitive-offset iterative preorder. Same matching and callback order, no thread-stack growth on deep paths.
  • Update the existing M3InsertStatements OpenRewrite YAML, inventory and design documentation, and add regression tests in the existing Eclipse JFace tests.

Checks

  • Executed locally, Java 21 isolated algorithm harness: 20,000 random-tree/query comparisons identical to the recursive oracle, including exact data/equals/getChildren callback trace; an unmatched 100,000-depth tree completed with -Xss256k.
  • GitHub compare: exactly 11 relevant paths, current master base, no base rewrites, 14 additive commits.
  • Authored but not executed here: Eclipse JFace/PDE tests for self-append, tree preorder, cross-thread post; existing JFace viewer differential remains the required owning oracle.
  • Not executed: full Tycho reactor, SWT GUI/pixel differential, JDK21/JNI native integration, multi-display GUI verification. Keep as draft and do not flip the default viewer mode.

Scope boundary

Already-landed Problems/Tasks/Bookmarks/All Markers and JFace work (#21/#25/#26) is left unchanged. Project Explorer, Outline/JDT, Properties, Progress, Error Log, Search Results, Quick Search, e4 stacks and Console are separately inventoried at docs/m3/views/VIEW_INVENTORY.tsv and need their own change-source adapters and differential proofs before they can be called fixed.

Recipe/source custody

docs/m3/jface-viewport/recipe/META-INF/rewrite/m3-jface-viewport.yml now specifies A5. Canonical Maven/OpenRewrite mastery and full fixed-point/admission tests must be carried to hsoliwal/com.synexia before promotion. No force push, squash, rebase or untested full-view rewrite.

Verification ledger: docs/m3/views/SHARED_VIEWER_REPAIR_20261021.md.

Full cross-fork viewer checklist retained as ALL_VIEWERS_PROGRAMME_20261021.md. GitHub Issues is disabled for this repository, so the checklist is kept under reviewable source custody instead.

Coalesce only adjacent single refresh posts for the identical target. Bind timers to their pending batch so older callbacks cannot drain newer work. Preserve ordered updates and explicit direct apply operations, with focused SWT regression and nine-variant coverage.
Chronological non-squash merge into the original feature base. Preserve source ancestry and existing code; wider platform acceptance remains separately gated. Do not force/rebase/delete branches.

Copy link
Copy Markdown
Owner Author

Source-level reconciliation warning — 2026-10-22

A fresh master-based, source-sealed successor is open as #36, with the canonical Maven/OpenRewrite source recipes in Synexia #12917.

Please do not copy or merge this PR's M3Viewers.java / M3ViewerDelta.java wholesale into current master without owner-level reconciliation: master already contains merged #28's faster five-lane System.arraycopy append and immutable System.nanoTime/deadlineNanos first-post timer bound. This branch's M3ViewerDelta.append uses per-item push, and its queue recomputes a wall-clock deadline using the latest delay; either can regress an already delivered atom.

#36 preserves current master M3ViewerDelta and tests byte-for-byte. It selectively receives this PR's off-worker SWT access repair, explicit owning-Display post overload and UI-safe flush, the feature-stacked #30 adjacent-refresh coalescing, opt-in M3ViewerPaths iterative A5 and AbstractTreeViewer hook, and a 16-method union of these JFace tests with the two #28 deadline regressions.

Exact receiver Git blob readback matches the precommitted canonical postimages. A Java21 isolated algorithm oracle passed 460,010 checks; full new Maven/SDK, Tycho, SWT native GTK/Win32/Cocoa, JFace test and resource/performance qualification are not yet completed. Keep both PRs reviewable; #36 is the preferred master-based conflict-resolution path, not an assertion that the entire viewer program is done.

hsoliwal added a commit that referenced this pull request Oct 22, 2026
hsoliwal added a commit that referenced this pull request Oct 22, 2026
Seven added documentation paths, zero deletions. Keep canonical SWT/JFace implementation intact; retain original verification provenance.
@hsoliwal
hsoliwal merged commit 7063273 into master Oct 23, 2026
hsoliwal added a commit that referenced this pull request Oct 23, 2026
Integrate PR #45 as the reviewed composite successor of #27 and #37/#35, preserving complete merge ancestry and JFace viewport/selection/display-safety implementations. No squash, no branch deletion.
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