protected abstract static class FilteredItemsSelectionDialog.SelectionHistory extends Object
accessed(Object)
.
The history can be stored to/loaded from an XML file.
Constructor and Description |
---|
FilteredItemsSelectionDialog.SelectionHistory()
Creates new instance of
SelectionHistory . |
Modifier and Type | Method and Description |
---|---|
void |
accessed(Object object)
Adds object to history.
|
boolean |
contains(Object object)
Returns
true if history contains object. |
Object[] |
getHistoryItems()
Gets array of history items.
|
boolean |
isEmpty()
Returns
true if history is empty. |
void |
load(IMemento memento)
Load history elements from memento.
|
boolean |
remove(Object element)
Remove element from history.
|
protected abstract Object |
restoreItemFromMemento(IMemento memento)
Creates an object using given memento.
|
void |
save(IMemento memento)
Save history elements to memento.
|
protected abstract void |
storeItemToMemento(Object item,
IMemento memento)
Store object in
IMemento . |
public FilteredItemsSelectionDialog.SelectionHistory()
SelectionHistory
.public void accessed(Object object)
object
- the item to be added to the historypublic boolean contains(Object object)
true
if history contains object.object
- the item for which check will be executedtrue
if history contains object
false
in other waypublic boolean isEmpty()
true
if history is empty.true
if history is emptypublic boolean remove(Object element)
element
- to remove form the historytrue
if this list contained the specified
elementpublic void load(IMemento memento)
memento
- memento from which the history will be retrievedpublic void save(IMemento memento)
memento
- memento to which the history will be addedpublic Object[] getHistoryItems()
protected abstract Object restoreItemFromMemento(IMemento memento)
memento
- memento used for creating new object
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.