Establish buildable modules and shared host-service boundaries

This commit is contained in:
2026-11-12 07:49:06 +01:00
parent 1326b18746
commit 306266ae40
41 changed files with 1980 additions and 23 deletions
+58
View File
@@ -0,0 +1,58 @@
<?xml version="1.0" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.neitzel.fxdesigner</groupId>
<artifactId>neitzel-fx-designer</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>
<artifactId>designer-kit-ui</artifactId>
<properties>
<module.java.release>25</module.java.release>
</properties>
<dependencies>
<dependency>
<groupId>de.neitzel.fxdesigner</groupId>
<artifactId>designer-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq.scenebuilder</groupId>
<artifactId>kit</artifactId>
<version>26.0.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>module-dependency-boundary</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<searchTransitive>true</searchTransitive>
<excludes>
<exclude>com.intellij:*</exclude>
<exclude>com.jetbrains:*</exclude>
<exclude>com.jetbrains.intellij.platform:*</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,30 @@
package de.neitzel.fxdesigner.kit;
import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
import de.neitzel.fxdesigner.host.HostServices;
import java.util.Objects;
import javafx.application.Platform;
/**
* Shared Kit instance. Host setup/toolkit checks must complete before construction on the FX
* thread.
*/
public final class KitView {
private final HostServices host;
private final EditorController editor;
public KitView(HostServices host) {
if (!Platform.isFxApplicationThread())
throw new IllegalStateException("Kit requires the FX thread");
this.host = Objects.requireNonNull(host);
this.editor = new EditorController();
}
public EditorController editor() {
return editor;
}
public HostServices host() {
return host;
}
}