Class AttributedStringPcodeFormatter

java.lang.Object
ghidra.app.util.pcode.AbstractPcodeFormatter<List<AttributedString>,ghidra.app.util.pcode.AttributedStringPcodeFormatter.ToAttributedStringsAppender>
ghidra.app.util.pcode.AttributedStringPcodeFormatter
All Implemented Interfaces:
PcodeFormatter<List<AttributedString>>

public class AttributedStringPcodeFormatter extends AbstractPcodeFormatter<List<AttributedString>,ghidra.app.util.pcode.AttributedStringPcodeFormatter.ToAttributedStringsAppender>
  • Constructor Details

    • AttributedStringPcodeFormatter

      public AttributedStringPcodeFormatter()
      Constructor
  • Method Details

    • setAddressColor

      public void setAddressColor(Color addressColor)
      Set the color for addresses
      Parameters:
      addressColor -
    • setRegisterColor

      public void setRegisterColor(Color registerColor)
      Set the color for register names
      Parameters:
      registerColor -
    • setScalarColor

      public void setScalarColor(Color scalarColor)
      Set the color for scalars and non-address constants
      Parameters:
      scalarColor -
    • setLocalColor

      public void setLocalColor(Color localColor)
      Set the color for labels referring to addresses
      Parameters:
      localColor -
    • setMnemonicColor

      public void setMnemonicColor(Color mnemonicColor)
      Set the color for op mnemonics
      Parameters:
      mnemonicColor -
    • setUnimplColor

      public void setUnimplColor(Color unimplColor)
      Set the color for the unimpl op mnemonic
      Parameters:
      unimplColor -
    • setSeparatorColor

      public void setSeparatorColor(Color separatorColor)
      Set the color for punctuation
      Parameters:
      separatorColor -
    • setLineLabelColor

      public void setLineLabelColor(Color lineLabelColor)
      Set the color for labels referring to p-code ops
      Parameters:
      lineLabelColor -
    • setSpaceColor

      public void setSpaceColor(Color spaceColor)
      Set the color for address space names
      Parameters:
      spaceColor -
    • setRawColor

      public void setRawColor(Color rawColor)
      Set the color for raw varnodes
      Parameters:
      rawColor -
    • setUseropColor

      public void setUseropColor(Color useropColor)
      Set the color for userop (CALLOTHER) names
      Parameters:
      useropColor -
    • setFontMetrics

      public void setFontMetrics(FontMetrics metrics)
      Set font metrics for AttributedString objects
      Parameters:
      metrics -
    • setOptions

      public void setOptions(int maxDisplayLines, boolean displayRawPcode)
      Set general formatting options
      Parameters:
      maxDisplayLines -
      displayRawPcode -
    • createAppender

      protected ghidra.app.util.pcode.AttributedStringPcodeFormatter.ToAttributedStringsAppender createAppender(Language language, boolean indent)
      Description copied from class: AbstractPcodeFormatter
      Create the appender for a formatting invocation
      Specified by:
      createAppender in class AbstractPcodeFormatter<List<AttributedString>,ghidra.app.util.pcode.AttributedStringPcodeFormatter.ToAttributedStringsAppender>
      Parameters:
      language - the language of the p-code to format
      indent - indicates whether each line should be indented to accommodate line labels
      Returns:
      the new appender
    • isFormatRaw

      public boolean isFormatRaw()
      Description copied from class: AbstractPcodeFormatter
      Check if this formatter is configured to display raw p-code
      Overrides:
      isFormatRaw in class AbstractPcodeFormatter<List<AttributedString>,ghidra.app.util.pcode.AttributedStringPcodeFormatter.ToAttributedStringsAppender>
      Returns:
      true if displaying raw, false otherwise
    • formatOpTemplate

      protected AbstractPcodeFormatter.FormatResult formatOpTemplate(ghidra.app.util.pcode.AttributedStringPcodeFormatter.ToAttributedStringsAppender appender, OpTpl op)
      Description copied from class: AbstractPcodeFormatter
      Format a single op template
      Overrides:
      formatOpTemplate in class AbstractPcodeFormatter<List<AttributedString>,ghidra.app.util.pcode.AttributedStringPcodeFormatter.ToAttributedStringsAppender>
      Parameters:
      appender - the appender to receive the formatted text
      op - the template to format
      Returns:
      instructions to continue or terminate. The loop in AbstractPcodeFormatter.formatTemplates(Language, List) is terminated if this method returns AbstractPcodeFormatter.FormatResult.TERMINATE.