Class PyGhidraInterpreter

java.lang.Object
ghidra.pyghidra.interpreter.PyGhidraInterpreter
All Implemented Interfaces:
ghidra.app.plugin.core.interpreter.InterpreterConnection, Disposable

public final class PyGhidraInterpreter extends Object implements Disposable, ghidra.app.plugin.core.interpreter.InterpreterConnection
The PyGhidra interpreter connection
  • Field Details

    • console

      public final ghidra.app.plugin.core.interpreter.InterpreterConsole console
  • Constructor Details

    • PyGhidraInterpreter

      public PyGhidraInterpreter(PyGhidraPlugin plugin, boolean isPythonAvailable)
  • Method Details

    • dispose

      public void dispose()
      Description copied from interface: Disposable
      Dispose this object
      Specified by:
      dispose in interface Disposable
    • getIcon

      public Icon getIcon()
      Specified by:
      getIcon in interface ghidra.app.plugin.core.interpreter.InterpreterConnection
    • getTitle

      public String getTitle()
      Specified by:
      getTitle in interface ghidra.app.plugin.core.interpreter.InterpreterConnection
    • getCompletions

      public List<ghidra.app.plugin.core.console.CodeCompletion> getCompletions(String cmd)
      Specified by:
      getCompletions in interface ghidra.app.plugin.core.interpreter.InterpreterConnection
    • getCompletions

      public List<ghidra.app.plugin.core.console.CodeCompletion> getCompletions(String cmd, int caretPos)
      Specified by:
      getCompletions in interface ghidra.app.plugin.core.interpreter.InterpreterConnection
    • init

      public void init(PyGhidraConsole pythonSideConsole)
      Initializes the interpreter with the provided PyGhidraConsole. This method is for internal use only and is only public so it can be called from Python.
      Parameters:
      pythonSideConsole - the python side console
      Throws:
      AssertException - if the interpreter has already been initialized