Skip to content

java admin client enhancements#6372

Draft
duncdrum wants to merge 8 commits into
developfrom
dp-jac-swing
Draft

java admin client enhancements#6372
duncdrum wants to merge 8 commits into
developfrom
dp-jac-swing

Conversation

@duncdrum
Copy link
Copy Markdown
Contributor

Sorry for the accidental push to upstream. Since I touched this stuff recently, I figured I d have a go at pushing this further. Not a heavy user of JAC, or swing framework. needs proper testing likely on windows as well

Have a look. Steals ideas from @reinhapa in #6046

close #4355

duncdrum added 6 commits May 13, 2026 16:02
Introduce ClientSwingEdt (invokeAndWaitIfNeeded / invokeLaterIfNeeded)
and
use it from ClientFrame for error dialogs, shell display, resource table
updates, and status text. Migrate DocumentView save/save-as to
SwingWorker
and marshal ProgressObserver updates to the EDT.

ClientAction is unchanged: non-GUI callers still handle failures on the
calling thread (e.g. InteractiveClient console path).

see  #4355
Replace QueryRunnable/thread with QuerySwingWorker (publish to EDT).
Convert
remove, move, rename, copy, reindex, upload, and restore off
newClientThread
to SwingWorker; fix restore confirm and reload paths for EDT safety.

see #4355
Add InteractiveClient.runOnFrameEdt and route setPath, setStatus,
edit/get/show
shell output, and error dispose through
ClientSwingEdt.invokeAndWaitIfNeeded.
Start ProcessRunnable on a named virtual thread instead of
newClientThread.

Closes #4355
Shell `edit` now uses ClientSwingXmlWorker so retrieve() runs in the
worker thread and DocumentView is opened from SwingWorker.done() on
the EDT. Extract ClientDocumentEditSupport for testable load-only I/O.

Tests: ClientSwingEdtTest (exception propagation, invokeLater order);
ClientDocumentEditSupportTest (XMLDBException propagation, payload).

see #4355
Shell get: try-with-resources on EXistResource after retrieve.
Add consoleErr/errorln overloads with optional Throwable; use in main,
process(), more(), scheduleEditResource, trace writer, and
passwd/adduser.
Add setExistImage / setExistImageIcon and use across client dialogs.
ClientFrame FileListDropTargetListener extends DropTargetAdapter.

see #6046
@duncdrum duncdrum added enhancement new features, suggestions, etc. java Issues or pull requests that change Java code or are related to the JVM labels May 13, 2026
@duncdrum duncdrum marked this pull request as ready for review May 13, 2026 16:48
@duncdrum duncdrum requested a review from a team as a code owner May 13, 2026 16:48
Comment thread exist-core/src/main/java/org/exist/client/DocumentView.java Fixed
@duncdrum
Copy link
Copy Markdown
Contributor Author

Huh that's new

@reinhapa
Copy link
Copy Markdown
Member

@duncdrum may take an other look at the current state of #6046 (did some stealing of your work too 😎)

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@duncdrum duncdrum marked this pull request as draft May 19, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement new features, suggestions, etc. java Issues or pull requests that change Java code or are related to the JVM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Java Admin Client uses non-Swing concurrency to interact with GUI

2 participants