Bump parent to preemptively bumped version

We need a new ij1-patcher and scijava-common version for the upcoming
changes.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Override ImageJ 1.x' macro/script menu items by default

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Remove obsolete method

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Refactor how legacy-compatible command are handled

We are about to introduce support for legacy-compatible scripts; the
corresponding ScriptInfos will be handled very similarly to the way
CommandInfos are handled. Let's refactor that code in preparation.

In particular, do not require a list of CommandInfo instances, but
instead a map from keys to ModuleInfo instances. The keys will put into
ImageJ 1.x' commands table by which we identify the infos to execute
later. By using a sensible convention ("Command:<class-name>"), this
adds incidental information to the command launcher.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Initialize legacy-compatible commands lazily

We really only need this when the legacy UI initializes. This means we
can discover the legacy-compatible commands lazily.

In the next commits, we will add support for legacy-compatible scripts;
at least for the ImageJ 1.x macro language, we need that lazy
initialization anyway, otherwise the script service (called from the
legacy service) will try to inject the context into the ImageJ 1.x macro
engine (which in turn needs a *fully initialized* legacy service).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Register legacy-compatible scripts as menu items, too

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Discover legacy-compatible scripts the same way Fiji did

This means that macros and scripts inside the plugins/Scripts/<...> will
be inserted into the corresponding top-level menu structure (e.g.
plugins/Scripts/File/Make_Screencast.bsh will be added as File>Make
Screencast) and all remaining macros and scripts in plugins/<...> will
be inserted into the corresponding location inside the Plugins menu
(e.g. plugins/Utilities/Fiji_Cube.ijm will be registered as
Plugins>Utilities>Fiji Cube).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add missing Javadoc

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add IJ1Helper#shiftKeyDown()

This adds a simple delegator to ask ImageJ 1.x whether it thinks that
the Shift key is held down.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Open legacy-compatible scripts in the editor when Shift is down

This reinstates the handling known from ImageJ 1.x and Fiji that holding
down the Shift key before clicking a menu item corresponding to a macro
or a script opens it in the editor instead of executing it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge branch 'override-ij1-script-support'

This adds back the script support in Fiji: macros and scripts are
installed into the menu structure if they are discovered in appropriate
format inside the plugins/ directory:

1) the file name must have a file extension known to a supported script
   language

2) the file name must contain an underscore

3) the menu path corresponds to the location inside the plugins/
   directory structure: the scripts will be installed into the submenu
   of Plugins corresponding to the relative path;

   by putting the script inside plugins/Scripts/, it is even possible to
   put the script outside of the Plugins menu, e.g.
   plugins/Scripts/File/Open_Samples/Adelsons_Squares.ijm is installed
   into File>Open Samples>Adelsons Squares.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>