JavaScript is disabled on your browser.
public interface NavigationHistoryService
The ToolStateHistoryService maintains a stack of locations that the user
has visited via a navigation plugin.
It provides methods querying and manipulating this list.
Method Summary
All Methods Instance Methods Abstract Methods
void
Adds the given locationMomento to the list of previous locations.
void
Removes all visited locations from the history list
Returns the LocationMemento objects in the "next" list
Returns the LocationMemento objects in the "previous" list
boolean
Returns true if there is a valid "next" location in the history list.
boolean
Returns true if there is a valid "next" function location in the history list
boolean
Returns true if there is a valid "previous" location in the history list
boolean
Returns true if there is a valid "previous" function location in the history list
void
Positions the current location to the next location in the history list.
void
Navigates to the given location in the "next" list.
void
Positions the "current" location to the next location which is in a different function
from current one or previous non-code location.
void
Positions the "current" location to the previous location in the history list.
void
Navigates to the given location in the "previous" list.
void
Positions the "previous" location to the next location which is in a different function
from current one or previous non-code location.
Method Details
next
Positions the current location to the next location in the history list.
If there is no "next" location, the history list remains unchanged.
Parameters:
navigatable
- the navigatable to be navigated
previous
Positions the "current" location to the previous location in the history list.
If there is no "previous" location, the history list remains unchanged.
Parameters:
navigatable
- the navigatable to be navigated
next
Navigates to the given location in the "next" list. If the location is not in the list, then
nothing will happen.
Parameters:
navigatable
- the navigatable to be navigated
location
- The location within the "next" list to which to go
previous
Navigates to the given location in the "previous" list. If the location is not in
the list, then nothing will happen
Parameters:
navigatable
- the navigatable to be navigated
location
- The location within the "previous" list to which to go.
nextFunction
Positions the "current" location to the next location which is in a different function
from current one or previous non-code location.
If we are not inside any function, performs like "next".
Parameters:
navigatable
- the navigatable to be navigated
previousFunction
Positions the "previous" location to the next location which is in a different function
from current one or previous non-code location.
If we are not inside any function, performs like "next".
Parameters:
navigatable
- the navigatable to be navigated
getPreviousLocations
Returns the LocationMemento objects in the "previous" list
Parameters:
navigatable
- the navigatable to be navigated
Returns:
the LocationMemento objects in the "previous" list
getNextLocations
Returns the LocationMemento objects in the "next" list
Parameters:
navigatable
- the navigatable to be navigated
Returns:
the LocationMemento objects in the "next" list
hasNext
Returns true if there is a valid "next" location in the history list.
Parameters:
navigatable
- the navigatable to be navigated
Returns:
true if there is a "next" location
hasPrevious
Returns true if there is a valid "previous" location in the history list
Parameters:
navigatable
- the navigatable to be navigated
Returns:
true if there is a "previous" location
hasNextFunction
Returns true if there is a valid "next" function location in the history list
Parameters:
navigatable
- Navigatable object we are looking at
Returns:
true if there is a valid "next" function location
hasPreviousFunction
Returns true if there is a valid "previous" function location in the history list
Parameters:
navigatable
- Navigatable object we are looking at
Returns:
true if there is a valid "previous" function location
addNewLocation
Adds the given locationMomento to the list of previous locations. Clears the list
of next locations.
Parameters:
navigatable
- the navigatable to be navigated
clear
Removes all visited locations from the history list
Parameters:
navigatable
- the navigatable to be navigated