Author HTML and typed suggestion bindings in the IntelliJ designer
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user