/*
* (non-Javadoc)
* Method declared on IStatusLineManager
*/
public IProgressMonitor getProgressMonitor() {
final IProgressMonitor progressDelegate = statusLineExist() ? getProgressMonitorDelegate()
: new NullProgressMonitor();
return new IProgressMonitorWithBlocking() {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, int)
*/
public void beginTask(String name, int totalWork) {
progressDelegate.beginTask(name, totalWork);
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#done()
*/
public void done() {
progressDelegate.done();
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double)
*/
public void internalWorked(double work) {
progressDelegate.internalWorked(work);
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#isCanceled()
*/
public boolean isCanceled() {
return progressDelegate.isCanceled();
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
*/
public void setCanceled(boolean value) {
//Don't bother updating for disposed status
if (statusLineExist()) {
progressDelegate.setCanceled(value);
}
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String)
*/
public void setTaskName(String name) {
progressDelegate.setTaskName(name);
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String)
*/
public void subTask(String name) {
progressDelegate.subTask(name);
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#worked(int)
*/
public void worked(int work) {
progressDelegate.worked(work);
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitorWithBlocking#clearBlocked()
*/