no message
This commit is contained in:
7
.idea/workspace.xml
generated
7
.idea/workspace.xml
generated
@@ -7,14 +7,15 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||||
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ShowCurrentDVMPackage.java" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SaveCurrentDVMPackage.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/ShowTestingPackage.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Test/TestDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Test/TestDBTable.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPackage/TestingPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPackage/TestingPackage.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPackage/TestingPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPackage/TestingPackage.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackageDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackageDBTable.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackageDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackageDBTable.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackagesBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackagesBar.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackagesBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackagesBar.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddTasksToDVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddTasksToDVMPackage.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ShowCurrentDVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ShowCurrentDVMPackage.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/ShowTestingPackage.java" beforeDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
package TestingSystem.Common.Test;
|
package TestingSystem.Common.Test;
|
||||||
import Common.Current;
|
import Common.Current;
|
||||||
import Common.Database.iDBTable;
|
import Common.Database.iDBTable;
|
||||||
|
import Common.Global;
|
||||||
import Common.UI.DataSetControlForm;
|
import Common.UI.DataSetControlForm;
|
||||||
import Common.UI.Windows.Dialog.DBObjectDialog;
|
import Common.UI.Windows.Dialog.DBObjectDialog;
|
||||||
|
import TestingSystem.Common.Group.Group;
|
||||||
import TestingSystem.Common.Test.UI.TestFields;
|
import TestingSystem.Common.Test.UI.TestFields;
|
||||||
|
|
||||||
|
import java.util.Vector;
|
||||||
public class TestDBTable extends iDBTable<Test> {
|
public class TestDBTable extends iDBTable<Test> {
|
||||||
public TestDBTable() {
|
public TestDBTable() {
|
||||||
super(Test.class);
|
super(Test.class);
|
||||||
@@ -108,4 +112,16 @@ public class TestDBTable extends iDBTable<Test> {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
public Vector<Test> getSelectedGroupTests(Group group) {
|
||||||
|
Vector<Test> allTests = new Vector<>();
|
||||||
|
Vector<Test> selectedTests = new Vector<>();
|
||||||
|
//--
|
||||||
|
for (Test test : Data.values()) {
|
||||||
|
if (test.group_id == group.id) {
|
||||||
|
allTests.add(test);
|
||||||
|
if (test.isSelected()) selectedTests.add(test);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return selectedTests.isEmpty()?allTests:selectedTests;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -34,6 +34,18 @@ public abstract class TestingPackage<J> extends riDBObject {
|
|||||||
public String packedGroups = "";
|
public String packedGroups = "";
|
||||||
@Description("DEFAULT ''")
|
@Description("DEFAULT ''")
|
||||||
public String packedTests = "";
|
public String packedTests = "";
|
||||||
|
//----
|
||||||
|
@Description("DEFAULT ''")
|
||||||
|
public String configurationsNames = "";
|
||||||
|
@Description("DEFAULT ''")
|
||||||
|
public String groupsNames = "";
|
||||||
|
//----
|
||||||
|
@Description("DEFAULT 0")
|
||||||
|
public int configurationsCount = 0;
|
||||||
|
@Description("DEFAULT 0")
|
||||||
|
public int groupsCount = 0;
|
||||||
|
@Description("DEFAULT 0")
|
||||||
|
public int testsCount = 0;
|
||||||
//--
|
//--
|
||||||
public TasksPackageState state = TasksPackageState.Draft;
|
public TasksPackageState state = TasksPackageState.Draft;
|
||||||
//--
|
//--
|
||||||
@@ -54,10 +66,16 @@ public abstract class TestingPackage<J> extends riDBObject {
|
|||||||
connectionErrosCount = tp.connectionErrosCount;
|
connectionErrosCount = tp.connectionErrosCount;
|
||||||
state = tp.state;
|
state = tp.state;
|
||||||
//--
|
//--
|
||||||
packedConfigurations=tp.packedConfigurations;
|
packedConfigurations = tp.packedConfigurations;
|
||||||
packedGroups=tp.packedGroups;
|
packedGroups = tp.packedGroups;
|
||||||
packedTests=tp.packedTests;
|
packedTests = tp.packedTests;
|
||||||
//--
|
//--
|
||||||
|
configurationsCount = tp.configurationsCount;
|
||||||
|
groupsCount = tp.groupsCount;
|
||||||
|
testsCount = tp.testsCount;
|
||||||
|
//--
|
||||||
|
groupsNames = tp.groupsNames;
|
||||||
|
configurationsNames = tp.configurationsNames;
|
||||||
}
|
}
|
||||||
public TestingPackage(TestingPackage p) {
|
public TestingPackage(TestingPackage p) {
|
||||||
SynchronizeFields(p);
|
SynchronizeFields(p);
|
||||||
@@ -142,44 +160,44 @@ public abstract class TestingPackage<J> extends riDBObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
public void addConfigurations(Vector<Configuration> new_configurations){
|
public void addConfigurations(Vector<Configuration> new_configurations) {
|
||||||
Vector<String> res= Utils.unpack_s(packedConfigurations);
|
Vector<String> res = Utils.unpack_s(packedConfigurations);
|
||||||
//---
|
//---
|
||||||
System.out.println("old_configs "+res.size());
|
System.out.println("old_configs " + res.size());
|
||||||
for(String id_: res){
|
for (String id_ : res) {
|
||||||
System.out.println(Utils.Brackets(id_));
|
System.out.println(Utils.Brackets(id_));
|
||||||
}
|
}
|
||||||
//---
|
//---
|
||||||
for (Configuration configuration: new_configurations){
|
for (Configuration configuration : new_configurations) {
|
||||||
String id_ = String.valueOf(configuration.id);
|
String id_ = String.valueOf(configuration.id);
|
||||||
if (!res.contains(id_))
|
if (!res.contains(id_))
|
||||||
res.add(id_);
|
res.add(id_);
|
||||||
}
|
}
|
||||||
packedConfigurations= String.join("\n", res );
|
packedConfigurations = String.join("\n", res);
|
||||||
System.out.println("new_configs="+res.size());
|
System.out.println("new_configs=" + res.size());
|
||||||
for(String id_: res){
|
for (String id_ : res) {
|
||||||
System.out.println(Utils.Brackets(id_));
|
System.out.println(Utils.Brackets(id_));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void addGroups(Vector<Group> new_groups){
|
public void addGroups(Vector<Group> new_groups) {
|
||||||
Vector<String> res= Utils.unpack_s(packedGroups);
|
Vector<String> res = Utils.unpack_s(packedGroups);
|
||||||
//---
|
//---
|
||||||
for (Group group: new_groups){
|
for (Group group : new_groups) {
|
||||||
String id_ = String.valueOf(group.id);
|
String id_ = String.valueOf(group.id);
|
||||||
if (!res.contains(id_))
|
if (!res.contains(id_))
|
||||||
res.add(id_);
|
res.add(id_);
|
||||||
}
|
}
|
||||||
packedGroups= String.join("\n", res );
|
packedGroups = String.join("\n", res);
|
||||||
}
|
}
|
||||||
public void addTests(Vector<Test> new_tests){
|
public void addTests(Vector<Test> new_tests) {
|
||||||
Vector<String> res= Utils.unpack_s(packedTests);
|
Vector<String> res = Utils.unpack_s(packedTests);
|
||||||
//---
|
//---
|
||||||
for (Test test: new_tests){
|
for (Test test : new_tests) {
|
||||||
String id_ = String.valueOf(test.id);
|
String id_ = String.valueOf(test.id);
|
||||||
if (!res.contains(id_))
|
if (!res.contains(id_))
|
||||||
res.add(id_);
|
res.add(id_);
|
||||||
}
|
}
|
||||||
packedTests= String.join("\n", res );
|
packedTests = String.join("\n", res);
|
||||||
}
|
}
|
||||||
//------------------------------------------------------->>>
|
//------------------------------------------------------->>>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
package TestingSystem.DVM.DVMPackage;
|
package TestingSystem.DVM.DVMPackage;
|
||||||
import Common.Current;
|
import Common.Current;
|
||||||
import Common.Database.*;
|
import Common.Database.iDBTable;
|
||||||
import Common.Global;
|
import Common.Global;
|
||||||
import Common.UI.DataSetControlForm;
|
import Common.UI.DataSetControlForm;
|
||||||
import Common.UI.UI;
|
import Common.UI.UI;
|
||||||
import TestingSystem.DVM.DVMTasks.DVMCompilationTask;
|
import TestingSystem.Common.TestingPackage.TestingPackage;
|
||||||
import TestingSystem.DVM.DVMTasks.DVMRunTask;
|
|
||||||
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
|
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Vector;
|
||||||
|
|
||||||
import static Common.UI.Tables.TableRenderers.*;
|
import static Common.UI.Tables.TableRenderers.*;
|
||||||
public class DVMPackageDBTable extends iDBTable<DVMPackage> {
|
public class DVMPackageDBTable extends iDBTable<DVMPackage> {
|
||||||
@@ -39,10 +39,12 @@ public class DVMPackageDBTable extends iDBTable<DVMPackage> {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void AdditionalInitColumns() {
|
protected void AdditionalInitColumns() {
|
||||||
columns.get(8).setRenderer(RendererProgress);
|
columns.get(6).setRenderer(RendererMultiline);
|
||||||
columns.get(9).setRenderer(RendererDate);
|
columns.get(7).setRenderer(RendererMultiline);
|
||||||
columns.get(10).setRenderer(RendererDate);
|
columns.get(11).setRenderer(RendererProgress);
|
||||||
columns.get(11).setRenderer(RendererStatusEnum);
|
columns.get(12).setRenderer(RendererDate);
|
||||||
|
columns.get(13).setRenderer(RendererDate);
|
||||||
|
columns.get(14).setRenderer(RendererStatusEnum);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void ShowCurrentObject() throws Exception {
|
public void ShowCurrentObject() throws Exception {
|
||||||
@@ -64,12 +66,15 @@ public class DVMPackageDBTable extends iDBTable<DVMPackage> {
|
|||||||
public String[] getUIColumnNames() {
|
public String[] getUIColumnNames() {
|
||||||
return new String[]{
|
return new String[]{
|
||||||
"Автор",
|
"Автор",
|
||||||
|
|
||||||
"Машина",
|
"Машина",
|
||||||
"Пользователь",
|
"Пользователь",
|
||||||
"DVM",
|
"DVM",
|
||||||
|
//-
|
||||||
|
"конфигурации",
|
||||||
|
"группы",
|
||||||
|
"тестов",
|
||||||
|
//-
|
||||||
"Задач",
|
"Задач",
|
||||||
|
|
||||||
"Ядер",
|
"Ядер",
|
||||||
"Прогресс",
|
"Прогресс",
|
||||||
"Начало",
|
"Начало",
|
||||||
@@ -77,6 +82,15 @@ public class DVMPackageDBTable extends iDBTable<DVMPackage> {
|
|||||||
"Статус"
|
"Статус"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
public static Vector<String> getConfigurationsNames(TestingPackage object){
|
||||||
|
String[] data = object.configurationsNames.split(";");
|
||||||
|
return new Vector<String>(Arrays.asList(data));
|
||||||
|
}
|
||||||
|
public static Vector<String> getGroupsNames(TestingPackage object){
|
||||||
|
String[] data = object.groupsNames.split(";");
|
||||||
|
return new Vector<String>(Arrays.asList(data));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getFieldAt(DVMPackage object, int columnIndex) {
|
public Object getFieldAt(DVMPackage object, int columnIndex) {
|
||||||
switch (columnIndex) {
|
switch (columnIndex) {
|
||||||
@@ -89,16 +103,22 @@ public class DVMPackageDBTable extends iDBTable<DVMPackage> {
|
|||||||
case 5:
|
case 5:
|
||||||
return object.version;
|
return object.version;
|
||||||
case 6:
|
case 6:
|
||||||
return object.tasksCount;
|
return getConfigurationsNames(object);
|
||||||
case 7:
|
case 7:
|
||||||
return object.kernels;
|
return getGroupsNames(object);
|
||||||
case 8:
|
case 8:
|
||||||
return object.progress;
|
return object.testsCount;
|
||||||
case 9:
|
case 9:
|
||||||
return new Date(object.StartDate);
|
return object.tasksCount;
|
||||||
case 10:
|
case 10:
|
||||||
return new Date(object.ChangeDate);
|
return object.kernels;
|
||||||
case 11:
|
case 11:
|
||||||
|
return object.progress;
|
||||||
|
case 12:
|
||||||
|
return new Date(object.StartDate);
|
||||||
|
case 13:
|
||||||
|
return new Date(object.ChangeDate);
|
||||||
|
case 14:
|
||||||
return object.state;
|
return object.state;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
@@ -109,7 +129,7 @@ public class DVMPackageDBTable extends iDBTable<DVMPackage> {
|
|||||||
return new Comparator<DVMPackage>() {
|
return new Comparator<DVMPackage>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(DVMPackage o1, DVMPackage o2) {
|
public int compare(DVMPackage o1, DVMPackage o2) {
|
||||||
return o2.id-o1.id;
|
return o2.id - o1.id;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// return Comparator.comparingInt(o -> o.).reversed();
|
// return Comparator.comparingInt(o -> o.).reversed();
|
||||||
|
|||||||
@@ -12,9 +12,15 @@ public class DVMPackagesBar extends DataMenuBar {
|
|||||||
addPasses(PassCode_2021.SynchronizeTests);
|
addPasses(PassCode_2021.SynchronizeTests);
|
||||||
addSeparator();
|
addSeparator();
|
||||||
//addMenus(new AddDVMPackageMenu());
|
//addMenus(new AddDVMPackageMenu());
|
||||||
addPasses(PassCode_2021.AddDVMPackage, PassCode_2021.AddTasksToDVMPackage);
|
addPasses(PassCode_2021.AddDVMPackage
|
||||||
|
|
||||||
|
// PassCode_2021.AddTasksToDVMPackage
|
||||||
|
);
|
||||||
addSeparator();
|
addSeparator();
|
||||||
addPasses(PassCode_2021.ShowCurrentDVMPackage, PassCode_2021.CloneDVMPackage);
|
addPasses(PassCode_2021.ShowCurrentDVMPackage, PassCode_2021.SaveCurrentDVMPackage
|
||||||
|
|
||||||
|
// PassCode_2021.CloneDVMPackage
|
||||||
|
);
|
||||||
addSeparator();
|
addSeparator();
|
||||||
addPasses(PassCode_2021.DeleteDVMPackage);
|
addPasses(PassCode_2021.DeleteDVMPackage);
|
||||||
addSeparator();
|
addSeparator();
|
||||||
|
|||||||
79
src/Visual_DVM_2021/Passes/All/SaveCurrentDVMPackage.java
Normal file
79
src/Visual_DVM_2021/Passes/All/SaveCurrentDVMPackage.java
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
package Visual_DVM_2021.Passes.All;
|
||||||
|
import Common.Constants;
|
||||||
|
import Common.Current;
|
||||||
|
import Common.Global;
|
||||||
|
import Common.Utils.Utils;
|
||||||
|
import TestingSystem.Common.Group.Group;
|
||||||
|
import TestingSystem.Common.Test.Test;
|
||||||
|
import TestingSystem.DVM.Configuration.Configuration;
|
||||||
|
import TestingSystem.DVM.DVMPackage.DVMPackage;
|
||||||
|
import Visual_DVM_2021.Passes.Pass_2021;
|
||||||
|
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Vector;
|
||||||
|
public class SaveCurrentDVMPackage extends Pass_2021<DVMPackage> {
|
||||||
|
//--
|
||||||
|
Vector<Configuration> configurations;
|
||||||
|
Vector<Group> groups;
|
||||||
|
Vector<Test> tests;
|
||||||
|
//--
|
||||||
|
Vector<String> configurationsNames;
|
||||||
|
Vector<String> groupsNames;
|
||||||
|
//--
|
||||||
|
@Override
|
||||||
|
public String getIconPath() {
|
||||||
|
return "/icons/Save.png";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getButtonText() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected boolean canStart(Object... args) throws Exception {
|
||||||
|
target = null;
|
||||||
|
configurations = new Vector<>();
|
||||||
|
//---
|
||||||
|
groups = new Vector<>();
|
||||||
|
tests = new Vector<>();
|
||||||
|
//---
|
||||||
|
configurationsNames = new Vector<>();
|
||||||
|
groupsNames = new Vector<>();
|
||||||
|
//---
|
||||||
|
if (!Current.Check(Log, Current.DVMPackage)) return false;
|
||||||
|
//--
|
||||||
|
target = Current.getDVMPackage();
|
||||||
|
for (Configuration configuration : Global.testingServer.db.configurations.getCheckedItems()) {
|
||||||
|
configurations.add(configuration);
|
||||||
|
configurationsNames.add(configuration.description);
|
||||||
|
}
|
||||||
|
for (Group group : Global.testingServer.db.groups.getCheckedItems()) {
|
||||||
|
groups.add(group);
|
||||||
|
groupsNames.add(group.description);
|
||||||
|
tests.addAll(Global.testingServer.db.tests.getSelectedGroupTests(group));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
//проход не создает задачи. Проход просто фиксирует конфигурации группы и тесты.
|
||||||
|
@Override
|
||||||
|
protected void body() throws Exception {
|
||||||
|
target.addConfigurations(configurations);
|
||||||
|
target.addGroups(groups);
|
||||||
|
target.addTests(tests);
|
||||||
|
//--
|
||||||
|
target.configurationsCount = configurations.size();
|
||||||
|
target.groupsCount = groups.size();
|
||||||
|
target.testsCount = tests.size();
|
||||||
|
//--
|
||||||
|
target.configurationsNames = String.join(";", configurationsNames);
|
||||||
|
target.groupsNames = String.join(";", groupsNames);
|
||||||
|
//--
|
||||||
|
if (target.id != Constants.Nan)
|
||||||
|
Global.testingServer.db.Update(target);
|
||||||
|
//--
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void showDone() throws Exception {
|
||||||
|
Global.testingServer.db.dvmPackages.ShowUI(target.id);
|
||||||
|
Global.testingServer.db.dvmRunTasks.ShowDVMPackage(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,75 @@
|
|||||||
package Visual_DVM_2021.Passes.All;
|
package Visual_DVM_2021.Passes.All;
|
||||||
import Common.Current;
|
import Common.Current;
|
||||||
|
import Common.Global;
|
||||||
|
import TestingSystem.Common.Group.Group;
|
||||||
|
import TestingSystem.Common.Test.Test;
|
||||||
import TestingSystem.Common.TestingPackage.TestingPackage;
|
import TestingSystem.Common.TestingPackage.TestingPackage;
|
||||||
|
import TestingSystem.DVM.Configuration.Configuration;
|
||||||
|
import TestingSystem.DVM.DVMPackage.DVMPackage;
|
||||||
import Visual_DVM_2021.Passes.Pass_2021;
|
import Visual_DVM_2021.Passes.Pass_2021;
|
||||||
import Visual_DVM_2021.Passes.ShowTestingPackage;
|
|
||||||
public class ShowCurrentDVMPackage extends ShowTestingPackage {
|
import java.util.Vector;
|
||||||
|
public class ShowCurrentDVMPackage extends Pass_2021<DVMPackage> {
|
||||||
@Override
|
@Override
|
||||||
public Current currentName() {
|
public String getIconPath() {
|
||||||
return Current.DVMPackage;
|
return "/icons/LastOpened.png";
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public String getButtonText() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
public Current currentName(){return Current.DVMPackage;};
|
||||||
|
@Override
|
||||||
|
protected boolean canStart(Object... args) throws Exception {
|
||||||
|
target = null;
|
||||||
|
if (Current.Check(Log, Current.DVMPackage)) {
|
||||||
|
target = Current.getDVMPackage();
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -342,14 +342,16 @@ public enum PassCode_2021 {
|
|||||||
ShowSapforCompilationOut,
|
ShowSapforCompilationOut,
|
||||||
ShowSapforCompilationErr,
|
ShowSapforCompilationErr,
|
||||||
GetOldBugReports,
|
GetOldBugReports,
|
||||||
ShowCurrentDVMPackage
|
ShowCurrentDVMPackage,
|
||||||
|
SaveCurrentDVMPackage
|
||||||
;
|
;
|
||||||
//--
|
//--
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case Undefined:
|
case Undefined:
|
||||||
return "?";
|
return "?";
|
||||||
|
case SaveCurrentDVMPackage:
|
||||||
|
return "Сохранить текущий пакет тестирования DVM";
|
||||||
case ShowCurrentDVMPackage:
|
case ShowCurrentDVMPackage:
|
||||||
return "Показать состав пакета тестирования DVM";
|
return "Показать состав пакета тестирования DVM";
|
||||||
case GetOldBugReports:
|
case GetOldBugReports:
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
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