Skip to content

Notify the user when no LinkHandler supports a URI - #4

Open
tferr wants to merge 1 commit into
scijava:mainfrom
tferr:fix-no-handler
Open

tferr wants to merge 1 commit into
scijava:mainfrom
tferr:fix-no-handler

Conversation

@tferr

@tferr tferr commented Oct 19, 2026 •

Copy link
Copy Markdown

Notice this when implementing snt:// links used here:

When a link is opened by an installation that lacks the component implementing it (e.g., a Fiji install that is not subscribed
to an update site), LinkService#handle(URI) only logged a debug message, so the link appeared to do nothing.

This is easy to hit because fiji:// may receive a fiji://<component>/... link, regardless of which components it has.
In the case of SNT, a fiji://snt/... link requires the Neuroanatomy update site.

This add LinkService#handleUnsupported(URI), called when no handler matches.
The default implementation keeps the previous debug logging

DefaultLinkService overrides it to log a warning and, if a UIService is available and the JVM is not headless, show an error dialog with the (truncated) link and a generic hint to install or update the missing component. When scijava.app.directory is set, the dialog also reports which installation received the link, to help diagnose setups with several side-by-side installations (which is related to #3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant