From c112823c279140e29350687b3211357f72940639 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 21 Nov 2026 16:32:25 +0100 Subject: [PATCH] updates target platform to Eclipse 2026-12 --- AGENTS.md | 22 ++++----- README.md | 10 +++- .../feature.xml | 1 - .../feature.xml | 4 +- .../feature.xml | 19 ++------ .../feature.xml | 9 ---- .../com.minres.scviewer.feature/feature.xml | 4 +- .../META-INF/MANIFEST.MF | 1 - .../META-INF/MANIFEST.MF | 6 ++- .../META-INF/MANIFEST.MF | 6 ++- .../META-INF/MANIFEST.MF | 1 - .../META-INF/MANIFEST.MF | 1 - .../META-INF/MANIFEST.MF | 13 +++-- .../scviewer/e4/application/E4LifeCycle.java | 2 +- .../elements/NavigateToolbarContribution.java | 2 +- .../elements/RelationTypeToolControl.java | 8 ++-- .../WaveformPopupMenuContribution.java | 2 +- .../handlers/AddSeparatorHandler.java | 2 +- .../handlers/AddWaveformHandler.java | 2 +- .../handlers/ChangeValueDisplay.java | 2 +- .../handlers/ChangeWaveformDisplay.java | 2 +- .../e4/application/handlers/EnableHover.java | 2 +- .../application/handlers/EnableTxDetails.java | 2 +- .../handlers/LoadStoreSettingsHandler.java | 2 +- .../handlers/MoveWaveformHandler.java | 2 +- .../application/handlers/NavigateEvent.java | 2 +- .../application/handlers/NavigateTrans.java | 2 +- .../e4/application/handlers/PanHandler.java | 2 +- .../handlers/SetRelationTypeHandler.java | 2 +- .../application/handlers/ThemeSetHandler.java | 2 +- .../e4/application/handlers/ZoomHandler.java | 2 +- .../internal/status/StatusBarControl.java | 6 +-- .../internal/status/WaveStatusBarControl.java | 4 +- .../e4/application/parts/AboutDialog.java | 4 +- .../e4/application/parts/DesignBrowser.java | 4 +- .../e4/application/parts/HelpBrowser.java | 6 +-- .../application/parts/TransactionDetails.java | 6 +-- .../parts/TransactionListView.java | 2 +- .../e4/application/parts/WaveformViewer.java | 8 ++-- pom.xml | 4 +- .../scviewer.product | 10 ++-- .../com.minres.scviewer.target.target | 48 +++++++++---------- releng/com.minres.scviewer.updateSite/pom.xml | 10 ++-- .../META-INF/MANIFEST.MF | 1 + .../handlers/CommandHandlersTest.java | 30 ++++++++++++ .../handlers/WaveformBindingsTest.java | 9 +++- 46 files changed, 151 insertions(+), 140 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index dfd9d3a4..faca7f4e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -32,10 +32,10 @@ mvn -version mvn verify ``` -Maven itself must run on JDK 21. Check the Java version in `mvn -version`; changing +Maven itself must run on JDK 25. Check the Java version in `mvn -version`; changing the target platform's JRE or a bundle manifest does not change Maven's JVM. For -Eclipse Maven launches, select JDK 21 in the launch configuration's JRE tab. -Maven 3.9.16 with JDK 21 is a validated combination for this repository. +Eclipse Maven launches, select JDK 25 in the launch configuration's JRE tab. +Maven 3.9.16 with JDK 25 is a validated combination for this repository. The Tycho version is centralized in the root POM's `tycho-version` property. `.mvn/jvm.config` opens `sun.nio.ch` for JRuby used by documentation generation; @@ -83,9 +83,9 @@ Report the command, result, and any remaining warnings or untested behavior. - Perform SWT widget operations on the UI thread. Keep expensive loading and querying off it; dispose resources, detach listeners, and cancel background work when their owning view or database closes. -- Preserve compatibility with the selected Eclipse platform. It currently uses - `javax.inject`; introducing `jakarta.inject` requires a coordinated platform - migration rather than an isolated import replacement. +- Preserve compatibility with the Eclipse 2026-12 target. Use `jakarta.inject` + and `jakarta.annotation` for e4 injection and lifecycle annotations; keep bundle + imports and the OPCoach preferences build aligned with those namespaces. - FST native sources and CMake scripts live under `plugins/com.minres.scviewer.database.fst/csrc/fst/`. Native builds are separate from the Java reactor; rebuild platform libraries only when the change requires @@ -95,9 +95,9 @@ Report the command, result, and any remaining warnings or untested behavior. - Keep the target definition, bundle execution environments, product JRE, and Maven build JDK compatible. Check dependency resolution after target changes. -- The Orbit repository selection avoids an obsolete Felix SCR provider that - conflicts with Eclipse's Declarative Services API. Preserve that compatibility - when changing repository versions. +- Use the platform's SimRel builds of Commons libraries, SLF4J, and Logback. + Avoid mixing old Orbit SCR providers with the current Declarative Services API. + Commons Compress's optional IO, Lang, and Codec imports must be present at runtime. - Publish source bundles using `plugin-source` and the update site's `includeAllSources`; do not reintroduce the deprecated `feature-source` goal or generated source-feature references in `category.xml`. @@ -106,8 +106,8 @@ Report the command, result, and any remaining warnings or untested behavior. - Edit help content in `doc/com.minres.scviewer.doc/src/asciidoc/`. The documentation build copies DocBook intermediates into `src/docbkx/` and generates files inside the help bundle; review resulting diffs rather than hand-editing generated HTML. -- Read `README.md` for launch guidance, including the embedded-help configuration - directory restriction on spaces and percent escapes. +- Read `README.md` for launch guidance, including target-cache refresh and + configuration-directory restrictions for older embedded-help runtimes. - Preserve existing user changes and local recording fixtures. Do not include unrelated untracked inputs, generated `target/` contents, or rebuilt native binaries in a change. diff --git a/README.md b/README.md index 59e62c7f..257f33d2 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,13 @@ The viewer has the following features To build the plugins the Eclipse SDK or PDE can be used. +The target platform uses Eclipse 2026-12 (currently a milestone) and a bundled +Java 25 runtime. Run Maven with JDK 25 (`mvn -version`), then run `mvn verify`. +For Eclipse launches, select JDK 25 and reload the target definition. The e4 +application and OPCoach preferences use Jakarta injection and lifecycle APIs. +OPCoach reuses version 1.3.2 for its older Javax and newer Jakarta builds; refresh +cached target artifacts when switching from the old target. + Key Shortcuts ============= @@ -133,7 +140,8 @@ Development Notes ## Embedded Help -The legacy Jasper JSP loader uses `File.toURL()` for its generated-class directory. +Older target platforms use a legacy Jasper JSP loader that calls `File.toURL()` +for its generated-class directory. A PDE configuration directory containing a literal percent escape (such as `scviewer.product%20issue3`) can therefore produce HTTP 500 / `PWC6034` / `ClassNotFoundException: org.apache.jsp.index_jsp` even when the class was compiled. diff --git a/features/com.minres.scviewer.database.feature/feature.xml b/features/com.minres.scviewer.database.feature/feature.xml index 004f8e38..81680ca6 100644 --- a/features/com.minres.scviewer.database.feature/feature.xml +++ b/features/com.minres.scviewer.database.feature/feature.xml @@ -27,7 +27,6 @@ http://www.eclipse.org/legal/epl-v10.html - diff --git a/features/com.minres.scviewer.e4.feature/feature.xml b/features/com.minres.scviewer.e4.feature/feature.xml index 1177cb41..188d52bf 100644 --- a/features/com.minres.scviewer.e4.feature/feature.xml +++ b/features/com.minres.scviewer.e4.feature/feature.xml @@ -22,7 +22,7 @@ - + @@ -32,7 +32,6 @@ - @@ -44,7 +43,6 @@ - diff --git a/features/com.minres.scviewer.e4.help.feature/feature.xml b/features/com.minres.scviewer.e4.help.feature/feature.xml index 25ff33e2..516361ba 100644 --- a/features/com.minres.scviewer.e4.help.feature/feature.xml +++ b/features/com.minres.scviewer.e4.help.feature/feature.xml @@ -46,14 +46,14 @@ unpack="false"/> - diff --git a/features/com.minres.scviewer.e4.platform.feature/feature.xml b/features/com.minres.scviewer.e4.platform.feature/feature.xml index 59096886..7c17066f 100644 --- a/features/com.minres.scviewer.e4.platform.feature/feature.xml +++ b/features/com.minres.scviewer.e4.platform.feature/feature.xml @@ -66,14 +66,5 @@ fragment="true" unpack="false"/> - diff --git a/features/com.minres.scviewer.feature/feature.xml b/features/com.minres.scviewer.feature/feature.xml index 2e003e89..ae48e387 100644 --- a/features/com.minres.scviewer.feature/feature.xml +++ b/features/com.minres.scviewer.feature/feature.xml @@ -28,7 +28,7 @@ http://www.eclipse.org/legal/epl-v10.html - + @@ -49,7 +49,7 @@ http://www.eclipse.org/legal/epl-v10.html version="0.0.0"/> - org.eclipse.justj.openjdk.hotspot.jre.minimal-21 + org.eclipse.justj.openjdk.hotspot.jre.minimal-25 linux @@ -113,7 +113,7 @@ - + diff --git a/products/com.minres.scviewer.e4.product/scviewer.product b/products/com.minres.scviewer.e4.product/scviewer.product index cef59d94..5274301e 100644 --- a/products/com.minres.scviewer.e4.product/scviewer.product +++ b/products/com.minres.scviewer.e4.product/scviewer.product @@ -26,9 +26,9 @@ - org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21 - org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21 - org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21 + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-25 + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-25 + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-25 @@ -45,17 +45,13 @@ - - - - diff --git a/releng/com.minres.scviewer.target/com.minres.scviewer.target.target b/releng/com.minres.scviewer.target/com.minres.scviewer.target.target index 4412a2fe..02a48a2a 100644 --- a/releng/com.minres.scviewer.target/com.minres.scviewer.target.target +++ b/releng/com.minres.scviewer.target/com.minres.scviewer.target.target @@ -1,51 +1,47 @@ - + - + - + + + + + - + - + + + + + + + + + + - - + + - - - - - - - - + - - - - - - - - - - + diff --git a/releng/com.minres.scviewer.updateSite/pom.xml b/releng/com.minres.scviewer.updateSite/pom.xml index dc701fa7..6bf83f56 100644 --- a/releng/com.minres.scviewer.updateSite/pom.xml +++ b/releng/com.minres.scviewer.updateSite/pom.xml @@ -64,17 +64,13 @@ tycho-eclipse-plugin ${tycho-version} - - - -Djava.security.manager=allow - + JavaSE-25 -application org.eclipse.ant.core.antRunner -buildfile packaging-p2-composite.ant p2.composite.add -Dsite.label="SCViewer Software Repository" -Dproject.build.directory=${project.build.directory} -DmajorMinorVersion=${parsedVersion.majorVersion}.${parsedVersion.minorVersion} -DunqualifiedVersion=${unqualifiedVersion} -Dsoftware.download.area="${software.download.area}/SCViewer-GHP/repository" - 2021-12 p2 - http://download.eclipse.org/releases/2021-12/ + https://download.eclipse.org/releases/2026-12/ @@ -99,7 +95,7 @@ eclipse-feature - org.eclipse.equinox.ds + org.apache.felix.scr eclipse-plugin diff --git a/tests/com.minres.scviewer.e4.application.test/META-INF/MANIFEST.MF b/tests/com.minres.scviewer.e4.application.test/META-INF/MANIFEST.MF index b7c54e09..0f8478f6 100644 --- a/tests/com.minres.scviewer.e4.application.test/META-INF/MANIFEST.MF +++ b/tests/com.minres.scviewer.e4.application.test/META-INF/MANIFEST.MF @@ -4,6 +4,7 @@ Bundle-Name: SCViewer application tests Bundle-Vendor: MINRES Technologies GmbH Bundle-SymbolicName: com.minres.scviewer.e4.application.test Bundle-Version: 2.20.0 +Import-Package: org.osgi.service.event;version="1.4.0" Fragment-Host: com.minres.scviewer.e4.application Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.eclipse.e4.ui.bindings, diff --git a/tests/com.minres.scviewer.e4.application.test/src/com/minres/scviewer/e4/application/handlers/CommandHandlersTest.java b/tests/com.minres.scviewer.e4.application.test/src/com/minres/scviewer/e4/application/handlers/CommandHandlersTest.java index 680e6797..525bc340 100644 --- a/tests/com.minres.scviewer.e4.application.test/src/com/minres/scviewer/e4/application/handlers/CommandHandlersTest.java +++ b/tests/com.minres.scviewer.e4.application.test/src/com/minres/scviewer/e4/application/handlers/CommandHandlersTest.java @@ -16,6 +16,9 @@ import java.lang.reflect.Proxy; import java.util.List; import java.util.concurrent.atomic.AtomicReference; +import org.eclipse.e4.core.contexts.ContextInjectionFactory; +import org.eclipse.e4.core.contexts.EclipseContextFactory; +import org.eclipse.e4.core.di.annotations.Execute; import org.eclipse.e4.ui.model.application.ui.basic.MPart; import org.eclipse.e4.ui.workbench.modeling.EPartService; import org.eclipse.jface.viewers.ISelection; @@ -26,6 +29,7 @@ import com.minres.scviewer.database.IWaveform; import com.minres.scviewer.database.IWaveformDb; import com.minres.scviewer.database.WaveformType; import com.minres.scviewer.database.ui.TrackEntry; +import com.minres.scviewer.database.ui.ZoomKind; import com.minres.scviewer.e4.application.parts.DesignBrowser; import com.minres.scviewer.e4.application.parts.WaveformViewer; @@ -72,6 +76,32 @@ public class CommandHandlersTest { (proxy, method, args) -> method.getName().equals("getActivePart") ? active.get() : null); } + @Test + public void preferencesBundleUsesThePlatformInjectionNamespace() { + // OPCoach published Javax and Jakarta builds with the same bundle version. + var bundle = org.eclipse.core.runtime.Platform.getBundle("com.opcoach.e4.preferences"); + assertNotNull(bundle); + assertTrue("Refresh the cached OPCoach 1.3.2 artifact from the target repository", + bundle.getHeaders().get("Import-Package").contains("jakarta.inject")); + } + + @Test + public void zoomCommandResolvesItsNamedParameterThroughPlatformInjection() { + AtomicReference zoom = new AtomicReference<>(); + Viewer viewer = new Viewer() { + @Override public void zoom(ZoomKind kind) { zoom.set(kind); } + }; + var context = EclipseContextFactory.create(); + try { + context.set(EPartService.class, parts(new AtomicReference<>(part(viewer)))); + context.set(ZoomHandler.PARAMTER_ID, "in"); + ContextInjectionFactory.invoke(new ZoomHandler(), Execute.class, context); + assertEquals(ZoomKind.IN, zoom.get()); + } finally { + context.dispose(); + } + } + @Test public void combineHandlerRoutesToActiveViewerAndHonorsDialogCancellation() { var first = new TrackEntry(waveform(WaveformType.SIGNAL), null); diff --git a/tests/com.minres.scviewer.e4.application.test/src/com/minres/scviewer/e4/application/handlers/WaveformBindingsTest.java b/tests/com.minres.scviewer.e4.application.test/src/com/minres/scviewer/e4/application/handlers/WaveformBindingsTest.java index 5793ba26..b2cb8b50 100644 --- a/tests/com.minres.scviewer.e4.application.test/src/com/minres/scviewer/e4/application/handlers/WaveformBindingsTest.java +++ b/tests/com.minres.scviewer.e4.application.test/src/com/minres/scviewer/e4/application/handlers/WaveformBindingsTest.java @@ -21,6 +21,8 @@ import org.eclipse.e4.core.contexts.EclipseContextFactory; import org.eclipse.e4.ui.bindings.internal.BindingTable; import org.eclipse.e4.ui.bindings.internal.BindingTableManager; import org.eclipse.e4.ui.bindings.internal.ContextSet; +import org.eclipse.e4.ui.model.application.MApplication; +import org.eclipse.e4.ui.model.application.MApplicationFactory; import org.eclipse.jface.bindings.Binding; import org.eclipse.jface.bindings.keys.KeyBinding; import org.eclipse.jface.bindings.keys.KeySequence; @@ -37,9 +39,12 @@ public class WaveformBindingsTest { ContextSet.setComparator(new ContextSet.CComp(contexts)); var context = EclipseContextFactory.create(); try { + var application = MApplicationFactory.INSTANCE.createApplication(); + application.setContext(context); + context.set(MApplication.class, application); var manager = ContextInjectionFactory.make(BindingTableManager.class, context); - var windowTable = new BindingTable(window); - var waveformTable = new BindingTable(waveform); + var windowTable = new BindingTable(window, application); + var waveformTable = new BindingTable(waveform, application); manager.addTable(windowTable); manager.addTable(waveformTable); var commands = new CommandManager(); var category = commands.getCategory("test"); category.define("test", "");