Package ghidra.pyghidra
Class PyGhidraPlugin
java.lang.Object
ghidra.framework.plugintool.Plugin
ghidra.app.plugin.ProgramPlugin
ghidra.pyghidra.PyGhidraPlugin
- All Implemented Interfaces:
PluginEventListener
,ServiceListener
,ExtensionPoint
This plugin provides the interactive Python interpreter.
-
Field Summary
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Tells a plugin that it is no longer needed.protected void
highlightChanged
(ProgramSelection highlight) Subclass should override this method if it is interested in program highlight events.void
init()
Initialization method; override to add initialization for this plugin.protected void
locationChanged
(ProgramLocation location) Subclass should override this method if it is interested in program location events.protected void
programActivated
(Program program) Subclass should override this method if it is interested when programs become active.protected void
programDeactivated
(Program program) Subclass should override this method if it is interested when programs become inactive.protected void
selectionChanged
(ProgramSelection selection) Subclass should override this method if it is interested in program selection events.static void
setInitializer
(Consumer<PyGhidraPlugin> initializer) Sets the plugin's Python side initializer.Methods inherited from class ghidra.app.plugin.ProgramPlugin
getCurrentProgram, getProgramHighlight, getProgramLocation, getProgramSelection, goTo, goTo, postProgramActivated, processEvent, programClosed, programOpened, setSelection
Methods inherited from class ghidra.framework.plugintool.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
-
Field Details
-
TITLE
- See Also:
-
script
-
interpreter
-
-
Constructor Details
-
PyGhidraPlugin
-
-
Method Details
-
setInitializer
Sets the plugin's Python side initializer.This method is for internal use only and is only public so it can be called from Python.
- Parameters:
initializer
- the Python side initializer- Throws:
AssertException
- if the code completer has already been set
-
init
public void init()Description copied from class:Plugin
Initialization method; override to add initialization for this plugin. This is where a plugin should acquire its services. When this method is called, all plugins have been instantiated in the tool. -
dispose
public void dispose()Description copied from class:Plugin
Tells a plugin that it is no longer needed. The plugin should release any resources that it has. All actions, components, services will automatically be cleaned up. -
programActivated
Description copied from class:ProgramPlugin
Subclass should override this method if it is interested when programs become active. Note: this method is called in response to a ProgramActivatedPluginEvent.At the time this method is called, the "currentProgram" variable will be set the new active program.
- Overrides:
programActivated
in classProgramPlugin
- Parameters:
program
- the new program going active.
-
programDeactivated
Description copied from class:ProgramPlugin
Subclass should override this method if it is interested when programs become inactive. Note: this method is called in response to a ProgramActivatedPluginEvent and there is a currently active program. At the time this method is called, the "currentProgram" variable will be set the new active program or null if there is no new active program.- Overrides:
programDeactivated
in classProgramPlugin
- Parameters:
program
- the old program going inactive.
-
locationChanged
Description copied from class:ProgramPlugin
Subclass should override this method if it is interested in program location events.- Overrides:
locationChanged
in classProgramPlugin
- Parameters:
location
- location could be null
-
selectionChanged
Description copied from class:ProgramPlugin
Subclass should override this method if it is interested in program selection events.- Overrides:
selectionChanged
in classProgramPlugin
- Parameters:
selection
- selection could be null
-
highlightChanged
Description copied from class:ProgramPlugin
Subclass should override this method if it is interested in program highlight events.- Overrides:
highlightChanged
in classProgramPlugin
- Parameters:
highlight
- highlight could be null
-