LegacyTestUtils: we use CodeHacker directly now

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a better infrastructure for legacy hooks

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Implement legacy hooks for ImageJ2

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
LegacyInjector: add ctor with explicit headless mode, legacy hooks

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make LegacyJavaAgentIT less implementation-dependent

We are about to switch around a few things, in particular the assumption
that there is always a LegacyService available.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Remove obsolete patches for ij.macro.Functions

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Move IJFunctions into the LegacyInjector/LegacyHooks

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Move ImageJFunctions into LegacyInjector/LegacyHooks

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Move ImagePlusFunctions into LegacyInjector/LegacyHooks

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Move ImageWindowFunctions into LegacyInjector/LegacyHooks

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Move PluginClassLoaderFunctions into LegacyInjector/LegacyHooks

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Switch to Modern Mode: get the LegacyService through the Context

ImageJ 1.x should not know about any ImageJ2 classes explicitly...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
No longer offer the LegacyService in ij.IJ

We cannot: the class loader in which ImageJ 1.x lives should not need
to know any ImageJ2 class explicitly.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Get rid of the DummyLegacyService

It was only needed because we conflated the concept of LegacyService and
LegacyHooks to begin with...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Move LegacyExtensions' hooks into LegacyHooks

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Do not inject the LegacyService into ImageJ 1.x anymore

It turned out that it limited us too much to load all of the classes
required by ImageJ2's LegacyService into the same class loader as
ImageJ 1.x.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
CodeHacker: remove obsolete code

In our endeavor to separate better between ImageJ 1.x and ImageJ2
classes, we no longer use ImageJ2 classes directly in the patched
ImageJ 1.x.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
IJ1Helper: remove no longer needed functions

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
WIP: Add a class loader specifically for loading a patched ImageJ 1.x

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