рефакторинг. переносил текущие объекты в другое место

This commit is contained in:
2024-10-13 22:08:13 +03:00
parent 09b64218bd
commit 6afa2dc892
240 changed files with 1472 additions and 1518 deletions

View File

@@ -24,25 +24,25 @@ public class StartSelectedDVMConfigurations extends PublishServerObject<TestingS
//--
@Override
protected boolean canStart(Object... args) throws Exception {
if (!Current.getAccount().CheckRegistered(Log)) {
if (!Global.mainModule.getAccount().CheckRegistered(Log)) {
return false;
}
if (!Current_.Check(Log, Current.Machine, Current.User, Current.Compiler))
if (!Global.mainModule.Check(Log, Current.Machine, Current.User, Current.Compiler))
return false;
if (!Current.getMachine().type.equals(MachineType.Server)) {
if (!Global.mainModule.getMachine().type.equals(MachineType.Server)) {
Log.Writeln_("Тестирование поддерживается только на одиночном удалённом сервере.");
return false;
}
if (!Current.getUser().state.equals(UserState.ready_to_work)) {
if (!Global.mainModule.getUser().state.equals(UserState.ready_to_work)) {
Log.Writeln_("Пользователь не готов к работе. Выполните инициализацию пользователя!");
return false;
}
if (!Current.getCompiler().type.equals(CompilerType.dvm)) {
if (!Global.mainModule.getCompiler().type.equals(CompilerType.dvm)) {
Log.Writeln_("Тестирование поддерживается только для DVM компиляторов.");
return false;
}
if (!Current.getCompiler().versionLoaded)
passes.get(PassCode.ShowCompilerVersion).Do(Current.getCompiler(), false);
if (!Global.mainModule.getCompiler().versionLoaded)
passes.get(PassCode.ShowCompilerVersion).Do(Global.mainModule.getCompiler(), false);
//-----
Vector<DVMConfiguration> configurations = Global.testingServer.db.dvm_configurations.getCheckedOrCurrent();
if (configurations.isEmpty()) {
@@ -51,10 +51,10 @@ public class StartSelectedDVMConfigurations extends PublishServerObject<TestingS
}
//---
target= new DVMPackage(
Current.getAccount(),
Current.getMachine(),
Current.getUser(),
Current.getCompiler(),
Global.mainModule.getAccount(),
Global.mainModule.getMachine(),
Global.mainModule.getUser(),
Global.mainModule.getCompiler(),
configurations,
Global.properties.EmailOnTestingProgress ? 1 : 0
);