Package ghidra.app.util.viewer.listingpanel

# Class ProgramBigListingModel

java.lang.Object
ghidra.app.util.viewer.listingpanel.ProgramBigListingModel

All Implemented Interfaces:
  `FormatModelListener`, `ListingModel`, `DomainObjectListener`, `OptionsChangeListener`, `EventListener`, `ChangeListener`

public class ProgramBigListingModel extends Object implements ListingModel, FormatModelListener, DomainObjectListener, ChangeListener, OptionsChangeListener

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final Program`
  `program`

  ### Fields inherited from interface ghidra.app.util.viewer.listingpanel.ListingModel

  `DISPLAY_EXTERNAL_FUNCTION_POINTER_OPTION_NAME, DISPLAY_NONEXTERNAL_FUNCTION_POINTER_OPTION_NAME, FUNCTION_POINTER_OPTION_GROUP_NAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ProgramBigListingModel(Program program, FormatManager formatMgr)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addListener(ListingModelListener listener)`
  Adds a listener for changes to this model.
  `AddressSet`
  `adjustAddressSetToCodeUnitBoundaries(AddressSet addressSet)`
  Adjusts each range in the given address set to be on code unit boundaries.
  `boolean`
  `areFunctionVariablesOpen(Address FunctionAddress)`
  Checks if the function variables are being displayed at the given address
  `void`
  `closeAllData(AddressSetView addresses, TaskMonitor monitor)`
  Closes all data found within the given addresses.
  `void`
  `closeAllData(Data data, TaskMonitor monitor)`
  Recursively close the given data and its sub-components.
  `void`
  `closeData(Data data)`
  Closes the given data, but not any sub-components.
  `ListingModel`
  `copy()`
  Makes a copy of this model.
  `void`
  `dispose()`
  Disposes this model
  `void`
  `domainObjectChanged(DomainObjectChangedEvent ev)`
  Method called when a change is made to the domain object.
  `void`
  `formatModelChanged(FieldFormatModel model)`
  Notifies that the given format model was changed.
  `Address`
  `getAddressAfter(Address address)`
  `Address`
  `getAddressBefore(Address addr)`
  `AddressSetView`
  `getAddressSet()`
  `Layout`
  `getLayout(Address addr, boolean isGapAddress)`
  `int`
  `getMaxWidth()`
  Returns the width of the longest layout this model can produce..
  `Program`
  `getProgram()`
  Returns the program being displayed by this model..
  `boolean`
  `isClosed()`
  Returns true if the program being displayed by this listing has been closed (and therefor the model is invalid.).
  `boolean`
  `isOpen(Data data)`
  Returns true if the data is open
  `boolean`
  `isOpenData(CodeUnit cu)`
  `protected void`
  `notifyDataChanged(boolean updateImmediately)`
  `void`
  `openAllData(AddressSetView addresses, TaskMonitor monitor)`
  Opens all data found within the given addresses.
  `void`
  `openAllData(Data data, TaskMonitor monitor)`
  Recursively open the given data and its sub-components.
  `boolean`
  `openData(Data data)`
  Opens the given data, but not any sub-components.
  `void`
  `optionsChanged(ToolOptions options, String optionName, Object oldValue, Object newValue)`
  Notification that an option changed.
  `void`
  `removeListener(ListingModelListener listener)`
  Removes a listener from those being notified of model changes.
  `void`
  `setAllFunctionVariablesOpen(boolean open)`
  Sets the display of variables for all functions.
  `void`
  `setFormatManager(FormatManager formatManager)`
  Sets the `FormatManager` for this model which determines the layout of the fields.
  `void`
  `setFunctionVariablesOpen(Address functionAddress, boolean open)`
  Sets whether or not to display function variables for the function at the given address.
  `void`
  `stateChanged(ChangeEvent e)`
  `void`
  `toggleOpen(Data data)`
  Changes the open state of the given data (open -> closes; closed-> open).

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

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

  ### Methods inherited from interface ghidra.app.util.viewer.format.FormatModelListener

  `formatModelAdded, formatModelRemoved`

- ## Field Details

  - ### program

    protected final Program program

- ## Constructor Details

  - ### ProgramBigListingModel

    public ProgramBigListingModel(Program program, FormatManager formatMgr)

- ## Method Details

  - ### optionsChanged

    public void optionsChanged(ToolOptions options, String optionName, Object oldValue, Object newValue)
    Description copied from interface: `OptionsChangeListener`
    Notification that an option changed.

    Note: to reject an options change, you can throw a `OptionsVetoException`.

    Specified by:
      `optionsChanged` in interface `OptionsChangeListener`
    Parameters:
      `options` - options object containing the property that changed
      `optionName` - name of option that changed
      `oldValue` - old value of the option
      `newValue` - new value of the option

  - ### getAddressSet

    public AddressSetView getAddressSet()
    Specified by:
      `getAddressSet` in interface `ListingModel`

  - ### dispose

    public void dispose()
    Description copied from interface: `ListingModel`
    Disposes this model
    Specified by:
      `dispose` in interface `ListingModel`

  - ### setFormatManager

    public void setFormatManager(FormatManager formatManager)
    Description copied from interface: `ListingModel`
    Sets the `FormatManager` for this model which determines the layout of the fields.
    Specified by:
      `setFormatManager` in interface `ListingModel`
    Parameters:
      `formatManager` - the new FormatManager to use

  - ### stateChanged

    public void stateChanged(ChangeEvent e)
    Specified by:
      `stateChanged` in interface `ChangeListener`

  - ### getLayout

    public Layout getLayout(Address addr, boolean isGapAddress)
    Specified by:
      `getLayout` in interface `ListingModel`

  - ### getMaxWidth

    public int getMaxWidth()
    Description copied from interface: `ListingModel`
    Returns the width of the longest layout this model can produce..
    Specified by:
      `getMaxWidth` in interface `ListingModel`
    Returns:
      the width of the longest layout this model can produce.

  - ### getAddressAfter

    public Address getAddressAfter(Address address)
    Specified by:
      `getAddressAfter` in interface `ListingModel`

  - ### getAddressBefore

    public Address getAddressBefore(Address addr)
    Specified by:
      `getAddressBefore` in interface `ListingModel`

  - ### isOpenData

    public boolean isOpenData(CodeUnit cu)

  - ### isOpen

    public boolean isOpen(Data data)
    Description copied from interface: `ListingModel`
    Returns true if the data is open
    Specified by:
      `isOpen` in interface `ListingModel`
    Parameters:
      `data` - the data to check
    Returns:
      true if the data is open

  - ### toggleOpen

    public void toggleOpen(Data data)
    Description copied from interface: `ListingModel`
    Changes the open state of the given data (open -> closes; closed-> open).
    Specified by:
      `toggleOpen` in interface `ListingModel`
    Parameters:
      `data` - the data to open

  - ### setFunctionVariablesOpen

    public void setFunctionVariablesOpen(Address functionAddress, boolean open)
    Description copied from interface: `ListingModel`
    Sets whether or not to display function variables for the function at the given address.
    Specified by:
      `setFunctionVariablesOpen` in interface `ListingModel`
    Parameters:
      `functionAddress` - the address of the function
      `open` - if true, the variables are displayed, otherwise they are hidden

  - ### setAllFunctionVariablesOpen

    public void setAllFunctionVariablesOpen(boolean open)
    Description copied from interface: `ListingModel`
    Sets the display of variables for all functions. This basically sets the default state, but the state can be overridden for individual functions. Changing this value erases all individually set values.
    Specified by:
      `setAllFunctionVariablesOpen` in interface `ListingModel`
    Parameters:
      `open` - if true, show function variables

  - ### areFunctionVariablesOpen

    public boolean areFunctionVariablesOpen(Address FunctionAddress)
    Description copied from interface: `ListingModel`
    Checks if the function variables are being displayed at the given address
    Specified by:
      `areFunctionVariablesOpen` in interface `ListingModel`
    Parameters:
      `FunctionAddress` - the address of the function
    Returns:
      true if the variables are being displayed for the function at the given address

  - ### openAllData

    public void openAllData(Data data, TaskMonitor monitor)
    Description copied from interface: `ListingModel`
    Recursively open the given data and its sub-components.
    Specified by:
      `openAllData` in interface `ListingModel`
    Parameters:
      `data` - the data to open
      `monitor` - the task monitor

  - ### closeAllData

    public void closeAllData(Data data, TaskMonitor monitor)
    Description copied from interface: `ListingModel`
    Recursively close the given data and its sub-components.
    Specified by:
      `closeAllData` in interface `ListingModel`
    Parameters:
      `data` - the data to close
      `monitor` - the task monitor

  - ### openAllData

    public void openAllData(AddressSetView addresses, TaskMonitor monitor)
    Description copied from interface: `ListingModel`
    Opens all data found within the given addresses. Each data is fully opened.
    Specified by:
      `openAllData` in interface `ListingModel`
    Parameters:
      `addresses` - the range of addresses to search for data
      `monitor` - the task monitor

  - ### closeAllData

    public void closeAllData(AddressSetView addresses, TaskMonitor monitor)
    Description copied from interface: `ListingModel`
    Closes all data found within the given addresses. Each data is fully closed.
    Specified by:
      `closeAllData` in interface `ListingModel`
    Parameters:
      `addresses` - the range of addresses to search for data
      `monitor` - the task monitor

  - ### closeData

    public void closeData(Data data)
    Description copied from interface: `ListingModel`
    Closes the given data, but not any sub-components.
    Specified by:
      `closeData` in interface `ListingModel`
    Parameters:
      `data` - the data to close

  - ### openData

    public boolean openData(Data data)
    Description copied from interface: `ListingModel`
    Opens the given data, but not any sub-components.
    Specified by:
      `openData` in interface `ListingModel`
    Parameters:
      `data` - the data to open
    Returns:
      true if the data was opened (will return false if the data is already open or has no children)

  - ### notifyDataChanged

    protected void notifyDataChanged(boolean updateImmediately)

  - ### formatModelChanged

    public void formatModelChanged(FieldFormatModel model)
    Description copied from interface: `FormatModelListener`
    Notifies that the given format model was changed.
    Specified by:
      `formatModelChanged` in interface `FormatModelListener`
    Parameters:
      `model` - the model that was changed.

  - ### addListener

    public void addListener(ListingModelListener listener)
    Description copied from interface: `ListingModel`
    Adds a listener for changes to this model.
    Specified by:
      `addListener` in interface `ListingModel`
    Parameters:
      `listener` - the listener to be notified

  - ### removeListener

    public void removeListener(ListingModelListener listener)
    Description copied from interface: `ListingModel`
    Removes a listener from those being notified of model changes.
    Specified by:
      `removeListener` in interface `ListingModel`
    Parameters:
      `listener` - the listener to be removed

  - ### getProgram

    public Program getProgram()
    Description copied from interface: `ListingModel`
    Returns the program being displayed by this model..
    Specified by:
      `getProgram` in interface `ListingModel`
    Returns:
      the program being displayed by this model.

  - ### isClosed

    public boolean isClosed()
    Description copied from interface: `ListingModel`
    Returns true if the program being displayed by this listing has been closed (and therefor the model is invalid.).
    Specified by:
      `isClosed` in interface `ListingModel`
    Returns:
      true if the program being displayed by this listing has been closed (and therefor the model is invalid.)

  - ### domainObjectChanged

    public void domainObjectChanged(DomainObjectChangedEvent ev)
    Description copied from interface: `DomainObjectListener`
    Method called when a change is made to the domain object.
    Specified by:
      `domainObjectChanged` in interface `DomainObjectListener`
    Parameters:
      `ev` - event containing the change record and type of change that was made

  - ### adjustAddressSetToCodeUnitBoundaries

    public AddressSet adjustAddressSetToCodeUnitBoundaries(AddressSet addressSet)
    Description copied from interface: `ListingModel`
    Adjusts each range in the given address set to be on code unit boundaries.
    Specified by:
      `adjustAddressSetToCodeUnitBoundaries` in interface `ListingModel`
    Parameters:
      `addressSet` - the address set to be adjusted
    Returns:
      a new AddressSet where each range is on a code unit boundary

  - ### copy

    public ListingModel copy()
    Description copied from interface: `ListingModel`
    Makes a copy of this model.
    Specified by:
      `copy` in interface `ListingModel`
    Returns:
      a copy of this model.