public ProgressMonitorWrapperJob(IAnalysisJob wrappedJob, string message) { this.wrappedJob = wrappedJob; monitor = IdeApp.Workbench.ProgressMonitors.GetStatusProgressMonitor(message, null, false); var work = wrappedJob.GetFiles().Sum(f => wrappedJob.GetIssueProviders(f).Count()); monitor.BeginTask(message, work); }
public ProgressMonitorWrapperJob (IAnalysisJob wrappedJob, string message) { this.wrappedJob = wrappedJob; monitor = IdeApp.Workbench.ProgressMonitors.GetStatusProgressMonitor (message, null, false); var work = wrappedJob.GetFiles ().Sum (f => wrappedJob.GetIssueProviders (f).Count ()); monitor.BeginTask (message, work); }
/// <summary> /// Remove the specified job from the queue. /// </summary> /// <param name="job">The job to remove.</param> public void Remove (IAnalysisJob job) { lock (_lock) { foreach (var file in job.GetFiles()) { JobSlice queueItem = slices.FirstOrDefault (j => j.File == file); if (queueItem == null) // The file might have been processed already, carry on continue; queueItem.RemoveJob (job); if (!queueItem.GetJobs ().Any ()) slices.Remove (queueItem); } InvalidateSort (); } }
/// <summary> /// Adds the specified job to the queue. /// </summary> /// <param name="job">The job.</param> public void Add (IAnalysisJob job) { lock (_lock) { var jobStatus = new JobStatus (job); foreach (var file in job.GetFiles()) { JobSlice slice = slices.FirstOrDefault (j => j.File == file); if (slice == null) { slice = new JobSlice (file); slices.Add (slice); } jobStatus.AddSlice (slice); slice.AddJob (job, jobStatus); } InvalidateSort (); } }
/// <summary> /// Adds the specified job to the queue. /// </summary> /// <param name="job">The job.</param> public void Add(IAnalysisJob job) { lock (_lock) { var jobStatus = new JobStatus(job); foreach (var file in job.GetFiles()) { JobSlice slice = slices.FirstOrDefault(j => j.File == file); if (slice == null) { slice = new JobSlice(file); slices.Add(slice); } jobStatus.AddSlice(slice); slice.AddJob(job, jobStatus); } InvalidateSort(); } }
/// <summary> /// Remove the specified job from the queue. /// </summary> /// <param name="job">The job to remove.</param> public void Remove(IAnalysisJob job) { lock (_lock) { foreach (var file in job.GetFiles()) { JobSlice queueItem = slices.FirstOrDefault(j => j.File == file); if (queueItem == null) { // The file might have been processed already, carry on continue; } queueItem.RemoveJob(job); if (!queueItem.GetJobs().Any()) { slices.Remove(queueItem); } } InvalidateSort(); } }
public IEnumerable <ProjectFile> GetFiles() { return(wrappedJob.GetFiles()); }