Class JythonPlugin
java.lang.Object
ghidra.framework.plugintool.Plugin
ghidra.app.plugin.ProgramPlugin
ghidra.jython.JythonPlugin
- All Implemented Interfaces:
ghidra.app.plugin.core.interpreter.InterpreterConnection, OptionsChangeListener, PluginEventListener, ServiceListener, ExtensionPoint
public class JythonPlugin
extends ProgramPlugin
implements ghidra.app.plugin.core.interpreter.InterpreterConnection, OptionsChangeListener
This plugin provides the interactive Jython interpreter.
-
Field Summary
Fields inherited from class ProgramPlugin
currentHighlight, currentLocation, currentProgram, currentSelectionFields inherited from class Plugin
name, pluginDescription, tool -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddispose()Tells a plugin that it is no longer needed.List<ghidra.app.plugin.core.console.CodeCompletion> getCompletions(String cmd) Returns a list of possible command completion values.List<ghidra.app.plugin.core.console.CodeCompletion> getCompletions(String cmd, int caretPos) Returns a list of possible command completion values at the given position.getIcon()getTitle()protected voidinit()Initialization method; override to add initialization for this plugin.voidInterrupts what the interpreter is currently doing.voidoptionsChanged(ToolOptions options, String optionName, Object oldValue, Object newValue) Handle a change in one of our options.voidreset()Resets the interpreter's state.toString()Methods inherited from class ProgramPlugin
getCurrentProgram, getProgramHighlight, getProgramLocation, getProgramSelection, goTo, goTo, highlightChanged, locationChanged, postProgramActivated, processEvent, programActivated, programClosed, programDeactivated, programOpened, selectionChanged, setSelectionMethods inherited from class Plugin
accept, acceptData, canClose, canCloseDomainObject, cleanup, close, dataStateRestoreCompleted, dependsUpon, deregisterService, equals, eventSent, firePluginEvent, getData, getMissingRequiredServices, getName, getPluginDescription, getServicesRequired, getSupportedDataTypes, getTool, getTransientState, getUndoRedoState, hashCode, hasMissingRequiredService, hasUnsaveData, internalRegisterEventConsumed, isDisposed, prepareToSave, readConfigState, readDataState, registerDynamicServiceProvided, registerServiceProvided, restoreTransientState, restoreUndoRedoState, saveData, serviceAdded, serviceRemoved, writeConfigState, writeDataState
-
Constructor Details
-
JythonPlugin
Creates a newJythonPluginobject.- Parameters:
tool- The tool associated with this plugin.
-
-
Method Details
-
init
-
optionsChanged
public void optionsChanged(ToolOptions options, String optionName, Object oldValue, Object newValue) Handle a change in one of our options.- Specified by:
optionsChangedin interfaceOptionsChangeListener- Parameters:
options- the options handleoptionName- name of the option changedoldValue- the old valuenewValue- the new value
-
getCompletions
Returns a list of possible command completion values.- Specified by:
getCompletionsin interfaceghidra.app.plugin.core.interpreter.InterpreterConnection- Parameters:
cmd- current command line (without prompt)- Returns:
- A list of possible command completion values. Could be empty if there aren't any.
-
getCompletions
Returns a list of possible command completion values at the given position.- Specified by:
getCompletionsin interfaceghidra.app.plugin.core.interpreter.InterpreterConnection- Parameters:
cmd- current command line (without prompt)caretPos- The position of the caret in the input string 'cmd'- Returns:
- A list of possible command completion values. Could be empty if there aren't any.
-
dispose
-
interrupt
public void interrupt()Interrupts what the interpreter is currently doing. -
reset
public void reset()Resets the interpreter's state. -
getTitle
- Specified by:
getTitlein interfaceghidra.app.plugin.core.interpreter.InterpreterConnection
-
toString
-
getIcon
- Specified by:
getIconin interfaceghidra.app.plugin.core.interpreter.InterpreterConnection
-