рефакторинг массовых удалений объектов

This commit is contained in:
2024-10-16 18:58:23 +03:00
parent cf660d26ea
commit 788bd67201
21 changed files with 170 additions and 53 deletions

View File

@@ -5,7 +5,7 @@ import _VisualDVM.ProjectData.Files.DBProjectFile;
public abstract class FilesMassPass<T> extends Pass<T> {
@Override
protected boolean canStart(Object... args) throws Exception {
if (Global.mainModule.getProject().db.files.getCheckedCount() == 0) {
if (Global.mainModule.getProject().db.files.getSelectedCount() == 0) {
Log.Writeln_("Не отмечено ни одного файла.");
return false;
}
@@ -20,7 +20,7 @@ public abstract class FilesMassPass<T> extends Pass<T> {
@Override
protected void body() throws Exception {
Global.mainModule.getProject().db.BeginTransaction();
for (DBProjectFile file : Global.mainModule.getProject().db.files.getCheckedItems()) {
for (DBProjectFile file : Global.mainModule.getProject().db.files.getSelectedItems()) {
ShowMessage1(file.name);
operation(file);
}