/** * Report to the progress monitor that this thread is blocked, supplying * an information message, and if possible the job that is causing the blockage. * Important: An invocation of this method MUST be followed eventually be * an invocation of reportUnblocked. * @param monitor The monitor to report blocking to * @param blockingJob The job that is blocking this thread, or <code>null</code> * @see #reportUnblocked */ final void reportBlocked(IProgressMonitor monitor, InternalJob blockingJob) { if (!(monitor instanceof IProgressMonitorWithBlocking)) return; IStatus reason; if (blockingJob == null || blockingJob instanceof ThreadJob || blockingJob.isSystem()) { reason = new Status(IStatus.INFO, JobManager.PI_JOBS, 1, JobMessages.jobs_blocked0, null); } else { String msg = NLS.bind(JobMessages.jobs_blocked1, blockingJob.getName()); reason = new JobStatus(IStatus.INFO, (Job) blockingJob, msg); } ((IProgressMonitorWithBlocking) monitor).setBlocked(reason); }
/** * Report to the progress monitor that this thread is blocked, supplying * an information message, and if possible the job that is causing the blockage. * Important: An invocation of this method MUST be followed eventually be * an invocation of reportUnblocked. * @param monitor The monitor to report blocking to * @param blockingJob The job that is blocking this thread, or <code>null</code> * @see #reportUnblocked */ final void reportBlocked(IProgressMonitor monitor, InternalJob blockingJob) { if (!(monitor instanceof IProgressMonitorWithBlocking)) return; IStatus reason; if (blockingJob == null || blockingJob instanceof ThreadJob || blockingJob.isSystem()) { reason = new Status(IStatus.INFO, JobManager.PI_JOBS, 1, JobMessages.jobs_blocked0, null); } else { String msg = NLS.bind(JobMessages.jobs_blocked1, blockingJob.getName()); reason = new JobStatus(IStatus.INFO, (Job) blockingJob, msg); } ((IProgressMonitorWithBlocking) monitor).setBlocked(reason); }
/** * Report to the progress monitor that this thread is blocked, supplying * an information message, and if possible the job that is causing the blockage. * Important: An invocation of this method MUST be followed eventually be * an invocation of reportUnblocked. * @param monitor The monitor to report blocking to * @param blockingJob The job that is blocking this thread, or <code>null</code> * @see #reportUnblocked */ final void reportBlocked(IProgressMonitor monitor, InternalJob blockingJob) { if (!(monitor instanceof IProgressMonitorWithBlocking)) return; IStatus reason; if (blockingJob == null || blockingJob instanceof ThreadJob || blockingJob.isSystem()) { reason = new Status(IStatus.INFO, JobManager.PI_JOBS, 1, JobMessages.jobs_blocked0, null); } else { String msg = NLS.bind(JobMessages.jobs_blocked1, blockingJob.getName()); reason = new JobStatus(IStatus.INFO, (Job) blockingJob, msg); } ((IProgressMonitorWithBlocking) monitor).setBlocked(reason); }
/** * Report to the progress monitor that this thread is blocked, supplying * an information message, and if possible the job that is causing the blockage. * Important: An invocation of this method MUST be followed eventually be * an invocation of reportUnblocked. * @param monitor The monitor to report blocking to * @param blockingJob The job that is blocking this thread, or <code>null</code> * @see #reportUnblocked */ final void reportBlocked(IProgressMonitor monitor, InternalJob blockingJob) { if (!(monitor instanceof IProgressMonitorWithBlocking)) return; IStatus reason; if (blockingJob == null || blockingJob instanceof ThreadJob || blockingJob.isSystem()) { reason = new Status(IStatus.INFO, JobManager.PI_JOBS, 1, JobMessages.jobs_blocked0, null); } else { String msg = NLS.bind(JobMessages.jobs_blocked1, blockingJob.getName()); reason = new JobStatus(IStatus.INFO, (Job) blockingJob, msg); } ((IProgressMonitorWithBlocking) monitor).setBlocked(reason); }