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

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

@@ -22,18 +22,18 @@ public class UpdateSelectedComponents extends Pass<Vector<Component>> {
protected boolean canStart(Object... args) throws Exception {
target = new Vector<>();
//------------------------
if (Global.Components.getCheckedCount() == 0) {
if (Global.Components.getSelectedCount() == 0) {
Log.Writeln_("Не отмечено ни одного компонента!");
return false;
}
target = Global.Components.getCheckedItems();
target = Global.Components.getSelectedItems();
return true;
}
@Override
public String getStartDescription() {
Vector<String> question = new Vector<>();
question.add("Обновить компоненты");
for (Component component : Global.Components.getCheckedItems()) {
for (Component component : Global.Components.getSelectedItems()) {
question.add(component.getComponentType().getDescription());
}
return String.join("\n", question);