/** * Add monitor as another monitor that * * @param monitor */ void addProgressListener(IProgressMonitorWithBlocking monitor) { listener = monitor; JobInfo info = getJobInfo(job); TaskInfo currentTask = info.getTaskInfo(); if (currentTask != null) { listener.beginTask(currentTaskName, currentTask.totalWork); listener.internalWorked(currentTask.preWork); } }
@Override public void clearBlocked() { try { super.clearBlocked(); if (additionalMonitor instanceof IProgressMonitorWithBlocking) { ((IProgressMonitorWithBlocking) additionalMonitor).clearBlocked(); } } catch (Exception e) { LogUtil.warn(e); } }
@Override public void setBlocked(IStatus reason) { try { super.setBlocked(reason); if (additionalMonitor instanceof IProgressMonitorWithBlocking) { ((IProgressMonitorWithBlocking) additionalMonitor).setBlocked(reason); } } catch (Exception e) { LogUtil.warn(e); } }