Package ghidra.app.decompiler.component
Class DecompilerController
java.lang.Object
ghidra.app.decompiler.component.DecompilerController
Coordinates the interactions between the DecompilerProvider, DecompilerPanel, and the
DecompilerManager
-
Constructor Summary
ConstructorDescriptionDecompilerController
(DecompilerCallbackHandler handler, DecompileOptions options, ghidra.app.plugin.core.decompile.DecompilerClipboardProvider clipboard) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
clears all internal state and releases all resources.void
void
display
(Program program, ProgramLocation location, ViewerPosition viewerPosition) Shows the function containing the given location in the decompilerPanel.void
dispose()
Called by the provider when the provider is disposed.void
void
boolean
boolean
void
programClosed
(Program closedProgram) 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.void
Resets the native decompiler process.void
setDecompileData
(DecompileData decompileData) Called by the DecompilerManager to update the currently displayed DecompileDatavoid
setMouseNavigationEnabled
(boolean enabled) void
setOptions
(DecompileOptions decompilerOptions) Sets new decompiler options and triggers a new decompile.void
setSelection
(ProgramSelection selection) void
setStatusMessage
(String message)
-
Constructor Details
-
DecompilerController
public DecompilerController(DecompilerCallbackHandler handler, DecompileOptions options, ghidra.app.plugin.core.decompile.DecompilerClipboardProvider clipboard)
-
-
Method Details
-
getDecompilerPanel
-
dispose
public void dispose()Called by the provider when the provider is disposed. Once dispose is called, it should never be used again. -
clear
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
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 userefreshDisplay(Program, ProgramLocation, File)
.- Parameters:
program
- the program for the given locationlocation
- the location containing the function to be displayed and the location in that function to position the cursor.viewerPosition
- the viewer position
-
setSelection
-
setOptions
Sets new decompiler options and triggers a new decompile.- Parameters:
decompilerOptions
- the options
-
isDecompiling
public boolean isDecompiling() -
resetDecompiler
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
Called by the DecompilerManager to update the currently displayed DecompileData- Parameters:
decompileData
- the new data
-
doWhenNotBusy
-
refreshDisplay
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 locationlocation
- the location containing the function to be displayed and the location in that function to position the cursor.debugFile
- the debug file
-
hasDecompileResults
public boolean hasDecompileResults() -
getCCodeModel
-
setStatusMessage
-
getProgram
-
getFunction
-
getHighFunction
-
getLocation
-
getDecompileData
-
exportLocation
public void exportLocation() -
clearCache
public void clearCache() -
programClosed
-