Do not override the junit version defined in pom-scijava

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Remove unnecessary 'else'

Thanks, Egbert Eclipse.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a callback to call when ImageJ 1.x populates the menu

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Call the LegacyHook#addMenuItem hook

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Remember the menu structure in the LegacyHooks

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a method to LegacyEnvironment to obtain the menu structure

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Fix style of TestUtils

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add more helpers to TestUtils

To ease testing with the LegacyClassLoader, we add a function to
construct new instances of a given class in a given class loader
and a function to invoke static methods of a given class in a given
class loader.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Verify that LegacyEnvironment#getMenuStructure() works

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Also add the separators to the menu structure

Since the separators can repeat, we add counters to the minus character.
As LegacyHooks keeps track of the menu structure in a neat
LinkedHashMap, the order is preserved.

This will help ij-legacy figure out the menu paths of the legacy plugins
in a more efficient and robust way.

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