The problem is caused by this commit: scijava/scijava-common@ff73f88a.
And relatedly, the shift key logic for scripts lives in imagej-legacy.
The problem is that
script.getPath() returns a relative path—e.g., the Plugins Examples Fiji Cube returns the value
Examples/Fiji_Cube.ijm, which is correct relative to one of the script directory prefixes. The issue is that there is more than one script directory prefix. From the Script Interpreter:
[/Applications/Fiji.app/scripts, /Applications/Fiji.app/plugins/Scripts, /Applications/Fiji.app/plugins]
(As an aside: Why do we have both
plugins anyway? It results in scripts being scattered across different subtrees.)
ScriptFinder now constructs
ScriptInfo objects with only a relative path, excluding the associated script directory prefix. This is OK, because the
ScriptInfo now has the whole script in memory, read from a URL into the
script field, which can then be fed back any time via the
I fixed it by calling
getReader() first to access the script contents, before falling back to
getPath(). This also has the handy side effect of making scripts stored inside JAR files shift-clickable too!
One remaining bug is that the language is still not set correctly, but I am too tired to fix that tonight.
If you have time, please test and let me know how it goes. There are other critical pending bug-fixes in imagej-legacy right now too, so I will be cutting a new release and uploading some time tomorrow, unless you find any showstopper problems.