no message

This commit is contained in:
2024-10-14 12:14:01 +03:00
parent 3a29898d5f
commit 452c4c7268
466 changed files with 1255 additions and 1100 deletions

View File

@@ -0,0 +1,48 @@
package _VisualDVM.Passes.All;
import _VisualDVM.Global;
import _VisualDVM.Repository.Component.Component;
import _VisualDVM.Passes.PassCode;
import Common.Passes.Pass;
import java.util.Vector;
public class UpdateSelectedComponents extends Pass<Vector<Component>> {
@Override
public String getIconPath() {
return "/icons/Update.png";
}
@Override
public String getButtonText() {
return "";
}
@Override
public boolean needsConfirmations() {
return true;
}
@Override
protected boolean canStart(Object... args) throws Exception {
target = new Vector<>();
//------------------------
if (Global.Components.getCheckedCount() == 0) {
Log.Writeln_("Не отмечено ни одного компонента!");
return false;
}
target = Global.Components.getCheckedItems();
return true;
}
@Override
public String getStartDescription() {
Vector<String> question = new Vector<>();
question.add("Обновить компоненты");
for (Component component : Global.Components.getCheckedItems()) {
question.add(component.getComponentType().getDescription());
}
return String.join("\n", question);
}
@Override
protected void body() throws Exception {
for (Component component : target) {
Global.Components.ui_.Select(component.getPK());
Global.mainModule.getPass(PassCode.UpdateComponent).Do();
}
}
}