scijava / scijava-common

A plugin framework and application container with built-in extensibility mechanism :electric_plug:
BSD 2-Clause "Simplified" License
85 stars 53 forks source link

Find scripts in base script directory #462

Closed gselzer closed 1 year ago

gselzer commented 1 year ago

This PR allows scripts to be found in the base script directory.

hinerm commented 1 year ago

This works, functionally, in principle. In practice, when I drop this in Fiji the discovered scripts aren't actually accessible via the menus because there is no "Scripts" root menu path: image

What about just putting them in /plugins/Scripts anyway? since that's where they go on the file system?

hinerm commented 1 year ago

In practice, when I drop this in Fiji the discovered scripts aren't actually accessible via the menus because there is no "Scripts" root menu path:

OK this was me being dumb and forgetting that everything, including scripts, need to have an underscore (_) in the file name to be placed into the GUI menus.

So yeah, this fix works. But I don't love that it creates a new menu entry called "Scripts" because.. there are tons of scripts that are NOT going into that directory (most of them)

In a local Fiji installation the scripts directory is in the plugins directory, so collecting them into the Plugins menu or submenu thereof seems reasonable?