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>
fixup! Initialize legacy-compatible commands lazily
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>