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

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

@@ -28,7 +28,7 @@ public class Run extends Pass<db_project_info> {
}
@Override
protected void performPreparation() throws Exception {
runTasks = Current.getRunConfiguration().generateRunTasks(target, Current.getCompilationTask());
runTasks = Global.mainModule.getRunConfiguration().generateRunTasks(target, Global.mainModule.getCompilationTask());
for (RunTask runTask : runTasks) {
Global.mainModule.getDb().Insert(runTask);
Utils.forceDeleteWithCheck(runTask.getLocalWorkspace());
@@ -41,17 +41,17 @@ public class Run extends Pass<db_project_info> {
@Override
protected boolean canStart(Object... args) {
subpass = null;
if (Current_.Check(Log, Current.Project, Current.Machine, Current.User, Current.Makefile, Current.RunConfiguration,
if (Global.mainModule.Check(Log, Current.Project, Current.Machine, Current.User, Current.Makefile, Current.RunConfiguration,
Current.CompilationTask)) {
//-
target = Current.getProject();
target = Global.mainModule.getProject();
//-
if (Current.getMachine().type.equals(MachineType.MVS_cluster) &&
Current.getRunConfiguration().LauncherCall.isEmpty()
if (Global.mainModule.getMachine().type.equals(MachineType.MVS_cluster) &&
Global.mainModule.getRunConfiguration().LauncherCall.isEmpty()
) {
Log.Writeln_("Запуск напрямую на кластере запрещён.Используйте для запуска DVM систему или MPI");
}
if (!Current.getCompilationTask().state.equals(TaskState.Done))
if (!Global.mainModule.getCompilationTask().state.equals(TaskState.Done))
Log.Writeln_("Текущая задача на компиляцию еще не выполнялась, или была завершена с ошибками");
return Log.isEmpty();
}
@@ -59,7 +59,7 @@ public class Run extends Pass<db_project_info> {
}
@Override
protected void body() throws Exception {
switch (Current.getMachine().type) {
switch (Global.mainModule.getMachine().type) {
case Local:
if (Utils_.isWindows()) {
subpass = passes.get(PassCode.WindowsLocalRun);
@@ -68,7 +68,7 @@ public class Run extends Pass<db_project_info> {
break;
case Undefined:
case MVS_cluster:
throw new PassException("Запуск не реализован для типа машины " + Utils_.DQuotes(Current.getMachine().type));
throw new PassException("Запуск не реализован для типа машины " + Utils_.DQuotes(Global.mainModule.getMachine().type));
/*
case MVS_cluster:
subpass = passes.get(PassCode_2021.MVSRun);
@@ -95,7 +95,7 @@ public class Run extends Pass<db_project_info> {
case DoneWithErrors:
task_completed = true;
if (task.hasDvmSts) {
Utils.CheckAndCleanDirectory(Current.getProject().getStatisticDirectory());
Utils.CheckAndCleanDirectory(Global.mainModule.getProject().getStatisticDirectory());
Pass.passes.get(PassCode.SPF_StatisticAnalyzer).Do(task);
}
break;