Package com.iizix
Interface IPropProgressMonitor
- All Known Implementing Classes:
- NullPropProgressMonitor,- PropProgressMonitor,- PropProgressMonitorAdapter
 - public interface IPropProgressMonitorA simple interface to the Eclipse IProgressMonitor.- Author:
- Christopher Mindus
 
- Field Summary- Fields - Modifier and Type - Field - Description - static IPropProgressMonitor- NULLThe NULL progress monitor that can be used e.g.
 - Method Summary- All Methods Instance Methods Abstract Methods - Modifier and Type - Method - Description - void- beginTask(java.lang.String name, int totalWork)Notifies that the main task is beginning.- void- cancel()Cancels the progress monitor.- void- done()Notifies that the work is done; that is, either the main task is completed or the user canceled it.- java.lang.Object- getProgressMonitor()Gets the org.eclipse.core.runtime.IProgressMonitor instance.- boolean- isCanceled()Returns whether cancellation of current operation has been requested.- IPropProgressMonitor- newSubMonitor(int work)Creates a new sub progress monitor taking up a number of work.- void- setTaskName(java.lang.String name)Sets the task name to the given value.- void- setWorked(int worked)Set worked value.- void- setWorkRemaining(int workRemaining)Set worked remaining.- void- worked(int work)Notifies that a given number of work unit of the main task has been completed.
 
- Field Detail- NULL- static final IPropProgressMonitor NULL The NULL progress monitor that can be used e.g. to resolve property references in the Server.
 
 - Method Detail- beginTask- void beginTask(java.lang.String name, int totalWork)Notifies that the main task is beginning. This must only be called once on a given progress monitor instance.- Parameters:
- name- The name (or description) of the main task.
- totalWork- The total number of work units into which the main task is been subdivided. The value must be greater than zero.
- Throws:
- java.lang.IllegalArgumentException- If totalWork is zero or less.
- java.lang.NullPointerException- If name is null.
 
 - setTaskName- void setTaskName(java.lang.String name) Sets the task name to the given value. This method is used to restore the task label after a nested operation was executed. Normally there is no need for clients to call this method.- Parameters:
- name- the name (or description) of the main task.
- See Also:
- beginTask(java.lang.String, int)
 
 - worked- void worked(int work) Notifies that a given number of work unit of the main task has been completed. Note that this amount represents an installment, as opposed to a cumulative amount of work done to date.- Parameters:
- work- A non-negative number of work units just completed.
- Throws:
- java.lang.IllegalArgumentException- If work is less than zero.
 
 - setWorked- void setWorked(int worked) Set worked value.- Parameters:
- worked- The work value.
 
 - setWorkRemaining- void setWorkRemaining(int workRemaining) Set worked remaining.- Parameters:
- workRemaining- The remaining work value, must be between zero and totalWork.
 
 - done- void done() Notifies that the work is done; that is, either the main task is completed or the user canceled it. This method may be called more than once (implementations should be prepared to handle this case).
 - isCanceled- boolean isCanceled() Returns whether cancellation of current operation has been requested. Long-running operations should poll to see if cancellation has been requested.- Returns:
- trueif cancellation has been requested, and- falseotherwise.
 
 - cancel- void cancel() Cancels the progress monitor.
 - getProgressMonitor- java.lang.Object getProgressMonitor() Gets the org.eclipse.core.runtime.IProgressMonitor instance.- Returns:
- An object that is castable to org.eclipse.core.runtime.IProgressMonitor.
 
 - newSubMonitor- IPropProgressMonitor newSubMonitor(int work) Creates a new sub progress monitor taking up a number of work.- Parameters:
- work- A non-negative number of work units that the new sub progress monitor will tick off.
- Returns:
- A new submonitor.