no message
This commit is contained in:
11
.idea/workspace.xml
generated
11
.idea/workspace.xml
generated
@@ -7,8 +7,19 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforVersionComparisonForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Current.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Current.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/Json/SapforVersion_json.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/Json/SapforVersion_json.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageInterface.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageInterface.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageTree.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ComparisonForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ComparisonForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackageFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackageFields.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackageForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackageForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackagesComparisonForm.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackagesComparisonForm.form" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackagesComparisonForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackagesComparisonForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.form" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
||||
@@ -34,8 +34,10 @@ public enum Current {
|
||||
//--
|
||||
ServerSapfor,
|
||||
SapforTasksPackage,
|
||||
SapforEtalonTaskResult,//самый левый пакет
|
||||
SapforTaskResult,
|
||||
SapforEtalonVersion,//самый левый пакет
|
||||
SapforVersion,
|
||||
//--
|
||||
|
||||
//--
|
||||
ComponentServerBackup,
|
||||
Subscriber,
|
||||
@@ -391,10 +393,10 @@ public enum Current {
|
||||
return "Профиль SAPFOR";
|
||||
case SapforProfileSetting:
|
||||
return "Настройка профиля SAPFOR";
|
||||
case SapforEtalonTaskResult:
|
||||
return "Задача SAPFOR(Эталон)";
|
||||
case SapforTaskResult:
|
||||
return "Задача SAPFOR";
|
||||
case SapforEtalonVersion:
|
||||
return "Версия SAPFOR(Эталон)";
|
||||
case SapforVersion:
|
||||
return "Версия SAPFOR";
|
||||
case ComponentServerBackup:
|
||||
return "Версия компонента для восстановления с сервера";
|
||||
case Subscriber:
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package SapforTestingSystem.Json;
|
||||
import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
import java.nio.file.Paths;
|
||||
public class SapforVersion_json implements Serializable {
|
||||
@Expose
|
||||
public String version = "";
|
||||
@@ -15,4 +19,13 @@ public class SapforVersion_json implements Serializable {
|
||||
version = version_in.substring(root_in.length() + 1);
|
||||
description = description_in;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return Home.getName()+ " : "+ Utils.Brackets(description);
|
||||
}
|
||||
public File Home = null;
|
||||
public void initHome(File configurationRoot) {
|
||||
String relativePath = Global.isWindows ? Utils.toW(version) : version;
|
||||
Home = Paths.get(configurationRoot.getAbsolutePath(), relativePath).toFile();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,13 +52,14 @@ public class SapforTasksPackageInterface {
|
||||
res.add(flagsNode);
|
||||
return res;
|
||||
}
|
||||
public static DefaultMutableTreeNode getTaskVersionsTree(SapforTask task) {
|
||||
public static DefaultMutableTreeNode getTaskVersionsTree(File configurationRoot, SapforTask task) {
|
||||
DefaultMutableTreeNode root = null;
|
||||
DefaultMutableTreeNode child = null;
|
||||
DefaultMutableTreeNode parent = null;
|
||||
//--
|
||||
for (SapforVersion_json version_json : task.versions) {
|
||||
child = new DefaultMutableTreeNode(version_json.description);
|
||||
version_json.initHome(configurationRoot);
|
||||
child = new DefaultMutableTreeNode(version_json);
|
||||
if (parent == null) {
|
||||
root = child;
|
||||
parent = child;
|
||||
@@ -69,13 +70,15 @@ public class SapforTasksPackageInterface {
|
||||
}
|
||||
if (parent != null) {
|
||||
for (SapforVersion_json version_json : task.variants) {
|
||||
parent.add(new DefaultMutableTreeNode(version_json.description));
|
||||
version_json.initHome(configurationRoot);
|
||||
parent.add(new DefaultMutableTreeNode(version_json));
|
||||
}
|
||||
}
|
||||
//--
|
||||
return root;
|
||||
}
|
||||
public static DefaultMutableTreeNode getTreeRoot(SapforTasksPackage package_in) {
|
||||
|
||||
SapforTasksResults_json results_json = getLocalResults(package_in);
|
||||
//-- флаги группы
|
||||
LinkedHashMap<String, LinkedHashMap<String, Vector<SapforTask>>> tasksByConfigurations = results_json.sortTasksByConfigurationsAndGroups();
|
||||
@@ -97,7 +100,8 @@ public class SapforTasksPackageInterface {
|
||||
*/
|
||||
DefaultMutableTreeNode taskNode = new DefaultMutableTreeNode(task.test_description);
|
||||
//--
|
||||
taskNode.add(getTaskVersionsTree(task));
|
||||
taskNode.add(getTaskVersionsTree(
|
||||
new File(getLocalWorkspace(package_in), configuration_id), task));
|
||||
//--
|
||||
groupNode.add(taskNode);
|
||||
}
|
||||
|
||||
@@ -1,23 +1,47 @@
|
||||
package SapforTestingSystem.SapforTasksPackage;
|
||||
import Common.Current;
|
||||
import Common.UI.Trees.DataTree;
|
||||
import Common.UI.UI;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.TreePath;
|
||||
import java.io.File;
|
||||
public class SapforTasksPackageTree extends DataTree {
|
||||
public SapforTasksPackageTree(DefaultMutableTreeNode root_in) {
|
||||
Current current;
|
||||
public SapforTasksPackageTree(DefaultMutableTreeNode root_in, Current current_in) {
|
||||
super(root_in);
|
||||
// setRootVisible(false);
|
||||
// CollapseAll();
|
||||
current = current_in;
|
||||
// setRootVisible(false);
|
||||
// CollapseAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getStartLine() {
|
||||
return 1;
|
||||
}
|
||||
@Override
|
||||
public void SelectionAction(TreePath path) {}
|
||||
@Override
|
||||
public void LeftMouseAction2() {
|
||||
|
||||
}
|
||||
@Override
|
||||
public Current getCurrent() {
|
||||
return current;
|
||||
}
|
||||
@Override
|
||||
public void SelectionAction(TreePath e) {
|
||||
System.out.println("Select");
|
||||
DefaultMutableTreeNode node = (DefaultMutableTreeNode) e.getLastPathComponent();
|
||||
Current.set(Current.ProjectNode, node);
|
||||
Object o = node.getUserObject();
|
||||
if (o instanceof File) {
|
||||
Current.set(Current.SelectedDirectory, o);
|
||||
Current.set(Current.SelectedFile, null);
|
||||
UI.getMainWindow().getProjectWindow().ShowNoSelectedFile();
|
||||
} else if (o instanceof DBProjectFile) {
|
||||
Current.set(Current.SelectedFile, o);
|
||||
File file = ((DBProjectFile) o).file;
|
||||
Current.set(Current.SelectedDirectory, file.getParentFile());
|
||||
UI.getMainWindow().getProjectWindow().ShowSelectedFile();
|
||||
}
|
||||
UI.getMainWindow().getProjectWindow().ShowSelectedDirectory();
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import org.fife.ui.rtextarea.RTextScrollPane;
|
||||
import javax.swing.*;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public abstract class ComparisonForm<T extends DBObject> {
|
||||
public abstract class ComparisonForm<T> {
|
||||
public Class<T> t; //класс объектов.
|
||||
//-->>
|
||||
private JPanel content;
|
||||
@@ -289,8 +289,11 @@ public abstract class ComparisonForm<T extends DBObject> {
|
||||
lObjectName.setToolTipText("Объект не назначен.");
|
||||
}
|
||||
protected void showObject() {
|
||||
lObjectName.setText(object.getPK().toString());
|
||||
lObjectName.setToolTipText(object.getPK().toString());
|
||||
if (object instanceof DBObject) {
|
||||
DBObject dbObject = (DBObject) object;
|
||||
lObjectName.setText(dbObject.toString());
|
||||
lObjectName.setToolTipText(dbObject.toString());
|
||||
}
|
||||
}
|
||||
protected void removeObject() {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.UI.Windows.Dialog.DialogFields;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackageInterface;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackageTree;
|
||||
import Visual_DVM_2021.UI.Interface.FormWithSplitters;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -29,8 +27,11 @@ public class SapforPackageFields implements DialogFields, FormWithSplitters {
|
||||
object = object_in;
|
||||
//--
|
||||
lObjectName.setText(object.id);
|
||||
/*
|
||||
treePanel.add(
|
||||
new JScrollPane(
|
||||
new SapforTasksPackageTree(SapforTasksPackageInterface.getTreeRoot(object))));
|
||||
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,6 @@ import Common.UI.Windows.Dialog.Dialog;
|
||||
import Common.UI.Windows.FormType;
|
||||
import GlobalData.FormsParams.DBForm;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackageInterface;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackageTree;
|
||||
|
||||
import javax.swing.*;
|
||||
public class SapforPackageForm extends Dialog<SapforTasksPackage, SapforPackageFields> {
|
||||
SapforTasksPackage sapforTasksPackage = null;
|
||||
private DBForm info = null;
|
||||
@@ -25,9 +21,12 @@ public class SapforPackageForm extends Dialog<SapforTasksPackage, SapforPackageF
|
||||
public void Init(Object... params) {
|
||||
sapforTasksPackage = (SapforTasksPackage) params[0];
|
||||
fields.lObjectName.setText(sapforTasksPackage.id);
|
||||
/*
|
||||
fields.getTreePanel().add(
|
||||
new JScrollPane(
|
||||
new SapforTasksPackageTree(SapforTasksPackageInterface.getTreeRoot(sapforTasksPackage))));
|
||||
|
||||
*/
|
||||
/*
|
||||
if (Global.db.sapforProfiles.size() > 0) {
|
||||
for (Object key : Global.db.sapforProfiles.Data.keySet()) {
|
||||
|
||||
@@ -98,40 +98,12 @@
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="3287b" binding="SCZ">
|
||||
<grid id="24e20" binding="treePanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="250"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="4163a" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="fd8a7" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="5b6cf" binding="treePanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
|
||||
@@ -24,7 +24,6 @@ public class SapforPackagesComparisonForm {
|
||||
private JButton bNext;
|
||||
private JButton bCompare;
|
||||
private JButton bClose;
|
||||
private JSplitPane SCZ;
|
||||
private JPanel treePanel;
|
||||
//-->>
|
||||
SapforPackagesComparisonForm this_ = null; //?
|
||||
@@ -82,7 +81,9 @@ public class SapforPackagesComparisonForm {
|
||||
protected void showObject() {
|
||||
lObjectName.setText(object.getPK().toString() + (isMaster() ? "(эталон)" : ""));
|
||||
lObjectName.setToolTipText(object.getPK().toString());
|
||||
treePanel.add(new JScrollPane(new SapforTasksPackageTree(SapforTasksPackageInterface.getTreeRoot(object))));
|
||||
treePanel.add(new JScrollPane(new SapforTasksPackageTree(SapforTasksPackageInterface.getTreeRoot(object),
|
||||
isMaster()? Current.SapforEtalonVersion: Current.SapforVersion
|
||||
)));
|
||||
}
|
||||
protected String getText() {
|
||||
return "";
|
||||
|
||||
16
src/Visual_DVM_2021/UI/Main/SapforVersionComparisonForm.java
Normal file
16
src/Visual_DVM_2021/UI/Main/SapforVersionComparisonForm.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.Current;
|
||||
import SapforTestingSystem.Json.SapforVersion_json;
|
||||
public class SapforVersionComparisonForm extends ComparisonForm<SapforVersion_json> {
|
||||
public SapforVersionComparisonForm(SapforVersionComparisonForm slave_in) {
|
||||
super(SapforVersion_json.class, slave_in);
|
||||
}
|
||||
@Override
|
||||
protected Current getCurrentObjectName() {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
protected String getText() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -193,7 +193,7 @@
|
||||
<splitpane id="760d4" binding="SC56">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="250"/>
|
||||
<dividerLocation value="100"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
@@ -247,11 +247,54 @@
|
||||
<splitpane id="c2b4" binding="SC64">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="350"/>
|
||||
<dividerLocation value="400"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
<children>
|
||||
<splitpane id="8e1d0" binding="SC65">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="300"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="10a70" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
<splitpane id="e0ceb" binding="SC66">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="300"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="490c4" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
|
||||
@@ -22,6 +22,8 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
public JSplitPane SC63;
|
||||
public JSplitPane SC59;
|
||||
public JSplitPane SC64;
|
||||
public JSplitPane SC65;
|
||||
public JSplitPane SC66;
|
||||
//-
|
||||
//---
|
||||
private JTabbedPane testingTabs;
|
||||
@@ -66,8 +68,8 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
SC50.setLeftComponent(dvmTestingRunMaster.getContent());
|
||||
SC50.setRightComponent(dvmTestingRunSlave.getContent());
|
||||
//-
|
||||
SC64.setLeftComponent(sapforTestingMaster.getContent());
|
||||
SC64.setRightComponent(sapforTestingSlave.getContent());
|
||||
SC65.setLeftComponent(sapforTestingMaster.getContent());
|
||||
SC66.setLeftComponent(sapforTestingSlave.getContent());
|
||||
//-
|
||||
Global.testingServer.db.configurations.mountUI(configurationsPanel);
|
||||
Global.testingServer.account_db.packages.mountUI(packagesPanel);
|
||||
|
||||
Reference in New Issue
Block a user