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>
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>
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>
Show UI for legacy editor test drive

This is required to auto-generate a dialog for input parameters.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
IJ1Helper: Allow modern commands to override legacy ones

Unless a command is marked explicitly with a 'no-legacy' Attr, it
should be allowed to override existing legacy commands.

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>
Remove the legacy-compatible editor plugin

We just inverted the logic with regards to legacy-compatible commands:
instead of marking the compatible ones, we require the "no-legacy" attr
in the @Plugin annotation for the *incompatible* ones instead.

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