ij-legacy: register Help>Switch to Modern Mode only once

No need to register it every time we switch to legacy mode...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
ij-legacy: Avoid running the (slow) option synchronizer

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Avoid loading the MacOSX platform prematurely

We need to make sure that the platform classes load, and even
instantiate, correctly before we can ask them whether they target the
current platform. Therefore, we need to avoid loading MacOSX-specific
classes, such as the com.eawt.* classes. Unfortunately, if we
enumerate the declared fields, and one of them is of a subclass of
a MacOSX-specific class, that class *will* be loaded.

To work around this, simply do not declare the ultimate type of the
MacOSX-specific event handler, and everything's groovy.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
ij-legacy: always apply the black list for legacy commands

We should not make the same mistake as Microsoft's Visual C++ compiler:
behave differently in debug vs non-debug mode, because that makes
debugging a real bummer.

This also has the side effect of accelerating the start-up time
substantially: we just shaved off another 150 milliseconds on this
developer's machine, which contributes to the speed-up for the final
goal of having a perceived quick start-up time of less than a second
for the ImageJ2 context.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge branch 'speed-up-context'

This manages to shave off another fifth second from the startup time,
to roughly one third over a second. Still not where this developer wants
things to be, but good enough for now.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
ij-legacy: handle IJ.runPlugIn("ij.IJ.init", null)

In headless mode, we need a way to force ImageJ to initialize itself
even without running a macro file and certainly without creating an
instance of ij.ImageJ (which would fail because ImageJ is an instance
of an AWT Frame which cannot be instantiated in headless mode).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
ij-legacy: initialize IJ1 properly even in headless mode

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
ij-legacy: find legacy commands even in headless mode

They simply won't have any menu path in headless mode, is all.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge branch 'headless-fixes'

Thanks Jennasee Jenkins!

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Teach MiniMaven about the -U option

Maven's -U option forces it to download snapshot versions even if
there are locally-cached copies that are not even a day old. We can
do the same: -U is now a shortcut for -Dminimaven.updateinterval=0.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
TextIOPlugin: set priority after DatasetIOPlugin

Lowered the TextIOPlugin priority to that of DatasetIOPlugin - 1. There
are .txt datasets (e.g. TextFormat) so we try to open those first, and
if they fail, allow the TextIOPlugin to handle it.