no message
This commit is contained in:
1
.idea/workspace.xml
generated
1
.idea/workspace.xml
generated
@@ -9,7 +9,6 @@
|
|||||||
<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 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/SapforTasksPackage/UI/SapforTasksPackageTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/UI/SapforTasksPackageTree.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/UI/SapforTasksPackageTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/UI/SapforTasksPackageTree.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/UI/VersionSummary.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/UI/VersionSummary.java" 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/SapforPackagesComparisonForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackagesComparisonForm.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
|||||||
@@ -36,29 +36,20 @@ public class SapforTasksPackageTree extends DataTree {
|
|||||||
public void selectSamePath_r(TreePath example, int index, DefaultMutableTreeNode node, Vector<DefaultMutableTreeNode> res) {
|
public void selectSamePath_r(TreePath example, int index, DefaultMutableTreeNode node, Vector<DefaultMutableTreeNode> res) {
|
||||||
if (index < example.getPathCount()) {
|
if (index < example.getPathCount()) {
|
||||||
DefaultMutableTreeNode exampleNode = (DefaultMutableTreeNode) example.getPathComponent(index);
|
DefaultMutableTreeNode exampleNode = (DefaultMutableTreeNode) example.getPathComponent(index);
|
||||||
// System.out.println("index = "+index);
|
|
||||||
// System.out.println("example node="+exampleNode.toString());
|
|
||||||
// System.out.println("node-"+node.toString());
|
|
||||||
// System.out.println("");
|
|
||||||
if (exampleNode.toString().equals(node.toString())) {
|
if (exampleNode.toString().equals(node.toString())) {
|
||||||
res.add(node);
|
res.add(node);
|
||||||
// System.out.println("+");
|
|
||||||
for (int i = 0; i < node.getChildCount(); ++i)
|
for (int i = 0; i < node.getChildCount(); ++i)
|
||||||
selectSamePath_r(example, index+1, (DefaultMutableTreeNode) node.getChildAt(i), res);
|
selectSamePath_r(example, index + 1, (DefaultMutableTreeNode) node.getChildAt(i), res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void selectSamePath(TreePath path_in) {
|
public void selectSamePath(TreePath path_in) {
|
||||||
// int i = path_in.getPath().length;
|
|
||||||
// path_in.getPathComponent(i).toString();
|
|
||||||
// System.out.println("e = " + path_in);
|
|
||||||
Vector<DefaultMutableTreeNode> pathNodes = new Vector<>();
|
Vector<DefaultMutableTreeNode> pathNodes = new Vector<>();
|
||||||
selectSamePath_r(path_in, 0, root, pathNodes);
|
selectSamePath_r(path_in, 0, root, pathNodes);
|
||||||
// System.out.println("+");
|
if (!pathNodes.isEmpty()) {
|
||||||
TreePath path = new TreePath(pathNodes.toArray());
|
TreePath path = new TreePath(pathNodes.toArray());
|
||||||
// System.out.println(path);
|
setSelectionPath(path);
|
||||||
setSelectionPath(path);
|
}
|
||||||
// System.out.println("++");
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void SelectionAction(TreePath e) {
|
public void SelectionAction(TreePath e) {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package Visual_DVM_2021.UI.Main;
|
package Visual_DVM_2021.UI.Main;
|
||||||
import Common.Current;
|
import Common.Current;
|
||||||
import Common.UI.DataSetControlForm;
|
|
||||||
import Common.UI.Label.ShortLabel;
|
import Common.UI.Label.ShortLabel;
|
||||||
import Common.UI.Menus_2023.VisualiserMenuBar;
|
import Common.UI.Menus_2023.VisualiserMenuBar;
|
||||||
import Common.UI.UI;
|
import Common.UI.UI;
|
||||||
@@ -13,6 +12,7 @@ import Visual_DVM_2021.Passes.Pass_2021;
|
|||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
public class SapforPackagesComparisonForm {
|
public class SapforPackagesComparisonForm {
|
||||||
|
public boolean comparisonMode = false;
|
||||||
//-->>
|
//-->>
|
||||||
private JPanel content;
|
private JPanel content;
|
||||||
public JPanel getContent() {
|
public JPanel getContent() {
|
||||||
@@ -34,7 +34,7 @@ public class SapforPackagesComparisonForm {
|
|||||||
protected SapforTasksPackage object = null;
|
protected SapforTasksPackage object = null;
|
||||||
//-->>
|
//-->>
|
||||||
// protected DataSet<String, SapforTaskResult> packageTasks;
|
// protected DataSet<String, SapforTaskResult> packageTasks;
|
||||||
protected DataSetControlForm Body;
|
protected SapforTasksPackageTree Body;
|
||||||
public JScrollPane treeScroll = null;
|
public JScrollPane treeScroll = null;
|
||||||
//--->>
|
//--->>
|
||||||
public boolean isMaster() {
|
public boolean isMaster() {
|
||||||
@@ -48,15 +48,39 @@ public class SapforPackagesComparisonForm {
|
|||||||
protected void RemoveObject() {
|
protected void RemoveObject() {
|
||||||
object = null;
|
object = null;
|
||||||
showNoObject();
|
showNoObject();
|
||||||
|
//--
|
||||||
|
if (comparisonMode) {
|
||||||
|
comparisonMode = false;
|
||||||
|
if (isMaster()) {
|
||||||
|
slave.comparisonMode = false;
|
||||||
|
slave.object = null;
|
||||||
|
slave.showNoObject();
|
||||||
|
} else {
|
||||||
|
master.comparisonMode = false;
|
||||||
|
master.object = null;
|
||||||
|
master.showNoObject();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public void ApplyObject() {
|
public void ApplyObject() {
|
||||||
|
//---
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
|
//---
|
||||||
TextLog log = new TextLog();
|
TextLog log = new TextLog();
|
||||||
if (Current.Check(log, Current.SapforTasksPackage)) {
|
if (Current.Check(log, Current.SapforTasksPackage)) {
|
||||||
object = Current.getSapforTasksPackage();
|
object = Current.getSapforTasksPackage();
|
||||||
if (object.isLoaded() || (Pass_2021.passes.get(PassCode_2021.DownloadSapforTasksPackage).Do(object)))
|
if (object.isLoaded() || (Pass_2021.passes.get(PassCode_2021.DownloadSapforTasksPackage).Do(object))) {
|
||||||
showObject();
|
showObject();
|
||||||
else UI.Info("Пакет не закружен");
|
/*
|
||||||
|
if (isMaster()) {
|
||||||
|
System.out.println("master");
|
||||||
|
SynchronizeTrees();
|
||||||
|
} else if (master.object != null){
|
||||||
|
System.out.println("slave");
|
||||||
|
master.SynchronizeTrees();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
} else UI.Info("Пакет не закружен");
|
||||||
} else
|
} else
|
||||||
UI.Info(log.toString());
|
UI.Info(log.toString());
|
||||||
}
|
}
|
||||||
@@ -75,22 +99,20 @@ public class SapforPackagesComparisonForm {
|
|||||||
//---
|
//---
|
||||||
public void showCommonTree() {
|
public void showCommonTree() {
|
||||||
//---
|
//---
|
||||||
treePanel.add(new JScrollPane(
|
treePanel.add(treeScroll = new JScrollPane(
|
||||||
new SapforTasksPackageTree(object.results.root,
|
Body = new SapforTasksPackageTree(object.results.root,
|
||||||
isMaster() ? Current.SapforEtalonVersion : Current.SapforVersion
|
isMaster() ? Current.SapforEtalonVersion : Current.SapforVersion
|
||||||
)));
|
)));
|
||||||
treePanel.repaint();
|
treePanel.repaint();
|
||||||
treePanel.revalidate();
|
treePanel.revalidate();
|
||||||
}
|
}
|
||||||
public SapforTasksPackageTree showComparisonTree() {
|
public void showComparisonTree() {
|
||||||
SapforTasksPackageTree res = null;
|
|
||||||
treePanel.add(treeScroll = new JScrollPane(
|
treePanel.add(treeScroll = new JScrollPane(
|
||||||
res =new SapforTasksPackageTree(object.results.comparison_root,
|
Body = new SapforTasksPackageTree(object.results.comparison_root,
|
||||||
isMaster() ? Current.SapforEtalonVersion : Current.SapforVersion
|
isMaster() ? Current.SapforEtalonVersion : Current.SapforVersion
|
||||||
)));
|
)));
|
||||||
treePanel.repaint();
|
treePanel.repaint();
|
||||||
treePanel.revalidate();
|
treePanel.revalidate();
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
//---
|
//---
|
||||||
public void showNoTree() {
|
public void showNoTree() {
|
||||||
@@ -191,6 +213,8 @@ public class SapforPackagesComparisonForm {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void performPreparation() throws Exception {
|
protected void performPreparation() throws Exception {
|
||||||
|
comparisonMode = false;
|
||||||
|
slave.comparisonMode = false;
|
||||||
//--
|
//--
|
||||||
treeScroll = null;
|
treeScroll = null;
|
||||||
slave.treeScroll = null;
|
slave.treeScroll = null;
|
||||||
@@ -238,39 +262,24 @@ public class SapforPackagesComparisonForm {
|
|||||||
slave.showCommonTree();
|
slave.showCommonTree();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
protected void performDone() throws Exception {
|
||||||
|
comparisonMode = true;
|
||||||
|
slave.comparisonMode = true;
|
||||||
|
//--
|
||||||
|
}
|
||||||
|
@Override
|
||||||
protected void showDone() throws Exception {
|
protected void showDone() throws Exception {
|
||||||
showComparisonTree().setSlaveTree(slave.showComparisonTree());
|
showComparisonTree();
|
||||||
slave.treeScroll.getVerticalScrollBar().setModel(treeScroll.getVerticalScrollBar().getModel());
|
slave.showComparisonTree();
|
||||||
|
SynchronizeTrees();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
pass.Do();
|
pass.Do();
|
||||||
}
|
}
|
||||||
public void DoShowPass(boolean startCondition) {
|
public void SynchronizeTrees() {
|
||||||
Pass_2021 pass = new Pass_2021() {
|
if (slave.Body!=null) {
|
||||||
@Override
|
Body.setSlaveTree(slave.Body);
|
||||||
public String getDescription() {
|
slave.treeScroll.getVerticalScrollBar().setModel(treeScroll.getVerticalScrollBar().getModel());
|
||||||
return "Отображение";
|
}
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected boolean needsAnimation() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public boolean needsConfirmations() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected boolean canStart(Object... args) throws Exception {
|
|
||||||
return startCondition;
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected void body() throws Exception {
|
|
||||||
Show();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
pass.Do();
|
|
||||||
}
|
}
|
||||||
//предполагаем что оба объекта есть и мы можем получить с них текст.
|
|
||||||
//1. если режим сравнения. синхронизация выбора строк в деревьях.
|
|
||||||
//2. открытие выбранной версии как текущего проекта. (создание копии с распаковкой сообщений)
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user