no message
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.GlobalData.Tasks.RunTask.RunTask;
|
||||
@@ -18,7 +19,7 @@ public class DeleteSelectedRunTasks extends Pass<Vector<RunTask>> {
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = new Vector<>();
|
||||
((GlobalDatabase) Utils_.db).runTasks.Data.values().stream().filter(task -> task.isVisible() && task.isSelected() && task.isPassive()).forEach(task -> target.add(task));
|
||||
(Global.mainModule.getDb()).runTasks.Data.values().stream().filter(task -> task.isVisible() && task.isSelected() && task.isPassive()).forEach(task -> target.add(task));
|
||||
if (target.isEmpty()) {
|
||||
Log.Writeln_("Не отмечено ни одной задачи для удаления.");
|
||||
return false;
|
||||
@@ -26,17 +27,17 @@ public class DeleteSelectedRunTasks extends Pass<Vector<RunTask>> {
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).runTasks.ClearUI();
|
||||
Global.mainModule.getDb().runTasks.ClearUI();
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
for (RunTask task : target) {
|
||||
Utils_.db.Delete(task);
|
||||
Global.mainModule.getDb().Delete(task);
|
||||
Utils.forceDeleteWithCheck(task.getLocalWorkspace());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).runTasks.ShowUI();
|
||||
Global.mainModule.getDb().runTasks.ShowUI();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user