com.ibm.wala.util
Class ProgressMaster

java.lang.Object
  extended by com.ibm.wala.util.ProgressMaster
All Implemented Interfaces:
org.eclipse.core.runtime.IProgressMonitor

public class ProgressMaster
extends java.lang.Object
implements org.eclipse.core.runtime.IProgressMonitor

A class to control execution through the IProgressMonitor interface. This class bounds each work item with a time in milliseconds. If there is no apparent progress within the specified bound, this class cancels itself.


Field Summary
 
Fields inherited from interface org.eclipse.core.runtime.IProgressMonitor
UNKNOWN
 
Method Summary
 void beginTask(java.lang.String name, int totalWork)
           
 void done()
           
 int getMillisPerWorkItem()
           
 void internalWorked(double work)
           
 boolean isCanceled()
           
 boolean lastItemTimedOut()
          Was the last cancel state due to a timeout?
static ProgressMaster make(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void reset()
           
 void setCanceled(boolean value)
           
 void setMillisPerWorkItem(int msPerWorkItem)
           
 void setTaskName(java.lang.String name)
           
 void subTask(java.lang.String name)
           
 void worked(int work)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

make

public static ProgressMaster make(org.eclipse.core.runtime.IProgressMonitor monitor)

beginTask

public void beginTask(java.lang.String name,
                      int totalWork)
Specified by:
beginTask in interface org.eclipse.core.runtime.IProgressMonitor

reset

public void reset()

lastItemTimedOut

public boolean lastItemTimedOut()
Was the last cancel state due to a timeout?


done

public void done()
Specified by:
done in interface org.eclipse.core.runtime.IProgressMonitor

internalWorked

public void internalWorked(double work)
Specified by:
internalWorked in interface org.eclipse.core.runtime.IProgressMonitor

isCanceled

public boolean isCanceled()
Specified by:
isCanceled in interface org.eclipse.core.runtime.IProgressMonitor

setCanceled

public void setCanceled(boolean value)
Specified by:
setCanceled in interface org.eclipse.core.runtime.IProgressMonitor

setTaskName

public void setTaskName(java.lang.String name)
Specified by:
setTaskName in interface org.eclipse.core.runtime.IProgressMonitor

subTask

public void subTask(java.lang.String name)
Specified by:
subTask in interface org.eclipse.core.runtime.IProgressMonitor

worked

public void worked(int work)
Specified by:
worked in interface org.eclipse.core.runtime.IProgressMonitor

getMillisPerWorkItem

public int getMillisPerWorkItem()

setMillisPerWorkItem

public void setMillisPerWorkItem(int msPerWorkItem)