Class ProgramOpenCloseManager

java.lang.Object
ghidra.app.util.viewer.util.ProgramOpenCloseManager

public class ProgramOpenCloseManager extends Object
Manages the open/close state of various listing regions. This includes structures, arrays, and function variables.
  • Constructor Details

    • ProgramOpenCloseManager

      public ProgramOpenCloseManager()
  • Method Details

    • setFunctionVariablesOpen

      public void setFunctionVariablesOpen(Address functionAddress, boolean open)
      Sets whether or not to display function variables at the given address.
      Parameters:
      functionAddress - the address of the function
      open - true to display function variables, false to to hide them
    • isFunctionVariablesOpen

      public boolean isFunctionVariablesOpen(Address functionAddress)
      Checks if the function variables are being shown at the given function address.
      Parameters:
      functionAddress - the address of the function to check
      Returns:
      true if the variables are being displayed
    • setAllFunctionVariablesOpen

      public void setAllFunctionVariablesOpen(boolean open)
      Sets whether or not function variables are being shown by globally. This essentially sets the default state, but the state can be overridden at specific functions.
      Parameters:
      open - if true, then the function variables are displayed
    • isAllFunctionVariablesOpen

      public boolean isAllFunctionVariablesOpen()
    • openData

      public void openData(Data data)
      Marks the given data as open. This method notifies listeners of changes.
      Parameters:
      data - The data to open.
    • closeData

      public void closeData(Data data)
      Marks the given data as open. This method notifies listeners of changes.
      Parameters:
      data - The data to open.
    • isDataOpen

      public boolean isDataOpen(Address address)
      Tests if the data at the given address is open
      Parameters:
      address - the address to test if open
      Returns:
      true if the data at the address is open.
    • isDataOpen

      public boolean isDataOpen(Data data)
    • getOpenDataIndex

      public int getOpenDataIndex(Data data)
      Returns the index of the component that is open at the given address.
      Parameters:
      data - the data to get the index for
      Returns:
      the index of the component that is open for the given data
    • toggleDataOpen

      public void toggleDataOpen(Data data)
    • openAllData

      public void openAllData(Program program, AddressSetView addresses, TaskMonitor monitor)
    • closeAllData

      public void closeAllData(Program program, AddressSetView addresses, TaskMonitor monitor)
    • openDataRecursively

      public void openDataRecursively(Data data, TaskMonitor monitor)
    • closeDataRecursively

      public void closeDataRecursively(Data data, TaskMonitor monitor)
    • addChangeListener

      public void addChangeListener(ChangeListener l)
      Adds a change listener to be notified when a location is open or closed.
      Parameters:
      l - the listener to be notified.
    • removeChangeListener

      public void removeChangeListener(ChangeListener l)
      Removes the listener.
      Parameters:
      l - the listener to remove.