no message

This commit is contained in:
2024-10-07 22:22:51 +03:00
parent 17c0bf7eb3
commit 3516b58127
34 changed files with 115 additions and 202 deletions

View File

@@ -173,7 +173,7 @@ public class CreateTestFromDirectory extends Pass_2021<Test> {
}
//-
public File packTestCode() throws Exception {
target.temp_project_name = Utils.getDateName("test");
target.temp_project_name = CommonUtils.getDateName("test");
//-
File tempProject = target.getTempProject();
File tempArchive = target.getTempArchive();

View File

@@ -1,6 +1,5 @@
package Visual_DVM_2021.Passes.All;
import Common.Utils.CommonUtils;
import Common_old.Constants;
import Common_old.Current;
import Common_old.Utils.Utils;
import ProjectData.Files.FileType;
@@ -60,7 +59,7 @@ public class CreateTestFromFile extends Pass_2021<Test> {
return true;
}
public File packTestCode() throws Exception {
target.temp_project_name = Utils.getDateName("test");
target.temp_project_name = CommonUtils.getDateName("test");
//-
File tempProject = target.getTempProject();
File tempArchive = target.getTempArchive();

View File

@@ -51,7 +51,7 @@ public class DownloadProject extends CurrentConnectionPass {
@Override
protected void performDone() throws Exception {
File project = Paths.get(Global.visualiser.getWorkspace().getAbsolutePath(),
Utils.getDateName(src.name)).toFile();
CommonUtils.getDateName(src.name)).toFile();
if (passes.get(PassCode_2021.UnzipFolderPass).Do(local_archive.getAbsolutePath(), project.getAbsolutePath())) {
if (UI.Question("Проект " + CommonUtils.Brackets(src.name) + " успешно загружен. Открыть его"))
passes.get(PassCode_2021.OpenCurrentProject).Do(project);

View File

@@ -88,7 +88,7 @@ public class ExportDVMPackageToExcel extends Pass_2021<Vector<DVMPackage>> {
Log.Writeln_("Папка не выбрана.");
return false;
}
res = new File(dir, Utils.getDateName("packages") + ".xls");
res = new File(dir, CommonUtils.getDateName("packages") + ".xls");
return true;
}
//---
@@ -104,7 +104,7 @@ public class ExportDVMPackageToExcel extends Pass_2021<Vector<DVMPackage>> {
long milliseconds = object.ChangeDate - object.StartDate;
total_time += milliseconds;
//--
lines.add("время выполнения " + Utils.printSplittedDateInterval(milliseconds));
lines.add("время выполнения " + CommonUtils.printSplittedDateInterval(milliseconds));
return String.join("; ", lines);
}
//---
@@ -354,7 +354,7 @@ public class ExportDVMPackageToExcel extends Pass_2021<Vector<DVMPackage>> {
offset.Inc();
}
if (target.size() > 1) {
addInfoRow(offset.getValue(), "всего задач " + total_tasks_count + "; общее время выполнения " + Utils.printSplittedDateInterval(total_time));
addInfoRow(offset.getValue(), "всего задач " + total_tasks_count + "; общее время выполнения " + CommonUtils.printSplittedDateInterval(total_time));
offset.Inc();
}
addHeaderRow(offset.getValue(),

View File

@@ -1,5 +1,5 @@
package Visual_DVM_2021.Passes.All;
import Common_old.Utils.Utils;
import Common.Utils.CommonUtils;
import Visual_DVM_2021.Passes.CurrentProjectPass;
import javax.imageio.ImageIO;
@@ -21,7 +21,7 @@ public class MakeScreenShot extends CurrentProjectPass {
int y = display.getHeight();
BufferedImage bufferedImage = new Robot().createScreenCapture(new Rectangle(x, y));
//-
String res_name = Utils.getDateName("screenshot") + ".png";
String res_name = CommonUtils.getDateName("screenshot") + ".png";
outputfile = Paths.get(target.getAttachmentsDirectory().getAbsolutePath(), res_name).toFile();
//-
ImageIO.write(bufferedImage, "png", outputfile);

View File

@@ -93,7 +93,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
performanceTime = 0;
exitCode = CommonConstants.Nan;
//------------------
workspace = Paths.get(Global.TempDirectory.getAbsolutePath(), Utils.getDateName("precompilation")).toFile();
workspace = Paths.get(Global.TempDirectory.getAbsolutePath(), CommonUtils.getDateName("precompilation")).toFile();
FileUtils.forceMkdir(workspace);
//------------------------------>>
fortranCompiler = new Compiler();
@@ -194,7 +194,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
protected void StartProcess(String command, int TA) throws Exception {
killed = false;
output = "";
process = Utils.startScript(workspace, workspace, Utils.getDateName("start_task_script"),
process = Utils.startScript(workspace, workspace, CommonUtils.getDateName("start_task_script"),
command,
null);
outputLines.clear();

View File

@@ -1,7 +1,6 @@
package Visual_DVM_2021.Passes.All;
import Common.Utils.CommonUtils;
import _VisualDVM.Global;
import Common_old.Utils.Utils;
import ProjectData.Files.DBProjectFile;
import ProjectData.Files.FileType;
import Repository.Component.Sapfor.TransformationPermission;
@@ -40,7 +39,7 @@ public class PrepareForModulesAssembly extends Transformation {
protected void body() throws Exception {
File total = Paths.get(target.last_version.Home.getAbsolutePath(), "total.for").toFile();
while (total.exists()) {
total = Paths.get(target.last_version.Home.getAbsolutePath(), Utils.getDateName("total") + ".for").toFile();
total = Paths.get(target.last_version.Home.getAbsolutePath(), CommonUtils.getDateName("total") + ".for").toFile();
Thread.sleep(1000);
}
//--создать

View File

@@ -1,7 +1,7 @@
package Visual_DVM_2021.Passes.All;
import Common.Utils.CommonUtils;
import Common_old.Constants;
import Common_old.Current;
import Common_old.Utils.Utils;
import GlobalData.RemoteFile.RemoteFile;
import Visual_DVM_2021.Passes.PassException;
import Visual_DVM_2021.Passes.SSH.ConnectionPass;
@@ -25,7 +25,7 @@ public class RemoteInitialiseUser extends ConnectionPass<RemoteFile> {
}
@Override
protected void ServerAction() throws Exception {
String workspace_name = Utils.getDateName("visual_sapfor_workspace");
String workspace_name = CommonUtils.getDateName("visual_sapfor_workspace");
ShowMessage1("Создание рабочего пространства...");
target = new RemoteFile(user.connection.sftpChannel.getHome(), workspace_name);
user.connection.sftpChannel.mkdir(target.full_name);

View File

@@ -1,6 +1,5 @@
package Visual_DVM_2021.Passes.All;
import Common.Utils.CommonUtils;
import Common_old.Utils.Utils;
import GlobalData.RemoteFile.RemoteFile;
import Visual_DVM_2021.Passes.SSH.CurrentConnectionPass;
public class RemoteSingleCommand extends CurrentConnectionPass<String> {
@@ -15,7 +14,7 @@ public class RemoteSingleCommand extends CurrentConnectionPass<String> {
}
@Override
protected void ServerAction() throws Exception {
RemoteFile file = new RemoteFile(user.connection.sftpChannel.getHome(), Utils.getDateName("out"));
RemoteFile file = new RemoteFile(user.connection.sftpChannel.getHome(), CommonUtils.getDateName("out"));
user.connection.Command(command + " 1>" + CommonUtils.DQuotes(file.full_name));
if (user.connection.Exists(file)) {
target = user.connection.readFromFile(file);

View File

@@ -1,7 +1,7 @@
package Visual_DVM_2021.Passes;
import Common.Utils.CommonUtils;
import Common_old.Current;
import _VisualDVM.Global;
import Common_old.Utils.Utils;
import GlobalData.Settings.SettingName;
import TestingSystem.SAPFOR.Json.SapforVersion_json;
import TestingSystem.SAPFOR.SapforTask.SapforTask;
@@ -35,7 +35,7 @@ public abstract class OpenSapforVersionPass extends Pass_2021<SapforVersion_json
SapforTask task = target.task;
ShowMessage1("Построение дерева версий и создание баз данных...");
File rootHome = Paths.get(Global.getSetting(SettingName.Workspace).Value,
Utils.getDateName(task.test_description)).toFile();
CommonUtils.getDateName(task.test_description)).toFile();
for (SapforVersion_json version_json : task.versions) {
ShowMessage2(version_json.version);
version_json.createProject(rootHome);

View File

@@ -1,8 +1,8 @@
package Visual_DVM_2021.Passes.SSH;
import Common.Utils.CommonUtils;
import Common_old.Constants;
import Common_old.Current;
import _VisualDVM.Global;
import Common_old.Utils.Utils;
import GlobalData.Machine.Machine;
import GlobalData.Machine.MachineType;
import GlobalData.RemoteFile.RemoteFile;
@@ -66,7 +66,7 @@ public abstract class RepositoryServerSSHPass extends ConnectionPass {
user.connection.writeToFile("", INTERRUPT);
ShowMessage1("Ожидание остановки сервера тестирования");
do {
Utils.sleep(1000);
CommonUtils.sleep(1000);
ShowMessage2("Проверка признака остановки..");
} while (!user.connection.Exists(ABORTED));
//--