Package ghidra.app.util.pcode
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>
-
Nested Class Summary
Nested classes/interfaces inherited from class ghidra.app.util.pcode.AbstractPcodeFormatter
AbstractPcodeFormatter.FormatResult -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ghidra.app.util.pcode.AttributedStringPcodeFormatter.ToAttributedStringsAppendercreateAppender(Language language, boolean indent) Create the appender for a formatting invocationprotected AbstractPcodeFormatter.FormatResultformatOpTemplate(ghidra.app.util.pcode.AttributedStringPcodeFormatter.ToAttributedStringsAppender appender, OpTpl op) Format a single op templatebooleanCheck if this formatter is configured to display raw p-codevoidsetAddressColor(Color addressColor) Set the color for addressesvoidsetFontMetrics(FontMetrics metrics) Set font metrics for AttributedString objectsvoidsetLineLabelColor(Color lineLabelColor) Set the color for labels referring to p-code opsvoidsetLocalColor(Color localColor) Set the color for labels referring to addressesvoidsetMnemonicColor(Color mnemonicColor) Set the color for op mnemonicsvoidsetOptions(int maxDisplayLines, boolean displayRawPcode) Set general formatting optionsvoidsetRawColor(Color rawColor) Set the color for raw varnodesvoidsetRegisterColor(Color registerColor) Set the color for register namesvoidsetScalarColor(Color scalarColor) Set the color for scalars and non-address constantsvoidsetSeparatorColor(Color separatorColor) Set the color for punctuationvoidsetSpaceColor(Color spaceColor) Set the color for address space namesvoidsetUnimplColor(Color unimplColor) Set the color for theunimplop mnemonicvoidsetUseropColor(Color useropColor) Set the color for userop (CALLOTHER) namesMethods inherited from class ghidra.app.util.pcode.AbstractPcodeFormatter
formatAddress, formatCallOtherName, formatConstant, formatInput, formatLabelInput, formatMemoryInput, formatOutput, formatSize, formatTemplates, formatUnique, formatVarnode, formatVarnodeNice, formatVarnodeRaw, isLineLabelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.app.util.pcode.PcodeFormatter
formatOps, formatOps
-
Constructor Details
-
AttributedStringPcodeFormatter
public AttributedStringPcodeFormatter()Constructor
-
-
Method Details
-
setAddressColor
Set the color for addresses- Parameters:
addressColor-
-
setRegisterColor
Set the color for register names- Parameters:
registerColor-
-
setScalarColor
Set the color for scalars and non-address constants- Parameters:
scalarColor-
-
setLocalColor
Set the color for labels referring to addresses- Parameters:
localColor-
-
setMnemonicColor
Set the color for op mnemonics- Parameters:
mnemonicColor-
-
setUnimplColor
Set the color for theunimplop mnemonic- Parameters:
unimplColor-
-
setSeparatorColor
Set the color for punctuation- Parameters:
separatorColor-
-
setLineLabelColor
Set the color for labels referring to p-code ops- Parameters:
lineLabelColor-
-
setSpaceColor
Set the color for address space names- Parameters:
spaceColor-
-
setRawColor
Set the color for raw varnodes- Parameters:
rawColor-
-
setUseropColor
Set the color for userop (CALLOTHER) names- Parameters:
useropColor-
-
setFontMetrics
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:AbstractPcodeFormatterCreate the appender for a formatting invocation- Specified by:
createAppenderin classAbstractPcodeFormatter<List<AttributedString>,ghidra.app.util.pcode.AttributedStringPcodeFormatter.ToAttributedStringsAppender> - Parameters:
language- the language of the p-code to formatindent- indicates whether each line should be indented to accommodate line labels- Returns:
- the new appender
-
isFormatRaw
public boolean isFormatRaw()Description copied from class:AbstractPcodeFormatterCheck if this formatter is configured to display raw p-code- Overrides:
isFormatRawin classAbstractPcodeFormatter<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:AbstractPcodeFormatterFormat a single op template- Overrides:
formatOpTemplatein classAbstractPcodeFormatter<List<AttributedString>,ghidra.app.util.pcode.AttributedStringPcodeFormatter.ToAttributedStringsAppender> - Parameters:
appender- the appender to receive the formatted textop- the template to format- Returns:
- instructions to continue or terminate. The loop in
AbstractPcodeFormatter.formatTemplates(Language, List)is terminated if this method returnsAbstractPcodeFormatter.FormatResult.TERMINATE.
-