When running in an Eclipse Application code as an Java Application, NullPointerExceptions occured when calling methods on the singletons microbat.utils.ConsoleUtils and microbat.Activator.
Modification
New methods were added to allow overriding (setItselfAsSingleton and setItselfAsPlugin) the singletons.
Stubs for the 2 classes were created. ( microbat.utils.ConsoleUtilsStub and microbat.ActivatorStub)
Example Usage:
ConsoleUtils consoleUtilsStub = new ConsoleUtilsStub();
consoleUtilsStub.setItselfAsSingleton();
Now any method call to ConsoleUtils e.g. ConsoleUtils.printMessage("message"), will use methods inside ConsoleUtilStub
Description
When running in an Eclipse Application code as an Java Application,
NullPointerException
s occured when calling methods on the singletonsmicrobat.utils.ConsoleUtils
andmicrobat.Activator
.Modification
setItselfAsSingleton
andsetItselfAsPlugin
) the singletons.microbat.utils.ConsoleUtilsStub
andmicrobat.ActivatorStub
)Example Usage:
Now any method call to
ConsoleUtils
e.g.ConsoleUtils.printMessage("message")
, will use methods insideConsoleUtilStub