org.eclipse.mylar.internal.tasks.ui.views
Class TaskActivationHistory

java.lang.Object
  extended by org.eclipse.mylar.internal.tasks.ui.views.TaskActivationHistory

public class TaskActivationHistory
extends java.lang.Object

Author:
Ken Sueda (original prototype), Wesley Coelho (Added persistent tasks), Mik Kersten (hardening), Rob Elves

Field Summary
private  int currentIndex
           
private  java.util.List<ITask> history
           
private static int NUM_SAVED_HISTORY_ITEMS_TO_LOAD
          The number of tasks from the previous Eclipse session to load into the history at startup.
private  boolean persistentHistoryLoaded
           
 
Constructor Summary
TaskActivationHistory()
           
 
Method Summary
 void addTask(ITask task)
           
 void clear()
           
protected  ITask getHistoryTaskAt(int pos)
          Returns the task corresponding to the interaction event history item at the specified position
 ITask getPreviousTask()
           
 java.util.List<ITask> getPreviousTasks()
           
 boolean hasPrevious()
           
 void loadPersistentHistory()
          Load in a number of saved history tasks from previous session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

history

private java.util.List<ITask> history

currentIndex

private int currentIndex

NUM_SAVED_HISTORY_ITEMS_TO_LOAD

private static final int NUM_SAVED_HISTORY_ITEMS_TO_LOAD
The number of tasks from the previous Eclipse session to load into the history at startup. (This is not the maximum size of the history, which is currently unbounded)

See Also:
Constant Field Values

persistentHistoryLoaded

private boolean persistentHistoryLoaded
Constructor Detail

TaskActivationHistory

public TaskActivationHistory()
Method Detail

loadPersistentHistory

public void loadPersistentHistory()
Load in a number of saved history tasks from previous session. Should be called from constructor but ContextManager doesn't seem to be able to provide activity history at that point


getHistoryTaskAt

protected ITask getHistoryTaskAt(int pos)
Returns the task corresponding to the interaction event history item at the specified position


addTask

public void addTask(ITask task)

getPreviousTask

public ITask getPreviousTask()

getPreviousTasks

public java.util.List<ITask> getPreviousTasks()

hasPrevious

public boolean hasPrevious()

clear

public void clear()