Publish shared FXML diagnostics and integrate IntelliJ Problems
Navigate authoritative FXML locations, withdraw stale results and preserve host Undo/Redo. Include editor ownership in native problem identity so equal diagnostics from separate owners survive independent cleanup. Qualify both hosts automatically.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# Shared diagnostics and IntelliJ Problems
|
||||
|
||||
Both hosts now provide **Bindings → Problems**. The shared list combines immediate FXML/structural checks with target-side Direct, Computed, Converter, Repeat and Table validation. **Validate View** validates the current draft against the selected successful build. Results include severity and a build/draft qualifier. **Go to FXML**, double-click or Enter opens the authoritative source at the affected declaration without editing the document or adding an undo command.
|
||||
|
||||
Target diagnostics match control/property pairs to binding declarations, Repeat panes to Repeat declarations and Table identities to Tables. Duplicate matching bindings expose each declaration. Unknown/aggregate origins fall back to the document root; malformed XML uses the parser's line/column. This does not guess a Java origin or a particular Column/Row field when metadata supplies only a Table-level location. Local structural checks currently expose document-level locations except XML syntax errors. No protocol change or application execution in the hosts is needed.
|
||||
|
||||
## Freshness and lifetime
|
||||
|
||||
Each open designer owns a replaceable diagnostic set. FXML edits, related captured-document changes and Build and Refresh withdraw previous target results. Local checks run on the new source; target results require validation/discovery or preview validation. The state label explicitly says when target validation is outdated, pending or unavailable. An empty list before validation is not a successful type check. Explicit last-successful-build validation retains an outdated-build label.
|
||||
|
||||
Existing request tickets, source revisions and captured related-draft checks reject obsolete target replies. Navigation checks the source revision again before using an offset. Corrections and Undo/Redo replace local diagnostics and invalidate target evidence. Save remains allowed for invalid drafts; existing preview gates remain unchanged. An editor closing withdraws only its own published diagnostics. The list includes validation/operation failures with a document fallback location; it is not a persistent build-console log or project-wide scan of unopened Views.
|
||||
|
||||
## IntelliJ adapter
|
||||
|
||||
The IntelliJ adapter publishes the same locations and messages through the native `ProblemsCollector` as `FileProblem` entries grouped under **Neitzel FX Designer**. Severity is exposed in the text and icon. The collector feeds the Problems tool window's Project Errors view; this slice does not install a PSI annotator or source squiggles in Current File. Native file/line/column navigation opens the FXML text editor. The shared panel still uses the shared Source mode in either host.
|
||||
|
||||
The adapter checks the current IDE Document text before publishing queued results, removes superseded entries rather than appending duplicates, isolates editor ownership and withdraws entries on close/project disposal. IDE operations use the EDT with read access; target validation remains outside the IDE process. Host navigation now distinguishes source navigation from Component designer navigation, and standalone source navigation honors offsets in existing or newly opened editors.
|
||||
|
||||
The pinned IntelliJ build is **263.7307.200**. Its bundled `com.intellij.problemsView` plugin supplies the public `intellij.platform.problemView.shared` API; the designer declares that dependency rather than packaging IDE classes. The qualification companion declares it too. See JetBrains' [2026 API changes](https://plugins.jetbrains.com/docs/intellij/api-changes-list-2026.html) for the module rename and [Problems tool window](https://www.jetbrains.com/help/idea/problems-tool-window.html) for native navigation behavior. Integration is qualified against this SDK, not all IDE versions.
|
||||
|
||||
## Automated acceptance
|
||||
|
||||
Unit tests cover FXML origins, nested bindings, duplicate matching declarations, severity preservation, root fallbacks and malformed XML. The IDE adapter regression checks replacement, independent owners, source mismatch rejection and close/late-result cleanup through the real collector. The shared live scenario checks validation, exact source navigation, stale withdrawal, correction with Undo/Redo and invalid-source recovery in both native standalone and registered IntelliJ launch modes. The registered companion additionally checks native Problems publication, source navigation using collector file/line/column, Undo/Redo invalidation and registered-editor close cleanup.
|
||||
|
||||
Run the bootstrap and registered IDE checks in the [README](../README.md). No manual tests are required for this slice. Previously skipped manual checks remain skipped. Generated metadata, precise Java/Row source origins, source highlighting, quick fixes and broader project-wide diagnostics remain subsequent work.
|
||||
|
||||
### Qualification — 2026-11-13
|
||||
|
||||
The full bootstrap passed: 131 unit/adapter tests (123 Maven, eight IntelliJ), 36 target processes with 512 fixture checks, 48 lifecycle cycles, both native standalone modes, connected adapters and packaging/documentation checks. A subsequent regression exposed equal Problems entries from two owners collapsing in the collector. Including editor ownership in entry identity fixed it; the strengthened regression, all eight adapter tests and final plugin packaging passed again. The final plugin passed registered IntelliJ classpath and module-path qualification, including the shared panel, native Problems origins/source navigation, Undo/Redo invalidation, editor-close cleanup, exclusive JavaFX 26 natives and worker shutdown. No manual testing was used.
|
||||
|
||||
Two earlier IDE attempts timed out at initial preview, before the diagnostics scenario. An unchanged production build subsequently progressed; the pre-existing startup-render reliability follow-up remains open. Temporary startup instrumentation was removed. The native navigation test was corrected to assert the affected declaration rather than the first binding in the document, and to observe the shared editor's Undo state before issuing Redo. Exact source/caret and cleanup assertions remain required. Earlier persistence-check reliability work also remains open; this slice does not claim to fix it.
|
||||
|
||||
Local evidence: `/tmp/diagnostics-bootstrap.log`, `/tmp/diagnostics-identical-owner-red.log`, `/tmp/diagnostics-ide-owner-final.log`, `/tmp/diagnostics-qualified-ide.log`, `target/connected-workflow/` and `target/ide-workflow/`. Earlier startup/test diagnostics remain in `/tmp/diagnostics-registered-ide*.log` and `/tmp/diagnostics-startup-probe.log`. Generated qualification artifacts are not repository inputs.
|
||||
Reference in New Issue
Block a user