Package ghidra.app.decompiler.component
Class DecompilerController
- java.lang.Object
- 
- ghidra.app.decompiler.component.DecompilerController
 
- 
 public class DecompilerController extends java.lang.ObjectCoordinates the interactions between the DecompilerProvider, DecompilerPanel, and the DecompilerManager
- 
- 
Constructor SummaryConstructors Constructor Description DecompilerController(DecompilerCallbackHandler handler, DecompileOptions options, ghidra.app.plugin.core.decompile.DecompilerClipboardProvider clipboard)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()clears all internal state and releases all resources.voidclearCache()voiddisplay(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.voidexportLocation()ClangTokenGroupgetCCodeModel()DecompileDatagetDecompileData()DecompilerPanelgetDecompilerPanel()FunctiongetFunction()HighFunctiongetHighFunction()ProgramLocationgetLocation()ProgramgetProgram()booleanisDecompiling()voidprogramClosed(Program closedProgram)voidrefreshDisplay(Program program, ProgramLocation location, java.io.File debugFile)Always decompiles the function containing the given location before positioning the decompilerPanel's cursor to the closest equivalent position.voidresetDecompiler()Resets the native decompiler process.voidsetDecompileData(DecompileData decompileData)Called by the DecompilerManager to update the currently displayed DecompileData.voidsetMouseNavigationEnabled(boolean enabled)voidsetOptions(DecompileOptions decompilerOptions)Sets new decompiler options and triggers a new decompile.voidsetSelection(ProgramSelection selection)voidsetStatusMessage(java.lang.String message)
 
- 
- 
- 
Constructor Detail- 
DecompilerControllerpublic DecompilerController(DecompilerCallbackHandler handler, DecompileOptions options, ghidra.app.plugin.core.decompile.DecompilerClipboardProvider clipboard) 
 
- 
 - 
Method Detail- 
getDecompilerPanelpublic DecompilerPanel getDecompilerPanel() 
 - 
disposepublic void dispose() Called by the provider when the provider is disposed. Once dispose is called, it should never be used again.
 - 
clearpublic 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.
 - 
displaypublic 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).- 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.
 
 - 
setSelectionpublic void setSelection(ProgramSelection selection) 
 - 
setOptionspublic void setOptions(DecompileOptions decompilerOptions) Sets new decompiler options and triggers a new decompile.- Parameters:
- decompilerOptions-
 
 - 
isDecompilingpublic boolean isDecompiling() 
 - 
setMouseNavigationEnabledpublic void setMouseNavigationEnabled(boolean enabled) 
 - 
resetDecompilerpublic 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.
 - 
setDecompileDatapublic void setDecompileData(DecompileData decompileData) Called by the DecompilerManager to update the currently displayed DecompileData.
 - 
refreshDisplaypublic void refreshDisplay(Program program, ProgramLocation location, java.io.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.
 
 - 
getCCodeModelpublic ClangTokenGroup getCCodeModel() 
 - 
setStatusMessagepublic void setStatusMessage(java.lang.String message) 
 - 
getProgrampublic Program getProgram() 
 - 
getFunctionpublic Function getFunction() 
 - 
getHighFunctionpublic HighFunction getHighFunction() 
 - 
getLocationpublic ProgramLocation getLocation() 
 - 
getDecompileDatapublic DecompileData getDecompileData() 
 - 
exportLocationpublic void exportLocation() 
 - 
clearCachepublic void clearCache() 
 - 
programClosedpublic void programClosed(Program closedProgram) 
 
- 
 
-