Class AbstractNavigateBookmarksHandler

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
com.e1c.g5.v8.dt.internal.bookmarks.ui.commands.AbstractBookmarkHandler
com.e1c.g5.v8.dt.internal.bookmarks.ui.commands.AbstractNavigateBookmarksHandler
All Implemented Interfaces:
org.eclipse.core.commands.IHandler, org.eclipse.core.commands.IHandler2
Direct Known Subclasses:
GotoNextBookmarkHandler, GotoPreviousBookmarkHandler

public abstract class AbstractNavigateBookmarksHandler extends AbstractBookmarkHandler
Abstract base for handlers that navigate among bookmarks.
  • Constructor Details

    • AbstractNavigateBookmarksHandler

      public AbstractNavigateBookmarksHandler()
  • Method Details

    • findTargetBookmark

      protected abstract Optional<org.eclipse.core.resources.IMarker> findTargetBookmark(int caretLine, NavigableMap<Integer,List<org.eclipse.core.resources.IMarker>> bookmarksWithLines)
      Selects bookmark to navigate to.
      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.
    • executeWithTextEditor

      protected void executeWithTextEditor(org.eclipse.ui.texteditor.ITextEditor editor, org.eclipse.core.resources.IResource resource)
      Description copied from class: AbstractBookmarkHandler
      Handles command in text editor.
      Specified by:
      executeWithTextEditor in class AbstractBookmarkHandler
      Parameters:
      editor - Text editor being active. Must not be null.
      resource - Resource being edited in active text editor. Must not be null.