Package org.eclipse.ui.internal
Class EditorHistoryItem
java.lang.Object
org.eclipse.ui.internal.EditorHistoryItem
An item in the editor history.
-
Constructor Summary
ConstructorDescriptionEditorHistoryItem
(IEditorInput input, IEditorDescriptor descriptor) Constructs a new item.EditorHistoryItem
(IMemento memento) Constructs a new item from a memento. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canSave()
Returns whether this history item can be saved.Returns the editor descriptor.Returns the factory id of this item, either from the input if restored, otherwise from the memento.getInput()
Returns the editor input.getName()
Returns the name of this item, either from the input if restored, otherwise from the memento.Returns the tooltip text of this item, either from the input if restored, otherwise from the memento.boolean
Returns whether this item has been restored from the memento.boolean
matches
(IEditorInput input) Returns whether this item matches the given editor input.Restores the object state from the memento.Saves the object state in the given memento.
-
Constructor Details
-
EditorHistoryItem
Constructs a new item. -
EditorHistoryItem
Constructs a new item from a memento.
-
-
Method Details
-
getDescriptor
Returns the editor descriptor.- Returns:
- the editor descriptor.
-
getInput
Returns the editor input.- Returns:
- the editor input.
-
isRestored
public boolean isRestored()Returns whether this item has been restored from the memento. -
getName
Returns the name of this item, either from the input if restored, otherwise from the memento. -
getToolTipText
Returns the tooltip text of this item, either from the input if restored, otherwise from the memento. -
matches
Returns whether this item matches the given editor input. -
getFactoryId
Returns the factory id of this item, either from the input if restored, otherwise from the memento. Returnsnull
if there is no factory id. -
restoreState
Restores the object state from the memento. -
canSave
public boolean canSave()Returns whether this history item can be saved. -
saveState
Saves the object state in the given memento.- Parameters:
memento
- the memento to save the object state in
-