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 Programprogram-
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 voidaddListener(ListingModelListener listener)AddressSetadjustAddressSetToCodeUnitBoundaries(AddressSet addressSet)voidcloseAllData(AddressSetView addresses, TaskMonitor monitor)Closes all data found within the given addresses.voidcloseAllData(Data data, TaskMonitor monitor)Recursively close the given data and its sub-components.voidcloseData(Data data)Closes the given data, but not any sub-components.voiddispose()voiddomainObjectChanged(DomainObjectChangedEvent ev)Method called when a change is made to the domain object.voidformatModelAdded(FieldFormatModel model)Notifies that a new format model was added to the format manager.voidformatModelChanged(FieldFormatModel model)Notifies that the given format model was changed.voidformatModelRemoved(FieldFormatModel model)Notifies that a format model was removed.AddressgetAddressAfter(Address address)AddressgetAddressBefore(Address addr)AddressSetViewgetAddressSet()LayoutgetLayout(Address addr, boolean isGapAddress)intgetMaxWidth()ProgramgetProgram()booleanisClosed()booleanisOpen(Data data)Returns true if the data is openbooleanisOpenData(CodeUnit cu)protected voidnotifyDataChanged(boolean updateImmediately)voidopenAllData(AddressSetView addresses, TaskMonitor monitor)Opens all data found within the given addresses.voidopenAllData(Data data, TaskMonitor monitor)Recursively open the given data and its sub-components.voidopenData(Data data)Opens the given data, but not any sub-components.voidoptionsChanged(ToolOptions options, java.lang.String optionName, java.lang.Object oldValue, java.lang.Object newValue)Notification that an option changed.voidremoveListener(ListingModelListener listener)voidsetFormatManager(FormatManager formatManager)voidstateChanged(javax.swing.event.ChangeEvent e)voidtoggleOpen(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:OptionsChangeListenerNotification that an option changed.Note: to reject an options change, you can throw a
OptionsVetoException.- Specified by:
optionsChangedin 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:
getAddressSetin interfaceListingModel
-
dispose
public void dispose()
- Specified by:
disposein interfaceListingModel
-
setFormatManager
public void setFormatManager(FormatManager formatManager)
- Specified by:
setFormatManagerin interfaceListingModel
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
stateChangedin interfacejavax.swing.event.ChangeListener
-
getLayout
public Layout getLayout(Address addr, boolean isGapAddress)
- Specified by:
getLayoutin interfaceListingModel
-
getMaxWidth
public int getMaxWidth()
- Specified by:
getMaxWidthin interfaceListingModel
-
getAddressAfter
public Address getAddressAfter(Address address)
- Specified by:
getAddressAfterin interfaceListingModel
-
getAddressBefore
public Address getAddressBefore(Address addr)
- Specified by:
getAddressBeforein interfaceListingModel
-
isOpenData
public boolean isOpenData(CodeUnit cu)
-
isOpen
public boolean isOpen(Data data)
Description copied from interface:ListingModelReturns true if the data is open- Specified by:
isOpenin interfaceListingModel- Parameters:
data- the data to check- Returns:
- true if the data is open
-
toggleOpen
public void toggleOpen(Data data)
Description copied from interface:ListingModelChanges the open state of the given data (open -> closes; closed-> open).- Specified by:
toggleOpenin interfaceListingModel- Parameters:
data- the data to open
-
openAllData
public void openAllData(Data data, TaskMonitor monitor)
Description copied from interface:ListingModelRecursively open the given data and its sub-components.- Specified by:
openAllDatain interfaceListingModel- Parameters:
data- the data to openmonitor- the task monitor
-
closeAllData
public void closeAllData(Data data, TaskMonitor monitor)
Description copied from interface:ListingModelRecursively close the given data and its sub-components.- Specified by:
closeAllDatain interfaceListingModel- Parameters:
data- the data to closemonitor- the task monitor
-
openAllData
public void openAllData(AddressSetView addresses, TaskMonitor monitor)
Description copied from interface:ListingModelOpens all data found within the given addresses. Each data is fully opened.- Specified by:
openAllDatain 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:ListingModelCloses all data found within the given addresses. Each data is fully closed.- Specified by:
closeAllDatain interfaceListingModel- Parameters:
addresses- the range of addresses to search for datamonitor- the task monitor
-
closeData
public void closeData(Data data)
Description copied from interface:ListingModelCloses the given data, but not any sub-components.- Specified by:
closeDatain interfaceListingModel- Parameters:
data- the data to close
-
openData
public void openData(Data data)
Description copied from interface:ListingModelOpens the given data, but not any sub-components.- Specified by:
openDatain interfaceListingModel- Parameters:
data- the data to open
-
notifyDataChanged
protected void notifyDataChanged(boolean updateImmediately)
-
formatModelAdded
public void formatModelAdded(FieldFormatModel model)
Description copied from interface:FormatModelListenerNotifies that a new format model was added to the format manager.- Specified by:
formatModelAddedin interfaceFormatModelListener- Parameters:
model- the new model.
-
formatModelChanged
public void formatModelChanged(FieldFormatModel model)
Description copied from interface:FormatModelListenerNotifies that the given format model was changed.- Specified by:
formatModelChangedin interfaceFormatModelListener- Parameters:
model- the model that was changed.
-
formatModelRemoved
public void formatModelRemoved(FieldFormatModel model)
Description copied from interface:FormatModelListenerNotifies that a format model was removed.- Specified by:
formatModelRemovedin interfaceFormatModelListener- Parameters:
model- the model that was removed.
-
addListener
public void addListener(ListingModelListener listener)
- Specified by:
addListenerin interfaceListingModel
-
removeListener
public void removeListener(ListingModelListener listener)
- Specified by:
removeListenerin interfaceListingModel
-
getProgram
public Program getProgram()
- Specified by:
getProgramin interfaceListingModel
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceListingModel
-
domainObjectChanged
public void domainObjectChanged(DomainObjectChangedEvent ev)
Description copied from interface:DomainObjectListenerMethod called when a change is made to the domain object.- Specified by:
domainObjectChangedin interfaceDomainObjectListener- Parameters:
ev- event containing the change record and type of change that was made
-
adjustAddressSetToCodeUnitBoundaries
public AddressSet adjustAddressSetToCodeUnitBoundaries(AddressSet addressSet)
- Specified by:
adjustAddressSetToCodeUnitBoundariesin interfaceListingModel
-
-