Discover Converter capabilities and validate shared binding drafts

This commit is contained in:
2026-11-13 12:58:08 +01:00
parent 17b1bce704
commit 5a208d2336
35 changed files with 1096 additions and 34 deletions
@@ -8,6 +8,11 @@
</parent>
<artifactId>app-modulepath</artifactId>
<dependencies>
<dependency>
<groupId>de.neitzel.fxdesigner</groupId>
<artifactId>designer-preview-api</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.neitzel.lib</groupId>
<artifactId>fx</artifactId>
@@ -0,0 +1,19 @@
package fixture.components;
@de.neitzel.fxdesigner.preview.ConverterCapabilities(
modelType = Integer.class,
controlType = String.class,
reverse = true)
public class BrokenReverseConverter implements de.neitzel.fx.view.Converter {
static {
System.setProperty("fixture.converter.initialized", "BrokenReverseConverter");
}
public BrokenReverseConverter() {
throw new AssertionError("Discovery must not construct Converters");
}
public Object toControlValue(Object value) {
return "";
}
}
@@ -0,0 +1,18 @@
package fixture.components;
@de.neitzel.fxdesigner.preview.ConverterCapabilities(
modelType = Integer.class,
controlType = String.class)
public class ForwardRankConverter implements de.neitzel.fx.view.Converter {
static {
System.setProperty("fixture.converter.initialized", "ForwardRankConverter");
}
public ForwardRankConverter() {
throw new AssertionError("Discovery must not construct Converters");
}
public Object toControlValue(Object value) {
return "";
}
}
@@ -0,0 +1,11 @@
package fixture.components;
public class LegacyRankConverter extends RankConverter {
static {
System.setProperty("fixture.converter.initialized", "LegacyRankConverter");
}
public LegacyRankConverter() {
throw new AssertionError("Discovery must not construct Converters");
}
}
@@ -0,0 +1,15 @@
package fixture.components;
@de.neitzel.fxdesigner.preview.ConverterCapabilities(
modelType = String.class,
controlType = String.class,
reverse = true)
public class NameConverterA extends RankConverter {
static {
System.setProperty("fixture.converter.initialized", "NameConverterA");
}
public NameConverterA() {
throw new AssertionError("Discovery must not construct Converters");
}
}
@@ -0,0 +1,15 @@
package fixture.components;
@de.neitzel.fxdesigner.preview.ConverterCapabilities(
modelType = String.class,
controlType = String.class,
reverse = true)
public class NameConverterB extends RankConverter {
static {
System.setProperty("fixture.converter.initialized", "NameConverterB");
}
public NameConverterB() {
throw new AssertionError("Discovery must not construct Converters");
}
}
@@ -1,5 +1,9 @@
package fixture.components;
@de.neitzel.fxdesigner.preview.ConverterCapabilities(
modelType = Integer.class,
controlType = String.class,
reverse = true)
@jakarta.inject.Singleton
public class RankConverter implements de.neitzel.fx.view.Converter {
public Object toControlValue(Object value) {
@@ -1,5 +1,6 @@
module fixture.app {
requires fx;
requires de.neitzel.fxdesigner.preview;
requires injection;
requires jakarta.inject;
requires javafx.controls;