no message
This commit is contained in:
3
.idea/workspace.xml
generated
3
.idea/workspace.xml
generated
@@ -7,7 +7,10 @@
|
|||||||
</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/SapforTestingSystem/SapforTasksPackage/UI/ConfigurationDescription.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/SapforTestingSystem/SapforTask/SapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTask/SapforTask.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageInterface.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageInterface.java" afterDir="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" />
|
||||||
|
|||||||
@@ -52,20 +52,6 @@ public class SapforTask extends DBObject {
|
|||||||
//-----------
|
//-----------
|
||||||
public SapforTask() {
|
public SapforTask() {
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
public static Vector<DefaultMutableTreeNode> getTaskConfigurationDescription(SapforTask task) {
|
|
||||||
Vector<DefaultMutableTreeNode> res = new Vector<>();
|
|
||||||
DefaultMutableTreeNode codesNode = new DefaultMutableTreeNode("Проходы");
|
|
||||||
Vector<String> codes = new Vector<>(Arrays.asList(task.codes.split(" ")));
|
|
||||||
for (String code_s : codes)
|
|
||||||
codesNode.add(new DefaultMutableTreeNode(PassCode_2021.valueOf(code_s).getDescription()));
|
|
||||||
res.add(codesNode);
|
|
||||||
DefaultMutableTreeNode flagsNode = new DefaultMutableTreeNode("Флаги");
|
|
||||||
flagsNode.add(new DefaultMutableTreeNode(task.flags));
|
|
||||||
res.add(flagsNode);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
public DefaultMutableTreeNode getVersionsTree(File configurationRoot) {
|
public DefaultMutableTreeNode getVersionsTree(File configurationRoot) {
|
||||||
DefaultMutableTreeNode root = null;
|
DefaultMutableTreeNode root = null;
|
||||||
DefaultMutableTreeNode child = null;
|
DefaultMutableTreeNode child = null;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import Common.Global;
|
|||||||
import Common.Utils.Utils;
|
import Common.Utils.Utils;
|
||||||
import SapforTestingSystem.Json.SapforTasksResults_json;
|
import SapforTestingSystem.Json.SapforTasksResults_json;
|
||||||
import SapforTestingSystem.SapforTask.SapforTask;
|
import SapforTestingSystem.SapforTask.SapforTask;
|
||||||
|
import SapforTestingSystem.SapforTasksPackage.UI.ConfigurationDescription;
|
||||||
|
|
||||||
import javax.swing.tree.DefaultMutableTreeNode;
|
import javax.swing.tree.DefaultMutableTreeNode;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -14,30 +15,25 @@ public class SapforTasksPackageInterface {
|
|||||||
public static File getPackageArchive(SapforTasksPackage package_in) {
|
public static File getPackageArchive(SapforTasksPackage package_in) {
|
||||||
return new File(Global.SapforPackagesDirectory, package_in.id + ".zip");
|
return new File(Global.SapforPackagesDirectory, package_in.id + ".zip");
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
getTaskConfigurationDescription(SapforTask task){
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
public static DefaultMutableTreeNode getTreeRoot(SapforTasksPackage package_in) {
|
public static DefaultMutableTreeNode getTreeRoot(SapforTasksPackage package_in) {
|
||||||
|
|
||||||
SapforTasksResults_json results_json = getLocalResults(package_in);
|
SapforTasksResults_json results_json = getLocalResults(package_in);
|
||||||
//-- флаги группы
|
//-- флаги группы
|
||||||
LinkedHashMap<String, LinkedHashMap<String, Vector<SapforTask>>> tasksByConfigurations = results_json.sortTasksByConfigurationsAndGroups();
|
LinkedHashMap<String, LinkedHashMap<String, Vector<SapforTask>>> tasksByConfigurations = results_json.sortTasksByConfigurationsAndGroups();
|
||||||
//--
|
//--
|
||||||
DefaultMutableTreeNode root = new DefaultMutableTreeNode(package_in.id);
|
DefaultMutableTreeNode root = new DefaultMutableTreeNode(package_in.id);
|
||||||
for (String configuration_id : tasksByConfigurations.keySet()) {
|
for (String configuration_id : tasksByConfigurations.keySet()) {
|
||||||
DefaultMutableTreeNode configurationNode = new DefaultMutableTreeNode(configuration_id);
|
//--
|
||||||
|
DefaultMutableTreeNode configurationNode = null;
|
||||||
|
//--
|
||||||
LinkedHashMap<String, Vector<SapforTask>> groups_tasks = tasksByConfigurations.get(configuration_id);
|
LinkedHashMap<String, Vector<SapforTask>> groups_tasks = tasksByConfigurations.get(configuration_id);
|
||||||
for (String group : groups_tasks.keySet()) {
|
for (String group : groups_tasks.keySet()) {
|
||||||
DefaultMutableTreeNode groupNode = new DefaultMutableTreeNode(group);
|
DefaultMutableTreeNode groupNode = new DefaultMutableTreeNode(group);
|
||||||
for (SapforTask task : groups_tasks.get(group)) {
|
for (SapforTask task : groups_tasks.get(group)) {
|
||||||
|
|
||||||
DefaultMutableTreeNode taskNode = new DefaultMutableTreeNode(task.test_description);
|
|
||||||
//--
|
//--
|
||||||
taskNode.add(task.getVersionsTree(new File(getLocalWorkspace(package_in), configuration_id)));
|
if (configurationNode == null)
|
||||||
|
configurationNode = new DefaultMutableTreeNode(new ConfigurationDescription(configuration_id, task));
|
||||||
//--
|
//--
|
||||||
groupNode.add(taskNode);
|
groupNode.add(task.getVersionsTree(new File(getLocalWorkspace(package_in), configuration_id)));
|
||||||
}
|
}
|
||||||
configurationNode.add(groupNode);
|
configurationNode.add(groupNode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package SapforTestingSystem.SapforTasksPackage.UI;
|
||||||
|
import Common.Utils.Utils;
|
||||||
|
import SapforTestingSystem.SapforTask.SapforTask;
|
||||||
|
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Vector;
|
||||||
|
public class ConfigurationDescription {
|
||||||
|
public String id = "";
|
||||||
|
public String text = "";
|
||||||
|
public ConfigurationDescription(String configuration_id, SapforTask task) {
|
||||||
|
id = configuration_id;
|
||||||
|
text = task.flags;
|
||||||
|
Vector<String> codes = new Vector<>(Arrays.asList(task.codes.split(" ")));
|
||||||
|
Vector<String> descriptions = new Vector<>();
|
||||||
|
for (int i = 1; i < codes.size(); ++i) {
|
||||||
|
descriptions.add(Utils.Brackets(PassCode_2021.valueOf(codes.get(i)).getDescription()));
|
||||||
|
}
|
||||||
|
text += " " + String.join("→", descriptions);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user