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
ConstructorsConstructorDescriptionDecompilerController(ServiceProvider serviceProvider, DecompilerCallbackHandler handler, DecompileOptions options, ghidra.app.plugin.core.decompile.DecompilerClipboardProvider clipboard) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clears all internal state and releases all resources.voidvoiddisplay(Program program, ProgramLocation location, ViewerPosition viewerPosition) Shows the function containing the given location in the decompilerPanel.voiddispose()Called by the provider when the provider is disposed.voidvoidbooleanbooleanvoidprogramClosed(Program closedProgram) voidrefreshDisplay(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.voidResets the native decompiler process.voidsetDecompileData(DecompileData decompileData) Called by the DecompilerManager to update the currently displayed DecompileDatavoidsetMouseNavigationEnabled(boolean enabled) voidsetOptions(DecompileOptions decompilerOptions) Sets new decompiler options and triggers a new decompile.voidsetSelection(ProgramSelection selection) voidsetStatusMessage(String message)
-
Constructor Details
-
DecompilerController
public DecompilerController(ServiceProvider serviceProvider, DecompilerCallbackHandler handler, DecompileOptions options, ghidra.app.plugin.core.decompile.DecompilerClipboardProvider clipboard)
-
-
Method Details
-
getServiceProvider
-
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
-