|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.imagej.patcher.LegacyHooks
net.imagej.patcher.EssentialLegacyHooks
public class EssentialLegacyHooks
The base LegacyHooks to be used in the patched ImageJ 1.x.
This is the minimal implementation of LegacyHooks and will be
installed by default after patching in the extension points into ImageJ 1.x.
On its own, it does not allow to override the extension points (such as the
editor) with different implementations; one needs to install different hooks using
the net.imagej.patcher.CodeHacker#installHooks(LegacyHooks) method.
LegacyHooks interface, e.g. to offer "real" extension mechanisms such
as the SciJava-common plugin framework.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.imagej.patcher.LegacyHooks |
|---|
LegacyHooks.FatJarNameComparator |
| Constructor Summary | |
|---|---|
EssentialLegacyHooks()
|
|
| Method Summary | |
|---|---|
void |
error(Throwable t)
Shows an exception. |
boolean |
handleNoSuchMethodError(NoSuchMethodError error)
Extension point to enhance ImageJ 1.x' error reporting upon NoSuchMethodError. |
void |
initialized()
First extension point to run just after ImageJ 1.x spun up. |
Object |
interceptRunPlugIn(String className,
String arg)
Intercepts LegacyInitializer's Context creation. |
| Methods inherited from class net.imagej.patcher.LegacyHooks |
|---|
addMenuItem, addPluginClasspath, addPluginDirectory, autoGenerateConfigFile, autoGenerateConfigFile, createInEditor, debug, dispose, enableIJ1PluginDirs, getAppName, getClasspathElements, getContext, getIconURL, getMenuStructure, handleExtraPluginJars, installed, interceptOpen, isLegacyMode, log, newPluginClassLoader, openInEditor, quit, registerImage, runAfterRefreshMenus, showProgress, showProgress, showStatus, unregisterImage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EssentialLegacyHooks()
| Method Detail |
|---|
public void error(Throwable t)
LegacyHooks
error in class LegacyHookst - the exceptionpublic boolean handleNoSuchMethodError(NoSuchMethodError error)
LegacyHooksNoSuchMethodError.
handleNoSuchMethodError in class LegacyHookserror - the exception to handle
public void initialized()
LegacyHooks
initialized in class LegacyHooks
public Object interceptRunPlugIn(String className,
String arg)
One of the most critical code paths in Fiji
is how its runtime patches get installed. It calls the
LegacyEnvironment, of course, but the idea is for said environment
to install the essential LegacyHooks which then give ImageJ's
DefaultLegacyService a chance to spin up all of the legacy patches,
including Fiji's (which are add-ons on top of imagej-legacy).
If this critical code path fails, Fiji fails to start up properly. Ideally,
this should never happen, but this is not an ideal world: corrupt
.jar files and version skews caused by forgotten updates,
locally-modified files or simply by forward-incompatible downstream updates
can break any number of things in that path. So let's bend over another
inch (the existence of the ij1-patcher speaks volumes about our
learned ability to do so) and try extra hard to keep things working even
under very unfavorable circumstances.
interceptRunPlugIn in class LegacyHooksclassName - the class namearg - the argument passed to the runPlugIn method
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||