130 lines
18 KiB
Markdown
130 lines
18 KiB
Markdown
# Neitzel FX Designer
|
||
|
||
Shared Scene Builder Kit designer for NeitzelLib FX, with minimal standalone and IntelliJ hosts.
|
||
|
||
## Start here
|
||
|
||
New to JavaFX and MVVM? Start with the German [Kontakt-Kurzstart](docs/user-guide/kontakt-kurzstart.md) to run the contact book and preview the same FXML in IntelliJ. The [user and developer guide](docs/user-guide/README.md) also links to the broader [Person Desk example](docs/user-guide/quick-start.md) and covers project configuration, both hosts, preview providers, bindings, generation and troubleshooting. The implementation records below retain dated evidence and historical scope.
|
||
|
||
## Current state
|
||
|
||
The first workflow is runnable in both hosts: Build and Refresh publishes immutable snapshots; authenticated target workers discover examples and render parent/Component FXML drafts into the shared Kit canvas. Source and supported canvas edits use host-owned documents and undo/redo. See [the connected workflow](docs/first-connected-workflow.md) for architecture, launch commands, evidence and limits.
|
||
|
||
The repository builds six shared Maven modules, a Maven capture plugin, a separate Model metadata processor and an IntelliJ adapter plugin. Application code runs only in target JVMs. The shared UI now applies [source-preserving edits](docs/source-preserving-projection.md), supports nested/anonymous Components and fx:root bodies, and provides Source/Design/Split modes. Retained [target sessions, target sizing, interactive preview and Component/Row navigation](docs/target-runtime-sessions.md) now extend that workflow. The shared [binding discovery browser](docs/binding-discovery.md) now lists declared Model paths and direction-aware target compatibility. The [DirectBinding inspector](docs/direct-binding-inspector.md) creates, edits and removes declarations through source-preserving host Undo/Redo. Shared [Converter discovery and binding validation](docs/converter-validation.md) now adds capability-based proposals, document diagnostics and preview gating. [Custom ViewModel discovery and Computed-binding validation](docs/viewmodel-computed-validation.md) now follow the explicitly selected Controller or Component in both hosts. The [Computed-binding inspector](docs/computed-binding-inspector.md) now creates, changes and removes Computed declarations with method suggestions and shared source-preserving Undo/Redo. The [Repeat inspector](docs/repeat-binding-inspector.md) adds source-preserving collection declarations with host Undo/Redo and [collection/Component compatibility discovery](docs/repeat-compatibility.md). The shared [Table/Column inspector](docs/table-column-inspector.md) adds source-preserving Table configuration, ordered Column authoring and explicit Row navigation, now with [Table-specific compatibility and declared Row alignment discovery](docs/table-compatibility.md). The shared [reference-safe Structure editor](docs/reference-safe-structure.md) now renames identifiers, copies subtrees with fresh identifiers and deletes associated bindings through source-preserving host Undo/Redo, including destination validation for cross-View paste. The [shared Problems panel and IntelliJ Problems integration](docs/shared-diagnostics.md) now expose current diagnostics with authoritative FXML navigation and editor-scoped cleanup. Shared [source highlighting and diagnostic quick fixes](docs/source-highlighting-fixes.md) now add explicit source-preserving corrections with host Undo/Redo and native IntelliJ Alt+Enter actions. Opt-in [generated Model metadata](docs/generated-model-metadata.md) now feeds the shared discovery and binding authoring workflows from immutable build snapshots. Opt-in [generated Java ViewModels and registry defaults](docs/generated-viewmodels.md) now reuse the runtime storage and identity rules, with shared discovery in both hosts. [Reviewed FXML View generation](docs/reviewed-view-generation.md) now proposes editable forms from shared metadata, validates explicit choices and creates new documents in both hosts. The first [bundled standalone distribution](docs/standalone-distribution.md) adds a relocatable macOS app and ZIP with its Java runtime and Kit; release signing and wider platform qualification remain later work.
|
||
|
||
Configuration 1.0 schemas, context selection, local JDK mappings and draft protocol validation are now executable. See [configuration and protocol](docs/configuration-and-protocol.md) for formats and validation rules.
|
||
|
||
The shared [Build and Refresh workflow](docs/build-and-refresh.md) now builds isolated reactor copies and publishes immutable, leased snapshots, with explicit save approval and last-successful-build selection.
|
||
|
||
The [preview API and target adapter](docs/preview-target-fixtures.md) are validated with real classpath and named-module NeitzelLib applications, including bindings, rendering, readiness and cleanup. Each preview session requires a fresh target JVM.
|
||
|
||
The Component builder fix is integrated in NeitzelLib main. The [NeitzelLib 1.0.6 runtime baseline](docs/runtime/neitzellib-baseline.md) records the released source and artifact identity. NeitzelLib sources are not copied here; the narrow Kit text-selection patch has explicit provenance and regression coverage.
|
||
|
||
## Validate the foundation
|
||
|
||
Requirements: JDK 25 for builds and target linkage validation, Python 3.10+, the published NeitzelLib 1.0.6 artifacts, and IntelliJ IDEA SDK build **263.7307.200**. Downloads require network access. Set `JAVA_HOME` to JDK 25 and supply explicit local paths:
|
||
|
||
```sh
|
||
python3 scripts/check-bootstrap.py --idea-home "$IDEA_HOME" --target-java-home "$TARGET_JAVA_HOME"
|
||
```
|
||
|
||
On macOS `IDEA_HOME` points to the IDE application's `Contents` directory. The current SDK check uses its macOS product-info layout; other platforms are not qualified. The command checks runtime artifact hashes, clean-builds/installs the Maven modules, tests the adapters, checks bytecode baselines, runs target linkage under the supplied target JDK, builds the plugin ZIP, runs the real Maven snapshot and target-preview fixtures, checks the connected workflow in both document adapters and native standalone Kit windows, and validates documentation. Real registered IntelliJ UI qualification is a separate command below. It resolves NeitzelLib from the Gitea Maven registry.
|
||
|
||
Maven is pinned to **3.9.11** (Wrapper **3.3.4**); the separate IntelliJ build uses **Gradle 9.1.0** and IntelliJ Platform Gradle Plugin **2.20.1**. Wrapper distributions have pinned checksums. Shared-module-only validation is `./mvnw -B -ntp clean verify`; it does not qualify IntelliJ packaging. Plugin output is under `designer-intellij/build/distributions/`.
|
||
|
||
## Java source conventions
|
||
|
||
Use focused Lombok annotations for mechanical constructors/accessors/logging,
|
||
as described in [AGENTS.md](AGENTS.md). Lombok **1.18.48** is compile-time-only:
|
||
Maven uses `provided` plus an explicit processor path; the IntelliJ Gradle build
|
||
uses `compileOnly` and `annotationProcessor` (also for tests). Keep these versions
|
||
aligned. `lombok.config` stops configuration inheritance outside this checkout.
|
||
The Model processor module retains `proc=none` for its own bootstrap; its compiler
|
||
tests explicitly exercise Lombok and Model generation together.
|
||
|
||
Records, interface adapters, JavaFX property methods and lifecycle operations
|
||
remain explicit where annotations would obscure their contracts. Vendored Kit
|
||
code is excluded from stylistic cleanup. Neither host nor target tooling needs
|
||
Lombok on its runtime classpath.
|
||
|
||
## Run the minimal hosts
|
||
|
||
For a bundled runtime and native standalone launcher, see [packaging and automated qualification](docs/standalone-distribution.md). The commands below remain development launchers.
|
||
|
||
After the full build, launch a disposable fixture with either command; add `--mode modulepath` for named modules:
|
||
|
||
```sh
|
||
python3 scripts/run-fixture-host.py standalone --java-home "$JAVA_HOME" --target-java-home "$TARGET_JAVA_HOME"
|
||
python3 scripts/run-fixture-host.py intellij --java-home "$JAVA_HOME" --target-java-home "$TARGET_JAVA_HOME" --idea-home "$IDEA_HOME"
|
||
```
|
||
|
||
The IntelliJ launcher isolates settings/plugins and disables bundled Scene Builder embedding while retaining JavaFX/FXML language support. Select **Neitzel Designer**, then **Build and Refresh**. Both hosts use JavaFX/Kit 26, with the fixture application running separately on Java 25 / JavaFX 27.0.1.
|
||
|
||
Qualify the registered editor and loaded JavaFX natives in real disposable IDE windows:
|
||
|
||
```sh
|
||
python3 scripts/check-ide-host.py --java-home "$JAVA_HOME" --target-java-home "$TARGET_JAVA_HOME" --idea-home "$IDEA_HOME"
|
||
```
|
||
|
||
### Archiver in IntelliJ
|
||
|
||
Build the Designer modules and plugin with the bootstrap command above. It verifies the [NeitzelLib release baseline](docs/runtime/neitzellib-baseline.md). Use the NeitzelLib version declared by Archiver for its application build. Archiver includes its preview examples in the `designer-preview` Maven profile. To open an isolated IntelliJ instance with a project copy and the built plugin, run from this checkout with the same Maven environment:
|
||
|
||
```sh
|
||
python3 scripts/run-fixture-host.py intellij --archiver ../Archiver \
|
||
--idea-home "$IDEA_HOME" --java-home "$JAVA_HOME" --target-java-home "$JAVA_HOME"
|
||
```
|
||
|
||
Open `ArchiveWindow.fxml` in **Neitzel Designer**, choose **Build and Refresh** and start **Interactive preview** with **Beispielarchiv**. Open the sample archive and select an entry in the example document. The entry, selected folder and scan state control the same 22 command permissions as the application. Opening read-only disables import and account management. The trash button opens the populated session-local trash, and closing the archive disables it. Under **Bindings → Command bindings** select `open`, change its path to `openReadOnly`, apply and restart the preview. The status bar identifies the read-only example. **Discover / Validate Commands** lists public getters returning a NeitzelLib `Command`, including the Command exposed by an `AsyncCommand`. The Problems view navigates to an invalid declaration. To repeat the automated acceptance, use the same arguments with `python3 scripts/check-ide-host.py --archiver ../Archiver` (omit the `intellij` positional argument).
|
||
|
||
Add `--connection-form` to open or qualify `ConnectionForm.fxml`. After **Build and Refresh**, choose **Form preview** and select **IMAP · Beispielkonto** or **JMAP · Beispielkonto**. The full image comes from the target application at the selected width and height. **Interactive preview** opens a separate, editable instance of the selected example.
|
||
|
||
In **Form controls**, select the palette type, destination child list and insertion position, then **Insert control**. Select a control on the canvas or in **Selected control**. **Set property** and **Reset property** edit its FXML, and **Bind property** opens the direct-binding form. For **suggestions**, enter one string per line. To reorder or move a child, choose its destination and position, then **Move to destination**. Each change participates in IntelliJ Undo and Redo.
|
||
|
||
Use **TabPane / tabs** for a Tab, **SplitPane / items** for an ordered child, or select the named content slot on a Tab, ScrollPane or BorderPane. Add `--media-layout-grid` to the Archiver host check to exercise these destinations, the document media button and the folder grid. [Form and grid editing](docs/user-guide/authoring.md)
|
||
|
||
In `ArchiveWindow.fxml`, select a named DockGroupDefinition to edit minimum dimensions, allowed split directions and persistence. The Archiver host check accepts `--dock-rules` to exercise the document tab context menus at two window sizes and compare the destinations after closing the last tab. [Dock group settings and example](docs/user-guide/authoring.md#dock-group-size-splitting-and-persistence)
|
||
|
||
Open **Bindings → DataGrid / Docking** in `FolderTab.fxml` to select the grid or one of its columns. **Apply setting** writes the selected property. Clear an optional value to restore its FXML default. **Edit data binding** opens the direct binding for `items` or `source`. The **Archivordner · Beispieldateien** example loads two local files using the grid's declared columns and grouping.
|
||
|
||
In `ArchiveWindow.fxml`, select a layout branch to split it or an outer side area to move it. **Add area with group** creates a destination in an unused area. The **Beispielarchiv** example opens a document and its details in the declared destinations. Both the embedded image and the interactive window use this layout. To repeat both acceptance scenarios, add `--grid-docking ../NeitzelLib/fx-example/src/main/resources/de/neitzel/fx/example/docking/workspace/ReferenceWorkspace.fxml` to the Archiver host check.
|
||
|
||
Add `--saved-document` to the Archiver launcher or host check to open the designer-profile view `SavedDocument.fxml`. Under **Form controls**, select **HtmlViewer #article** to edit the media button labels and tooltips. Select **AutoCompleteTextField #fixed** and edit **suggestions**, one tag per line. **Build and Refresh** discovers **HTML · Rechnung** and **HTML · Lieferschein**. **Form preview** shows the rendered HTML at the selected dimensions. In **Interactive preview**, use **Dokument wechseln**, edit **HTML-Quelle**, or type **Re** and **Li** into **Dokument-Tags** before and after switching. The form binds `article.html` to `html` and `dynamic.suggestionsSource` to `tags`, both toward the view. To create either binding, open **Bindings → Discover targets**, select **view** and the model path, select the compatible control property, then choose **Use selected target → Apply binding**. **Form controls → Bind property** opens the declaration for an existing target.
|
||
|
||
Use `--import-form` with `scripts/check-ide-host.py --archiver ../Archiver` and the same JDK and IDEA options to verify seven generic binding targets. The check saves and reopens bindings on the folder grid and import selector, then exercises the free, conflicting and busy import examples in the registered editor.
|
||
|
||
Use `--management-readers` with the Archiver host check to exercise the two account states, the empty and populated trash, and all five reader toolbars. The check saves and reopens CommandBinding changes in both management forms and an icon and accessible text change in the picture toolbar.
|
||
|
||
Use `--row-menus` to qualify menu labels and Command assignments on the Archiver folder and trash rows and group captions for paths and file types containing spaces. The DataGrid inspector preserves literal keys using the qualified target runtime.
|
||
|
||
Use `--folder-profiles` with the Archiver host check to rebind the profile buttons and edit mail and book columns against indexed EML and EPUB files. The editable attribute list offers the row attributes used by the current grid.
|
||
|
||
Use `--folder-actions` with the Archiver host check to edit a text field’s column count, accessible name and controller action, then exercise the folder toolbar’s dismiss handler, full-text search, multiple selection and saved display profiles.
|
||
|
||
Use `--document-tabs` with the Archiver host check to open the production archive window and select **Archiver · HTML-Dokumenttabs**. The check also opens the production HTML and details FXML files directly, edits the assigned-tag Component and the input prompt through the visual inspector, and reopens the saved files. In the archive window it adds a second tag to the invoice, switches to the delivery note and back, removes the selected tag, and checks each WebView and suggestion popup. Direct examples cover read-only and busy states.
|
||
|
||
For an existing Archiver checkout, install the built plugin ZIP and create the ignored local JDK and worker mappings once with `python3 scripts/configure-library-example.py --project ../Archiver --target-java-home "$JAVA_HOME"`. Launch the IDE with access to the Maven repository containing the qualified snapshots.
|
||
|
||
The [save/startup reliability follow-up](docs/ide-host-reliability.md) covers queued IntelliJ VFS writes and host-revision/validation races, including repeated registered module-path qualification. Add `--mode modulepath --repeat 3` to the IDE runner to repeat that gate.
|
||
|
||
Worker startup cancellation and ready-preview cleanup are covered by the [native lifecycle regression](docs/native-worker-lifecycle.md); host checks also reject new native JVM crash reports.
|
||
|
||
These graphical checks require a macOS desktop session; other platforms are not qualified. See [workflow limits](docs/first-connected-workflow.md#limits-and-next-stage) before using arbitrary application documents.
|
||
|
||
In Archiver `HtmlDocument.fxml`, **Form controls** offers `HtmlMediaButton` in the palette. Select its **viewer** property, choose an earlier `HtmlViewer` with an `fx:id` and click **Set property**. **Reset property** clears the reference. **Bindings → Structure → Rename identifier** updates the reference when renaming the target. The `--viewer-import` IntelliJ qualification uses the local-image reference example and the real import dialog with a controlled file error and retry.
|
||
|
||
Use `--reader-states` with the Archiver IntelliJ host check for the direct `DocumentTag.fxml` example, binary attachment export and HTML load error with recovery. The test saves a chip style in the disposable project and checks the styled chips in the archive window.
|
||
|
||
## Implementation references
|
||
|
||
- [Lombok adoption](docs/lombok-adoption.md): scope, API preservation and build/host validation.
|
||
|
||
- [Initial project contract](docs/initial-project-contract.md): module responsibilities, configuration, snapshots, runtimes, preview sessions and communication.
|
||
- [Repository bootstrap plan](docs/repository-bootstrap-plan.md): ordered work packages and acceptance gates. Bootstrap work packages 1–7 are implemented; source-preserving projection is implemented and its [manual drag/resize gate](docs/manual-input-validation.md) passed in both hosts on the recorded baseline. Stage 3 now implements [target-runtime sessions, sizing and navigation](docs/target-runtime-sessions.md), with [manual passes and explicitly skipped remaining checks](docs/manual-runtime-navigation.md) recorded.
|
||
- [Decision provenance](docs/provenance.md): workspace planning and captured prototype evidence.
|
||
- [Third-party notices](THIRD-PARTY-NOTICES.md): Maven wrapper and patched Kit source provenance.
|
||
|
||
The canonical checkout is `/Volumes/PlanckSSD/KI/java/NeitzelFXDesigner`. Its Git remote is `ssh://git@gitea.neitzel.de:2222/konrad/NeitzelFXDesigner.git` and its default branch is `main`.
|
||
|
||
Verify the released NeitzelLib runtime separately with `python3 scripts/check-neitzellib-artifact.py --resolve`.
|