Package ghidra.app.nav
Interface Navigatable
- All Known Implementing Classes:
NavigatableComponentProviderAdapter
public interface Navigatable
Interface for ComponentProviders to implement if they support basic navigation and selection
capabilities. Implementing this interface will provide the provider with navigation history and
actions that require navigation or selection. (Search Text, Search Memory, Select bytes, Select
instructions, etc.)
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener to be notified if this Navigatable is terminateddefault AddressableByteSource
Returns a source for providing byte values of the program associated with this navigatable.Returns the current highlight of this Navigatablelong
Returns the current location of this NavigatableReturns the view state for this navigatableReturns an icon that represents this NavigatableReturns the current Program of this NavigatableReturns the current selection of this NavigatableReturns the current text selection or nullboolean
goTo
(Program program, ProgramLocation location) Commands this navigatable to goto (display) the given program and locationboolean
Returns true if this Navigatable is "connected".boolean
Returns true if this navigatable is no longer validdefault boolean
Return true if this Navigatable is part of the "dynamic analysis" or "debugger" user interface.boolean
Returns true if this provider is visiblevoid
removeHighlightProvider
(ListingHighlightProvider highlightProvider, Program program) Removes the given highlight provider for the given programvoid
Removes a listener to be notified if this Navigatable is terminated.void
Tells this provider to request focus.void
setHighlight
(ProgramSelection highlight) Tells this Navigatable to set its highlight to the given highlightvoid
setHighlightProvider
(ListingHighlightProvider highlightProvider, Program program) Set the highlight provider for the given programvoid
setMemento
(LocationMemento memento) Sets the view state for this navigatable.void
setSelection
(ProgramSelection selection) Tells this Navigatable to set its selection to the given selectionboolean
Returns true if this navigatable supports highlightingboolean
Currently only the 'connected' windows support markers
-
Field Details
-
DEFAULT_NAVIGATABLE_ID
static final long DEFAULT_NAVIGATABLE_ID- See Also:
-
-
Method Details
-
getInstanceID
long getInstanceID() -
goTo
Commands this navigatable to goto (display) the given program and location- Parameters:
program
- the programlocation
- the location in that program to display- Returns:
- true if the goto was successful
-
getLocation
ProgramLocation getLocation()Returns the current location of this Navigatable- Returns:
- the current location of this Navigatable
-
getProgram
Program getProgram()Returns the current Program of this Navigatable- Returns:
- the current Program of this Navigatable
-
getMemento
LocationMemento getMemento()Returns the view state for this navigatable- Returns:
- the view state for this navigatable
-
isConnected
boolean isConnected()Returns true if this Navigatable is "connected". Navigatables are connected if they produce and consume location and selection events.- Returns:
- true if this Navigatable is "connected"
-
isDynamic
default boolean isDynamic()Return true if this Navigatable is part of the "dynamic analysis" or "debugger" user interface.- Returns:
- true if this Navigatable is "dynamic"
-
supportsMarkers
boolean supportsMarkers()Currently only the 'connected' windows support markers- Returns:
- true if this navigatable supports markers
-
requestFocus
void requestFocus()Tells this provider to request focus. -
isVisible
boolean isVisible()Returns true if this provider is visible- Returns:
- true if visible
-
setSelection
Tells this Navigatable to set its selection to the given selection- Parameters:
selection
- the selection to set.
-
setHighlight
Tells this Navigatable to set its highlight to the given highlight- Parameters:
highlight
- the highlight to set.
-
getSelection
ProgramSelection getSelection()Returns the current selection of this Navigatable- Returns:
- the current selection of this Navigatable
-
getHighlight
ProgramSelection getHighlight()Returns the current highlight of this Navigatable- Returns:
- the current highlight of this Navigatable
-
getTextSelection
String getTextSelection()Returns the current text selection or null- Returns:
- the text selection
-
isDisposed
boolean isDisposed()Returns true if this navigatable is no longer valid- Returns:
- true if this navigatable is no longer valid
-
supportsHighlight
boolean supportsHighlight()Returns true if this navigatable supports highlighting- Returns:
- true if this navigatable supports highlighting
-
setHighlightProvider
Set the highlight provider for the given program- Parameters:
highlightProvider
- the providerprogram
- the program
-
removeHighlightProvider
Removes the given highlight provider for the given program- Parameters:
highlightProvider
- the providerprogram
- the program
-
getByteSource
Returns a source for providing byte values of the program associated with this navigatable. For a static program, this is just a wrapper for a program's memory. But dynamic programs require special handling for reading bytes.- Returns:
- a source of bytes for the navigatable's program
-