построение дерева версий результатов тестирования(еще с багами), и фикс мелкого бага

This commit is contained in:
2023-10-06 22:51:09 +03:00
parent 8f5945e560
commit 2eadbbd3fa
16 changed files with 227 additions and 37 deletions

View File

@@ -1,9 +1,9 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants;
import Common.Current;
import Common.UI.UI;
import Common.UI.Windows.Dialog.Text.FileNameForm;
import Common.Utils.Utils;
import ProjectData.Project.db_project_info;
import Visual_DVM_2021.Passes.ChangeFilePass;
import Visual_DVM_2021.Passes.PassException;
@@ -25,8 +25,8 @@ public class CreateEmptyDirectory extends ChangeFilePass {
Log.Writeln("Файл с именем " + Utils.Brackets(fileName) + " уже существует");
return false;
}
if (fileName.equalsIgnoreCase(db_project_info.data)) {
Log.Writeln(Utils.Brackets(db_project_info.data) + " является зарезервированным именем!");
if (fileName.equalsIgnoreCase(Constants.data)) {
Log.Writeln(Utils.Brackets(Constants.data) + " является зарезервированным именем!");
return false;
}
return true;

View File

@@ -1,8 +1,8 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants;
import Common.Global;
import Common.UI.Windows.Dialog.Text.FileNameForm;
import Common.Utils.Utils;
import ProjectData.Project.db_project_info;
import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.PassException;
import Visual_DVM_2021.Passes.Pass_2021;
@@ -35,7 +35,7 @@ public class CreateEmptyProject extends Pass_2021<File> {
}
@Override
protected void body() throws Exception {
File data = new File(target, db_project_info.data);
File data = new File(target, Constants.data);
if (!(target.mkdir()&&data.mkdir()))
throw new PassException("Не удалось создать проект.");
}

View File

@@ -19,7 +19,7 @@ public class EditSapforConfigurationCommand extends EditObjectPass<SapforConfig
}
@Override
protected boolean canStart(Object... args) throws Exception {
if (Current.Check(Log, Current.SapforConfiguration)) {
if (Current.Check(Log, Current.SapforConfigurationCommand)) {
return getTable().ShowEditObjectDialog(target = (SapforConfigurationCommand) Current.get(Current.SapforConfigurationCommand));
}
return false;

View File

@@ -1,4 +1,5 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants;
import Common.Current;
import Common.Global;
import Common.UI.DebugPrintLevel;
@@ -67,7 +68,7 @@ public class OpenCurrentProject extends Pass_2021<db_project_info> {
Log.Writeln_(Utils.Brackets(dir) + "\е является папкой!");
return false;
}
if (dir.getName().equals(db_project_info.data)) {
if (dir.getName().equals(Constants.data)) {
Log.Writeln_(Utils.Brackets(dir) + "\nявляется служебной папкой визуализатора!");
return false;
}

View File

@@ -169,8 +169,8 @@ public class OpenSapforTest extends Pass_2021<SapforTaskResult> {
Vector<MessageError> messages = new Vector<>();
//--
if (isTransformation) {
File p_out = Paths.get(project.Home.getAbsolutePath(), db_project_info.data, "parse_out.txt").toFile();
File out = Paths.get(project.Home.getAbsolutePath(), db_project_info.data, "out.txt").toFile();
File p_out = Paths.get(project.Home.getAbsolutePath(), Constants.data, "parse_out.txt").toFile();
File out = Paths.get(project.Home.getAbsolutePath(), Constants.data, "out.txt").toFile();
//--
if (p_out.exists()) {
project.Log += (FileUtils.readFileToString(p_out));

View File

@@ -1,4 +1,5 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants;
import Common.Current;
import Common.UI.UI;
import Common.Utils.Utils;
@@ -90,7 +91,7 @@ public class PublishTest extends TestingSystemPass<Test> {
}
project.Clone(src, false);
FileUtils.copyFile(project.db.getFile(), Paths.get(src.getAbsolutePath(),
db_project_info.data, project.db.getFile().getName()).toFile());
Constants.data, project.db.getFile().getName()).toFile());
//архивация.
File archive = Utils.getTempFileName("test_archive");
if (passes.get(PassCode_2021.ZipFolderPass).Do(src.getAbsolutePath(), archive.getAbsolutePath())) {