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


        public static final int SUGGESTED_DECOMPILE_TIMEOUT_SECS
        See Also:
        Constant Field Values

        public static final int SUGGESTED_MAX_PAYLOAD_BYTES
        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.
        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.
        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,
                                    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
        ownerPlugin - the plugin to which the options should be registered
        opt - the options object to register with
        program - the program
        hlep -
      • 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
        iface - specific DecompInterface being sent options
        XML document as a string
      • getMaxWidth

        public int getMaxWidth()
      • 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()
      • isDisplayNamespaces

        public boolean isDisplayNamespaces()
      • 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)
      • getCacheSize

        public int getCacheSize()