Class ProgramBigListingModel
- java.lang.Object
-
- ghidra.app.util.viewer.listingpanel.ProgramBigListingModel
-
- All Implemented Interfaces:
FormatModelListener
,ListingModel
,DomainObjectListener
,OptionsChangeListener
,java.util.EventListener
,javax.swing.event.ChangeListener
public class ProgramBigListingModel extends java.lang.Object implements ListingModel, FormatModelListener, DomainObjectListener, javax.swing.event.ChangeListener, OptionsChangeListener
-
-
Field Summary
Fields Modifier and Type Field Description protected 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(ListingModelListener listener)
AddressSet
adjustAddressSetToCodeUnitBoundaries(AddressSet addressSet)
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.void
dispose()
void
domainObjectChanged(DomainObjectChangedEvent ev)
Method called when a change is made to the domain object.void
formatModelAdded(FieldFormatModel model)
Notifies that a new format model was added to the format manager.void
formatModelChanged(FieldFormatModel model)
Notifies that the given format model was changed.void
formatModelRemoved(FieldFormatModel model)
Notifies that a format model was removed.Address
getAddressAfter(Address address)
Address
getAddressBefore(Address addr)
AddressSetView
getAddressSet()
Layout
getLayout(Address addr, boolean isGapAddress)
int
getMaxWidth()
Program
getProgram()
boolean
isClosed()
boolean
isOpen(Data data)
Returns true if the data is openboolean
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.void
openData(Data data)
Opens the given data, but not any sub-components.void
optionsChanged(ToolOptions options, java.lang.String optionName, java.lang.Object oldValue, java.lang.Object newValue)
Notification that an option changed.void
removeListener(ListingModelListener listener)
void
setFormatManager(FormatManager formatManager)
void
stateChanged(javax.swing.event.ChangeEvent e)
void
toggleOpen(Data data)
Changes the open state of the given data (open -> closes; closed-> open).
-
-
-
Field Detail
-
program
protected final Program program
-
-
Constructor Detail
-
ProgramBigListingModel
public ProgramBigListingModel(Program program, FormatManager formatMgr)
-
-
Method Detail
-
optionsChanged
public void optionsChanged(ToolOptions options, java.lang.String optionName, java.lang.Object oldValue, java.lang.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 interfaceOptionsChangeListener
- Parameters:
options
- options object containing the property that changedoptionName
- name of option that changedoldValue
- old value of the optionnewValue
- new value of the option
-
getAddressSet
public AddressSetView getAddressSet()
- Specified by:
getAddressSet
in interfaceListingModel
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceListingModel
-
setFormatManager
public void setFormatManager(FormatManager formatManager)
- Specified by:
setFormatManager
in interfaceListingModel
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
-
getLayout
public Layout getLayout(Address addr, boolean isGapAddress)
- Specified by:
getLayout
in interfaceListingModel
-
getMaxWidth
public int getMaxWidth()
- Specified by:
getMaxWidth
in interfaceListingModel
-
getAddressAfter
public Address getAddressAfter(Address address)
- Specified by:
getAddressAfter
in interfaceListingModel
-
getAddressBefore
public Address getAddressBefore(Address addr)
- Specified by:
getAddressBefore
in interfaceListingModel
-
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 interfaceListingModel
- 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 interfaceListingModel
- Parameters:
data
- the data to open
-
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 interfaceListingModel
- Parameters:
data
- the data to openmonitor
- 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 interfaceListingModel
- Parameters:
data
- the data to closemonitor
- 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 interfaceListingModel
- Parameters:
addresses
- the range of addresses to search for datamonitor
- 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 interfaceListingModel
- Parameters:
addresses
- the range of addresses to search for datamonitor
- 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 interfaceListingModel
- Parameters:
data
- the data to close
-
openData
public void openData(Data data)
Description copied from interface:ListingModel
Opens the given data, but not any sub-components.- Specified by:
openData
in interfaceListingModel
- Parameters:
data
- the data to open
-
notifyDataChanged
protected void notifyDataChanged(boolean updateImmediately)
-
formatModelAdded
public void formatModelAdded(FieldFormatModel model)
Description copied from interface:FormatModelListener
Notifies that a new format model was added to the format manager.- Specified by:
formatModelAdded
in interfaceFormatModelListener
- Parameters:
model
- the new model.
-
formatModelChanged
public void formatModelChanged(FieldFormatModel model)
Description copied from interface:FormatModelListener
Notifies that the given format model was changed.- Specified by:
formatModelChanged
in interfaceFormatModelListener
- Parameters:
model
- the model that was changed.
-
formatModelRemoved
public void formatModelRemoved(FieldFormatModel model)
Description copied from interface:FormatModelListener
Notifies that a format model was removed.- Specified by:
formatModelRemoved
in interfaceFormatModelListener
- Parameters:
model
- the model that was removed.
-
addListener
public void addListener(ListingModelListener listener)
- Specified by:
addListener
in interfaceListingModel
-
removeListener
public void removeListener(ListingModelListener listener)
- Specified by:
removeListener
in interfaceListingModel
-
getProgram
public Program getProgram()
- Specified by:
getProgram
in interfaceListingModel
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfaceListingModel
-
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 interfaceDomainObjectListener
- Parameters:
ev
- event containing the change record and type of change that was made
-
adjustAddressSetToCodeUnitBoundaries
public AddressSet adjustAddressSetToCodeUnitBoundaries(AddressSet addressSet)
- Specified by:
adjustAddressSetToCodeUnitBoundaries
in interfaceListingModel
-
-