4 Commits
35 changed files with 122 additions and 76 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>de.neitzel.fxdesigner</groupId> <groupId>de.neitzel.fxdesigner</groupId>
<artifactId>neitzel-fx-designer</artifactId> <artifactId>neitzel-fx-designer</artifactId>
<version>0.1.1</version> <version>0.1.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>designer-contracts</artifactId> <artifactId>designer-contracts</artifactId>
<properties> <properties>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>de.neitzel.fxdesigner</groupId> <groupId>de.neitzel.fxdesigner</groupId>
<artifactId>neitzel-fx-designer</artifactId> <artifactId>neitzel-fx-designer</artifactId>
<version>0.1.1</version> <version>0.1.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>designer-core</artifactId> <artifactId>designer-core</artifactId>
<properties> <properties>
@@ -345,11 +345,11 @@ public final class BuildRefresh implements AutoCloseable {
List.of( List.of(
"-DskipTests=true", "-DskipTests=true",
"-Dmaven.test.skip=false", "-Dmaven.test.skip=false",
"de.neitzel.fxdesigner:designer-maven-plugin:0.1.1:plan", "de.neitzel.fxdesigner:designer-maven-plugin:0.1.2-SNAPSHOT:plan",
"clean", "clean",
"de.neitzel.fxdesigner:designer-maven-plugin:0.1.1:dependencies", "de.neitzel.fxdesigner:designer-maven-plugin:0.1.2-SNAPSHOT:dependencies",
"package", "package",
"de.neitzel.fxdesigner:designer-maven-plugin:0.1.1:capture", "de.neitzel.fxdesigner:designer-maven-plugin:0.1.2-SNAPSHOT:capture",
"-Ddesigner.captureDir=" + metadata)); "-Ddesigner.captureDir=" + metadata));
return List.copyOf(command); return List.copyOf(command);
} }
@@ -22,9 +22,9 @@ public final class ConnectedWorkflowContract {
public int run(HostServices host, Path root, Path fixture) throws Exception { public int run(HostServices host, Path root, Path fixture) throws Exception {
var tools = var tools =
List.of( List.of(
root.resolve("designer-target-tools/target/designer-target-tools-0.1.1.jar"), root.resolve("designer-target-tools/target/designer-target-tools-0.1.2-SNAPSHOT.jar"),
root.resolve("designer-contracts/target/designer-contracts-0.1.1.jar"), root.resolve("designer-contracts/target/designer-contracts-0.1.2-SNAPSHOT.jar"),
root.resolve("designer-preview-api/target/designer-preview-api-0.1.1.jar")); root.resolve("designer-preview-api/target/designer-preview-api-0.1.2-SNAPSHOT.jar"));
var workflow = var workflow =
new DesignerWorkflow( new DesignerWorkflow(
host, host,
+3 -3
View File
@@ -4,7 +4,7 @@ plugins {
id("org.jetbrains.intellij.platform") version "2.20.1" id("org.jetbrains.intellij.platform") version "2.20.1"
} }
group = "de.neitzel.fxdesigner" group = "de.neitzel.fxdesigner"
version = "0.1.1" version = "0.1.2-SNAPSHOT"
repositories { repositories {
mavenLocal { content { includeGroup("de.neitzel.fxdesigner") } } mavenLocal { content { includeGroup("de.neitzel.fxdesigner") } }
mavenCentral() mavenCentral()
@@ -20,7 +20,7 @@ dependencies {
annotationProcessor(lombok) annotationProcessor(lombok)
testCompileOnly(lombok) testCompileOnly(lombok)
testAnnotationProcessor(lombok) testAnnotationProcessor(lombok)
implementation("de.neitzel.fxdesigner:designer-kit-ui:0.1.1") implementation("de.neitzel.fxdesigner:designer-kit-ui:0.1.2-SNAPSHOT")
intellijPlatform { intellijPlatform {
local(providers.gradleProperty("ideaHome").orElse(providers.environmentVariable("IDEA_HOME"))) local(providers.gradleProperty("ideaHome").orElse(providers.environmentVariable("IDEA_HOME")))
testFramework(TestFrameworkType.Platform) testFramework(TestFrameworkType.Platform)
@@ -31,7 +31,7 @@ dependencies {
implementation("org.openjfx:javafx-$it:26:$fxPlatform") implementation("org.openjfx:javafx-$it:26:$fxPlatform")
} }
testImplementation("junit:junit:4.13.2") testImplementation("junit:junit:4.13.2")
testImplementation("de.neitzel.fxdesigner:designer-core:0.1.1:tests") testImplementation("de.neitzel.fxdesigner:designer-core:0.1.2-SNAPSHOT:tests")
} }
intellijPlatform { intellijPlatform {
pluginConfiguration { pluginConfiguration {
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>de.neitzel.fxdesigner</groupId> <groupId>de.neitzel.fxdesigner</groupId>
<artifactId>neitzel-fx-designer</artifactId> <artifactId>neitzel-fx-designer</artifactId>
<version>0.1.1</version> <version>0.1.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>designer-kit-ui</artifactId> <artifactId>designer-kit-ui</artifactId>
<properties> <properties>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>de.neitzel.fxdesigner</groupId> <groupId>de.neitzel.fxdesigner</groupId>
<artifactId>neitzel-fx-designer</artifactId> <artifactId>neitzel-fx-designer</artifactId>
<version>0.1.1</version> <version>0.1.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>designer-maven-plugin</artifactId> <artifactId>designer-maven-plugin</artifactId>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
+1 -1
View File
@@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"> <project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent><groupId>de.neitzel.fxdesigner</groupId><artifactId>neitzel-fx-designer</artifactId><version>0.1.1</version></parent> <parent><groupId>de.neitzel.fxdesigner</groupId><artifactId>neitzel-fx-designer</artifactId><version>0.1.2-SNAPSHOT</version></parent>
<artifactId>designer-model-processor</artifactId> <artifactId>designer-model-processor</artifactId>
<properties><module.java.release>25</module.java.release></properties> <properties><module.java.release>25</module.java.release></properties>
<dependencies> <dependencies>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>de.neitzel.fxdesigner</groupId> <groupId>de.neitzel.fxdesigner</groupId>
<artifactId>neitzel-fx-designer</artifactId> <artifactId>neitzel-fx-designer</artifactId>
<version>0.1.1</version> <version>0.1.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>designer-preview-api</artifactId> <artifactId>designer-preview-api</artifactId>
<properties> <properties>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>de.neitzel.fxdesigner</groupId> <groupId>de.neitzel.fxdesigner</groupId>
<artifactId>neitzel-fx-designer</artifactId> <artifactId>neitzel-fx-designer</artifactId>
<version>0.1.1</version> <version>0.1.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>designer-standalone</artifactId> <artifactId>designer-standalone</artifactId>
<properties> <properties>
@@ -9,7 +9,7 @@ public final class Launcher {
} }
if (args.length == 1 && args[0].equals("--version")) { if (args.length == 1 && args[0].equals("--version")) {
System.out.println( System.out.println(
"Neitzel FX Designer 0.1.1; Java " "Neitzel FX Designer 0.1.2-SNAPSHOT; Java "
+ System.getProperty("java.version") + System.getProperty("java.version")
+ "; runtime " + "; runtime "
+ System.getProperty("java.home")); + System.getProperty("java.home"));
@@ -18,7 +18,7 @@ public final class WorkerLifecycleSmoke {
List.of("target-tools", "contracts", "preview-api").stream() List.of("target-tools", "contracts", "preview-api").stream()
.map( .map(
n -> n ->
root.resolve("designer-" + n + "/target/designer-" + n + "-0.1.1.jar")) root.resolve("designer-" + n + "/target/designer-" + n + "-0.1.2-SNAPSHOT.jar"))
.toList(); .toList();
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
var output = new StringBuffer(); var output = new StringBuffer();
@@ -15,9 +15,9 @@ public final class WorkerOwnerProbe {
new DraftOverlay(store.lease(store.state("fixture").lastSuccessful()), List.of()))) { new DraftOverlay(store.lease(store.state("fixture").lastSuccessful()), List.of()))) {
worker.start( worker.start(
List.of( List.of(
root.resolve("designer-target-tools/target/designer-target-tools-0.1.1.jar"), root.resolve("designer-target-tools/target/designer-target-tools-0.1.2-SNAPSHOT.jar"),
root.resolve("designer-contracts/target/designer-contracts-0.1.1.jar"), root.resolve("designer-contracts/target/designer-contracts-0.1.2-SNAPSHOT.jar"),
root.resolve("designer-preview-api/target/designer-preview-api-0.1.1.jar")), root.resolve("designer-preview-api/target/designer-preview-api-0.1.2-SNAPSHOT.jar")),
s -> {}); s -> {});
Files.writeString(pid, Long.toString(worker.pid())); Files.writeString(pid, Long.toString(worker.pid()));
Thread.sleep(60000); Thread.sleep(60000);
@@ -32,9 +32,9 @@ public final class WorkflowSmoke {
new HostServices.RuntimeInstallation(java, 25))); new HostServices.RuntimeInstallation(java, 25)));
var tools = var tools =
List.of( List.of(
root.resolve("designer-target-tools/target/designer-target-tools-0.1.1.jar"), root.resolve("designer-target-tools/target/designer-target-tools-0.1.2-SNAPSHOT.jar"),
root.resolve("designer-contracts/target/designer-contracts-0.1.1.jar"), root.resolve("designer-contracts/target/designer-contracts-0.1.2-SNAPSHOT.jar"),
root.resolve("designer-preview-api/target/designer-preview-api-0.1.1.jar")); root.resolve("designer-preview-api/target/designer-preview-api-0.1.2-SNAPSHOT.jar"));
try (var host = try (var host =
new StandaloneHost( new StandaloneHost(
runtimes, runtimes,
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>de.neitzel.fxdesigner</groupId> <groupId>de.neitzel.fxdesigner</groupId>
<artifactId>neitzel-fx-designer</artifactId> <artifactId>neitzel-fx-designer</artifactId>
<version>0.1.1</version> <version>0.1.2-SNAPSHOT</version>
</parent> </parent>
<artifactId>designer-target-tools</artifactId> <artifactId>designer-target-tools</artifactId>
<properties> <properties>
+1 -1
View File
@@ -34,7 +34,7 @@ The launcher manifest orders the patched shared Kit classes before upstream Kit.
`jpackage` adds nested input JARs to its generated host classpath. Worker tools are therefore copied to `Contents/app/tools` after launcher creation; an assembly assertion rejects leaked tool paths. The host package includes no IntelliJ SDK, target application library or test JARs. Target tools, contracts and preview API are supplied separately to the target JVM, which resolves application dependencies from the immutable build snapshot. `jpackage` adds nested input JARs to its generated host classpath. Worker tools are therefore copied to `Contents/app/tools` after launcher creation; an assembly assertion rejects leaked tool paths. The host package includes no IntelliJ SDK, target application library or test JARs. Target tools, contracts and preview API are supplied separately to the target JVM, which resolves application dependencies from the immutable build snapshot.
The application reports version `0.1.1`. The macOS bundle uses numeric version `1.0` because this JDK's `jpackage` rejects a zero leading version component. The archive has no Developer ID signature or notarization. Application building still requires its configured JDK, Maven and dependency access; bundling the designer does not make builds offline. The application reports version `0.1.2-SNAPSHOT`. The macOS bundle uses numeric version `1.0` because this JDK's `jpackage` rejects a zero leading version component. The archive has no Developer ID signature or notarization. Application building still requires its configured JDK, Maven and dependency access; bundling the designer does not make builds offline.
## Automated qualification ## Automated qualification
+1 -1
View File
@@ -31,7 +31,7 @@ Start with the German contact-book guide or use the [Person desk quick start](qu
The tested host baseline is macOS arm64, Java 25 and JavaFX/Kit 26. The reference application uses Java 25 and JavaFX 27.0.1. IntelliJ is qualified against build **263.7307.200**. These are tested combinations, not a claim that arbitrary JavaFX, JDK, IDE or OS versions work. The tested host baseline is macOS arm64, Java 25 and JavaFX/Kit 26. The reference application uses Java 25 and JavaFX 27.0.1. IntelliJ is qualified against build **263.7307.200**. These are tested combinations, not a claim that arbitrary JavaFX, JDK, IDE or OS versions work.
Install the Designer tooling `0.1.1` from this checkout. Published Designer versions are available from the [Gitea Maven registry](https://gitea.neitzel.de/api/packages/konrad/maven), which Maven can use as both a dependency and plugin repository. The target tools compile against the [NeitzelLib `1.0.6` release baseline](../runtime/neitzellib-baseline.md). Install the Designer tooling `0.1.2-SNAPSHOT` from this checkout. Published Designer versions are available from the [Gitea Maven registry](https://gitea.neitzel.de/api/packages/konrad/maven), which Maven can use as both a dependency and plugin repository. The target tools compile against the [NeitzelLib `1.0.6` release baseline](../runtime/neitzellib-baseline.md).
The contact-book tutorial uses that release. The Person Desk source checkout The contact-book tutorial uses that release. The Person Desk source checkout
and the Spring fixture can exercise the separated development runtime. and the Spring fixture can exercise the separated development runtime.
See [provider setup and compatibility](projects.md#use-the-separated-fx-runtime-with-neitzel-di). See [provider setup and compatibility](projects.md#use-the-separated-fx-runtime-with-neitzel-di).
+1 -1
View File
@@ -24,7 +24,7 @@ mvn -B -ntp javafx:run
## 2. Dieselbe FXML im Neitzel Designer öffnen ## 2. Dieselbe FXML im Neitzel Designer öffnen
Für die Vorschau kommen die Designer-Werkzeuge `0.1.1`, das lokale Plugin und ein **IntelliJ SDK 263.7307.200 auf macOS** hinzu. Der Host nutzt JavaFX/Kit 26; das Ziel verwendet weiterhin JavaFX 27.0.1. Folge der [Plugin-Installation und lokalen Konfiguration](kontakt-tutorial.md#4-das-projekt-mit-dem-designer-verbinden), inklusive `embed.scene.builder=false`. Nutzt du ein separates Maven-Repository, brauchen App-Build, Designer-Build und der in IntelliJ gestartete Prozess dessen Pfad. Für die Vorschau kommen die Designer-Werkzeuge `0.1.2-SNAPSHOT`, das lokale Plugin und ein **IntelliJ SDK 263.7307.200 auf macOS** hinzu. Der Host nutzt JavaFX/Kit 26; das Ziel verwendet weiterhin JavaFX 27.0.1. Folge der [Plugin-Installation und lokalen Konfiguration](kontakt-tutorial.md#4-das-projekt-mit-dem-designer-verbinden), inklusive `embed.scene.builder=false`. Nutzt du ein separates Maven-Repository, brauchen App-Build, Designer-Build und der in IntelliJ gestartete Prozess dessen Pfad.
1. Öffne `src/main/resources/de/neitzel/contactbook/view/ContactBook.fxml`. Wähle den Editor **Neitzel Designer** und darin **Build and Refresh**. Warte auf den erfolgreichen Build; der gewöhnliche IntelliJ-Build genügt nicht. 1. Öffne `src/main/resources/de/neitzel/contactbook/view/ContactBook.fxml`. Wähle den Editor **Neitzel Designer** und darin **Build and Refresh**. Warte auf den erfolgreichen Build; der gewöhnliche IntelliJ-Build genügt nicht.
2. Wähle **Kontaktverwaltung · Beispieldaten** und **Interactive preview**. Anders als die unbefüllte App zeigt das Vorschaufenster `Ada Lovelace` und `Grace Hopper`. Ziehe das Fenster bei Bedarf breiter und höher, damit Schaltflächen und Detailfelder vollständig sichtbar sind. Wähle Ada und probiere die beiden Listen. Tippe einen neuen Namen, klicke **Speichern**, ändere ihn erneut und klicke **Laden**: Nur der Vorschau-Snapshot wird geladen. 2. Wähle **Kontaktverwaltung · Beispieldaten** und **Interactive preview**. Anders als die unbefüllte App zeigt das Vorschaufenster `Ada Lovelace` und `Grace Hopper`. Ziehe das Fenster bei Bedarf breiter und höher, damit Schaltflächen und Detailfelder vollständig sichtbar sind. Wähle Ada und probiere die beiden Listen. Tippe einen neuen Namen, klicke **Speichern**, ändere ihn erneut und klicke **Laden**: Nur der Vorschau-Snapshot wird geladen.
+1 -1
View File
@@ -14,7 +14,7 @@ Die überprüfte Ausgangskombination für dieses Beispiel ist:
| Maven | 3.9.11 oder neuer | | Maven | 3.9.11 oder neuer |
| JavaFX der Anwendung | 27.0.1 | | JavaFX der Anwendung | 27.0.1 |
| NeitzelLib FX | `1.0.6`, aus der Gitea Maven-Registry | | NeitzelLib FX | `1.0.6`, aus der Gitea Maven-Registry |
| IntelliJ-Plugin | NeitzelFXDesigner `0.1.1`, lokal gebaut | | IntelliJ-Plugin | NeitzelFXDesigner `0.1.2-SNAPSHOT`, lokal gebaut |
| IntelliJ-Host | SDK `263.7307.200` auf macOS; JavaFX/Scene Builder Kit 26 im Host | | IntelliJ-Host | SDK `263.7307.200` auf macOS; JavaFX/Scene Builder Kit 26 im Host |
Die JDK-/JavaFX-Version der Anwendung ist unabhängig vom JavaFX-Toolkit des IntelliJ-Prozesses. Anwendungs- und Vorschau-Code läuft im Zielprozess. Die Kombination wurde mit dem aufgeführten IntelliJ SDK auf macOS geprüft. Die zugehörigen Quellstände und Artefaktgrenzen stehen in der [NeitzelLib-Baseline](../runtime/neitzellib-baseline.md). Die JDK-/JavaFX-Version der Anwendung ist unabhängig vom JavaFX-Toolkit des IntelliJ-Prozesses. Anwendungs- und Vorschau-Code läuft im Zielprozess. Die Kombination wurde mit dem aufgeführten IntelliJ SDK auf macOS geprüft. Die zugehörigen Quellstände und Artefaktgrenzen stehen in der [NeitzelLib-Baseline](../runtime/neitzellib-baseline.md).
+1 -1
View File
@@ -28,7 +28,7 @@
<maven.compiler.release>25</maven.compiler.release> <maven.compiler.release>25</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<designer.version>0.1.1</designer.version> <designer.version>0.1.2-SNAPSHOT</designer.version>
<javafx.version>27.0.1</javafx.version> <javafx.version>27.0.1</javafx.version>
<junit.version>6.1.3</junit.version> <junit.version>6.1.3</junit.version>
<jackson.version>2.20.1</jackson.version> <jackson.version>2.20.1</jackson.version>
@@ -21,7 +21,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Dependency versions --> <!-- Dependency versions -->
<designer.version>0.1.1</designer.version> <designer.version>0.1.2-SNAPSHOT</designer.version>
<neitzellib.version>1.0.6</neitzellib.version> <neitzellib.version>1.0.6</neitzellib.version>
<!-- Plugin versions --> <!-- Plugin versions -->
@@ -23,7 +23,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Dependency versions --> <!-- Dependency versions -->
<designer.version>0.1.1</designer.version> <designer.version>0.1.2-SNAPSHOT</designer.version>
<neitzellib.version>1.0.6</neitzellib.version> <neitzellib.version>1.0.6</neitzellib.version>
<!-- Plugin versions --> <!-- Plugin versions -->
+2
View File
@@ -70,6 +70,8 @@ Components, Repeat and Table release, cleanup after load/readiness failure
and cancellation, module resource diagnostics, and the required runtime and cancellation, module resource diagnostics, and the required runtime
diagnostic against FX 1.0.6. The host checks use disposably copied project diagnostic against FX 1.0.6. The host checks use disposably copied project
files and exercise the canvas, form preview and interactive preview. files and exercise the canvas, form preview and interactive preview.
The interactive check captures the initial field value before the native
window becomes visible and exercises editing in the opened window.
Each Spring context verifies that the running application or preview Each Spring context verifies that the running application or preview
cannot load Neitzel's `ApplicationContext` or Reflections and that cannot load Neitzel's `ApplicationContext` or Reflections and that
+1 -1
View File
@@ -22,7 +22,7 @@
<maven.compiler.release>25</maven.compiler.release> <maven.compiler.release>25</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<designer.version>0.1.1</designer.version> <designer.version>0.1.2-SNAPSHOT</designer.version>
<jakarta-annotation.version>2.1.1</jakarta-annotation.version> <jakarta-annotation.version>2.1.1</jakarta-annotation.version>
<jakarta-inject.version>2.0.1</jakarta-inject.version> <jakarta-inject.version>2.0.1</jakarta-inject.version>
<neitzellib.version>1.0.7</neitzellib.version> <neitzellib.version>1.0.7</neitzellib.version>
+69 -25
View File
@@ -2,16 +2,20 @@ package qualification;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.concurrent.FutureTask; import java.util.Optional;
import java.util.concurrent.TimeUnit;
import javafx.application.Platform; import javafx.application.Platform;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import javafx.stage.Stage; import javafx.stage.Stage;
import javafx.stage.Window; import javafx.stage.Window;
import javafx.stage.WindowEvent;
/** Test-only observer of the actual interactive window, inside the target JVM. */ /** Test-only observer of the actual interactive window, inside the target JVM. */
public final class SpringTargetProbe { public final class SpringTargetProbe {
private static final String PREVIEW_TITLE = "Neitzel preview — ";
public static void premain(String output) { public static void premain(String output) {
var command = System.getProperty("sun.java.command", "").split(" ", 2)[0]; var command = System.getProperty("sun.java.command", "").split(" ", 2)[0];
if (command.endsWith(".WorkerMain")) if (command.endsWith(".WorkerMain"))
@@ -22,45 +26,85 @@ public final class SpringTargetProbe {
private static void observe(Path output) { private static void observe(Path output) {
try { try {
while (true) { while (true) {
Thread.sleep(100);
var inspect = new FutureTask<>(() -> inspect(output));
try { try {
Platform.runLater(inspect); Platform.runLater(() -> watchOpening(output));
return;
} catch (IllegalStateException toolkitStarting) { } catch (IllegalStateException toolkitStarting) {
continue; Thread.sleep(10);
} }
if (inspect.get(10, TimeUnit.SECONDS)) return;
} }
} catch (InterruptedException stopped) { } catch (InterruptedException stopped) {
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
} catch (Throwable error) {
try {
Files.writeString(output.resolve("target-error.txt"), error.toString());
} catch (Exception writeFailure) {
error.addSuppressed(writeFailure);
error.printStackTrace();
}
} }
} }
private static boolean inspect(Path output) throws Exception { private static Optional<Stage> previewWindow() {
var stage = Window.getWindows().stream() return Window.getWindows().stream()
.filter(w -> w instanceof Stage window && window.isShowing() && window.getOpacity() > 0 .filter(Stage.class::isInstance)
&& window.getTitle() != null && window.getTitle().startsWith("Neitzel preview")) .map(Stage.class::cast)
.filter(stage -> stage.getOpacity() > 0 && stage.getTitle() != null
&& stage.getTitle().startsWith(PREVIEW_TITLE))
.findFirst(); .findFirst();
if (stage.isEmpty()) return false; }
private static void watchOpening(Path output) {
var windows = Window.getWindows();
if (previewWindow().isPresent()) {
reportFailure(output, new AssertionError("Probe attached after the preview opened"));
return;
}
windows.addListener(new InvalidationListener() {
@Override
public void invalidated(Observable ignored) {
previewWindow().ifPresent(stage -> {
windows.removeListener(this);
checkInitialValue(stage, output);
});
}
});
}
private static void checkInitialValue(Stage stage, Path output) {
try {
String attempt = Files.readString(output.resolve("spring-attempt")); String attempt = Files.readString(output.resolve("spring-attempt"));
boolean book = attempt.startsWith("book-"); boolean book = attempt.startsWith("book-");
var scene = stage.get().getScene(); String example = book ? "book" : "card";
var field = (TextField) scene.lookup(book ? "#bookName" : "#entryName"); if (!stage.getTitle().startsWith(PREVIEW_TITLE + example + " — "))
throw new AssertionError("Unexpected preview window in " + attempt + ": " + stage.getTitle());
if (!(stage.getScene().lookup(book ? "#bookName" : "#entryName") instanceof TextField field))
throw new AssertionError("Missing input field in " + attempt);
// JavaFX adds the window before making its native peer visible.
String initialValue = field.getText();
String expected = book ? "Preview contact book" : "Preview entry"; String expected = book ? "Preview contact book" : "Preview entry";
if (field == null || !expected.equals(field.getText())) if (!expected.equals(initialValue))
throw new AssertionError("Expected fresh " + expected + " in " + attempt); throw new AssertionError("Expected fresh " + expected + " in " + attempt);
stage.addEventHandler(WindowEvent.WINDOW_SHOWN,
event -> Platform.runLater(() -> checkEditing(stage, field, book, output, attempt, initialValue)));
} catch (Exception | AssertionError failure) {
reportFailure(output, failure);
}
}
private static void checkEditing(Stage stage, TextField field, boolean book, Path output,
String attempt, String initialValue) {
try {
if (!stage.isShowing()) throw new AssertionError("Preview closed before the edit check in " + attempt);
field.setText("Edited in preview"); field.setText("Edited in preview");
if (book && !"[Edited in preview]".equals(((Label) scene.lookup("#convertedName")).getText())) if (book && !"[Edited in preview]".equals(((Label) stage.getScene().lookup("#convertedName")).getText()))
throw new AssertionError("Spring Converter did not update the live interactive View"); throw new AssertionError("Spring Converter did not update the live interactive View");
Files.writeString(output.resolve(attempt + ".txt"), expected); Files.writeString(output.resolve(attempt + ".txt"), initialValue);
return true; } catch (Exception | AssertionError failure) {
reportFailure(output, failure);
}
}
private static void reportFailure(Path output, Throwable failure) {
try {
Files.writeString(output.resolve("target-error.txt"), failure.toString());
} catch (Exception writeFailure) {
failure.addSuppressed(writeFailure);
failure.printStackTrace();
}
} }
} }
} }
+1 -1
View File
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>de.neitzel.fxdesigner</groupId> <groupId>de.neitzel.fxdesigner</groupId>
<artifactId>neitzel-fx-designer</artifactId> <artifactId>neitzel-fx-designer</artifactId>
<version>0.1.1</version> <version>0.1.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>designer-contracts</module><module>designer-model-processor</module><module>designer-preview-api</module> <module>designer-contracts</module><module>designer-model-processor</module><module>designer-preview-api</module>
+1 -1
View File
@@ -27,7 +27,7 @@ run([wrapper, "-B", "-ntp", "-pl", "designer-target-tools", "org.apache.maven.pl
for module in ("contracts", "model-processor", "preview-api", "core", "kit-ui", "standalone", "target-tools", "maven-plugin"): for module in ("contracts", "model-processor", "preview-api", "core", "kit-ui", "standalone", "target-tools", "maven-plugin"):
name = "designer-" + module name = "designer-" + module
expected = 69 expected = 69
with zipfile.ZipFile(ROOT / name / "target" / (name + "-0.1.1.jar")) as jar: with zipfile.ZipFile(ROOT / name / "target" / (name + "-0.1.2-SNAPSHOT.jar")) as jar:
classes = [n for n in jar.namelist() if n.endswith(".class")] classes = [n for n in jar.namelist() if n.endswith(".class")]
assert classes, name assert classes, name
assert all(int.from_bytes(jar.read(n)[6:8], "big") == expected for n in classes), name assert all(int.from_bytes(jar.read(n)[6:8], "big") == expected for n in classes), name
+1 -1
View File
@@ -48,7 +48,7 @@ with tempfile.TemporaryDirectory(prefix="designer-connected-") as temporary:
crashes.check() crashes.check()
local = fixture / ".neitzel-fx-designer" local = fixture / ".neitzel-fx-designer"
(local / "runtimes.json").write_text(json.dumps({"schemaVersion":"1.0","runtimes":{"java25":{"build":args.target_java_home,"target":args.target_java_home}}})) (local / "runtimes.json").write_text(json.dumps({"schemaVersion":"1.0","runtimes":{"java25":{"build":args.target_java_home,"target":args.target_java_home}}}))
tools = [ROOT / ("designer-" + name) / "target" / ("designer-" + name + "-0.1.1.jar") for name in ("target-tools","contracts","preview-api")] tools = [ROOT / ("designer-" + name) / "target" / ("designer-" + name + "-0.1.2-SNAPSHOT.jar") for name in ("target-tools","contracts","preview-api")]
(local / "host.properties").write_text("configuration=../neitzel-fx-designer.json\ncontext=fixture\nsettings=runtimes.json\nmaven="+str(ROOT/"mvnw")+"\ntools="+os.pathsep.join(map(str,tools))+"\n") (local / "host.properties").write_text("configuration=../neitzel-fx-designer.json\ncontext=fixture\nsettings=runtimes.json\nmaven="+str(ROOT/"mvnw")+"\ntools="+os.pathsep.join(map(str,tools))+"\n")
run("native-kit-" + mode, [Path(os.environ["JAVA_HOME"]) / "bin/java", "--enable-native-access=ALL-UNNAMED", "-cp", classpath, run("native-kit-" + mode, [Path(os.environ["JAVA_HOME"]) / "bin/java", "--enable-native-access=ALL-UNNAMED", "-cp", classpath,
"de.neitzel.fxdesigner.standalone.KitWorkflowSmoke", local / "host.properties", "de.neitzel.fxdesigner.standalone.KitWorkflowSmoke", local / "host.properties",
+1 -1
View File
@@ -24,7 +24,7 @@ run([library / "mvnw", "-B", "-ntp", "-f", example / "pom.xml", "-Pdesigner-prev
"test-compile", "org.apache.maven.plugins:maven-dependency-plugin:3.6.1:build-classpath", "test-compile", "org.apache.maven.plugins:maven-dependency-plugin:3.6.1:build-classpath",
"-DincludeScope=test", "-Dmdep.outputFile=target/adapter-preview-runtime.txt"], 180, cwd=library) "-DincludeScope=test", "-Dmdep.outputFile=target/adapter-preview-runtime.txt"], 180, cwd=library)
target = example / "target" target = example / "target"
tools = [ROOT / f"designer-{module}/target/designer-{module}-0.1.1.jar" tools = [ROOT / f"designer-{module}/target/designer-{module}-0.1.2-SNAPSHOT.jar"
for module in ("target-tools", "contracts", "preview-api")] for module in ("target-tools", "contracts", "preview-api")]
classpath = os.pathsep.join([str(target / "test-classes"), str(target / "classes"), classpath = os.pathsep.join([str(target / "test-classes"), str(target / "classes"),
*map(str, tools), (target / "adapter-preview-runtime.txt").read_text().strip()]) *map(str, tools), (target / "adapter-preview-runtime.txt").read_text().strip()])
+1 -1
View File
@@ -42,7 +42,7 @@ with tempfile.TemporaryDirectory(prefix="designer-spring-preview-") as temporary
if re.search(r"de\.neitzel\.lib:(?:fx-)?injection:|org\.reflections:reflections:", tree): if re.search(r"de\.neitzel\.lib:(?:fx-)?injection:|org\.reflections:reflections:", tree):
raise AssertionError(f"Unexpected DI dependency in {module}\n{tree}") raise AssertionError(f"Unexpected DI dependency in {module}\n{tree}")
target = project / "preview/target" target = project / "preview/target"
tools = [ROOT / f"designer-{module}/target/designer-{module}-0.1.1.jar" tools = [ROOT / f"designer-{module}/target/designer-{module}-0.1.2-SNAPSHOT.jar"
for module in ("target-tools", "contracts", "preview-api")] for module in ("target-tools", "contracts", "preview-api")]
resolved = [Path(path) for path in (target / "runtime.txt").read_text().strip().split(os.pathsep)] resolved = [Path(path) for path in (target / "runtime.txt").read_text().strip().split(os.pathsep)]
entries = list(dict.fromkeys([target / "spring-di-preview-1.jar", *resolved, *tools[:2]])) entries = list(dict.fromkeys([target / "spring-di-preview-1.jar", *resolved, *tools[:2]]))
+1 -1
View File
@@ -30,7 +30,7 @@ assert 'Neitzel FX Designer' in subprocess.check_output([launcher,'--help'],env=
invalid=subprocess.run([launcher,'--unknown'],env=env,text=True,capture_output=True) invalid=subprocess.run([launcher,'--unknown'],env=env,text=True,capture_output=True)
assert invalid.returncode==2 and 'Unknown' in invalid.stderr,invalid assert invalid.returncode==2 and 'Unknown' in invalid.stderr,invalid
jars=list((app/'Contents/app').glob('*.jar')) jars=list((app/'Contents/app').glob('*.jar'))
checks=ROOT/'designer-kit-ui/target/designer-kit-ui-0.1.1-tests.jar' checks=ROOT/'designer-kit-ui/target/designer-kit-ui-0.1.2-SNAPSHOT-tests.jar'
classes=evidence/'agent-classes';classes.mkdir() classes=evidence/'agent-classes';classes.mkdir()
subprocess.run([a.java_home/'bin/javac','-cp',os.pathsep.join(map(str,[*jars,checks])), '-d',classes, subprocess.run([a.java_home/'bin/javac','-cp',os.pathsep.join(map(str,[*jars,checks])), '-d',classes,
ROOT/'integration-tests/standalone/PackageProbe.java'],check=True) ROOT/'integration-tests/standalone/PackageProbe.java'],check=True)
+1 -1
View File
@@ -24,7 +24,7 @@ if not all((java / "bin" / name).is_file() for name in ("java", "javac")):
parser.error("Supply a full application JDK installation") parser.error("Supply a full application JDK installation")
if not maven.is_file() or not os.access(maven, os.X_OK): if not maven.is_file() or not os.access(maven, os.X_OK):
parser.error("Supply an executable Maven wrapper or Maven installation") parser.error("Supply an executable Maven wrapper or Maven installation")
tools = [ROOT / f"designer-{name}/target/designer-{name}-0.1.1.jar" tools = [ROOT / f"designer-{name}/target/designer-{name}-0.1.2-SNAPSHOT.jar"
for name in ("target-tools", "contracts", "preview-api")] for name in ("target-tools", "contracts", "preview-api")]
if not all(file.is_file() for file in tools): if not all(file.is_file() for file in tools):
parser.error("Build/install the Designer Maven modules first") parser.error("Build/install the Designer Maven modules first")
+3 -3
View File
@@ -21,7 +21,7 @@ run([ROOT/'mvnw','-B','-ntp','-pl','designer-standalone','org.apache.maven.plugi
with tempfile.TemporaryDirectory(prefix='designer-package-') as tmp: with tempfile.TemporaryDirectory(prefix='designer-package-') as tmp:
stage=Path(tmp)/'input'; stage.mkdir() stage=Path(tmp)/'input'; stage.mkdir()
# Explicit manifest order: the verified Kit patch must precede upstream Kit. # Explicit manifest order: the verified Kit patch must precede upstream Kit.
paths=[ROOT/'designer-standalone/target/designer-standalone-0.1.1.jar'] paths=[ROOT/'designer-standalone/target/designer-standalone-0.1.2-SNAPSHOT.jar']
deps=[Path(s) for s in (ROOT/'designer-standalone/target/package-classpath.txt').read_text().strip().split(os.pathsep)] deps=[Path(s) for s in (ROOT/'designer-standalone/target/package-classpath.txt').read_text().strip().split(os.pathsep)]
paths += sorted(deps,key=lambda f:(0 if f.name.startswith('designer-kit-ui-') else 1,f.name)) paths += sorted(deps,key=lambda f:(0 if f.name.startswith('designer-kit-ui-') else 1,f.name))
for file in paths: for file in paths:
@@ -41,7 +41,7 @@ with tempfile.TemporaryDirectory(prefix='designer-package-') as tmp:
run([java/'bin/jar','cfm',stage/'launcher.jar',manifest,'-C',empty,'.']) run([java/'bin/jar','cfm',stage/'launcher.jar',manifest,'-C',empty,'.'])
tools=Path(tmp)/'tools'; tools.mkdir() tools=Path(tmp)/'tools'; tools.mkdir()
for name in ('target-tools','contracts','preview-api'): for name in ('target-tools','contracts','preview-api'):
file=ROOT/f'designer-{name}/target/designer-{name}-0.1.1.jar' file=ROOT/f'designer-{name}/target/designer-{name}-0.1.2-SNAPSHOT.jar'
shutil.copy2(file,tools/file.name) shutil.copy2(file,tools/file.name)
shutil.copy2(ROOT/'THIRD-PARTY-NOTICES.md',stage) shutil.copy2(ROOT/'THIRD-PARTY-NOTICES.md',stage)
runtime=Path(tmp)/'runtime' runtime=Path(tmp)/'runtime'
@@ -58,7 +58,7 @@ with tempfile.TemporaryDirectory(prefix='designer-package-') as tmp:
assert '/tools/' not in cfg, 'Target tools leaked into the host launcher' assert '/tools/' not in cfg, 'Target tools leaked into the host launcher'
inventory={str(f.relative_to(app)):hashlib.sha256(f.read_bytes()).hexdigest() for f in sorted(app.rglob('*')) if f.is_file()} inventory={str(f.relative_to(app)):hashlib.sha256(f.read_bytes()).hexdigest() for f in sorted(app.rglob('*')) if f.is_file()}
(destination/'package-manifest.json').write_text(json.dumps({'platform':platform.platform(),'architecture':platform.machine(), (destination/'package-manifest.json').write_text(json.dumps({'platform':platform.platform(),'architecture':platform.machine(),
'applicationVersion':'0.1.1','bundleVersion':'1.0', 'applicationVersion':'0.1.2-SNAPSHOT','bundleVersion':'1.0',
'source':subprocess.check_output(['git','rev-parse','HEAD'],cwd=ROOT,text=True).strip(), 'source':subprocess.check_output(['git','rev-parse','HEAD'],cwd=ROOT,text=True).strip(),
'workingTreeDirty':bool(subprocess.check_output(['git','status','--porcelain'],cwd=ROOT,text=True).strip()), 'workingTreeDirty':bool(subprocess.check_output(['git','status','--porcelain'],cwd=ROOT,text=True).strip()),
'javaRelease':(java/'release').read_text(),'files':inventory},indent=2)+'\n') 'javaRelease':(java/'release').read_text(),'files':inventory},indent=2)+'\n')
+1 -1
View File
@@ -16,7 +16,7 @@ shutil.copytree(ROOT / "integration-fixtures/preview" / args.mode, destination,
local = destination / ".neitzel-fx-designer" local = destination / ".neitzel-fx-designer"
local.mkdir() local.mkdir()
(local / "runtimes.json").write_text(json.dumps({"schemaVersion":"1.0","runtimes":{"java25":{"build":str(args.target_java_home.resolve()),"target":str(args.target_java_home.resolve())}}})) (local / "runtimes.json").write_text(json.dumps({"schemaVersion":"1.0","runtimes":{"java25":{"build":str(args.target_java_home.resolve()),"target":str(args.target_java_home.resolve())}}}))
tools = [ROOT / ("designer-" + name) / "target" / ("designer-" + name + "-0.1.1.jar") tools = [ROOT / ("designer-" + name) / "target" / ("designer-" + name + "-0.1.2-SNAPSHOT.jar")
for name in ("target-tools","contracts","preview-api")] for name in ("target-tools","contracts","preview-api")]
# Properties separators in values do not need escaping; double backslashes do. # Properties separators in values do not need escaping; double backslashes do.
def prop(value): return str(value).replace("\\", "\\\\") def prop(value): return str(value).replace("\\", "\\\\")
+1 -1
View File
@@ -135,7 +135,7 @@ else:
classes.mkdir() classes.mkdir()
checks = base / "plugins/qualification/lib/projection-checks.jar" checks = base / "plugins/qualification/lib/projection-checks.jar"
checks.parent.mkdir(parents=True) checks.parent.mkdir(parents=True)
shutil.copyfile(ROOT / "designer-kit-ui/target/designer-kit-ui-0.1.1-tests.jar", checks) shutil.copyfile(ROOT / "designer-kit-ui/target/designer-kit-ui-0.1.2-SNAPSHOT-tests.jar", checks)
jars = [*(args.idea_home / "lib").glob("*.jar"), *(base / "plugins").rglob("*.jar"), *(args.idea_home / "plugins/platform-problemView-plugin").rglob("*.jar")] jars = [*(args.idea_home / "lib").glob("*.jar"), *(base / "plugins").rglob("*.jar"), *(args.idea_home / "plugins/platform-problemView-plugin").rglob("*.jar")]
sources = ROOT / "integration-tests/idea" sources = ROOT / "integration-tests/idea"
suite = "Archive" suite = "Archive"