Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: scijava/scijava-desktop
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: scijava/scijava-desktop
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: single-instance
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 4 files changed
  • 2 contributors

Commits on May 7, 2026

  1. WIP: Add single-instance listener via app-launcher

    Registers a TCP socket listener (via SingleInstance.listen from
    app-launcher) so that a secondary transient instance launched by the OS
    can hand off its arguments to the already-running primary instance and
    exit immediately, before the splash screen ever appears.
    
    This feature is implemented in scijava-desktop -- not in scijava-common
    or app-launcher directly -- because OS-level integration features of
    scijava-desktop like file type associations and URI scheme registrations
    result in a new application process being launched each time a file or
    link of an associated type is opened. But for more complex applications
    like those the SciJava application framework is intended to build, users
    typically expect the already-running application to handle the newly
    opened file or link, rather than multiple instances stacking up.
    Bundling the single instance listener here keeps the responsibility
    clearly located and avoids scijava-common depending on app-launcher or
    vice versa -- scijava-common is intended to be launcher-agnostic, while
    app-launcher is designed as a minimal bootstrap tool that should not
    depend on the full framework it launches.
    
    When arguments arrive from a secondary instance, the receiveArgs
    callback runs an appropriate subset of the launch sequence:
    
    1. processArgs: dispatches args to registered ConsoleArgument handlers,
       some of which queue deferred work to StartupService rather than
       acting immediately because they need the UI to be visible
    2. execMains: handles any --main flags
    3. executeOperations: drains whatever was queued by processArgs
    
    The feature is opt-in via the scijava.app.single-instance system
    property, so that a launched application only becomes a single instance
    under appropriate conditions, as determined by the launch sequence.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ctrueden and claude committed May 7, 2026
    Configuration menu
    Copy the full SHA
    17e4420 View commit details
    Browse the repository at this point in the history
Loading