Interface NavigationHistoryService


public interface NavigationHistoryService
The NavigationHistoryService maintains a stack of locations that the user has visited via a navigation plugin. It provides methods querying and manipulating this list.
  • Method Details

    • next

      void next(Navigatable navigatable)
      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

      void previous(Navigatable navigatable)
      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

      void next(Navigatable navigatable, LocationMemento location)
      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

      void previous(Navigatable navigatable, LocationMemento location)
      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

      void nextFunction(Navigatable navigatable)
      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

      void previousFunction(Navigatable navigatable)
      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

      List<LocationMemento> getPreviousLocations(Navigatable navigatable)
      Returns the LocationMemento objects in the "previous" list
      Parameters:
      navigatable - the navigatable to be navigated
      Returns:
      the LocationMemento objects in the "previous" list
    • getNextLocations

      List<LocationMemento> getNextLocations(Navigatable navigatable)
      Returns the LocationMemento objects in the "next" list
      Parameters:
      navigatable - the navigatable to be navigated
      Returns:
      the LocationMemento objects in the "next" list
    • hasNext

      boolean hasNext(Navigatable navigatable)
      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

      boolean hasPrevious(Navigatable navigatable)
      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

      boolean hasNextFunction(Navigatable navigatable)
      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

      boolean hasPreviousFunction(Navigatable navigatable)
      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

      void addNewLocation(Navigatable navigatable)
      Adds the current location memento to the list of previous locations for the given navigatable. Clears the list of next locations.
      Parameters:
      navigatable - the navigatable to be navigated
    • clear

      void clear(Navigatable navigatable)
      Removes all visited locations from the history list for the given navigatable
      Parameters:
      navigatable - the navigatable whose list to be cleared
    • clear

      void clear(Program program)
      Removes all entries for the given program from all history lists
      Parameters:
      program - the program whose entries to be cleared