Class DecompileOptions


  • public class DecompileOptions
    extends java.lang.Object
    Configuration options for the decompiler This stores the options and can create an XML string to be sent to the decompiler process
    • Field Detail

      • SUGGESTED_DECOMPILE_TIMEOUT_SECS

        public static final int SUGGESTED_DECOMPILE_TIMEOUT_SECS
        See Also:
        Constant Field Values
      • SUGGESTED_MAX_PAYLOAD_BYTES

        public static final int SUGGESTED_MAX_PAYLOAD_BYTES
        See Also:
        Constant Field Values
      • SUGGESTED_MAX_INSTRUCTIONS

        public static final int SUGGESTED_MAX_INSTRUCTIONS
        See Also:
        Constant Field Values
    • Constructor Detail

      • DecompileOptions

        public DecompileOptions()
    • Method Detail

      • grabFromToolAndProgram

        public 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
      • grabFromProgram

        public 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
      • getProtoEvalModel

        public java.lang.String getProtoEvalModel()
      • setProtoEvalModel

        public void setProtoEvalModel​(java.lang.String protoEvalModel)
      • registerOptions

        public void registerOptions​(Plugin ownerPlugin,
                                    ToolOptions opt,
                                    Program program)
        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
      • getXML

        public 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
      • getMaxWidth

        public int getMaxWidth()
      • setMaxWidth

        public void setMaxWidth​(int maxwidth)
      • getKeywordColor

        public java.awt.Color getKeywordColor()
      • getTypeColor

        public java.awt.Color getTypeColor()
      • getFunctionColor

        public java.awt.Color getFunctionColor()
      • getCommentColor

        public java.awt.Color getCommentColor()
      • getConstantColor

        public java.awt.Color getConstantColor()
      • getVariableColor

        public java.awt.Color getVariableColor()
      • getParameterColor

        public java.awt.Color getParameterColor()
      • getGlobalColor

        public java.awt.Color getGlobalColor()
      • getDefaultColor

        public java.awt.Color getDefaultColor()
      • getCodeViewerBackgroundColor

        public java.awt.Color getCodeViewerBackgroundColor()
      • getCurrentVariableHighlightColor

        public java.awt.Color getCurrentVariableHighlightColor()
      • getMiddleMouseHighlightColor

        public java.awt.Color getMiddleMouseHighlightColor()
      • getSearchHighlightColor

        public java.awt.Color getSearchHighlightColor()
      • getMiddleMouseHighlightButton

        public int getMiddleMouseHighlightButton()
      • isPRECommentIncluded

        public boolean isPRECommentIncluded()
      • setPRECommentIncluded

        public void setPRECommentIncluded​(boolean commentPREInclude)
      • isPLATECommentIncluded

        public boolean isPLATECommentIncluded()
      • setPLATECommentIncluded

        public void setPLATECommentIncluded​(boolean commentPLATEInclude)
      • isPOSTCommentIncluded

        public boolean isPOSTCommentIncluded()
      • setPOSTCommentIncluded

        public void setPOSTCommentIncluded​(boolean commentPOSTInclude)
      • isEOLCommentIncluded

        public boolean isEOLCommentIncluded()
      • setEOLCommentIncluded

        public void setEOLCommentIncluded​(boolean commentEOLInclude)
      • isWARNCommentIncluded

        public boolean isWARNCommentIncluded()
      • setWARNCommentIncluded

        public void setWARNCommentIncluded​(boolean commentWARNInclude)
      • isHeadCommentIncluded

        public boolean isHeadCommentIncluded()
      • setHeadCommentIncluded

        public void setHeadCommentIncluded​(boolean commentHeadInclude)
      • isEliminateUnreachable

        public boolean isEliminateUnreachable()
      • setEliminateUnreachable

        public void setEliminateUnreachable​(boolean eliminateUnreachable)
      • isSimplifyDoublePrecision

        public boolean isSimplifyDoublePrecision()
      • setSimplifyDoublePrecision

        public void setSimplifyDoublePrecision​(boolean simplifyDoublePrecision)
      • isDisplayLineNumbers

        public boolean isDisplayLineNumbers()
      • isConventionPrint

        public boolean isConventionPrint()
      • setConventionPrint

        public void setConventionPrint​(boolean conventionPrint)
      • isNoCastPrint

        public boolean isNoCastPrint()
      • setNoCastPrint

        public void setNoCastPrint​(boolean noCastPrint)
      • getDefaultFont

        public java.awt.Font getDefaultFont()
      • getDefaultTimeout

        public int getDefaultTimeout()
      • setDefaultTimeout

        public void setDefaultTimeout​(int timeout)
      • getMaxPayloadMBytes

        public int getMaxPayloadMBytes()
      • setMaxPayloadMBytes

        public void setMaxPayloadMBytes​(int mbytes)
      • getMaxInstructions

        public int getMaxInstructions()
      • setMaxInstructions

        public void setMaxInstructions​(int num)
      • getCacheSize

        public int getCacheSize()