package _VisualDVM.Passes.All;
import Common.Passes.DeleteObjectsPass;
import Common.Utils.Utils_;
import _VisualDVM.GlobalData.Tasks.CompilationTask.CompilationTask;
import _VisualDVM.GlobalData.Tasks.RunTask.RunTask;
public class DeleteCompilationTasks extends DeleteObjectsPass<CompilationTask> {
    public DeleteCompilationTasks() {
        super(CompilationTask.class);
    }
    @Override
    protected void body() throws Exception {
        super.body();
        for (CompilationTask task : target) {
            for (RunTask runTask : task.getRunTasks().values()) {
                Utils_.forceDeleteWithCheck(runTask.getLocalWorkspace());
            }
            Utils_.forceDeleteWithCheck(task.getLocalWorkspace());
        }
    }
}
