показ эталонов сапфор
This commit is contained in:
2025-03-24 14:50:54 +03:00
parent 74ae6abf50
commit a60ed8f661
8 changed files with 68 additions and 13 deletions

12
.idea/workspace.xml generated
View File

@@ -7,13 +7,15 @@
</component>
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CompareSapforPackageToEthalon.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShowCurrentSAPFORConfigurationTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShowCurrentSAPFORConfigurationTests.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMConfiguration/UI/DVMConfigurationDialog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMConfiguration/UI/DVMConfigurationDialog.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationDialog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationDialog.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationFields.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationFields.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationFields.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CompareSapforPackages.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CompareSapforPackages.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/TestPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/TestPass.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/UI/SapforPackagesForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/UI/SapforPackagesForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/MainMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/MainMenuBar.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -3,7 +3,7 @@ import Common.Utils.Vector_;
import java.util.Vector;
public class Constants {
public static final int version = 1224;
public static final int version = 1225;
public static final int planner_version = 24;
public static final int testingMaxKernels = 64;
//--

View File

@@ -0,0 +1,35 @@
package _VisualDVM.Passes.All;
import Common.CommonConstants;
import Common.Passes.Pass;
import Common.Utils.Utils_;
import Common.Visual.UI;
import _VisualDVM.Global;
import _VisualDVM.TestingSystem.SAPFOR.SapforPackage.SapforPackage;
import java.util.Vector;
public class CompareSapforPackageToEthalon extends CompareSapforPackages {
@Override
protected boolean canStart(Object... args) throws Exception {
master = null;
slave = null;
//--
target = Global.testingServer.db.sapforPackages.getUI().getSelectedOrCurrent();
if (target.size() == 1) {
SapforPackage sapforPackage = target.get(0);
if (sapforPackage.ethalon_id == CommonConstants.Nan) {
Log.Writeln_("Не найдено эталона для пакета " + Utils_.Brackets(sapforPackage.id) + " !");
return false;
}
if (!Global.testingServer.db.sapforPackages.containsKey(sapforPackage.ethalon_id)) {
Log.Writeln_("Эталон " + Utils_.Brackets(sapforPackage.ethalon_id) + " не найден!");
return false;
}
SapforPackage ethalon = Global.testingServer.db.sapforPackages.get(sapforPackage.ethalon_id);
master = ethalon;
slave = sapforPackage;
return true;
}else
return UI.Question("Отмечено более одного пакета. Желаете сравнить их")&&super.canStart(args);
}
}

View File

@@ -7,8 +7,8 @@ import _VisualDVM.TestingSystem.SAPFOR.SapforPackage.SapforPackage;
import java.util.Vector;
public class CompareSapforPackages extends Pass<Vector<SapforPackage>> {
SapforPackage master;
SapforPackage slave;
protected SapforPackage master;
protected SapforPackage slave;
@Override
public String getIconPath() {
return "/icons/Comparsion.png";
@@ -40,11 +40,11 @@ public class CompareSapforPackages extends Pass<Vector<SapforPackage>> {
} else if (target.size() == 1) {
master = target.get(0);
slave = null;
return true; //UI.Question("Отобразить пакет " + Utils_.Brackets(master.getPK()));
return true;
} else if ((target.size() == 0) && ((Global.testingServer.db.sapforPackages.getUI().getCurrent() != null))) {
master = Global.testingServer.db.sapforPackages.getUI().getCurrent();
slave = null;
return true;// UI.Question("Отобразить пакет " + Utils_.Brackets(master.getPK()));
return true;
} else {
Log.Writeln_("Для сравнения требуется отметить два пакета.\nДля отображения требуется отметить один пакет,или выделить его");
return false;

View File

@@ -1,10 +1,13 @@
package _VisualDVM.Passes.All;
import Common.Passes.Pass;
import Common.Utils.Vector_;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.List;
import java.util.concurrent.ForkJoinPool;
public class TestPass extends Pass {
public static String getMotherboardSN() {
String result = "";
@@ -38,5 +41,16 @@ public class TestPass extends Pass {
}
@Override
protected void body() throws Exception {
List<Integer> numbers = new Vector_<>(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
// Use parallelStream() to create a parallel stream
ForkJoinPool commonPool = ForkJoinPool.commonPool();
commonPool.submit(() ->
numbers.parallelStream()
.forEach(num -> {
int square = num * num;
System.out.println("Square of " + num + " is " + square);
})
).join();
}
}

View File

@@ -307,6 +307,7 @@ public enum PassCode implements PassCode_ {
ReplaceTestProject,
ReplaceTestsFromFiles,
CompareSapforPackages,
CompareSapforPackageToEthalon,
CreateDVMPackageFromCurrentProject,
//--
ShutdownTestingServer,
@@ -364,6 +365,8 @@ public enum PassCode implements PassCode_ {
@Override
public String getDescription() {
switch (this) {
case CompareSapforPackageToEthalon:
return "Сравнить пакет тестирования SAPFOR с эталоном";
case SPF_RemoveSpfDirectives:
return "Удаление SPF директив";
case DeleteRemoteWorkspace:

View File

@@ -130,7 +130,7 @@ public class SapforPackagesForm extends RDataSetControlForm<SapforPackage> {
addSeparator();
addPasses(PassCode.AbortSapforPackage);
addSeparator();
addPasses(PassCode.SetSapforConfigurationEthalon, PassCode.CompareSapforPackages, PassCode.JoinSapforTestingVersionsToGroup);
addPasses(PassCode.SetSapforConfigurationEthalon, PassCode.CompareSapforPackageToEthalon, PassCode.JoinSapforTestingVersionsToGroup);
addSeparator();
addPasses(PassCode.DeleteSapforPackage);
}

View File

@@ -66,7 +66,8 @@ public class MainMenuBar extends VisualiserMenuBar {
//-
setPreferredSize(new Dimension(0, 30));
//--
/*
/*
add(new MenuBarButton() {
{
setIcon("/Common/icons/Apply.png");
@@ -76,7 +77,7 @@ public class MainMenuBar extends VisualiserMenuBar {
});
}
});
*/
*/
//--
add(new JSeparator());
add(MachineButton = new MenuBarButton() {