Class HistoryDropDownAction.History<E>

java.lang.Object
org.eclipse.handly.ui.action.HistoryDropDownAction.History<E>
Type Parameters:
E - the type of history entries
Enclosing class:
HistoryDropDownAction<E>

public abstract static class HistoryDropDownAction.History<E> extends Object
Represents the underlying history for the HistoryDropDownAction.
  • Constructor Details

    • History

      public History()
  • Method Details

    • getHistoryEntries

      public abstract List<E> getHistoryEntries()
      Returns a list of the history entries. The list will not be modified or retained by the caller.
      Returns:
      the history entries (not null, may be empty, must not contain nulls)
    • setHistoryEntries

      public abstract void setHistoryEntries(List<E> entries)
      Replaces the history entries with the given entries.
      Parameters:
      entries - never null, may be empty, does not contain nulls
    • getActiveEntry

      public abstract E getActiveEntry()
      Returns the history entry currently designated as 'active'.
      Returns:
      the active entry (may be null)
    • setActiveEntry

      public abstract void setActiveEntry(E entry)
      Designates the given history entry as the currently 'active' entry. This method should not throw an exception if for some reason the given entry cannot be made active.
      Parameters:
      entry - never null
    • getLabel

      public abstract String getLabel(E entry)
      Returns a user-readable text label for the given history entry.
      Parameters:
      entry - never null
      Returns:
      the text label for the entry (not null)
    • getImageDescriptor

      public abstract org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(E entry)
      Returns an image descriptor for the given history entry.
      Parameters:
      entry - never null
      Returns:
      the image descriptor for the entry (may be null)