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 ProgramPlugin
currentHighlight, currentLocation, currentProgram, currentSelectionFields inherited from class Plugin
name, pluginDescription, tool -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Tells a plugin that it is no longer needed.protected voidhighlightChanged(ProgramSelection highlight) Subclass should override this method if it is interested in program highlight events.voidinit()Initialization method; override to add initialization for this plugin.protected voidlocationChanged(ProgramLocation location) Subclass should override this method if it is interested in program location events.protected voidprogramActivated(Program program) Subclass should override this method if it is interested when programs become active.protected voidprogramDeactivated(Program program) Subclass should override this method if it is interested when programs become inactive.protected voidselectionChanged(ProgramSelection selection) Subclass should override this method if it is interested in program selection events.static voidsetInitializer(Consumer<PyGhidraPlugin> initializer) Sets the plugin's Python side initializer.Methods inherited from class ProgramPlugin
getCurrentProgram, getProgramHighlight, getProgramLocation, getProgramSelection, goTo, goTo, postProgramActivated, processEvent, programClosed, programOpened, 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
-
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
-
dispose
-
programActivated
Description copied from class:ProgramPluginSubclass 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:
programActivatedin classProgramPlugin- Parameters:
program- the new program going active.
-
programDeactivated
Description copied from class:ProgramPluginSubclass 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:
programDeactivatedin classProgramPlugin- Parameters:
program- the old program going inactive.
-
locationChanged
Description copied from class:ProgramPluginSubclass should override this method if it is interested in program location events.- Overrides:
locationChangedin classProgramPlugin- Parameters:
location- location could be null
-
selectionChanged
Description copied from class:ProgramPluginSubclass should override this method if it is interested in program selection events.- Overrides:
selectionChangedin classProgramPlugin- Parameters:
selection- selection could be null
-
highlightChanged
Description copied from class:ProgramPluginSubclass should override this method if it is interested in program highlight events.- Overrides:
highlightChangedin classProgramPlugin- Parameters:
highlight- highlight could be null
-