Class GotoNextBookmarkHandler

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
All Implemented Interfaces:
org.eclipse.core.commands.IHandler, org.eclipse.core.commands.IHandler2

public class GotoNextBookmarkHandler extends AbstractNavigateBookmarksHandler
Navigates to bookmark below caret line. If there is no bookmark below caret line, then navigates to the first bookmark in the document. If there are multiple bookmarks on the line then one of those bookmarks is selected. If no appropriate bookmark was found then editor is not changed.
  • Constructor Details

    • GotoNextBookmarkHandler

      public GotoNextBookmarkHandler()
  • Method Details

    • findTargetBookmark

      protected Optional<org.eclipse.core.resources.IMarker> findTargetBookmark(int caretLine, NavigableMap<Integer,List<org.eclipse.core.resources.IMarker>> bookmarksWithLines)
      Description copied from class: AbstractNavigateBookmarksHandler
      Selects bookmark to navigate to.
      Specified by:
      findTargetBookmark in class AbstractNavigateBookmarksHandler
      Parameters:
      caretLine - 0-based current caret line in the editor. Must not be null.
      bookmarksWithLines - Map where keys are 0-bazed line numbers where bookmarks are present in the active editor and values are list of bookmarks on the corresponding line. Must not be null.
      Returns:
      Bookmark to navigate to or an empty value if target cannot be found or should not navigate anywhere. Never null.