Override the editor in Plugins>Macros>Edit...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Also override the editor in the toolbar

E.g. when shift-clicking the >> button and selecting Startup Macros.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Override the editor when clicking 'Show macro' in the command finder

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

This topic branch tries to plug all the locations where the editor is
called by ImageJ 1.x (it is really astonishing how many different
locations contain essentially the same code simply opening an editor
with a macro...).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make IJ.getClassLoader() consistent

We should not return the class loader that happens to be the current
thread context class loader at the time IJ.getClassLoader() was called,
but rather the context class loader at the time the encapsulated ImageJ
1.x instance was initialized.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Leave preinit() early when the patches were already applied

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
alreadyPatched(): also look at the parent class loaders

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
fixup! alreadyPatched(): also look at the parent class loaders