Package ghidra.program.model.listing

# Class CodeUnitFormatOptions

java.lang.Object
ghidra.program.model.listing.CodeUnitFormatOptions

Direct Known Subclasses:
  `BrowserCodeUnitFormatOptions`

public class CodeUnitFormatOptions extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `CodeUnitFormatOptions.ShowBlockName`
  `ShowBlockName` defines the valid options for controlling the display of block names on labels.
  `static enum`
  `CodeUnitFormatOptions.ShowNamespace`
  `ShowNamespace` defines the valid options for controlling the display of name-spaces on labels.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected boolean`
  `alwaysShowPrimaryReference`
  `protected DataTypeDisplayOptions`
  `displayOptions`
  `protected boolean`
  `doRegVariableMarkup`
  `protected boolean`
  `doStackVariableMarkup`
  `protected boolean`
  `followReferencedPointers`
  `protected boolean`
  `includeInferredVariableMarkup`
  `protected boolean`
  `includeScalarReferenceAdjustment`
  `protected String`
  `localPrefixOverride`
  `protected CodeUnitFormatOptions.ShowBlockName`
  `showBlockName`
  `protected boolean`
  `showDataMutability`
  `protected boolean`
  `showLibraryInNamespace`
  `protected CodeUnitFormatOptions.ShowNamespace`
  `showNamespace`
  `protected boolean`
  `showOffcutInfo`
  `protected TemplateSimplifier`
  `templateSimplifier`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CodeUnitFormatOptions()`
  `CodeUnitFormatOptions(CodeUnitFormatOptions.ShowBlockName showBlockName, CodeUnitFormatOptions.ShowNamespace showNamespace)`
  Format options constructor using primarily default format options.
  `CodeUnitFormatOptions(CodeUnitFormatOptions.ShowBlockName showBlockName, CodeUnitFormatOptions.ShowNamespace showNamespace, String localPrefixOverride, boolean doRegVariableMarkup, boolean doStackVariableMarkup, boolean includeInferredVariableMarkup, boolean alwaysShowPrimaryReference, boolean includeScalarReferenceAdjustment, boolean showLibraryInNamespace, boolean followReferencedPointers, TemplateSimplifier templateSimplifier)`
  Format options constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CodeUnitFormatOptions.ShowBlockName`
  `getShowBlockNameOption()`
  Get current ShowBlockName option
  `String`
  `simplifyTemplate(String name)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### showBlockName

    protected volatile CodeUnitFormatOptions.ShowBlockName showBlockName

  - ### showNamespace

    protected volatile CodeUnitFormatOptions.ShowNamespace showNamespace

  - ### localPrefixOverride

    protected volatile String localPrefixOverride

  - ### showLibraryInNamespace

    protected volatile boolean showLibraryInNamespace

  - ### doRegVariableMarkup

    protected volatile boolean doRegVariableMarkup

  - ### doStackVariableMarkup

    protected volatile boolean doStackVariableMarkup

  - ### includeInferredVariableMarkup

    protected volatile boolean includeInferredVariableMarkup

  - ### alwaysShowPrimaryReference

    protected volatile boolean alwaysShowPrimaryReference

  - ### followReferencedPointers

    protected volatile boolean followReferencedPointers

  - ### includeScalarReferenceAdjustment

    protected volatile boolean includeScalarReferenceAdjustment

  - ### showDataMutability

    protected volatile boolean showDataMutability

  - ### showOffcutInfo

    protected volatile boolean showOffcutInfo

  - ### displayOptions

    protected DataTypeDisplayOptions displayOptions

  - ### templateSimplifier

    protected TemplateSimplifier templateSimplifier

- ## Constructor Details

  - ### CodeUnitFormatOptions

    public CodeUnitFormatOptions()

  - ### CodeUnitFormatOptions

    public CodeUnitFormatOptions(CodeUnitFormatOptions.ShowBlockName showBlockName, CodeUnitFormatOptions.ShowNamespace showNamespace)
    Format options constructor using primarily default format options.
    Parameters:
      `showBlockName` - controls display of block name in address representations.
      `showNamespace` - controls display of namespace path with label references.

  - ### CodeUnitFormatOptions

    public CodeUnitFormatOptions(CodeUnitFormatOptions.ShowBlockName showBlockName, CodeUnitFormatOptions.ShowNamespace showNamespace, String localPrefixOverride, boolean doRegVariableMarkup, boolean doStackVariableMarkup, boolean includeInferredVariableMarkup, boolean alwaysShowPrimaryReference, boolean includeScalarReferenceAdjustment, boolean showLibraryInNamespace, boolean followReferencedPointers, TemplateSimplifier templateSimplifier)
    Format options constructor. Extended reference mark-up is enabled.
    Parameters:
      `showBlockName` - controls display of block name in address representations.
      `showNamespace` - controls display of namespace path with label references.
      `localPrefixOverride` - optional override for local name-space when showNamespace is ShowNamespace.LOCAL or ShowNamespace.ALWAYS. Specifying a null value will cause the actual name-space to be used.
      `doRegVariableMarkup` - perform register variable/reference mark-up if true
      `doStackVariableMarkup` - perform stack variable/reference mark-up if true
      `includeInferredVariableMarkup` - if true and doRegVariableMarkup is also true, an attempt will be made to mark-up inferred register variable usage.
      `alwaysShowPrimaryReference` - if true forces the primary reference to be rendered with the operand using the => separator if necessary
      `includeScalarReferenceAdjustment` - if true scalar adjustment of certain reference offsets will be included to maintain replaced scalar value
      `showLibraryInNamespace` - if true any referenced external symbols will include library name
      `followReferencedPointers` - if true referenced pointers (read or indirect) will follow the pointer and display the indirect symbol with -> instead of pointer label.

- ## Method Details

  - ### getShowBlockNameOption

    public CodeUnitFormatOptions.ShowBlockName getShowBlockNameOption()
    Get current ShowBlockName option
    Returns:
      ShowBlockName option

  - ### simplifyTemplate

    public String simplifyTemplate(String name)