TO-UNDO

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
IJ1Helper: only set main window title and icon if there is a main window

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
IJ1Helper: be more careful when adding menu items

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Invert the LegacyCompatibleCommand logic

Instead of having to mark commands that are legacy-compatible, we now
require that commands that want to be marked as legacy-incompatible
*explicitly* by adding a 'no-legacy' attr.

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

It is no longer needed.

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

less out.txt | sed -n 's/^.INFO. Not overriding.*; class: //p' | sed 's/;
jar: file:.home.gene099.fiji.modules.imagej2.ImageJ.app.jars./ /' | sed -e
's/-[0-9\.]*.jar$//' -e 's/-[0-9\.]*-SNAPSHOT.jar$//' | sed 's/\(.*\)
\(.*\)/\2 \1/' | sort -k 1

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
wip
SwitchToModernTest: make *extra* sure that there is an annotation index

When building in Eclipse and running the SwitchToModernTest first thing,
for various reasons the annotation index is not built correctly. So
let's just run it in every case, even if we *know* that we're running
inside Maven.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Help diagnose multiple contexts

For the moment, there can only be one LegacyService per class loader.
Let's make sure that we're giving enough information to diagnose what
went wrong when a second legacy services was about to be instantiated
nevertheless.

While at it, make sure that resetting the current instance is guarded
in a synchronized block just like setting it is.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Prevent the LegacyInitializer from being called recursively

The SwitchToModernTest exposes the problem where the legacy initializer
creates a new context that in turn tries to create a new legacy service
which creates a legacy UI which in turn triggers the initializer to be
run. Break the loop.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
wip
TO-UNDO: failed test switching off legacy mode always
Revert "TO-UNDO: failed test switching off legacy mode always"

This reverts commit 398a2c40a3761012b35bff4e3dadff1289ce2764.
wip