Author HTML and typed suggestion bindings in the IntelliJ designer

This commit is contained in:
2026-11-24 21:02:58 +01:00
parent f9c3de2d2b
commit 33e8f8f9f0
12 changed files with 264 additions and 25 deletions
+9
View File
@@ -41,6 +41,15 @@ if args.archiver:
file = project / f"src/main/resources/de/neitzel/archiver/ui/{view}.fxml"
if args.saved_document:
file = project / "src/designer/resources/de/neitzel/archiver/preview/SavedDocument.fxml"
if args.check:
# Start the authoring test with both destinations unbound in the disposable copy.
source = file.read_text()
for control, prop, path in (("article", "html", "html"), ("dynamic", "suggestionsSource", "tags")):
declaration = f'<DirectBinding control="{control}" property="{prop}" path="{path}" direction="view"/>'
if source.count(declaration) != 1:
raise ValueError(f"Expected the shipped sample binding for {control}.{prop}")
source = source.replace(declaration, "")
file.write_text(source)
else:
subprocess.run([sys.executable, ROOT / "scripts/prepare-fixture-host.py", "--destination", project,
"--target-java-home", args.target_java_home, "--mode", args.mode], check=True)