Interface INavigationLocation

  • All Known Implementing Classes:
    NavigationLocation, TextSelectionNavigationLocation

    public interface INavigationLocation
    Represents the context marked for the user in the navigation history. Not intended to be implemented by clients. Clients should subclass NavigationLocation instead.
    Since:
    2.1
    Restriction:
    This interface is not intended to be implemented by clients.
    • Method Detail

      • dispose

        void dispose()
        Disposes of this location and frees any allocated resource.
      • releaseState

        void releaseState()
        Release any state kept by this location. Any relevant state should be saved by the previous call of saveState(IMemento). This object will not be used until restoreState is called again.
      • saveState

        void saveState​(IMemento memento)
        Persists the state of this location into the memento
        Parameters:
        memento - the storage were the state should be saved into.
      • restoreState

        void restoreState​(IMemento memento)
        Restore the state of this location from the memento
        Parameters:
        memento - the storage were the state was saved into.
      • restoreLocation

        void restoreLocation()
        Restore the context saved by this location.
      • mergeInto

        boolean mergeInto​(INavigationLocation currentLocation)
        Merge the receiver into currentLocation. Return true if the two locations could be merged otherwise return false.

        This message is sent to all locations before being added to the history; given the change to the new location to merge itself into the current location minimizing the number of entries in the navigation history.

        Parameters:
        currentLocation - where the receiver should be merged into
        Returns:
        boolean true if the merge was possible
      • getInput

        Object getInput()
        Returns the input used for this location. Returns null if the receiver's state has been released.
        Returns:
        the input for this location
      • getText

        String getText()
        Returns the display name for this location. This name is used in the navigation history list.
        Returns:
        the display name
      • setInput

        void setInput​(Object input)
        Sets the location's input.

        Should not be called by clients.

        Parameters:
        input - the editor input.
      • update

        void update()
        The message update is sent to the active location before another location becomes active.