Package ghidra.app.decompiler
Class DecompileOptions
- java.lang.Object
- 
- ghidra.app.decompiler.DecompileOptions
 
- 
 public class DecompileOptions extends java.lang.ObjectConfiguration options for the decompiler This stores the options and can create an XML string to be sent to the decompiler process
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classDecompileOptions.CommentStyleEnumstatic classDecompileOptions.IntegerFormatEnum
 - 
Field SummaryFields Modifier and Type Field Description static intSUGGESTED_DECOMPILE_TIMEOUT_SECSstatic intSUGGESTED_MAX_PAYLOAD_BYTES
 - 
Constructor SummaryConstructors Constructor Description DecompileOptions()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCacheSize()java.awt.ColorgetCodeViewerBackgroundColor()java.awt.ColorgetCommentColor()DecompileOptions.CommentStyleEnumgetCommentStyle()java.awt.ColorgetConstantColor()java.awt.ColorgetCurrentVariableHighlightColor()java.awt.ColorgetDefaultColor()java.awt.FontgetDefaultFont()intgetDefaultTimeout()DecompilerLanguagegetDisplayLanguage()java.awt.ColorgetFunctionColor()java.awt.ColorgetGlobalColor()java.awt.ColorgetKeywordColor()intgetMaxPayloadMBytes()intgetMaxWidth()intgetMiddleMouseHighlightButton()java.awt.ColorgetMiddleMouseHighlightColor()java.awt.ColorgetParameterColor()java.lang.StringgetProtoEvalModel()java.awt.ColorgetSearchHighlightColor()java.awt.ColorgetTypeColor()java.awt.ColorgetVariableColor()java.lang.StringgetXML(DecompInterface iface)Produce XML document of configuration options to be sent to decompiler process.voidgrabFromProgram(Program program)Grab all the decompiler options from the program specifically and cache them in this object.voidgrabFromToolAndProgram(Plugin ownerPlugin, ToolOptions opt, Program program)Grab all the decompiler options from various sources within a specific tool and program and cache them in this object.booleanisConventionPrint()booleanisDisplayLineNumbers()booleanisDisplayNamespaces()booleanisEliminateUnreachable()booleanisEOLCommentIncluded()booleanisHeadCommentIncluded()booleanisNoCastPrint()booleanisPLATECommentIncluded()booleanisPOSTCommentIncluded()booleanisPRECommentIncluded()booleanisSimplifyDoublePrecision()booleanisWARNCommentIncluded()voidregisterOptions(Plugin ownerPlugin, ToolOptions opt, Program program, HelpLocation help)This registers all the decompiler tool options with ghidra, and has the side effect of pulling all the current values for the options if they existvoidsetCommentStyle(DecompileOptions.CommentStyleEnum commentStyle)voidsetConventionPrint(boolean conventionPrint)voidsetDefaultTimeout(int timeout)voidsetDisplayLanguage(DecompilerLanguage val)voidsetEliminateUnreachable(boolean eliminateUnreachable)voidsetEOLCommentIncluded(boolean commentEOLInclude)voidsetHeadCommentIncluded(boolean commentHeadInclude)voidsetMaxPayloadMBytes(int mbytes)voidsetNoCastPrint(boolean noCastPrint)voidsetPLATECommentIncluded(boolean commentPLATEInclude)voidsetPOSTCommentIncluded(boolean commentPOSTInclude)voidsetPRECommentIncluded(boolean commentPREInclude)voidsetProtoEvalModel(java.lang.String protoEvalModel)voidsetSimplifyDoublePrecision(boolean simplifyDoublePrecision)voidsetWARNCommentIncluded(boolean commentWARNInclude)
 
- 
- 
- 
Field Detail- 
SUGGESTED_DECOMPILE_TIMEOUT_SECSpublic static final int SUGGESTED_DECOMPILE_TIMEOUT_SECS - See Also:
- Constant Field Values
 
 - 
SUGGESTED_MAX_PAYLOAD_BYTESpublic static final int SUGGESTED_MAX_PAYLOAD_BYTES - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
grabFromToolAndProgrampublic void grabFromToolAndProgram(Plugin ownerPlugin, ToolOptions opt, Program program) Grab all the decompiler options from various sources within a specific tool and program and cache them in this object.- Parameters:
- ownerPlugin- the plugin that owns the "tool options" for the decompiler
- opt- the Options object that contains the "tool options" specific to the decompiler
- program- the program whose "program options" are relevant to the decompiler
 
 - 
grabFromProgrampublic void grabFromProgram(Program program) Grab all the decompiler options from the program specifically and cache them in this object.- Parameters:
- program- the program whose "program options" are relevant to the decompiler
 
 - 
getProtoEvalModelpublic java.lang.String getProtoEvalModel() 
 - 
setProtoEvalModelpublic void setProtoEvalModel(java.lang.String protoEvalModel) 
 - 
registerOptionspublic void registerOptions(Plugin ownerPlugin, ToolOptions opt, Program program, HelpLocation help) This registers all the decompiler tool options with ghidra, and has the side effect of pulling all the current values for the options if they exist- Parameters:
- ownerPlugin- the plugin to which the options should be registered
- opt- the options object to register with
- program- the program
- hlep-
 
 - 
getXMLpublic java.lang.String getXML(DecompInterface iface) Produce XML document of configuration options to be sent to decompiler process. This object is global to all decompile processes so we can tailor to the specific process by passing in the interface- Parameters:
- iface- specific DecompInterface being sent options
- Returns:
- XML document as a string
 
 - 
getMaxWidthpublic int getMaxWidth() 
 - 
getKeywordColorpublic java.awt.Color getKeywordColor() 
 - 
getTypeColorpublic java.awt.Color getTypeColor() 
 - 
getFunctionColorpublic java.awt.Color getFunctionColor() 
 - 
getCommentColorpublic java.awt.Color getCommentColor() 
 - 
getConstantColorpublic java.awt.Color getConstantColor() 
 - 
getVariableColorpublic java.awt.Color getVariableColor() 
 - 
getParameterColorpublic java.awt.Color getParameterColor() 
 - 
getGlobalColorpublic java.awt.Color getGlobalColor() 
 - 
getDefaultColorpublic java.awt.Color getDefaultColor() 
 - 
getCodeViewerBackgroundColorpublic java.awt.Color getCodeViewerBackgroundColor() 
 - 
getCurrentVariableHighlightColorpublic java.awt.Color getCurrentVariableHighlightColor() 
 - 
getMiddleMouseHighlightColorpublic java.awt.Color getMiddleMouseHighlightColor() 
 - 
getSearchHighlightColorpublic java.awt.Color getSearchHighlightColor() 
 - 
getMiddleMouseHighlightButtonpublic int getMiddleMouseHighlightButton() 
 - 
isPRECommentIncludedpublic boolean isPRECommentIncluded() 
 - 
setPRECommentIncludedpublic void setPRECommentIncluded(boolean commentPREInclude) 
 - 
isPLATECommentIncludedpublic boolean isPLATECommentIncluded() 
 - 
setPLATECommentIncludedpublic void setPLATECommentIncluded(boolean commentPLATEInclude) 
 - 
isPOSTCommentIncludedpublic boolean isPOSTCommentIncluded() 
 - 
setPOSTCommentIncludedpublic void setPOSTCommentIncluded(boolean commentPOSTInclude) 
 - 
isEOLCommentIncludedpublic boolean isEOLCommentIncluded() 
 - 
setEOLCommentIncludedpublic void setEOLCommentIncluded(boolean commentEOLInclude) 
 - 
isWARNCommentIncludedpublic boolean isWARNCommentIncluded() 
 - 
setWARNCommentIncludedpublic void setWARNCommentIncluded(boolean commentWARNInclude) 
 - 
isHeadCommentIncludedpublic boolean isHeadCommentIncluded() 
 - 
setHeadCommentIncludedpublic void setHeadCommentIncluded(boolean commentHeadInclude) 
 - 
isEliminateUnreachablepublic boolean isEliminateUnreachable() 
 - 
setEliminateUnreachablepublic void setEliminateUnreachable(boolean eliminateUnreachable) 
 - 
isSimplifyDoublePrecisionpublic boolean isSimplifyDoublePrecision() 
 - 
setSimplifyDoublePrecisionpublic void setSimplifyDoublePrecision(boolean simplifyDoublePrecision) 
 - 
isDisplayLineNumberspublic boolean isDisplayLineNumbers() 
 - 
isDisplayNamespacespublic boolean isDisplayNamespaces() 
 - 
getDisplayLanguagepublic DecompilerLanguage getDisplayLanguage() 
 - 
isConventionPrintpublic boolean isConventionPrint() 
 - 
setConventionPrintpublic void setConventionPrint(boolean conventionPrint) 
 - 
isNoCastPrintpublic boolean isNoCastPrint() 
 - 
setNoCastPrintpublic void setNoCastPrint(boolean noCastPrint) 
 - 
setDisplayLanguagepublic void setDisplayLanguage(DecompilerLanguage val) 
 - 
getDefaultFontpublic java.awt.Font getDefaultFont() 
 - 
getDefaultTimeoutpublic int getDefaultTimeout() 
 - 
setDefaultTimeoutpublic void setDefaultTimeout(int timeout) 
 - 
getMaxPayloadMBytespublic int getMaxPayloadMBytes() 
 - 
setMaxPayloadMBytespublic void setMaxPayloadMBytes(int mbytes) 
 - 
getCommentStylepublic DecompileOptions.CommentStyleEnum getCommentStyle() 
 - 
setCommentStylepublic void setCommentStyle(DecompileOptions.CommentStyleEnum commentStyle) 
 - 
getCacheSizepublic int getCacheSize() 
 
- 
 
-