From 5c4c65d8c3bfdf1f18247d174394212fb9915ae5 Mon Sep 17 00:00:00 2001 From: Hitesh Soliwal Date: Thu, 22 Oct 2026 09:44:21 +0530 Subject: [PATCH 1/7] feat(JFace): receive source-sealed selected state m3-eclipse-selection-structuredviewer-20261022 --- .../jface/viewers/StructuredViewer.java | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java index 043068ed885..48afb6ae826 100644 --- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java +++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java @@ -103,6 +103,16 @@ public abstract class StructuredViewer extends ContentViewer implements IPostSel */ private boolean inChange; + /** True only while an M3 caller requests selection preservation. */ + private boolean m3PreservingSelection; + + /** The active M3 owner, distinct from calls made by its final listeners. */ + private boolean m3SelectionActive; + + private boolean m3SelectionRequested; + private ISelection m3RequestedSelection; + private boolean m3RequestedReveal; + /** * Used while a selection change is in progress on this viewer to indicates * whether the selection should be restored. @@ -816,6 +826,9 @@ public void run() { * @see #addPostSelectionChangedListener(ISelectionChangedListener) */ protected void firePostSelectionChanged(final SelectionChangedEvent event) { + if (m3PreservingSelection && inChange) { + return; + } for (ISelectionChangedListener l : postSelectionChangedListeners) { SafeRunnable.run(new SafeRunnable() { @Override @@ -1358,6 +1371,74 @@ protected void preservingSelection(Runnable updateCode) { preservingSelection(updateCode, false); } + /* Reuse virtual preservation, including subclass check-state ownership. */ + void m3PreservingSelection(Runnable updateCode) { + if (!getPreserveSelection()) { + updateCode.run(); + return; + } + boolean previous = m3PreservingSelection; + m3PreservingSelection = true; + try { + preservingSelection(updateCode); + } finally { + m3PreservingSelection = previous; + } + } + + private void preservingM3Selection(Runnable updateCode, boolean reveal) { + if (m3SelectionActive) { + updateCode.run(); + return; + } + if (!preserveSelection) { + return; + } + boolean previousInChange = inChange; + boolean previousRestoreSelection = restoreSelection; + boolean previousRequested = m3SelectionRequested; + ISelection previousSelection = m3RequestedSelection; + boolean previousReveal = m3RequestedReveal; + ISelection oldSelection = getSelection(); + m3SelectionActive = true; + m3SelectionRequested = false; + m3RequestedSelection = null; + m3RequestedReveal = false; + try { + inChange = restoreSelection = true; + updateCode.run(); + } finally { + try { + Control control = getControl(); + if (control != null && !control.isDisposed() && (m3SelectionRequested || restoreSelection)) { + ISelection selection = m3SelectionRequested ? m3RequestedSelection : oldSelection; + boolean restoreReveal = m3SelectionRequested ? m3RequestedReveal : reveal; + ISelection currentSelection = getSelection(); + boolean unchanged = selection == null ? currentSelection.isEmpty() : currentSelection.equals(selection); + if (restoreReveal || !unchanged) { + setSelectionToWidget(selection, restoreReveal); + } + } + } finally { + // Native restoration may call setSelection again through Modify. + // Its request wins, without replaying restoration in a loop. + inChange = previousInChange; + restoreSelection = previousRestoreSelection && restoreSelection; + m3SelectionActive = false; + m3SelectionRequested = previousRequested; + m3RequestedSelection = previousSelection; + m3RequestedReveal = previousReveal; + } + Control control = getControl(); + if (!previousInChange && control != null && !control.isDisposed()) { + ISelection newSelection = getSelection(); + if (!newSelection.equals(oldSelection)) { + handleInvalidSelection(oldSelection, newSelection); + } + } + } + } + /** * Attempts to preserves the current selection across a run of the given * code, with a best effort to avoid scrolling if reveal is @@ -1383,6 +1464,10 @@ protected void preservingSelection(Runnable updateCode) { * @since 3.3 */ void preservingSelection(Runnable updateCode, boolean reveal) { + if (m3PreservingSelection) { + preservingM3Selection(updateCode, reveal); + return; + } if (!preserveSelection) { return; } @@ -1674,6 +1759,11 @@ public void setSelection(ISelection selection, boolean reveal) { firePostSelectionChanged(new SelectionChangedEvent(this, sel)); } else { restoreSelection = false; + if (m3SelectionActive) { + m3SelectionRequested = true; + m3RequestedSelection = selection; + m3RequestedReveal = reveal; + } setSelectionToWidget(selection, reveal); } } @@ -2134,6 +2224,9 @@ protected final void updateItem(Widget widget, Object element) { * the selection, or null if none */ protected void updateSelection(ISelection selection) { + if (m3PreservingSelection && inChange) { + return; + } SelectionChangedEvent event = new SelectionChangedEvent(this, selection); fireSelectionChanged(event); } From 63fb9680ccd5cf66e1ef500f86d3f9da8519a94c Mon Sep 17 00:00:00 2001 From: Hitesh Soliwal Date: Thu, 22 Oct 2026 09:44:26 +0530 Subject: [PATCH 2/7] feat(JFace): receive source-sealed selected state m3-eclipse-selection-structuredviewerinternals-20261022 --- .../jface/viewers/StructuredViewerInternals.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewerInternals.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewerInternals.java index b99249fe3d6..1553e02186a 100644 --- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewerInternals.java +++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewerInternals.java @@ -92,4 +92,17 @@ protected static Widget[] getItems(StructuredViewer viewer, Object element) { return viewer.findItems(element); } + /** + * Internal access for the explicit M3 delta selection boundary. The viewer + * remains the owner of selection and subclass check-state preservation. + * + * @param viewer the viewer + * @param updateCode the synchronous update + * @since 3.43 + */ + @NoReference + public static void preservingSelection(StructuredViewer viewer, Runnable updateCode) { + viewer.m3PreservingSelection(updateCode); + } + } From 785a23fb388ba6d50a34d1552b9a3a6d11d60f71 Mon Sep 17 00:00:00 2001 From: Hitesh Soliwal Date: Thu, 22 Oct 2026 09:44:32 +0530 Subject: [PATCH 3/7] feat(JFace): receive source-sealed selected state m3-eclipse-selection-comboviewer-20261022 --- .../src/org/eclipse/jface/viewers/ComboViewer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ComboViewer.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ComboViewer.java index 3769dbbe51e..b3712effc5e 100644 --- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ComboViewer.java +++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ComboViewer.java @@ -12,6 +12,7 @@ * IBM Corporation - initial API and implementation * Sebastian Davids - bug 69254 * Lars Vogel - Bug 430873 + * Hitesh Soliwal (Synexia) - clear absent selections without overwriting callbacks *******************************************************************************/ package org.eclipse.jface.viewers; @@ -209,6 +210,10 @@ public void reveal(Object element) { @Override protected void listSetSelection(int[] ixs) { + if (ixs.length == 0) { + listDeselectAll(); + return; + } if (combo == null) { for (int ix : ixs) { ccombo.select(ix); @@ -224,7 +229,6 @@ protected void listSetSelection(int[] ixs) { protected void listDeselectAll() { if (combo == null) { ccombo.deselectAll(); - ccombo.clearSelection(); } else { combo.deselectAll(); combo.clearSelection(); From 03235a263fb2efa746ff6254b28fd7e7de6abb2f Mon Sep 17 00:00:00 2001 From: Hitesh Soliwal Date: Thu, 22 Oct 2026 09:45:01 +0530 Subject: [PATCH 4/7] feat(JFace): receive source-sealed m3-eclipse-selection-m3viewers-20261022 --- .../eclipse/jface/viewers/m3/M3Viewers.java | 51 +++++++++++++++++-- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/m3/M3Viewers.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/m3/M3Viewers.java index d38f0bc33eb..fcadd56125b 100644 --- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/m3/M3Viewers.java +++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/m3/M3Viewers.java @@ -21,7 +21,9 @@ import org.eclipse.jface.viewers.AbstractListViewer; import org.eclipse.jface.viewers.AbstractTableViewer; import org.eclipse.jface.viewers.AbstractTreeViewer; +import org.eclipse.jface.viewers.ComboViewer; import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.StructuredViewerInternals; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; @@ -31,9 +33,10 @@ *
    *
  • {@link #apply} applies a delta now, on the UI thread, with consecutive * operations of one kind batched into one viewer call;
  • - *
  • {@link #post} queues a delta from any thread. Deltas posted in a burst - * are merged and applied once, after {@code delayMillis} without a newer post - * (superseding-generation debounce), and at the latest after four delays;
  • + *
  • {@link #post(StructuredViewer, M3ViewerDelta, int)} queues a delta from any + * thread. Deltas posted in a burst are merged and applied once, after + * {@code delayMillis} without a newer post + * (rescheduled debounce), and at the latest after four initial delays;
  • *
  • {@link #flush} applies a queued delta at once. The viewers call it * before every {@code refresh}, so a refresh never runs ahead of queued * deltas.
  • @@ -60,7 +63,8 @@ private M3Viewers() { /** * Applies {@code delta} to {@code viewer} now. Must run on the viewer's UI - * thread. + * thread. ComboViewer UPDATE runs preserve their logical selection, including + * explicit selection requests made by callbacks. * * @param viewer the viewer * @param delta the delta; it is not changed @@ -90,6 +94,37 @@ public static void apply(StructuredViewer viewer, M3ViewerDelta delta) { } } + /** + * Applies {@code delta} now, preserving the viewer's selection across the + * complete sequence. A selected element may be removed and reinserted by the + * patch without exposing an intermediate selection change. An explicit + * selection set by a callback takes precedence over restoring the old one. + * Nested calls join the current selection boundary. + *

    + * Checkbox viewers use their existing check-state preservation, including + * the authority of an installed check-state provider. This method does not + * save or restore a tree's expansion state. Exceptions propagate as for + * {@link #apply}; a partially applied delta is not rolled back. + *

    + *

    + * Must run on the viewer's UI thread. This entry point preserves selection + * across the complete delta. Ordinary {@link #apply} and + * {@link #post(StructuredViewer, M3ViewerDelta, int)} preserve ComboViewer + * selection within each UPDATE run. + *

    + * + * @param viewer the viewer + * @param delta the delta; it is not changed + * @since 3.43 (M3 enhanced API) + */ + public static void applyPreservingSelection(StructuredViewer viewer, M3ViewerDelta delta) { + Control control = viewer.getControl(); + if (control == null || control.isDisposed() || delta.isEmpty()) { + return; + } + StructuredViewerInternals.preservingSelection(viewer, () -> apply(viewer, delta)); + } + /* applies the run of operations starting at i; returns the index after it */ private static int run(StructuredViewer viewer, M3ViewerDelta delta, int i) { byte kind = delta.kind(i); @@ -117,7 +152,13 @@ private static int run(StructuredViewer viewer, M3ViewerDelta delta, int i) { && Arrays.equals(delta.properties(end), delta.properties(i))) { end++; } - viewer.update(elements(delta, i, end), delta.properties(i)); + Object[] updated = elements(delta, i, end); + String[] properties = delta.properties(i); + if (viewer instanceof ComboViewer) { + StructuredViewerInternals.preservingSelection(viewer, () -> viewer.update(updated, properties)); + } else { + viewer.update(updated, properties); + } } default -> { if (delta.element(i) == null) { From fae3b1502fe382d25e48922a90dd1aefd4de6795 Mon Sep 17 00:00:00 2001 From: Hitesh Soliwal Date: Thu, 22 Oct 2026 09:45:06 +0530 Subject: [PATCH 5/7] feat(JFace): receive source-sealed m3-eclipse-selection-m3viewerdifferential-20261022 --- .../viewers/m3/M3ViewerDifferential.java | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/M3ViewerDifferential.java b/tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/M3ViewerDifferential.java index 146bbf7012c..b7e111646b9 100644 --- a/tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/M3ViewerDifferential.java +++ b/tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/M3ViewerDifferential.java @@ -239,7 +239,10 @@ Row newRow() { return r; } - /** A model of {@code n} rows with a few equal duplicates (first-match semantics). */ + /** + * A model of {@code n} base rows plus a few additional rows. Equal duplicates + * are retained for flat viewers; tree siblings must have distinct ids. + */ void newModel(int n) { model = new ArrayList<>(); for (int i = 0; i < n; i++) { @@ -247,7 +250,8 @@ void newModel(int n) { } for (int d = n / 20; d > 0; d--) { Row original = model.get(random.nextInt(model.size())); - model.add(random.nextInt(model.size()), new Row(original.id, d)); + int at = random.nextInt(model.size()); + model.add(at, variant.startsWith("tree") ? new Row(nextId++, 0) : new Row(original.id, d)); } root = new Row(-1, 0); root.children.addAll(model); @@ -311,11 +315,12 @@ java.util.List run(Display display, int steps) { Shell shell = new Shell(display); shell.setLayout(new FillLayout()); shell.setSize(420, 320); - shell.open(); try { newModel(40 + random.nextInt(400)); StructuredViewer v = create(shell); v.setInput(input()); + shell.layout(true, true); + shell.open(); record(display, v, "setInput"); for (int step = 0; step < steps; step++) { String op; @@ -450,11 +455,17 @@ void record(Display display, StructuredViewer v, String op) { while (display.readAndDispatch()) { // let paint and deferred events run } + Control control = v.getControl(); + org.eclipse.swt.graphics.Point size = control.getSize(); + if (size.x <= 0 || size.y <= 0) { + throw new IllegalStateException("Viewer control must have positive size: " + size); + } StringBuilder b = new StringBuilder(op); b.append(" | sel=").append(ids(v.getStructuredSelection().toList())); b.append(" | ").append(calls.drain()); - b.append(" | ").append(widgetState(v.getControl())); - b.append(" | px=").append(pixels(v.getControl())); + b.append(" | size=").append(size.x).append('x').append(size.y); + b.append(" | ").append(widgetState(control)); + b.append(" | px=").append(pixels(control)); log.add(b.toString()); } From 2b63f816b12ed51f50f6a774c34f0a0315f2d909 Mon Sep 17 00:00:00 2001 From: Hitesh Soliwal Date: Thu, 22 Oct 2026 09:45:10 +0530 Subject: [PATCH 6/7] test(JFace): receive four selected-state SWT owner regressions --- .../viewers/m3/M3SelectionReceiverTest.java | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/M3SelectionReceiverTest.java diff --git a/tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/M3SelectionReceiverTest.java b/tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/M3SelectionReceiverTest.java new file mode 100644 index 00000000000..def08f37548 --- /dev/null +++ b/tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/M3SelectionReceiverTest.java @@ -0,0 +1,141 @@ +/******************************************************************************* + * Copyright (c) 2026 Hitesh Soliwal and contributors. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0, which is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.jface.tests.viewers.m3; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.eclipse.jface.viewers.ArrayContentProvider; +import org.eclipse.jface.viewers.ComboViewer; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.m3.M3ViewerDelta; +import org.eclipse.jface.viewers.m3.M3Viewers; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CCombo; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +/** + * Original SWT/JFace selection owners after the source-sealed M3 atom promotion. + * This is intentionally separate from the already qualified queue test class: + * it adds no dependency on private queue implementation fields or timer races. + */ +public class M3SelectionReceiverTest { + private static final class Row { + String label; + Row(String label) { this.label = label; } + } + + private Shell shell; + + @BeforeEach + public void setUp() { + shell = new Shell(Display.getDefault()); + shell.setLayout(new FillLayout()); + shell.setSize(320, 180); + shell.open(); + } + + @AfterEach + public void tearDown() { + if (!shell.isDisposed()) { + shell.dispose(); + } + } + + private static V initialize(V viewer, List rows) { + viewer.setContentProvider(ArrayContentProvider.getInstance()); + viewer.setLabelProvider(new LabelProvider() { + @Override + public String getText(Object element) { + return ((Row) element).label; + } + }); + viewer.setInput(rows); + return viewer; + } + + @Test + public void explicitPreservationKeepsTheSamePhysicalRowAfterRemoveAndReinsert() { + Row kept = new Row("kept"); + Row other = new Row("other"); + List rows = new ArrayList<>(List.of(kept, other)); + TableViewer viewer = initialize(new TableViewer(shell, SWT.MULTI), rows); + viewer.setSelection(new StructuredSelection(kept)); + rows.remove(kept); + rows.add(kept); + M3Viewers.applyPreservingSelection(viewer, + new M3ViewerDelta().remove(kept).add(rows, kept, -1)); + assertSame(kept, viewer.getStructuredSelection().getFirstElement()); + assertEquals(2, viewer.getTable().getItemCount()); + } + + @Test + public void comboUpdatePreservesOwnerSelectionAcrossLabelMutation() { + Row selected = new Row("before"); + Row other = new Row("other"); + List rows = new ArrayList<>(List.of(selected, other)); + ComboViewer viewer = initialize(new ComboViewer(shell, SWT.READ_ONLY), rows); + viewer.setSelection(new StructuredSelection(selected)); + selected.label = "after"; + M3Viewers.apply(viewer, new M3ViewerDelta().update(selected, null)); + assertSame(selected, viewer.getStructuredSelection().getFirstElement()); + assertEquals("after", viewer.getCombo().getItem(0)); + } + + @Test + public void ccomboEmptyExplicitSelectionClearsNativeIndex() { + Row selected = new Row("first"); + List rows = new ArrayList<>(List.of(selected, new Row("second"))); + ComboViewer viewer = initialize(new ComboViewer(new CCombo(shell, SWT.READ_ONLY)), rows); + viewer.setSelection(new StructuredSelection(selected)); + assertEquals(0, viewer.getCCombo().getSelectionIndex()); + viewer.setSelection(StructuredSelection.EMPTY); + assertEquals(-1, viewer.getCCombo().getSelectionIndex()); + assertTrue(viewer.getStructuredSelection().isEmpty()); + } + + @Test + public void callbackSelectionDuringComboUpdateOutranksPriorSelection() { + Row previous = new Row("old"); + Row requested = new Row("new"); + List rows = new ArrayList<>(List.of(previous, requested)); + ComboViewer viewer = new ComboViewer(shell, SWT.READ_ONLY); + AtomicBoolean reselect = new AtomicBoolean(); + viewer.setContentProvider(ArrayContentProvider.getInstance()); + viewer.setLabelProvider(new LabelProvider() { + @Override + public String getText(Object element) { + if (element == previous && reselect.compareAndSet(true, false)) { + viewer.setSelection(new StructuredSelection(requested)); + } + return ((Row) element).label; + } + }); + viewer.setInput(rows); + viewer.setSelection(new StructuredSelection(previous)); + previous.label = "changed"; + reselect.set(true); + M3Viewers.apply(viewer, new M3ViewerDelta().update(previous, null)); + assertSame(requested, viewer.getStructuredSelection().getFirstElement()); + } +} From 9c05efa006906fdb54281784f9292cbcc56fd5fc Mon Sep 17 00:00:00 2001 From: Hitesh Soliwal Date: Thu, 22 Oct 2026 09:59:20 +0530 Subject: [PATCH 7/7] ci(JFace): receive canonical source-hash and Java21 model proof workflow --- .../m3-jface-selection-source-20261022.yml | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/m3-jface-selection-source-20261022.yml diff --git a/.github/workflows/m3-jface-selection-source-20261022.yml b/.github/workflows/m3-jface-selection-source-20261022.yml new file mode 100644 index 00000000000..5aefa0e5e01 --- /dev/null +++ b/.github/workflows/m3-jface-selection-source-20261022.yml @@ -0,0 +1,75 @@ +# SPDX-FileCopyrightText: 2026 Hitesh Soliwal and Contributors to the Synexia Project +# SPDX-License-Identifier: Apache-2.0 +name: M3 JFace Selection Source and Model Gate +on: + push: + branches: + - codex/eclipse-jface-selection-on-36-20261022 + paths: + - 'bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/**' + - 'tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/**' + - '.github/workflows/m3-jface-selection-source-20261022.yml' + pull_request: + branches: + - codex/eclipse-jface-best-merged-20261022 + paths: + - 'bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/**' + - 'tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/**' + - '.github/workflows/m3-jface-selection-source-20261022.yml' +permissions: + contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + source-and-model: + name: Verify exact JFace atoms plus pinned Java21 model (not native SWT) + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Checkout the exact Eclipse PR head + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - name: Setup Java21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + - name: Verify all source-sealed JFace postimages and original fast lanes + shell: bash + run: | + set -euo pipefail + cat <<'M3_POSTIMAGES' | sha256sum --check --status + b6ca713a0c886912fe38247206e38a2e423caf32bb5ff843764ea93de9c792af bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java + 62a94bdf7717b59a10bd341ebae84b3a57149d1792af19ac7755f2538c23d830 bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewerInternals.java + 615b01136455c2202fd0cc2fd3ef551c7968902ca3919f23fefcb9dc1c9f3a0b bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ComboViewer.java + 2ee741c25d27fb3b04bedafd6ad7c9ba08efff865c3b749b883a6466d534437a bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/m3/M3Viewers.java + ba85eecc3c7f91bcdb7df8249e009390771bb9b6f68572402d0e411a2fea968a tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/M3ViewerDifferential.java + c998c56be9bc6033057df3a62e65874cdbaacd6e6bbb0c45820c8e6acf74008e tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/viewers/m3/M3SelectionReceiverTest.java + M3_POSTIMAGES + observed=$(git hash-object bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/m3/M3ViewerDelta.java) + test "$observed" = 'b68f93b3854e49ad0571905ad274823c9c502bae' + grep -q 'public static void applyPreservingSelection' bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/m3/M3Viewers.java + - name: Checkout the pinned canonical Synexia recipe and isolated oracle + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + repository: hsoliwal/com.synexia + ref: 48fde6ad83d5889126aa3570deaa247801b95c8e + path: canonical + persist-credentials: false + - name: Refuse queue loss and execute strict Java21 selection model + shell: bash + run: | + set -euo pipefail + python3 - <<'PY' + from pathlib import Path + prefix = 'bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/m3/M3Viewers.java' + post = Path(prefix).read_bytes() + donor = Path('canonical/synexia-openrewrite-recipes/src/main/resources/com/synexia/rewrite/hash-pinned-java/m3-eclipse-selection-m3viewers-20261022/pre/postimage.java.txt').read_bytes() + marker = b'\tprivate static final class Queue {' + assert marker in post and marker in donor + assert post[post.index(marker):] == donor[donor.index(marker):], 'M3 queue contract was overwritten' + print('PASS: original M3 five-lane append and owner queue preserved') + PY + bash canonical/synexia-openrewrite-recipes/recipe-crates/m3-eclipse-jface-selection-20261022/evidence/model/verify-isolated.sh