Edit form controls and render localized application previews in the IntelliJ designer

This commit is contained in:
2026-11-24 15:13:31 +01:00
parent 73da1f985e
commit 93a9f04b11
18 changed files with 1623 additions and 63 deletions
+10 -3
View File
@@ -23,7 +23,10 @@ p.add_argument("--idea-home", type=Path, required=True)
p.add_argument("--mode", choices=["all", "classpath", "modulepath"], default="all")
p.add_argument("--repeat", type=int, default=1, help="Consecutive independent runs per mode")
p.add_argument("--archiver", type=Path, help="Qualify ArchiveWindow.fxml in a disposable project copy")
p.add_argument("--connection-form", action="store_true", help="Qualify the Archiver connection form")
args = p.parse_args()
if args.connection_form and not args.archiver:
p.error("--connection-form requires --archiver")
if args.repeat < 1:
p.error("--repeat must be positive")
output = ROOT / "target/ide-workflow"
@@ -34,9 +37,11 @@ modes = ("classpath",) if args.archiver else (("classpath", "modulepath") if arg
for run_number, mode in ((n, mode) for n in range(1, args.repeat + 1) for mode in modes):
crashes = NativeCrashGuard(ROOT)
launch = subprocess.run([sys.executable, ROOT / "scripts/run-fixture-host.py", "intellij",
"--check", *(["--archiver", str(args.archiver.resolve())] if args.archiver else []), "--mode", mode, "--java-home", args.java_home,
"--check", *(["--connection-form"] if args.connection_form else []), *(["--archiver", str(args.archiver.resolve())] if args.archiver else []), "--mode", mode, "--java-home", args.java_home,
"--target-java-home", args.target_java_home, "--idea-home", args.idea_home],
cwd=ROOT, text=True, capture_output=True, check=True, timeout=60)
cwd=ROOT, text=True, capture_output=True, timeout=60)
if launch.returncode:
raise RuntimeError(launch.stdout + launch.stderr)
evidence = batch / f"{mode}-run-{run_number}"
evidence.mkdir(exist_ok=True)
(output / (mode + "-launch.log")).write_text(launch.stdout + launch.stderr)
@@ -50,6 +55,8 @@ for run_number, mode in ((n, mode) for n in range(1, args.repeat + 1) for mode i
raise RuntimeError((base / "FAILURE.txt").read_text())
if (base / "SUCCESS.txt").exists():
break
if not subprocess.run(["ps", "-p", str(pid), "-o", "pid="], capture_output=True).stdout.strip():
raise RuntimeError("IDE exited during qualification. See " + str(base / "launcher.log"))
time.sleep(.25)
else:
raise RuntimeError("IDE qualification timed out: " + str(base))
@@ -74,7 +81,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"):
for name in ("SUCCESS.txt", "FAILURE.txt", "ui-state.txt", "launcher.log", "steps.txt", "target-error.txt", "preview-restored.png", "imap.png", "jmap.png", "intellij.png"):
if (base / name).exists():
shutil.copyfile(base / name, evidence / name)
workers = descendant_workers(pid)