Interface ListingModel
- All Known Implementing Classes:
EmptyListingModel,ListingModelConverter,ProgramBigListingModel
public interface ListingModel
Model displaying program data in a
FieldPanel-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ListingModelListener listener) Adds a listener for changes to this model.adjustAddressSetToCodeUnitBoundaries(AddressSet addressSet) Adjusts each range in the given address set to be on code unit boundaries.booleanareFunctionVariablesOpen(Address FunctionAddress) Checks if the function variables are being displayed at the given addressvoidcloseAllData(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.voidCloses the given data, but not any sub-components.copy()Makes a copy of this model.voiddispose()Disposes this modelgetAddressAfter(Address address) Returns the next address that has displayable information after the given address.getAddressBefore(Address address) Returns the previous address that has displayable information before the given address.Returns the address set of all addresses in the model.Returns a layout with displayable information for the given address.intReturns the width of the longest layout this model can produce..Returns the program being displayed by this model..booleanisClosed()Returns true if the program being displayed by this listing has been closed (and therefor the model is invalid.).booleanisFunctionOpen(Address functionAddress) Checks if the function at the given entry point is open or not.booleanReturns true if the data is openvoidopenAllData(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.booleanOpens the given data, but not any sub-components.voidremoveListener(ListingModelListener listener) Removes a listener from those being notified of model changes.voidsetAllFunctionsOpen(boolean open) Sets all functions to open or closed.voidsetAllFunctionVariablesOpen(boolean open) Sets the display of variables for all functions.voidsetFormatManager(FormatManager formatManager) Sets theFormatManagerfor this model which determines the layout of the fields.voidsetFunctionOpen(Address functionAddress, boolean open) Sets the function at the given address to be open or notvoidsetFunctionVariablesOpen(Address FunctionAddress, boolean open) Sets whether or not to display function variables for the function at the given address.voidtoggleOpen(Data data) Changes the open state of the given data (open -> closes; closed-> open).
-
Field Details
-
FUNCTION_POINTER_OPTION_GROUP_NAME
- See Also:
-
DISPLAY_EXTERNAL_FUNCTION_POINTER_OPTION_NAME
- See Also:
-
DISPLAY_NONEXTERNAL_FUNCTION_POINTER_OPTION_NAME
- See Also:
-
-
Method Details
-
getAddressSet
AddressSetView getAddressSet()Returns the address set of all addresses in the model.- Returns:
- the address set of all addresses in the model
-
getAddressAfter
Returns the next address that has displayable information after the given address. This allows the listing to efficiently skip over large sections of undisplayable addresses such as those consumed by large data or addresses part of a closed function.- Parameters:
address- the address from which to find the next address with displayable information- Returns:
- the next address with displayable information
-
getAddressBefore
Returns the previous address that has displayable information before the given address. This allows the listing to efficiently skip over large sections of undisplayable addresses such as those consumed by large data or addresses part of a closed function.- Parameters:
address- the address from which to find the previous address with displayable information- Returns:
- the previous address with displayable information
-
getLayout
Returns a layout with displayable information for the given address.- Parameters:
address- the address to get displayable informationisGapAddress- true implies there is a gap of missing addresses before this address. Note that this is different from addresses that are hidden due to collapsed functions or closed data. These gaps are not even in consideration to display information such as undefined memory or a fragmented program view.- Returns:
- a Layout with information to be displayed for the given address.
-
getMaxWidth
int getMaxWidth()Returns the width of the longest layout this model can produce..- Returns:
- the width of the longest layout this model can produce.
-
isOpen
Returns true if the data is open- Parameters:
data- the data to check- Returns:
- true if the data is open
-
toggleOpen
Changes the open state of the given data (open -> closes; closed-> open).- Parameters:
data- the data to open
-
setFunctionVariablesOpen
Sets whether or not to display function variables for the function at the given address.- Parameters:
FunctionAddress- the address of the functionopen- if true, the variables are displayed, otherwise they are hidden
-
areFunctionVariablesOpen
Checks if the function variables are being displayed at the given address- Parameters:
FunctionAddress- the address of the function- Returns:
- true if the variables are being displayed for the function at the given address
-
setAllFunctionVariablesOpen
void setAllFunctionVariablesOpen(boolean open) 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.- Parameters:
open- if true, show function variables
-
openData
Opens the given data, but not any sub-components.- 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)
-
openAllData
Recursively open the given data and its sub-components.- Parameters:
data- the data to openmonitor- the task monitor
-
openAllData
Opens all data found within the given addresses. Each data is fully opened.- Parameters:
addresses- the range of addresses to search for datamonitor- the task monitor
-
closeData
Closes the given data, but not any sub-components.- Parameters:
data- the data to close
-
closeAllData
Recursively close the given data and its sub-components.- Parameters:
data- the data to closemonitor- the task monitor
-
closeAllData
Closes all data found within the given addresses. Each data is fully closed.- Parameters:
addresses- the range of addresses to search for datamonitor- the task monitor
-
addListener
Adds a listener for changes to this model.- Parameters:
listener- the listener to be notified
-
removeListener
Removes a listener from those being notified of model changes.- Parameters:
listener- the listener to be removed
-
getProgram
Program getProgram()Returns the program being displayed by this model..- Returns:
- the program being displayed by this model.
-
isClosed
boolean isClosed()Returns true if the program being displayed by this listing has been closed (and therefor the model is invalid.).- Returns:
- true if the program being displayed by this listing has been closed (and therefor the model is invalid.)
-
setFormatManager
Sets theFormatManagerfor this model which determines the layout of the fields.- Parameters:
formatManager- the new FormatManager to use
-
dispose
void dispose()Disposes this model -
adjustAddressSetToCodeUnitBoundaries
Adjusts each range in the given address set to be on code unit boundaries.- Parameters:
addressSet- the address set to be adjusted- Returns:
- a new AddressSet where each range is on a code unit boundary
-
copy
ListingModel copy()Makes a copy of this model.- Returns:
- a copy of this model.
-
isFunctionOpen
Checks if the function at the given entry point is open or not.- Parameters:
functionAddress- the entry point of the function to check for open- Returns:
- true if the function is open; false otherwise
-
setFunctionOpen
Sets the function at the given address to be open or not- Parameters:
functionAddress- the entry point of the function to set open or closedopen- true to open the function, false to close it
-
setAllFunctionsOpen
void setAllFunctionsOpen(boolean open) Sets all functions to open or closed.- Parameters:
open- if true, opens all function; otherwise closes all functions
-