промежуточный. Думаю над отображением для сравнения.

This commit is contained in:
2023-10-30 18:28:01 +03:00
parent 735db1334e
commit dfac99e784
8 changed files with 34 additions and 94 deletions

7
.idea/workspace.xml generated
View File

@@ -8,7 +8,12 @@
<component name="ChangeListManager">
<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$/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/SapforTestingSystem/SapforTasksPackage/SapforTasksPackagesDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackagesDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DeleteSapforTasksPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DeleteSapforTasksPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadSapforTasksPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadSapforTasksPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/TestingWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Interface/TestingWindow.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.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />

View File

@@ -2,7 +2,6 @@ package SapforTestingSystem.SapforTasksPackage;
import Common.Current;
import Common.Database.*;
import Common.UI.DataSetControlForm;
import Common.UI.UI;
import SapforTestingSystem.SapforTask.SapforTask;
import java.util.Date;
@@ -35,18 +34,6 @@ public class SapforTasksPackagesDBTable extends DBTable<String, SapforTasksPacka
columns.get(6).setRenderer(RendererDate);
columns.get(7).setRenderer(RendererStatusEnum);
}
@Override
public void ShowCurrentObject() throws Exception {
super.ShowCurrentObject();
// UI.getNewMainWindow().getTestingWindow().DropTestRunTasksComparison();
UI.getMainWindow().getTestingWindow().ShowCurrentSapforTasksPackage();
}
@Override
public void ShowNoCurrentObject() throws Exception {
super.ShowNoCurrentObject();
// UI.getNewMainWindow().getTestingWindow().DropTestRunTasksComparison();
UI.getMainWindow().getTestingWindow().ShowNoCurrentSapforTasksPackage();
}
};
}
@Override

View File

@@ -1,5 +1,6 @@
package Visual_DVM_2021.Passes.All;
import Common.Current;
import Common.UI.UI;
import Common.Utils.Utils;
import Repository.Server.ServerCode;
import Repository.Server.ServerExchangeUnit_2021;
@@ -31,6 +32,10 @@ public class DeleteSapforTasksPackage extends TestingSystemPass<SapforTasksPacka
return false;
}
@Override
protected void showPreparation() throws Exception {
UI.getMainWindow().getTestingWindow().DropSapforComparison();
}
@Override
protected void ServerAction() throws Exception {
Vector<SapforTasksPackage> vector = new Vector<>();
vector.add(target);

View File

@@ -1,7 +1,6 @@
package Visual_DVM_2021.Passes.All;
import Common.Current;
import Common.Global;
import Common.UI.UI;
import Common.Utils.Utils;
import Repository.Server.ServerCode;
import Repository.Server.ServerExchangeUnit_2021;
@@ -65,10 +64,5 @@ public class DownloadSapforTasksPackage extends TestingSystemPass<SapforTasksPac
FileUtils.writeStringToFile(SapforTasksPackageInterface.getLoadedSign(target), new Date().toString());
}
}
@Override
protected void showDone() throws Exception {
super.showDone();
UI.getMainWindow().getTestingWindow().ShowCurrentSapforTasksPackage();
}
}

View File

@@ -4,6 +4,7 @@ public interface TestingWindow extends VisualizerForm {
//-
void ShowCurrentTestsPackage();
void DropTestRunTasksComparison();
void DropSapforComparison();
void ShowCurrentTestRunTask();
void ShowNoTestRunTask();
//-
@@ -13,6 +14,4 @@ public interface TestingWindow extends VisualizerForm {
void RemountTestTable();
//-
void FocusTestingTasks();
void ShowCurrentSapforTasksPackage();
void ShowNoCurrentSapforTasksPackage();
}

View File

@@ -98,24 +98,7 @@
<properties/>
<border type="none"/>
<children>
<toolbar id="b1fde">
<constraints border-constraint="North"/>
<properties>
<floatable value="false"/>
</properties>
<border type="none"/>
<children>
<component id="a856" class="javax.swing.JLabel" binding="flagsLabel">
<constraints/>
<properties>
<font name="Times New Roman" size="16" style="1"/>
<foreground color="-16777216"/>
<text value="? "/>
</properties>
</component>
</children>
</toolbar>
<grid id="ecc39" binding="tasksPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<grid id="3e63e" binding="treePanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>

View File

@@ -1,9 +1,11 @@
package Visual_DVM_2021.UI.Main;
import Common.Current;
import Common.UI.DataSetControlForm;
import Common.UI.Label.ShortLabel;
import Common.UI.Menus_2023.VisualiserMenuBar;
import Common.UI.UI;
import Common.Utils.TextLog;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
import Visual_DVM_2021.Passes.Pass_2021;
import javax.swing.*;
@@ -20,14 +22,13 @@ public class SapforPackagesComparisonForm {
private JButton bNext;
private JButton bCompare;
private JButton bClose;
private JPanel tasksPanel;
private JLabel flagsLabel;
public JPanel treePanel;
//-->>
SapforPackagesComparisonForm this_ = null; //?
SapforPackagesComparisonForm slave = null;
SapforPackagesComparisonForm master = null;
//-->>
// protected SapforConfigurationTasksSet object = null;
protected SapforTasksPackage object = null;
//-->>
// protected DataSet<String, SapforTaskResult> packageTasks;
protected DataSetControlForm Body;
@@ -41,25 +42,17 @@ public class SapforPackagesComparisonForm {
//--->>
//неперегружаемые методы
protected void RemoveObject() {
// object = null;
object = null;
showNoObject();
}
public void ApplyObject() {
RemoveObject();
TextLog log = new TextLog();
/*
if (Current.Check(log, getCurrentObjectName())) {
if (Current.Check(log, Current.SapforTasksPackage)) {
object = Current.getSapforTasksPackage();
try {
packageTasks = isMaster() ? Global.db.getSapforPackagesMasterDataSet(object) :
Global.db.getSapforPackagesSlaveDataSet(object);
} catch (Exception ex) {
ex.printStackTrace();
}
showObject();
} else
UI.Info(log.toString());
*/
}
//предполагаем что оба объекта есть и мы можем получить с них текст.
protected void Compare() throws Exception {
@@ -78,26 +71,13 @@ public class SapforPackagesComparisonForm {
}
public void Show() throws Exception {
}
//Перегружаемые методы.
//--->>
// protected Current getCurrentObjectName() {
// return Current.SapforTasksPackage;
// }
protected void showNoObject() {
lObjectName.setText("?");
lObjectName.setToolTipText("Объект не назначен.");
flagsLabel.setText("?");
UI.Clear(tasksPanel);
}
protected void showObject() {
/*
lObjectName.setText(object.getPK().toString() + (isMaster() ? "(эталон)" : ""));
lObjectName.setToolTipText(object.getPK().toString());
flagsLabel.setText(object.flags);
//-
packageTasks.mountUI(tasksPanel);
packageTasks.ShowUI();
*/
}
protected String getText() {
return "";

View File

@@ -48,28 +48,27 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
private JCheckBox filterFinished;
private JButton bTest;
private JButton bDownloadTestProject;
private JToolBar compilationTasksTools;
private JToolBar runTasksTools;
//-
//
public CompilationTasksComparisonForm singleCompilationTaskMaster; // одиночная компиляция
public CompilationTasksComparisonForm singleCompilationTaskSlave;
//--
//-
private TestRunTasksComparisonForm dvmTestingRunMaster; //сравнение тестов двм системы.
private TestRunTasksComparisonForm dvmTestingRunSlave;
private final TestRunTasksComparisonForm dvmTestingRunMaster; //сравнение тестов двм системы.
private final TestRunTasksComparisonForm dvmTestingRunSlave;
//-
private SapforPackagesComparisonForm sapforTestingMaster; //сравнение тестов SAPFOR.
private SapforPackagesComparisonForm sapforTestingSlave;
public TestingForm() {
content.add(UI.testingBar, BorderLayout.NORTH);
LoadSplitters();
//-
dvmTestingRunMaster = new TestRunTasksComparisonForm(dvmTestingRunSlave = new TestRunTasksComparisonForm(null));
sapforTestingMaster = new SapforPackagesComparisonForm(sapforTestingSlave = new SapforPackagesComparisonForm(null));
//--->>>
RefreshTabsNames();
//-
SC50.setLeftComponent(dvmTestingRunMaster.getContent());
SC50.setRightComponent(dvmTestingRunSlave.getContent());
//-
SC64.setLeftComponent(sapforTestingMaster.getContent());
SC64.setRightComponent(sapforTestingSlave.getContent());
//-
Global.testingServer.db.configurations.mountUI(configurationsPanel);
Global.testingServer.account_db.packages.mountUI(packagesPanel);
Global.testingServer.account_db.testRunTasks.mountUI(testsRunTasksPanel);
@@ -102,6 +101,11 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
dvmTestingRunSlave.RemoveObject();
}
@Override
public void DropSapforComparison() {
sapforTestingMaster.RemoveObject();
sapforTestingSlave.RemoveObject();
}
@Override
public void ShowCurrentTestRunTask() {
// if (dvmTestingRunMaster.isActive()) dvmTestingRunMaster.ShowTask();
// else dvmTestingRunSlave.ShowTask();
@@ -135,28 +139,11 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
UI.Clear(testsRunTasksPanel);
UI.Clear(sapforTasksPackagesPanel);
UI.Clear(sapforTasksPanel);
DropSapforComparison();
//-->>
Global.testingServer.account_db.packages.mountUI(packagesPanel);
Global.testingServer.account_db.testRunTasks.mountUI(testsRunTasksPanel);
Global.testingServer.account_db.sapforTasksPackages.mountUI(sapforTasksPackagesPanel);
Global.testingServer.account_db.sapforTasks.mountUI(sapforTasksPanel);
}
@Override
public void ShowCurrentSapforTasksPackage() {
/*
UI.Clear(sapforPackageTreePanel);
if (SapforTasksPackageInterface.isLoaded(Current.getSapforTasksPackage())){
sapforPackageTreePanel.add(
new JScrollPane(new SapforPackageFields(Current.getSapforTasksPackage()).getContent())
);
// new JScrollPane(new SapforTasksPackageTree(SapforTasksPackageInterface.getTree(Current.getSapforTasksPackage())))
;
}
*/
}
@Override
public void ShowNoCurrentSapforTasksPackage() {
// UI.Clear(sapforPackageTreePanel);
}
}