Class DecompilerController

java.lang.Object
ghidra.app.decompiler.component.DecompilerController

public class DecompilerController extends Object
Coordinates the interactions between the DecompilerProvider, DecompilerPanel, and the DecompilerManager
  • Constructor Details Link icon

  • Method Details Link icon

    • getServiceProvider Link icon

      public ServiceProvider getServiceProvider()
    • getDecompilerPanel Link icon

      public DecompilerPanel getDecompilerPanel()
    • dispose Link icon

      public void dispose()
      Called by the provider when the provider is disposed. Once dispose is called, it should never be used again.
    • clear Link icon

      public void clear()
      clears all internal state and releases all resources. Called when the provider is no longer visible or the currently displayed program is closed.
    • display Link icon

      public void display(Program program, ProgramLocation location, ViewerPosition viewerPosition)
      Shows the function containing the given location in the decompilerPanel. Also, positions the decompilerPanel's cursor to the closest equivalent position. If the decompilerPanel is already displaying the function, then only the cursor is repositioned. To force a re-decompile use refreshDisplay(Program, ProgramLocation, File).
      Parameters:
      program - the program for the given location
      location - the location containing the function to be displayed and the location in that function to position the cursor.
      viewerPosition - the viewer position
    • setSelection Link icon

      public void setSelection(ProgramSelection selection)
    • setOptions Link icon

      public void setOptions(DecompileOptions decompilerOptions)
      Sets new decompiler options and triggers a new decompile.
      Parameters:
      decompilerOptions - the options
    • isDecompiling Link icon

      public boolean isDecompiling()
    • setMouseNavigationEnabled Link icon

      public void setMouseNavigationEnabled(boolean enabled)
    • resetDecompiler Link icon

      public void resetDecompiler()
      Resets the native decompiler process. Call this method when the decompiler's view of a program has been invalidated, such as when a new overlay space has been added.
    • setDecompileData Link icon

      public void setDecompileData(DecompileData decompileData)
      Called by the DecompilerManager to update the currently displayed DecompileData
      Parameters:
      decompileData - the new data
    • doWhenNotBusy Link icon

      public void doWhenNotBusy(Callback c)
    • refreshDisplay Link icon

      public void refreshDisplay(Program program, ProgramLocation location, File debugFile)
      Always decompiles the function containing the given location before positioning the decompilerPanel's cursor to the closest equivalent position.
      Parameters:
      program - the program for the given location
      location - the location containing the function to be displayed and the location in that function to position the cursor.
      debugFile - the debug file
    • hasDecompileResults Link icon

      public boolean hasDecompileResults()
    • getCCodeModel Link icon

      public ClangTokenGroup getCCodeModel()
    • setStatusMessage Link icon

      public void setStatusMessage(String message)
    • getProgram Link icon

      public Program getProgram()
    • getFunction Link icon

      public Function getFunction()
    • getHighFunction Link icon

      public HighFunction getHighFunction()
    • getLocation Link icon

      public ProgramLocation getLocation()
    • getDecompileData Link icon

      public DecompileData getDecompileData()
    • exportLocation Link icon

      public void exportLocation()
    • clearCache Link icon

      public void clearCache()
    • programClosed Link icon

      public void programClosed(Program closedProgram)