Package org.eclipse.handly.ui.action
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>
Represents the underlying history for the
HistoryDropDownAction.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract EReturns the history entry currently designated as 'active'.Returns a list of the history entries.abstract org.eclipse.jface.resource.ImageDescriptorgetImageDescriptor(E entry) Returns an image descriptor for the given history entry.abstract StringReturns a user-readable text label for the given history entry.abstract voidsetActiveEntry(E entry) Designates the given history entry as the currently 'active' entry.abstract voidsetHistoryEntries(List<E> entries) Replaces the history entries with the given entries.
-
Constructor Details
-
History
public History()
-
-
Method Details
-
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
Replaces the history entries with the given entries.- Parameters:
entries- nevernull, may be empty, does not contain nulls
-
getActiveEntry
Returns the history entry currently designated as 'active'.- Returns:
- the active entry (may be
null)
-
setActiveEntry
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- nevernull
-
getLabel
Returns a user-readable text label for the given history entry.- Parameters:
entry- nevernull- Returns:
- the text label for the entry (not
null)
-
getImageDescriptor
Returns an image descriptor for the given history entry.- Parameters:
entry- nevernull- Returns:
- the image descriptor for the entry (may be
null)
-