Files
NeitzelFXDesigner/docs/direct-binding-inspector.md
T

4.3 KiB

Shared DirectBinding inspector

The first editable stage-4 slice runs in the shared Kit UI in standalone and IntelliJ. Open Bindings → Direct bindings, select a declaration or choose New binding, then Apply binding or Remove binding. Fields cover control fx:id, property, Model path, direction and optional Converter class. Discover targets → Use selected target prepares a new form from discovery without changing source until Apply. Selecting a declaration selects its target on the canvas; selecting a bound control selects its declaration.

Source and history contract

Each create, change, remove or explicit replacement becomes one revision-checked host document command. Normal host Undo/Redo restores the exact prior/new source. Saving uses the authoritative document. The form refuses stale source and read-only documents; a source change resets its active selection so a previous range cannot be reused accidentally.

A secure DOM identifies declarations; a lexical range index edits only the relevant source spans. Existing quote styles, imports, Model processing instructions, comments, unrelated whitespace and unfamiliar declarations remain intact. New declarations use fully qualified names, avoiding import changes. Missing root fx:define/BindingList containers and namespace declarations are added as needed, including self-closing containers and alternate FXML prefixes. Explicit BindingList elements wrappers are supported. Removing a binding leaves its surrounding comments and whitespace.

Existing DirectBindings written with attributes are editable. Declarations using nested property elements remain visible and can be explicitly removed, but must be changed in Source. This does not flatten or guess unsupported syntax. Short class names require the library import; conflicting explicit imports are not treated as library declarations.

A target occupied by another DirectBinding or ComputedBinding requires Replace conflicting bindings. Replacement removes those conflicting declarations and adds/changes the chosen binding in one undo command. ComputedBinding authoring is not included.

Validation boundary

Structural diagnostics cover duplicate targets, missing/ambiguous fx:id, empty property, malformed/missing Model path and invalid direction. Converter discovery and binding validation now add target-side path/property/type and capability checks, a shared chooser, and automatic validation before new previews. Saving and source repair remain available on errors.

Generated/custom ViewModel metadata, Computed/Repeat/Table authoring, complete semantic diagnostics and identifier rename/copy/subtree-delete reference repair remain later stage-4 work.

Automated qualification

Lexical unit checks cover creation of containers/namespaces, attribute-only changes and escaping, unknown content/comment preservation, paired-tag removal, duplicate replacement, explicit elements wrappers, unsupported nested syntax and secure parsing.

The same live shared-UI scenario runs in standalone and the registered IntelliJ editor against classpath and module-path fixtures. It creates, changes, removes and explicitly replaces bindings; checks exact source after one Undo/Redo per operation; saves; loads the edited document through the real target runtime; and saves an invalid path while checking that preview is blocked. Existing projection, sizing, discovery, session and shutdown checks remain enabled. No human test is required for this slice. Previously skipped manual checks remain skipped, not retroactively passed.

Run the normal scripts/check-bootstrap.py gate and scripts/check-ide-host.py with the pinned host/target JDKs and IntelliJ installation described in the README. Qualification on 2026-11-13 passed: 75 Maven tests, 7 IntelliJ adapter tests, 34 target processes with 424 assertions, 48 worker lifecycle cycles, connected workflows and live shared UI in standalone and registered IntelliJ for classpath and module-path applications. Native isolation and worker shutdown passed with no new crash report. The live run also caught and fixed a canvas/list selection feedback loop; final logs contain no uncaught selection errors. The IDE companion checks use public UI and XML assertions across its separate plugin class loader. Local evidence: /tmp/direct-binding-bootstrap.log and /tmp/direct-binding-registered-ide.log.