no message
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.TestingSystem.Common.TestingServer;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforConfiguration.SapforConfiguration;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforPackage.SapforPackage;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.ServerSapforState;
|
||||
import _VisualDVM.Passes.Server.PublishServerObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Vector;
|
||||
public class StartSelectedSAPFORConfigurations extends PublishServerObject<TestingServer, SapforPackage> {
|
||||
Vector<SapforConfiguration> configurations;
|
||||
protected File sapfor = null;
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/Start.png";
|
||||
}
|
||||
//--
|
||||
public StartSelectedSAPFORConfigurations() {
|
||||
super(Global.testingServer, SapforPackage.class);
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
//--
|
||||
if (!Global.mainModule.getAccount().CheckRegistered(Log)) {
|
||||
return false;
|
||||
}
|
||||
if (!Global.mainModule.Check(Log, Current.ServerSapfor)) {
|
||||
return false;
|
||||
}
|
||||
if (!Global.mainModule.getServerSapfor().state.equals(ServerSapforState.Done)) {
|
||||
Log.Writeln_("Выбранная версия SAPFOR не собрана!");
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
configurations = Global.testingServer.db.sapforConfigurations.getCheckedOrCurrent();
|
||||
if (configurations.isEmpty()) {
|
||||
Log.Writeln_("Не отмечено ни одной конфигурации, или отсутствует текущая конфигурация.");
|
||||
return false;
|
||||
}
|
||||
target = new SapforPackage(Global.mainModule.getAccount(),
|
||||
Global.mainModule.getServerSapfor(),
|
||||
configurations,
|
||||
Global.properties.EmailOnTestingProgress ? 1 : 0,
|
||||
Log);
|
||||
if (target.tasksCount == 0) {
|
||||
Log.Writeln_("Не сформировано ни одной новой задачи.");
|
||||
return false;
|
||||
}
|
||||
return (UI_.Question("Будет запущено " + target.tasksCount + " задач. Продолжить"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user