use of net.sf.mzmine.taskcontrol.Task in project mzmine2 by mzmine.
the class VanKrevelenDiagramModule method runModule.
@Override
@Nonnull
public ExitCode runModule(@Nonnull MZmineProject project, @Nonnull ParameterSet parameters, @Nonnull Collection<Task> tasks) {
Task newTask = new VanKrevelenDiagramTask(parameters);
tasks.add(newTask);
return ExitCode.OK;
}
use of net.sf.mzmine.taskcontrol.Task in project mzmine2 by mzmine.
the class TICVisualizerWindow method dispose.
@Override
public void dispose() {
// If the window is closed, we want to cancel all running tasks of the
// data sets
Task[] tasks = this.ticDataSets.values().toArray(new Task[0]);
for (Task task : tasks) {
TaskStatus status = task.getStatus();
if ((status == TaskStatus.WAITING) || (status == TaskStatus.PROCESSING)) {
task.cancel();
}
}
super.dispose();
}
use of net.sf.mzmine.taskcontrol.Task in project mzmine2 by mzmine.
the class ComplexSearchModule method runModule.
@Override
@Nonnull
public ExitCode runModule(@Nonnull MZmineProject project, @Nonnull ParameterSet parameters, @Nonnull Collection<Task> tasks) {
PeakList[] peakLists = parameters.getParameter(ComplexSearchParameters.peakLists).getValue().getMatchingPeakLists();
for (PeakList peakList : peakLists) {
Task newTask = new ComplexSearchTask(parameters, peakList);
tasks.add(newTask);
}
return ExitCode.OK;
}
use of net.sf.mzmine.taskcontrol.Task in project mzmine2 by mzmine.
the class Ms2SearchModule method runModule.
@Override
@Nonnull
public ExitCode runModule(@Nonnull MZmineProject project, @Nonnull ParameterSet parameters, @Nonnull Collection<Task> tasks) {
PeakList[] peakList1 = parameters.getParameter(Ms2SearchParameters.peakList1).getValue().getMatchingPeakLists();
PeakList[] peakList2 = parameters.getParameter(Ms2SearchParameters.peakList2).getValue().getMatchingPeakLists();
// Previously iterated over all the peaklists & did a separate task for each.
// Now a single task.
Task newTask = new Ms2SearchTask(parameters, peakList1[0], peakList2[0]);
tasks.add(newTask);
return ExitCode.OK;
}
use of net.sf.mzmine.taskcontrol.Task in project mzmine2 by mzmine.
the class LipidSearchModule method runModule.
@Override
@Nonnull
public ExitCode runModule(@Nonnull MZmineProject project, @Nonnull ParameterSet parameters, @Nonnull Collection<Task> tasks) {
PeakList[] peakLists = parameters.getParameter(LipidSearchParameters.peakLists).getValue().getMatchingPeakLists();
for (PeakList peakList : peakLists) {
Task newTask = new LipidSearchTask(parameters, peakList);
tasks.add(newTask);
}
return ExitCode.OK;
}
Aggregations