no message
This commit is contained in:
@@ -334,8 +334,10 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
Vector<DBObject> objects = (Vector<DBObject>) request.object;
|
||||
for (DBObject dbObject: objects){
|
||||
System.out.println(db);
|
||||
beforePublishAction(dbObject);
|
||||
response.object = publishObject(dbObject);
|
||||
System.out.println(response.object);
|
||||
afterPublishAction(dbObject);
|
||||
}
|
||||
//ключи не возвращаем. пока не нужны.
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Constants;
|
||||
import Common.Current;
|
||||
import Common.Utils.Files.VDirectoryChooser;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import ProjectData.Files.ProjectFile;
|
||||
import ProjectData.Project.db_project_info;
|
||||
import Repository.Component.Sapfor.Sapfor;
|
||||
@@ -25,11 +26,11 @@ public class CreateTestFromFolder extends Pass_2021<Test> {
|
||||
}
|
||||
@Override
|
||||
protected boolean needsAnimation() {
|
||||
return true;
|
||||
return from_directory_chooser;
|
||||
}
|
||||
Group group = null;
|
||||
File dir = null;
|
||||
boolean from_directory_chooser;
|
||||
boolean from_directory_chooser=false;
|
||||
Vector<ProjectFile> project_files = new Vector<>();
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
@@ -37,17 +38,20 @@ public class CreateTestFromFolder extends Pass_2021<Test> {
|
||||
from_directory_chooser = true;
|
||||
if (!Current.Check(Log, Current.Group))
|
||||
return false;
|
||||
Utils.RestoreSelectedDirectory(directoryChooser);
|
||||
dir = directoryChooser.ShowDialog();
|
||||
group = Current.getGroup();
|
||||
if (dir == null) {
|
||||
if (from_directory_chooser) Log.Writeln_("Папка не выбрана.");
|
||||
return false;
|
||||
} else {
|
||||
Pass_2021.passes.get(PassCode_2021.UpdateSetting).Do(SettingName.ProjectsSearchDirectory, dir.getParent());
|
||||
}
|
||||
} else {
|
||||
from_directory_chooser = false;
|
||||
dir = (File) args[0];
|
||||
group = (Group) args[1];
|
||||
}
|
||||
if (dir == null) {
|
||||
if (from_directory_chooser) Log.Writeln_("Папка не выбрана.");
|
||||
return false;
|
||||
}
|
||||
//---
|
||||
File[] files = dir.listFiles();
|
||||
project_files = new Vector<>();
|
||||
@@ -144,9 +148,9 @@ public class CreateTestFromFolder extends Pass_2021<Test> {
|
||||
if (Sapfor.analysis(Current.getSapfor().getFile(), project.Home,
|
||||
PassCode_2021.SPF_GetMaxMinBlockDistribution,
|
||||
Current.getSapfor().getConsoleFlags())) {
|
||||
for (String line: Sapfor.outputLines){
|
||||
for (String line : Sapfor.outputLines) {
|
||||
String prefix = "GET_MIN_MAX_BLOCK_DIST: ";
|
||||
if (line.startsWith(prefix)){
|
||||
if (line.startsWith(prefix)) {
|
||||
String s = line.substring(prefix.length());
|
||||
System.out.println(Utils.Brackets(s));
|
||||
String[] data = s.split(" ");
|
||||
|
||||
@@ -5,6 +5,7 @@ import Common.Global;
|
||||
import Common.UI.UI;
|
||||
import Common.Utils.Utils;
|
||||
import ProjectData.Project.db_project_info;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
@@ -12,6 +13,7 @@ import java.util.Vector;
|
||||
public class CreateTestsGroupFromSelectedVersions extends Pass_2021<Vector<db_project_info>> {
|
||||
int group_id;
|
||||
int test_id;
|
||||
Vector<Test> tests = new Vector<>();
|
||||
@Override
|
||||
protected boolean needsAnimation() {
|
||||
return true;
|
||||
@@ -28,6 +30,7 @@ public class CreateTestsGroupFromSelectedVersions extends Pass_2021<Vector<db_pr
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
group_id = Constants.Nan;
|
||||
test_id = Constants.Nan;
|
||||
tests = new Vector<>();
|
||||
if (!Current.getAccount().CheckRegistered(Log))
|
||||
return false;
|
||||
if (!Global.versions_multiselection) {
|
||||
@@ -62,23 +65,23 @@ public class CreateTestsGroupFromSelectedVersions extends Pass_2021<Vector<db_pr
|
||||
"\nПродолжить");
|
||||
}
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
passes.get(PassCode_2021.CloseCurrentProject).Do();
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
UI.testingBar.ShowAutoCheckTesting();
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
/*
|
||||
ShowMessage1("Создание тестов");
|
||||
CreateTestFromFolder createTestFromFolder = (CreateTestFromFolder) passes.get(PassCode_2021.CreateTestFromFolder);
|
||||
PublishTests publishTests = (PublishTests) passes.get(PassCode_2021.PublishTests);
|
||||
for (db_project_info vizTestProject : target) {
|
||||
//на случай если версия в текущем сеансе еще не открывалась.
|
||||
vizTestProject.Open();
|
||||
vizTestProject.Close();
|
||||
if (!passes.get(PassCode_2021.PublishTest).Do(vizTestProject, Current.getGroup().id)) break;
|
||||
ShowMessage2(vizTestProject.name);
|
||||
if (createTestFromFolder.Do(vizTestProject.Home, Current.getGroup())) {
|
||||
tests.add(createTestFromFolder.target);
|
||||
} else break;
|
||||
}
|
||||
*/
|
||||
System.out.println("tests created " + tests.size());
|
||||
ShowMessage1("Публикация тестов");
|
||||
publishTests.Do(tests);
|
||||
}
|
||||
@Override
|
||||
protected void performFinish() throws Exception {
|
||||
|
||||
@@ -6,17 +6,17 @@ import Visual_DVM_2021.Passes.Server.TestingSystemPass;
|
||||
|
||||
import java.util.Vector;
|
||||
public class PublishTests extends TestingSystemPass<Vector<Test>> {
|
||||
@Override
|
||||
protected boolean needsAnimation() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = (Vector<Test>) args[0];
|
||||
return target != null && !target.isEmpty();
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.PublishObjects, "", target));
|
||||
}
|
||||
@Override
|
||||
protected void performFinish() throws Exception {
|
||||
super.performFinish();
|
||||
passes.get(server.db.getSynchronizePassCode()).Do();
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.PublishObjects, null, target));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user