no message
This commit is contained in:
@@ -53,6 +53,11 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
ChangeDate = tp.ChangeDate;
|
||||
connectionErrosCount = tp.connectionErrosCount;
|
||||
state = tp.state;
|
||||
//--
|
||||
packedConfigurations=tp.packedConfigurations;
|
||||
packedGroups=tp.packedGroups;
|
||||
packedTests=tp.packedTests;
|
||||
//--
|
||||
}
|
||||
public TestingPackage(TestingPackage p) {
|
||||
SynchronizeFields(p);
|
||||
@@ -106,6 +111,7 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
res.add(Global.testingServer.db.tests.get(o_id));
|
||||
return res;
|
||||
}
|
||||
/*
|
||||
public void printCGT() {
|
||||
try {
|
||||
System.out.println("package="+id);
|
||||
@@ -135,6 +141,7 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
*/
|
||||
public void addConfigurations(Vector<Configuration> new_configurations){
|
||||
Vector<String> res= Utils.unpack_s(packedConfigurations);
|
||||
//---
|
||||
|
||||
@@ -51,33 +51,12 @@ public class DVMPackageDBTable extends iDBTable<DVMPackage> {
|
||||
Global.testingServer.db.dvmRunTasks.ShowDVMPackage(getCurrent());
|
||||
UI.getMainWindow().getTestingWindow().DropTestRunTasksComparison();
|
||||
//--
|
||||
System.out.println("show dvmpackage");
|
||||
if (getCurrent().package_json!=null){
|
||||
getCurrent().printCGT();
|
||||
}
|
||||
// Global.testingServer.db.UnselectAllGTC();
|
||||
//отметить все группы, тесты, конфигурации, что относятся к пакету.
|
||||
|
||||
/*
|
||||
if (getCurrent().package_json != null) {
|
||||
for (DVMCompilationTask compilationTask : getCurrent().package_json.compilationTasks) {
|
||||
for (DVMRunTask runTask : compilationTask.runTasks) {
|
||||
Data.put(runTask.id, runTask);
|
||||
}
|
||||
}
|
||||
ShowUI();
|
||||
//--
|
||||
}
|
||||
*/
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
Global.testingServer.db.dvmRunTasks.ShowNoPackage();
|
||||
UI.getMainWindow().getTestingWindow().DropTestRunTasksComparison();
|
||||
//--
|
||||
System.out.println("show no dvmpackage");
|
||||
// Global.testingServer.db.UnselectAllGTC();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public class DVMPackagesBar extends DataMenuBar {
|
||||
//addMenus(new AddDVMPackageMenu());
|
||||
addPasses(PassCode_2021.AddDVMPackage, PassCode_2021.AddTasksToDVMPackage);
|
||||
addSeparator();
|
||||
addPasses(PassCode_2021.CloneDVMPackage);
|
||||
addPasses(PassCode_2021.ShowCurrentDVMPackage, PassCode_2021.CloneDVMPackage);
|
||||
addSeparator();
|
||||
addPasses(PassCode_2021.DeleteDVMPackage);
|
||||
addSeparator();
|
||||
|
||||
@@ -181,7 +181,7 @@ public class AddTasksToDVMPackage extends Pass_2021<DVMPackage> {
|
||||
target.tasksCount += tasks_count;
|
||||
Global.testingServer.db.Update(target);
|
||||
//--
|
||||
target.printCGT();
|
||||
// target.printCGT();
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
|
||||
11
src/Visual_DVM_2021/Passes/All/ShowCurrentDVMPackage.java
Normal file
11
src/Visual_DVM_2021/Passes/All/ShowCurrentDVMPackage.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import TestingSystem.Common.TestingPackage.TestingPackage;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import Visual_DVM_2021.Passes.ShowTestingPackage;
|
||||
public class ShowCurrentDVMPackage extends ShowTestingPackage {
|
||||
@Override
|
||||
public Current currentName() {
|
||||
return Current.DVMPackage;
|
||||
}
|
||||
}
|
||||
@@ -341,12 +341,17 @@ public enum PassCode_2021 {
|
||||
//--
|
||||
ShowSapforCompilationOut,
|
||||
ShowSapforCompilationErr,
|
||||
GetOldBugReports;
|
||||
GetOldBugReports,
|
||||
ShowCurrentDVMPackage
|
||||
|
||||
;
|
||||
//--
|
||||
public String getDescription() {
|
||||
switch (this) {
|
||||
case Undefined:
|
||||
return "?";
|
||||
case ShowCurrentDVMPackage:
|
||||
return "Показать состав пакета тестирования DVM";
|
||||
case GetOldBugReports:
|
||||
return "Получить неиспользуемые баг репорты";
|
||||
case SPF_RenameIncludes:
|
||||
|
||||
72
src/Visual_DVM_2021/Passes/ShowTestingPackage.java
Normal file
72
src/Visual_DVM_2021/Passes/ShowTestingPackage.java
Normal file
@@ -0,0 +1,72 @@
|
||||
package Visual_DVM_2021.Passes;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import TestingSystem.Common.Group.Group;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import TestingSystem.Common.TestingPackage.TestingPackage;
|
||||
import TestingSystem.DVM.Configuration.Configuration;
|
||||
|
||||
import java.util.Vector;
|
||||
public abstract class ShowTestingPackage extends Pass_2021<TestingPackage> {
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/LastOpened.png";
|
||||
}
|
||||
@Override
|
||||
public String getButtonText() {
|
||||
return "";
|
||||
}
|
||||
public abstract Current currentName();
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = null;
|
||||
if (Current.Check(Log, currentName())) {
|
||||
target = (TestingPackage) Current.get(currentName());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
Global.testingServer.db.UnselectAllGTC();
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
System.out.println("package="+target.id);
|
||||
Vector<Configuration> configurations = target.getConfigurations();
|
||||
Vector<Group> groups = target.getGroups();
|
||||
Vector<Test> tests = target.getTests();
|
||||
//-----
|
||||
Vector<String> res = new Vector<>();
|
||||
res.add("конфигурации: " + configurations.size());
|
||||
for (Configuration configuration : configurations)
|
||||
res.add(configuration.description);
|
||||
//--
|
||||
res.add("группы: " + groups.size());
|
||||
for (Group group : groups)
|
||||
res.add(group.description);
|
||||
//--
|
||||
res.add("тесты: " + tests.size());
|
||||
for (Test test : tests)
|
||||
res.add(test.description);
|
||||
System.out.println(String.join("\n", res));
|
||||
//--
|
||||
for (Configuration configuration: configurations)
|
||||
configuration.Select(true);
|
||||
for (Group group: groups)
|
||||
group.Select(true);
|
||||
for (Test test: tests)
|
||||
test.Select(true);
|
||||
//--
|
||||
|
||||
if (!groups.isEmpty()){
|
||||
Global.testingServer.db.groups.ShowUI(groups.lastElement().id);
|
||||
}
|
||||
if (!tests.isEmpty()){
|
||||
Global.testingServer.db.tests.ShowUI(tests.lastElement().id);
|
||||
}
|
||||
if (!configurations.isEmpty()){
|
||||
Global.testingServer.db.configurations.ShowUI(configurations.lastElement().id);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user