Отображение текущей задачи тестирования ДВМ

This commit is contained in:
2025-02-10 22:38:42 +03:00
parent 7eecdf8f4d
commit 0049409cdf
10 changed files with 175 additions and 125 deletions

View File

@@ -1,29 +0,0 @@
package _VisualDVM.Visual.Windows;
import _VisualDVM.Global;
import _VisualDVM.TestingSystem.DVM.DVMTasks.DVMRunTask;
public class DVMRunTasksComparisonForm extends TasksComparisonForm<DVMRunTask> {
public DVMRunTasksComparisonForm(ComparisonForm<DVMRunTask> slave_in) {
super(DVMRunTask.class, slave_in);
}
@Override
public Object getDefaultCurrentObject() {
return Global.testingServer.db.dvmRunTasks.getUI().getCurrent();
}
@Override
protected String getTextByTab() {
switch (status) {
case CompilationOutput:
return object.getCompilationOutput();
case CompilationErrors:
return object.getCompilationErrors();
case RunOutput:
return object.getOutput();
case RunErrors:
return object.getErrors();
case Sts:
return object.getStatistic();
default:
return "";
}
}
}

View File

@@ -111,8 +111,8 @@
</grid>
<grid id="1f9bd" binding="dvmComparisonTab" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<tabbedpane title="Сравнение задач DVM" icon="icons/Comparsion.png">
<tooltip value="Сравнение пакетов тестирования DVM"/>
<tabbedpane title="Задачи DVM" icon="icons/Comparsion.png">
<tooltip value="Просмотр текущего пакета DVM"/>
</tabbedpane>
</constraints>
<properties/>
@@ -159,11 +159,94 @@
<splitpane id="ba9b7" binding="SC50">
<constraints border-constraint="Center"/>
<properties>
<dividerLocation value="500"/>
<dividerLocation value="300"/>
<dividerSize value="3"/>
</properties>
<border type="none"/>
<children/>
<children>
<grid id="49659" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<tabbedpane id="665df" binding="compilationTabs">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children>
<grid id="97d0" binding="compilationOutPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<tabbedpane title="" icon="icons/CompilationOutput.png">
<tooltip value="Поток вывода компиляции"/>
</tabbedpane>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
<grid id="953c0" binding="compilationErrPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<tabbedpane title="" icon="icons/CompilationErrors.png">
<tooltip value="Поток ошибок компиляции"/>
</tabbedpane>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</tabbedpane>
</children>
</grid>
<grid id="d5bb4" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<tabbedpane id="e06c2" binding="runTabs">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children>
<grid id="5f83b" binding="runOutPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<tabbedpane title="" icon="icons/RunOutput.png">
<tooltip value="Поток вывода запуска"/>
</tabbedpane>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
<grid id="b85ac" binding="runErrPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<tabbedpane title="" icon="icons/RunErrors.png">
<tooltip value="Поток ошибок запуска"/>
</tabbedpane>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
<grid id="d35c7" binding="runStsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<tabbedpane title="" icon="icons/Sts.png">
<tooltip value="DVM статистика запуска"/>
</tabbedpane>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</tabbedpane>
</children>
</grid>
</children>
</splitpane>
</children>
</grid>

View File

@@ -10,6 +10,7 @@ import _VisualDVM.TestingSystem.Common.TestingServer;
import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage;
import _VisualDVM.TestingSystem.DVM.DVMTasks.DVMRunTask;
import _VisualDVM.TestingSystem.SAPFOR.SapforPackage.SapforPackage;
import _VisualDVM.Visual.Editor.BaseEditor;
import _VisualDVM.Visual.Interface.TestingWindow;
import javax.swing.*;
@@ -18,8 +19,13 @@ import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
public class TestingForm implements FormWithSplitters, TestingWindow {
//-
private final DVMRunTasksComparisonForm dvmTestingRunMaster; //сравнение тестов двм системы.
private final DVMRunTasksComparisonForm dvmTestingRunSlave;
private final BaseEditor coText;
private final BaseEditor ceText;
private final BaseEditor roText;
private final BaseEditor reText;
private final BaseEditor stsText;
//private final DVMRunTasksComparisonForm dvmTestingRunMaster; //сравнение тестов двм системы.
//private final DVMRunTasksComparisonForm dvmTestingRunSlave;
//-
private final SapforPackagesComparisonForm sapforPackageTreeMaster; //сравнение деревьев пакетов SAPFOR.
private final SapforPackagesComparisonForm sapforPackageTreeSlave;
@@ -37,7 +43,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
public JSplitPane SC83;
public JSplitPane SC72;
public JSplitPane SC85;
private JPanel content;
//---
private JTabbedPane testingTabs;
@@ -66,6 +71,13 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
private JPanel sapforSettingsPanel;
private JPanel sapforSettingsCommandsPanel;
private JPanel dvmSettingsPanel;
private JTabbedPane compilationTabs;
private JTabbedPane runTabs;
private JPanel compilationOutPanel;
private JPanel compilationErrPanel;
private JPanel runOutPanel;
private JPanel runErrPanel;
private JPanel runStsPanel;
private JPanel testsRunTasksBackground;
private JCheckBox filterFinished;
private JButton bTest;
@@ -96,7 +108,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
content.add(Global.mainModule.getUI().getTestingMenuBar(), BorderLayout.NORTH);
LoadSplitters();
//-
dvmTestingRunMaster = new DVMRunTasksComparisonForm(dvmTestingRunSlave = new DVMRunTasksComparisonForm(null));
// dvmTestingRunMaster = new DVMRunTasksComparisonForm(dvmTestingRunSlave = new DVMRunTasksComparisonForm(null));
sapforPackageTreeMaster = new SapforPackagesComparisonForm(sapforPackageTreeSlave = new SapforPackagesComparisonForm(null));
sapforVersionMaster = new SapforVersionsComparisonForm(
sapforVersionSlave = new SapforVersionsComparisonForm(null, Current.SapforVersion),
@@ -105,8 +117,11 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
//--->>>
RefreshTabsNames();
//-
SC50.setLeftComponent(dvmTestingRunMaster.getContent());
SC50.setRightComponent(dvmTestingRunSlave.getContent());
compilationOutPanel.add(new JScrollPane(coText = new BaseEditor()));
compilationErrPanel.add(new JScrollPane(ceText = new BaseEditor()));
runOutPanel.add(new JScrollPane(roText = new BaseEditor()));
runErrPanel.add(new JScrollPane(reText = new BaseEditor()));
runStsPanel.add(new JScrollPane(stsText = new BaseEditor()));
//-
SC65.setLeftComponent(sapforPackageTreeMaster.getContent());
SC66.setLeftComponent(sapforPackageTreeSlave.getContent());
@@ -157,8 +172,8 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
}
@Override
public void DropTestRunTasksComparison() {
dvmTestingRunMaster.RemoveObject();
dvmTestingRunSlave.RemoveObject();
// dvmTestingRunMaster.RemoveObject();
// dvmTestingRunSlave.RemoveObject();
}
@Override
public void DropSapforComparison() {
@@ -223,14 +238,8 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
testingTabs.setTitleAt(2, "SAPFOR: ?");
}
@Override
public void ShowCurrentDVMPackage() {
}
@Override
public void ShowNoCurrentDVMPackage() {
}
@Override
public void ShowDVMRunTask(DVMRunTask master) {
dvmTestingRunMaster.ApplyObject(master);
// dvmTestingRunMaster.ApplyObject(master);
testingTabs.setSelectedIndex(1);
}
@Override
@@ -242,17 +251,48 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
testingTabs.setSelectedIndex(1);
}
@Override
public void CompareDVMRunTasks(DVMRunTask master, DVMRunTask slave) {
dvmTestingRunMaster.ApplyObject(master);
dvmTestingRunSlave.ApplyObject(slave);
dvmTestingRunMaster.DoComparePass(true);
// testingTabs.setSelectedIndex(1);
}
@Override
public void CompareSapforPackages(SapforPackage master, SapforPackage slave) {
sapforPackageTreeMaster.ApplyObject(master);
sapforPackageTreeSlave.ApplyObject(slave);
sapforPackageTreeMaster.DoComparePass();
testingTabs.setSelectedIndex(3);
}
@Override
public void ShowCurrentDVMTask() {
DVMRunTask object = Global.testingServer.db.dvmRunTasks.getUI().getCurrent();
coText.setText(object.getCompilationOutput());
ceText.setText(object.getCompilationErrors());
roText.setText(object.getOutput());
reText.setText(object.getErrors());
stsText.setText(object.getStatistic());
switch (object.compilation_state){
case Done:
case AbortedByTimeout:
compilationTabs.setSelectedIndex(0);
break;
default:
compilationTabs.setSelectedIndex(1);
break;
}
switch (object.state){
case Done:
case Canceled:
case Inactive:
case DoneWithErrors:
case AbortedByTimeout:
runTabs.setSelectedIndex(0);
break;
default:
runTabs.setSelectedIndex(1);
break;
}
}
@Override
public void ShowNoCurrentDVMTask() {
coText.setText("");
ceText.setText("");
roText.setText("");
reText.setText("");
stsText.setText("");
}
}