Class ListingModelConverter
- java.lang.Object
-
- ghidra.app.util.viewer.multilisting.ListingModelConverter
-
- All Implemented Interfaces:
ListingModel
public class ListingModelConverter extends java.lang.Object implements ListingModel
-
-
Field Summary
-
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 ListingModelConverter(ListingModel primaryModel, ListingModel model)
Converts addresses from the primary model into addresses for this converters model.
-
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()
Address
getAddressAfter(Address primaryModelAddress)
Address
getAddressBefore(Address primaryModelAddress)
AddressSetView
getAddressSet()
Layout
getLayout(Address primaryAddress, boolean isGapAddress)
int
getMaxWidth()
Program
getProgram()
boolean
isClosed()
boolean
isOpen(Data data)
Returns true if the data is openvoid
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
removeListener(ListingModelListener listener)
void
setAddressTranslator(AddressTranslator translator)
Sets an address translator for this converter.void
setFormatManager(FormatManager formatManager)
void
toggleOpen(Data data)
Changes the open state of the given data (open -> closes; closed-> open).
-
-
-
Constructor Detail
-
ListingModelConverter
public ListingModelConverter(ListingModel primaryModel, ListingModel model)
Converts addresses from the primary model into addresses for this converters model.- Parameters:
primaryModel
- the primary modelmodel
- this converter's model
-
-
Method Detail
-
addListener
public void addListener(ListingModelListener listener)
- Specified by:
addListener
in interfaceListingModel
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceListingModel
-
getAddressAfter
public Address getAddressAfter(Address primaryModelAddress)
- Specified by:
getAddressAfter
in interfaceListingModel
-
getAddressBefore
public Address getAddressBefore(Address primaryModelAddress)
- Specified by:
getAddressBefore
in interfaceListingModel
-
getAddressSet
public AddressSetView getAddressSet()
- Specified by:
getAddressSet
in interfaceListingModel
-
getLayout
public Layout getLayout(Address primaryAddress, boolean isGapAddress)
- Specified by:
getLayout
in interfaceListingModel
-
getMaxWidth
public int getMaxWidth()
- Specified by:
getMaxWidth
in interfaceListingModel
-
getProgram
public Program getProgram()
- Specified by:
getProgram
in interfaceListingModel
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfaceListingModel
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
removeListener
public void removeListener(ListingModelListener listener)
- Specified by:
removeListener
in interfaceListingModel
-
setFormatManager
public void setFormatManager(FormatManager formatManager)
- Specified by:
setFormatManager
in interfaceListingModel
-
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
-
adjustAddressSetToCodeUnitBoundaries
public AddressSet adjustAddressSetToCodeUnitBoundaries(AddressSet addressSet)
- Specified by:
adjustAddressSetToCodeUnitBoundaries
in interfaceListingModel
-
setAddressTranslator
public void setAddressTranslator(AddressTranslator translator)
Sets an address translator for this converter. If provided the translator converts addresses from the primary program to those in the program for this converter's model.- Parameters:
translator
- translates addresses between the primary model and this converter's model
-
-