no message
This commit is contained in:
29
src/_VisualDVM/Passes/All/DeleteDebugResults.java
Normal file
29
src/_VisualDVM/Passes/All/DeleteDebugResults.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.Tasks.Task;
|
||||
import _VisualDVM.Passes.Project.CurrentProjectPass;
|
||||
|
||||
import java.util.Vector;
|
||||
import java.util.stream.Collectors;
|
||||
public class DeleteDebugResults extends CurrentProjectPass {
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
Global.mainModule.getDb().compilationTasks.ClearUI();
|
||||
Global.mainModule.getDb().runTasks.ClearUI();
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
Vector<Task> toDelete = Global.mainModule.getDb().compilationTasks.Data.values().stream().filter(task -> task.belongsToProject(target)).collect(Collectors.toCollection(Vector::new));
|
||||
Global.mainModule.getDb().runTasks.Data.values().stream().filter(task -> task.belongsToProject(target)).forEach(toDelete::add);
|
||||
for (Task task : toDelete) {
|
||||
Utils.forceDeleteWithCheck(task.getLocalWorkspace());
|
||||
Global.mainModule.getDb().Delete(task);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
Global.mainModule.getDb().compilationTasks.ShowUI();
|
||||
Global.mainModule.getDb().runTasks.ShowUI();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user