In ghidra script you can just println("to the console");
However I need to print to the ghidra console from a ghidra plugin (a real jar plugin, not a script).
I found that I can get an instance of ConsoleService via:
ConsoleService consoleService = pluginTool.getService(ConsoleService.class);
consoleService.print("hello");
my plugin looks like the following:
public class MyPlugin extends AbstractAnalyzer {
public MyPlugin() {
setSupportsOneTimeAnalysis(true);
}
}
How do I get an instance of a PluginTool so that I could get the ConsoleService?