Package ghidra.python
Class PythonPlugin
- java.lang.Object
-
- ghidra.framework.plugintool.Plugin
-
- ghidra.app.plugin.ProgramPlugin
-
- ghidra.python.PythonPlugin
-
- All Implemented Interfaces:
ghidra.app.plugin.core.interpreter.InterpreterConnection,OptionsChangeListener,PluginEventListener,ServiceListener,ExtensionPoint
public class PythonPlugin extends ghidra.app.plugin.ProgramPlugin implements ghidra.app.plugin.core.interpreter.InterpreterConnection, OptionsChangeListener
This plugin provides the interactive Python interpreter.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ghidra.util.classfinder.ExtensionPoint
ExtensionPoint.Exclude, ExtensionPoint.Util
-
-
Field Summary
-
Fields inherited from class ghidra.app.plugin.ProgramPlugin
currentHighlight, currentLocation, currentProgram, currentSelection
-
Fields inherited from class ghidra.framework.plugintool.Plugin
name, pluginDescription, tool
-
-
Constructor Summary
Constructors Change Constructor Description PythonPlugin(PluginTool tool)Creates a new PythonPlugin object.
-
Method Summary
All Methods Instance Methods Concrete Methods Change Modifier and Type Method Description NEW protected voiddispose()Tells a plugin that it is no longer needed.java.util.List<ghidra.app.plugin.core.console.CodeCompletion>getCompletions(java.lang.String cmd)Returns a list of possible command completion values.javax.swing.ImageIcongetIcon()java.lang.StringgetTitle()NEW protected voidinit()Initialization method; override to add initialization for this plugin.voidinterrupt()voidoptionsChanged(ToolOptions options, java.lang.String optionName, java.lang.Object oldValue, java.lang.Object newValue)Handle a change in one of our options.voidreset()java.lang.StringtoString()-
Methods inherited from class ghidra.app.plugin.ProgramPlugin
enableOnHighlight, enableOnLocation, enableOnProgram, enableOnSelection, getCurrentProgram, getProgramHighlight, getProgramLocation, getProgramSelection, goTo, goTo, highlightChanged, locationChanged, processEvent, programActivated, programClosed, programDeactivated, programOpened, selectionChanged, setBookmark, setSelection
-
Methods inherited from class ghidra.framework.plugintool.Plugin
acceptData, canClose, canCloseDomainObject, cleanup, close, dataStateRestoreCompleted, dependsUpon, deregisterService, equals, eventSent, firePluginEvent, getData, getMissingRequiredServices, getName, getPluginDescription, getPluginName, getServicesRequired, getSupportedDataTypes, getTool, getTransientState, getUndoRedoState, hashCode, hasMissingRequiredService, hasUnsaveData, isDisposed, prepareToSave, readConfigState, readDataState, registerDynamicEventConsumed, registerDynamicServiceProvided, registerEventConsumed, registerEventProduced, registerServiceProvided, registerServiceUsed, restoreTransientState, restoreUndoRedoState, saveData, serviceAdded, serviceRemoved, writeConfigState, writeDataState
-
-
-
-
Constructor Detail
-
PythonPlugin
public PythonPlugin(PluginTool tool)
Creates a new PythonPlugin object.- Parameters:
tool- The tool associated with this plugin.
-
-
Method Detail
-
optionsChanged
public void optionsChanged(ToolOptions options, java.lang.String optionName, java.lang.Object oldValue, java.lang.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
public java.util.List<ghidra.app.plugin.core.console.CodeCompletion> getCompletions(java.lang.String cmd)
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.
-
interrupt
public void interrupt()
- Specified by:
interruptin interfaceghidra.app.plugin.core.interpreter.InterpreterConnection
-
reset
public void reset()
- Specified by:
resetin interfaceghidra.app.plugin.core.interpreter.InterpreterConnection
-
getTitle
public java.lang.String getTitle()
- Specified by:
getTitlein interfaceghidra.app.plugin.core.interpreter.InterpreterConnection
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getIcon
public javax.swing.ImageIcon getIcon()
- Specified by:
getIconin interfaceghidra.app.plugin.core.interpreter.InterpreterConnection
-
-