Class ClangHighlightController

  • Direct Known Subclasses:
    LocationClangHighlightController

    public abstract class ClangHighlightController
    extends java.lang.Object
    Class to handle highlights for a decompiled function.
    • Field Detail

      • defaultNonFunctionBackgroundColor

        protected java.awt.Color defaultNonFunctionBackgroundColor
      • defaultHighlightColor

        protected java.awt.Color defaultHighlightColor
      • defaultSpecialColor

        protected java.awt.Color defaultSpecialColor
      • defaultParenColor

        protected java.awt.Color defaultParenColor
      • highlightTokenSet

        protected java.util.HashSet<ClangToken> highlightTokenSet
    • Constructor Detail

      • ClangHighlightController

        public ClangHighlightController()
    • Method Detail

      • setDefaultHighlightColor

        public void setDefaultHighlightColor​(java.awt.Color highlightColor)
      • setDefaultSpecialColor

        public void setDefaultSpecialColor​(java.awt.Color specialColor)
      • setDefaultParenColor

        public void setDefaultParenColor​(java.awt.Color parenColor)
      • getDefaultHighlightColor

        public java.awt.Color getDefaultHighlightColor()
      • getDefaultSpecialColor

        public java.awt.Color getDefaultSpecialColor()
      • getDefaultParenColor

        public java.awt.Color getDefaultParenColor()
      • getHighlightedText

        public java.lang.String getHighlightedText()
      • getHighlightedToken

        public ClangToken getHighlightedToken()
        Return the current highlighted token (if exists and unique)
        Returns:
        token or null
      • addVarnodesToHighlight

        public void addVarnodesToHighlight​(ClangNode parentNode,
                                           java.util.Set<Varnode> varnodes,
                                           java.awt.Color highlightColor,
                                           Varnode specificvn,
                                           PcodeOp specificop,
                                           java.awt.Color specialColor)
      • addPcodeOpsToHighlight

        public void addPcodeOpsToHighlight​(ClangNode parentNode,
                                           java.util.Set<PcodeOp> ops,
                                           java.awt.Color highlightColor)
      • addTokensToHighlights

        public void addTokensToHighlights​(java.util.List<ClangToken> tokenList,
                                          java.awt.Color highlightColor)
      • clearHighlights

        public void clearHighlights()
      • addHighlight

        public void addHighlight​(ClangToken clangToken,
                                 java.awt.Color highlightColor)
      • doAddHighlight

        public void doAddHighlight​(ClangToken clangToken,
                                   java.awt.Color highlightColor)
      • clearHighlight

        public void clearHighlight​(ClangToken clangToken)
      • isHighlighted

        public boolean isHighlighted​(ClangToken clangToken)
      • addHighlightParen

        public java.util.List<ClangToken> addHighlightParen​(ClangSyntaxToken tok,
                                                            java.awt.Color highlightColor)
        If input token is a parenthesis, highlight all tokens between it and its match
        Parameters:
        tok - = potential parenthesis token
        Returns:
        a list of all tokens that were highlighted.
      • addHighlightBrace

        public void addHighlightBrace​(ClangSyntaxToken token,
                                      java.awt.Color highlightColor)
      • addHighlightFill

        public void addHighlightFill()
        Add highlighting to tokens that are surrounded by highlighted tokens, but which have no address