Class PyGhidraPlugin

All Implemented Interfaces:
PluginEventListener, ServiceListener, ExtensionPoint

public class PyGhidraPlugin extends ProgramPlugin
This plugin provides the interactive Python interpreter.
  • Field Details

  • Constructor Details

    • PyGhidraPlugin

      public PyGhidraPlugin(PluginTool tool)
  • Method Details

    • setInitializer

      public static void setInitializer(Consumer<PyGhidraPlugin> initializer)
      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.
      Overrides:
      init in class Plugin
    • 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.
      Overrides:
      dispose in class Plugin
    • programActivated

      protected void programActivated(Program program)
      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 class ProgramPlugin
      Parameters:
      program - the new program going active.
    • programDeactivated

      protected void programDeactivated(Program program)
      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 class ProgramPlugin
      Parameters:
      program - the old program going inactive.
    • locationChanged

      protected void locationChanged(ProgramLocation location)
      Description copied from class: ProgramPlugin
      Subclass should override this method if it is interested in program location events.
      Overrides:
      locationChanged in class ProgramPlugin
      Parameters:
      location - location could be null
    • selectionChanged

      protected void selectionChanged(ProgramSelection selection)
      Description copied from class: ProgramPlugin
      Subclass should override this method if it is interested in program selection events.
      Overrides:
      selectionChanged in class ProgramPlugin
      Parameters:
      selection - selection could be null
    • highlightChanged

      protected void highlightChanged(ProgramSelection highlight)
      Description copied from class: ProgramPlugin
      Subclass should override this method if it is interested in program highlight events.
      Overrides:
      highlightChanged in class ProgramPlugin
      Parameters:
      highlight - highlight could be null