рефакторинг создания группы тестов из папки.попутно найден внесенный обновлением настроек баг.
This commit is contained in:
@@ -61,7 +61,7 @@ public class CreateGroupFromDirectory extends PublishTests {
|
||||
} else return false;
|
||||
//---------------
|
||||
Vector<File> files = new Vector<>(Arrays.asList(files_));
|
||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("ProjectsSearchDirectory", directoryChooser.getCurrentDirectory());
|
||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("ProjectsSearchDirectory", directoryChooser.getCurrentDirectory().getAbsolutePath());
|
||||
return super.canStart(files, group);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.VFileChooser;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
@@ -29,7 +30,7 @@ public class CreateGroupFromFiles extends PublishTests {
|
||||
return false;
|
||||
}
|
||||
File dir = fileChooser.getCurrentDirectory();
|
||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("ProjectsSearchDirectory", dir);
|
||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("ProjectsSearchDirectory", dir.getAbsolutePath());
|
||||
//---------------
|
||||
if (dir.getName().equals(Constants.data)) {
|
||||
Log.Writeln_(Utils_.Brackets(dir) + "\nявляется служебной папкой визуализатора!");
|
||||
|
||||
@@ -25,7 +25,7 @@ public class CreateTestsFromFiles extends PublishTests {
|
||||
Log.Writeln_("Не выбрано ни одного файла.");
|
||||
return false;
|
||||
}
|
||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("ProjectsSearchDirectory", fileChooser.getCurrentDirectory());
|
||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("ProjectsSearchDirectory", fileChooser.getCurrentDirectory().getAbsolutePath());
|
||||
return super.canStart(files, Global.testingServer.db.groups.getUI().getCurrent());
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -5,6 +5,7 @@ import Common.Visual.UI;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.Project.db_project_info;
|
||||
import _VisualDVM.Repository.Server.ServerCode;
|
||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
|
||||
import java.util.Vector;
|
||||
@@ -46,6 +47,7 @@ public class CreateTestsGroupFromSelectedVersions extends PublishTests {
|
||||
}
|
||||
//---
|
||||
return UI.Question("В группу " + Utils_.Brackets(group.description) +
|
||||
"\nбудет добавлено " + target.size() + " тестов.\nПродолжить");
|
||||
"\nбудет добавлено " + target.size() + " тестов.\nПродолжить")&&
|
||||
SendRequest(ServerCode.PublishObjects, null, target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import Common.Utils.Utils_;
|
||||
import Common.Visual.UI;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Passes.Server.TestingServerPass;
|
||||
import _VisualDVM.Passes.Server.TestingSystemPass_OLD;
|
||||
import _VisualDVM.Repository.Server.ServerCode;
|
||||
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
|
||||
@@ -12,7 +13,7 @@ import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Vector;
|
||||
public abstract class PublishTests extends TestingSystemPass_OLD<Vector<Test>> {
|
||||
public abstract class PublishTests extends TestingServerPass<Vector<Test>> {
|
||||
protected Group group;
|
||||
//----
|
||||
@Override
|
||||
@@ -24,14 +25,6 @@ public abstract class PublishTests extends TestingSystemPass_OLD<Vector<Test>> {
|
||||
return "/icons/AddFile.png";
|
||||
}
|
||||
@Override
|
||||
protected boolean needsAnimation() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.PublishObjects, null, target));
|
||||
}
|
||||
@Override
|
||||
protected void performFinish() throws Exception {
|
||||
super.performFinish();
|
||||
Global.mainModule.getPass(PassCode.SynchronizeTests).Do();
|
||||
@@ -45,7 +38,6 @@ public abstract class PublishTests extends TestingSystemPass_OLD<Vector<Test>> {
|
||||
protected String getNoFilesMessage() {
|
||||
return "";
|
||||
}
|
||||
;
|
||||
//--
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
@@ -71,6 +63,7 @@ public abstract class PublishTests extends TestingSystemPass_OLD<Vector<Test>> {
|
||||
}
|
||||
//---
|
||||
return UI.Question("В группу " + Utils_.Brackets(group.description) +
|
||||
"\nбудет добавлено " + target.size() + " тестов.\nПродолжить");
|
||||
"\nбудет добавлено " + target.size() + " тестов.\nПродолжить") &&
|
||||
SendRequest(ServerCode.PublishObjects, null, target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,6 +114,8 @@ public enum ServerCode {
|
||||
return "Проверка регистрации машины на сервере";
|
||||
case EmailBroadcast:
|
||||
return "Рассылка";
|
||||
case PublishObjects:
|
||||
return "Публикация объектов";
|
||||
default:
|
||||
return this.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user