args = new Vector<>();
args.add(CommonUtils.DQuotes(machineAddress));
diff --git a/src/TestingSystem/Common/Test/Test.java b/src/TestingSystem/Common/Test/Test.java
index 029327a4..c14fc251 100644
--- a/src/TestingSystem/Common/Test/Test.java
+++ b/src/TestingSystem/Common/Test/Test.java
@@ -53,7 +53,7 @@ public class Test extends riDBObject {
@Override
public void select(boolean flag) {
super.select(flag);
- if (Current.hasUI())
+ if (CommonUtils.hasUI())
UI.getMainWindow().ShowCheckedTestsCount();
}
//---
diff --git a/src/TestingSystem/Common/TestingPlanner.java b/src/TestingSystem/Common/TestingPlanner.java
index 6f3df357..79e0f84d 100644
--- a/src/TestingSystem/Common/TestingPlanner.java
+++ b/src/TestingSystem/Common/TestingPlanner.java
@@ -2,7 +2,6 @@ package TestingSystem.Common;
import Common.CommonConstants;
import Common.Utils.CommonUtils;
import Common_old.Constants;
-import Common_old.Current;
import _VisualDVM.Global;
import Common_old.Utils.Utils;
import GlobalData.Machine.Machine;
@@ -206,7 +205,7 @@ public abstract class TestingPlanner extends Repositor
}
@Override
public String getLogName() {
- return Current.mode.toString();
+ return CommonUtils.mode.toString();
}
};
CommonUtils.MainLog.ClearLog();
diff --git a/src/TestingSystem/SAPFOR/SapforTestingPlanner.java b/src/TestingSystem/SAPFOR/SapforTestingPlanner.java
index 71825805..b340f686 100644
--- a/src/TestingSystem/SAPFOR/SapforTestingPlanner.java
+++ b/src/TestingSystem/SAPFOR/SapforTestingPlanner.java
@@ -1,9 +1,8 @@
package TestingSystem.SAPFOR;
import Common.CommonConstants;
+import Common.Mode;
import Common.Utils.CommonUtils;
import Common_old.Constants;
-import Common_old.Current;
-import _VisualDVM.Global;
import Common_old.GlobalProperties;
import Common_old.Utils.Utils;
import ProjectData.LanguageName;
@@ -18,6 +17,7 @@ import TestingSystem.SAPFOR.Json.SapforTestingSet_json;
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
import TestingSystem.SAPFOR.ServerSapfor.ServerSapfor;
import TestingSystem.SAPFOR.ServerSapfor.ServerSapforState;
+import _VisualDVM.Global;
import javafx.util.Pair;
import org.apache.commons.io.FileUtils;
@@ -94,7 +94,7 @@ public class SapforTestingPlanner extends TestingPlanner {
FileUtils.copyFile(new File(CommonUtils.Home, "TestingSystem.jar"), visualiser);
//создание настроек
GlobalProperties properties = new GlobalProperties(Global.properties);
- properties.Mode = Current.Mode.Package;
+ properties.Mode = Mode.Package;
CommonUtils.jsonToFile(properties, new File(workspace, "properties"));
//подготовка пакетного режима. Запустит его уже очередь.
Utils.createScript(workspace, workspace, "start", "java -jar VisualSapfor.jar");
diff --git a/src/Visual_DVM_2021/Passes/All/DeleteVersion.java b/src/Visual_DVM_2021/Passes/All/DeleteVersion.java
index 0c9c534b..b4f1d96b 100644
--- a/src/Visual_DVM_2021/Passes/All/DeleteVersion.java
+++ b/src/Visual_DVM_2021/Passes/All/DeleteVersion.java
@@ -21,7 +21,7 @@ public class DeleteVersion extends Pass_2021 {
current = (Current.getVersion() != null) && Current.getVersion().Home.equals(target.Home);
return true;
} else {
- if (((target = Current.getVersion()) != null) && (!Current.hasUI() ||
+ if (((target = Current.getVersion()) != null) && (!CommonUtils.hasUI() ||
UI.Warning("Удалить " +
((Current.HasProject() && target.Home.equals(Current.getProject().Home)) ? "текущий проект" : "версию ")
+ CommonUtils.Brackets(target.name)))) {
@@ -39,7 +39,7 @@ public class DeleteVersion extends Pass_2021 {
if ((Current.getProject().Home.getAbsolutePath().startsWith(target.Home.getAbsolutePath())))
passes.get(PassCode_2021.CloseCurrentProject).Do();
}
- if (Current.hasUI()) {
+ if (CommonUtils.hasUI()) {
UI.getVersionsWindow().RemoveVersionFromComparison(target);
}
}
diff --git a/src/Visual_DVM_2021/Passes/All/SPF_CreateParallelVariant.java b/src/Visual_DVM_2021/Passes/All/SPF_CreateParallelVariant.java
index d79239e9..9fa8740d 100644
--- a/src/Visual_DVM_2021/Passes/All/SPF_CreateParallelVariant.java
+++ b/src/Visual_DVM_2021/Passes/All/SPF_CreateParallelVariant.java
@@ -1,10 +1,11 @@
package Visual_DVM_2021.Passes.All;
-import Common_old.Current;
-import _VisualDVM.Global;
+import Common.Mode;
+import Common.Utils.CommonUtils;
import ProjectData.SapforData.Variants.ParallelVariant;
import Repository.Component.Sapfor.TransformationPermission;
import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.SapforTransformation;
+import _VisualDVM.Global;
public class SPF_CreateParallelVariant extends SapforTransformation {
ParallelVariant variant = null;
@Override
@@ -65,13 +66,13 @@ public class SPF_CreateParallelVariant extends SapforTransformation {
protected void performDone() throws Exception {
Global.transformationPermission = TransformationPermission.VariantsOnly;
target.migrateFilesSettings(target.last_version, true, true);
- if (Current.hasUI())
+ if (CommonUtils.hasUI())
variant.UpdateStats(sapfor.getPredictorStats(), target.last_version.name);
}
@Override
protected void performFinish() throws Exception {
//в пакетном режиме вариант всегда один. поэтому, сообщения надо распаковать сразу.
- if (Current.mode.equals(Current.Mode.Package))
+ if (CommonUtils.mode.equals(Mode.Package))
super.performFinish();
}
@Override
diff --git a/src/Visual_DVM_2021/Passes/All/SPF_ParseFilesWithOrder.java b/src/Visual_DVM_2021/Passes/All/SPF_ParseFilesWithOrder.java
index 2c4b7390..77bf45ac 100644
--- a/src/Visual_DVM_2021/Passes/All/SPF_ParseFilesWithOrder.java
+++ b/src/Visual_DVM_2021/Passes/All/SPF_ParseFilesWithOrder.java
@@ -111,7 +111,7 @@ public class SPF_ParseFilesWithOrder extends SapforAnalysis {
protected void performPreparation() throws Exception {
super.performPreparation(); //удаление интеррупта.
//------------------------------------------------------------------------------------------>>> пакетный режим.
- if (!precompilation_done && Current.hasUI()) {
+ if (!precompilation_done && CommonUtils.hasUI()) {
passes.get(PassCode_2021.Save).Do();
target.CleanAnalyses();
}
diff --git a/src/Visual_DVM_2021/Passes/Pass_2021.java b/src/Visual_DVM_2021/Passes/Pass_2021.java
index 0e0b0657..6f5aa455 100644
--- a/src/Visual_DVM_2021/Passes/Pass_2021.java
+++ b/src/Visual_DVM_2021/Passes/Pass_2021.java
@@ -191,30 +191,30 @@ public class Pass_2021 {
//-
private void PerformCanNotStart() throws Exception {
performCanNotStart();
- if (Current.hasUI())
+ if (CommonUtils.hasUI())
showCanNotStart();
}
protected void PerformPreparation() throws Exception {
performPreparation();
- if (Current.hasUI())
+ if (CommonUtils.hasUI())
showPreparation();
}
private void PerformFinish() throws Exception {
performFinish();
//-
- if (Current.hasUI())
+ if (CommonUtils.hasUI())
showFinish();
}
private void PerformDone() throws Exception {
performDone();
//-
- if (Current.hasUI())
+ if (CommonUtils.hasUI())
showDone();
}
private void PerformFail() throws Exception {
performFail();
//-
- if (Current.hasUI())
+ if (CommonUtils.hasUI())
showFail();
}
//------
@@ -298,11 +298,11 @@ public class Pass_2021 {
timer.Start();
//------------------------------->
try {
- if (Current.hasUI()) FocusBeforeStart();
+ if (CommonUtils.hasUI()) FocusBeforeStart();
if (canStart(args)) {
PerformPreparation();
//todo тут должна быть вилка на анимацию?
- if (Current.hasUI() && needsAnimation()) {
+ if (CommonUtils.hasUI() && needsAnimation()) {
animation_sem = new Semaphore(1);
animation_sem.acquire();
//---
@@ -386,7 +386,7 @@ public class Pass_2021 {
" окончен за " + timer.Print() +
" состояние " + CommonUtils.Brackets(state.getDescription())
);
- if (!Log.isEmpty() && Current.hasUI())
+ if (!Log.isEmpty() && CommonUtils.hasUI())
UI.Error(
"проход " + CommonUtils.Brackets(getDescription()) + "\n" + state.getDescription() + "\n\n" +
Log.toString());
@@ -396,7 +396,7 @@ public class Pass_2021 {
}
//--
public void ShowSapforMessage(String message) {
- if (Current.hasUI() && form != null) {
+ if (CommonUtils.hasUI() && form != null) {
String[] data = message.split(":");
switch (data[0]) {
case "message_1":
diff --git a/src/Visual_DVM_2021/Passes/SapforAnalysis.java b/src/Visual_DVM_2021/Passes/SapforAnalysis.java
index 4352384d..78fc9c41 100644
--- a/src/Visual_DVM_2021/Passes/SapforAnalysis.java
+++ b/src/Visual_DVM_2021/Passes/SapforAnalysis.java
@@ -1,6 +1,5 @@
package Visual_DVM_2021.Passes;
import Common.Utils.CommonUtils;
-import Common_old.Current;
import _VisualDVM.Global;
import Common_old.UI.DebugPrintLevel;
import Common_old.UI.Menus_2023.PassControl;
@@ -49,7 +48,7 @@ public class SapforAnalysis extends SapforPass {
@Override
protected void PerformPreparation() throws Exception {
//-
- if (Current.hasUI())
+ if (CommonUtils.hasUI())
showPreparation(); // отображение пустых данных
//-
performPreparation(); //в данном случае удаление данных
diff --git a/src/_VisualDVM/Global.java b/src/_VisualDVM/Global.java
index 179fd756..e64080b5 100644
--- a/src/_VisualDVM/Global.java
+++ b/src/_VisualDVM/Global.java
@@ -146,7 +146,7 @@ public class Global {
}
@Override
public String getLogName() {
- return Current.mode.toString();
+ return CommonUtils.mode.toString();
}
};
CommonUtils.MainLog.ClearLog();
@@ -216,7 +216,7 @@ public class Global {
}
//возможно заменить settings на properties
public static DBSetting getSetting(SettingName settingName) throws Exception {
- switch (Current.mode) {
+ switch (CommonUtils.mode) {
case Normal:
return ((GlobalDatabase)CommonUtils.db).settings.get(settingName);
default:
@@ -386,10 +386,10 @@ public class Global {
System.out.println("home directory is" + CommonUtils.Brackets(CommonUtils.Home));
//---
SynschronizeProperties();
- Current.mode = properties.Mode;
- System.out.println("mode is " + Current.mode);
+ CommonUtils.mode = properties.Mode;
+ System.out.println("mode is " + CommonUtils.mode);
try {
- switch (Current.mode) {
+ switch (CommonUtils.mode) {
case Normal:
NormalMode(Integer.parseInt(args[1]));
break;