Files
NeitzelFXDesigner/docs/computed-binding-inspector.md

4.6 KiB

Shared Computed-binding inspector

Both hosts now provide Bindings → Computed bindings. Select a declaration or choose New Computed binding, enter the target control's fx:id, property and Controller method, then Apply Computed binding. Remove Computed binding deletes the selected declaration. Selecting a declaration selects its canvas target; selecting a bound canvas control selects its declaration.

Find methods / Validate asks the target worker for public Controller methods and compares their return types with the entered target. Choose a method explicitly from the list or type its name; choosing a suggestion only prepares the form. The source changes on Apply. The list includes compatibility and unresolved/unavailable explanations. Existing unprefixed names remain accepted; discovered names use #method. Computed bindings have no Model path, direction or Converter fields.

Source and history

Direct and Computed inspectors share one lexical document editor and form lifecycle. Creation adds a fully qualified declaration and required containers without serializing the document or rewriting imports. Changes touch only control/property/method attributes, preserving their existing quoting, unrelated attributes, comments and whitespace. Removal deletes only the selected element. Alternate FXML prefixes, explicit BindingList elements wrappers and self-closing containers use the same tested insertion rules.

Each Apply, Remove or explicit conflict replacement is one revision-checked host document command. Normal standalone and IntelliJ Undo/Redo restore the exact previous/new text. Source changes invalidate the active form selection, and read-only documents cannot be changed. Declarations with nested property elements remain visible and explicitly removable, but editing them requires Source; the inspector does not flatten unfamiliar syntax.

A target already used by a Direct or Computed declaration requires Replace conflicting bindings. Replacement removes the conflicting declarations and applies the requested binding atomically. This also provides explicit replacement between binding types; neither inspector silently takes over an occupied target.

Validation and limits

Structural diagnostics include missing/ambiguous targets, missing properties and malformed method names. Target-side validation checks Controller method access, arity, return types and target compatibility without executing application methods. Errors block new previews while invalid drafts remain saveable and undoable. Build/draft freshness and explicit retained-build provenance continue to apply.

The inspector does not generate Controller methods or evaluate their bodies. The Repeat inspector now supports collection declarations. Generated metadata, remaining collection authoring/compatibility, structural reference refactoring and complete IDE Problems integration remain later work. Existing skipped human checks remain skipped.

Automated qualification

Lexical tests cover container creation, escaping, exact attribute edits, paired-tag removal, cross-type conflict replacement, nested syntax and import identity. The same live UI scenario in both hosts discovers and chooses a compatible method without changing source, creates/changes/removes Computed declarations, replaces a Direct binding explicitly, saves and renders valid edits, saves a type-invalid edit while previews are blocked, and checks exact single-command Undo/Redo. Classpath and module-path applications use the real NeitzelLib target runtime. No manual testing is required.

Run scripts/check-bootstrap.py and scripts/check-ide-host.py using the pinned SDKs and commands in the README.

Qualification on 2026-11-13 passed on the pinned macOS baseline: 95 unit/adapter tests (88 Maven, 7 IntelliJ), 36 target processes / 484 fixture assertions, 48 worker lifecycle cycles, both native standalone modes and both registered IntelliJ modes. Registered IDE checks also verified exclusive JavaFX 26 natives and worker cleanup. The source file rename received a final whitespace-only formatter adjustment after the build; no behavior changed. No manual testing was used, and previously skipped checks remain skipped.

Local evidence: /tmp/computed-bootstrap.log, /tmp/computed-registered-ide.log, target/connected-workflow/ and target/ide-workflow/{classpath,modulepath}.json. Malformed-XML diagnostics are deliberate recovery-test inputs; no new native crash or uncaught application exception was found. This qualifies the pinned baseline, not additional OS/IDE versions.