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
+1 -1
View File
@@ -84,7 +84,7 @@ for run_number, mode in ((n, mode) for n in range(1, args.repeat + 1) for mode i
shutil.copyfile(base / "intellij.png", output / (mode + ".png"))
(evidence / "proof.json").write_text(json.dumps(proof, indent=2) + "\n")
finally:
for name in ("SUCCESS.txt", "FAILURE.txt", "ui-state.txt", "launcher.log", "steps.txt", "target-error.txt", "preview-restored.png", "imap.png", "jmap.png", "invoice.png", "delivery.png", "saved-document-result", "tags-Pr.png", "tags-Re.png", "tags-Li.png", "folder.png", "right.png", "bottom.png", "result-folder", "result-right", "result-bottom", "intellij.png"):
for name in ("SUCCESS.txt", "FAILURE.txt", "ui-state.txt", "launcher.log", "steps.txt", "target-error.txt", "preview-restored.png", "imap.png", "jmap.png", "invoice.png", "delivery.png", "saved-document-result", "saved-bindings.fxml", "binding-article.png", "binding-dynamic.png", "tags-Pr.png", "tags-Re.png", "tags-Li.png", "folder.png", "right.png", "bottom.png", "result-folder", "result-right", "result-bottom", "intellij.png"):
if (base / name).exists():
shutil.copyfile(base / name, evidence / name)
workers = descendant_workers(pid)
+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)