no message

This commit is contained in:
2025-09-17 14:21:56 +03:00
parent 00a30bdec4
commit 1329bb3038
6 changed files with 33 additions and 17 deletions

2
.idea/workspace.xml generated
View File

@@ -7,7 +7,7 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<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 afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/ModifiedFile_json.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Json/VersionInfo_json.java" afterDir="false" />
<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$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" /> <change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Sapfor/Sapfor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Sapfor/Sapfor.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Sapfor/Sapfor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Sapfor/Sapfor.java" afterDir="false" />

View File

@@ -4,7 +4,7 @@
"ServerUserPassword": "mprit_2011", "ServerUserPassword": "mprit_2011",
"OfferRegistrationOnStart": true, "OfferRegistrationOnStart": true,
"Workspace": "E:\\Tests", "Workspace": "E:\\Tests",
"ProjectsSearchDirectory": "E:\\Tests\\Downloads\\33136", "ProjectsSearchDirectory": "E:\\Tests\\Downloads",
"DocumentsDirectory": "C:\\Users\\misha\\Documents\\_testing_system", "DocumentsDirectory": "C:\\Users\\misha\\Documents\\_testing_system",
"VisualiserPath": "C:\\Users\\misha\\Downloads", "VisualiserPath": "C:\\Users\\misha\\Downloads",
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F", "Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",

View File

@@ -0,0 +1,8 @@
package _VisualDVM.ComponentsServer.Component.Json;
import com.google.gson.annotations.Expose;
public class VersionInfo_json {
@Expose
public int version;
@Expose
public String date;
}

View File

@@ -5,7 +5,6 @@ import Common.Utils.Pair;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.UI; import Common.Visual.UI;
import _VisualDVM.ComponentsServer.Component.OSDComponent; import _VisualDVM.ComponentsServer.Component.OSDComponent;
import _VisualDVM.ComponentsServer.Component.Visualizer_2;
import _VisualDVM.Constants; import _VisualDVM.Constants;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode; import _VisualDVM.Passes.PassCode;
@@ -21,10 +20,7 @@ import org.apache.commons.io.FileUtils;
import java.io.File; import java.io.File;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.Collections; import java.util.*;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Vector;
public abstract class Sapfor extends OSDComponent { public abstract class Sapfor extends OSDComponent {
public static final int empty_code = -100; public static final int empty_code = -100;
public static final int canceled_code = -99; public static final int canceled_code = -99;
@@ -420,7 +416,12 @@ public abstract class Sapfor extends OSDComponent {
public void GetVersionInfo() { public void GetVersionInfo() {
try { try {
RunAnalysis("SPF_GetVersionAndBuildDate", -1, "", ""); RunAnalysis("SPF_GetVersionAndBuildDate", -1, "", "");
Visualizer_2.UnpackVersionInfo(this, getResult()); //заглушка.
version = 6666;
date_text = new Date().toString();
// VersionInfo_json versionInfo_json =
// UI.Info("sapfor version info");
// Visualizer_2.UnpackVersionInfo(this, getResult());
} catch (Exception e) { } catch (Exception e) {
Utils_.MainLog.PrintException(e); Utils_.MainLog.PrintException(e);
UI.Error("Не удалось получить версию компонента " + Utils_.DQuotes(getComponentType().getDescription())); UI.Error("Не удалось получить версию компонента " + Utils_.DQuotes(getComponentType().getDescription()));
@@ -502,11 +503,15 @@ public abstract class Sapfor extends OSDComponent {
this.predictorStats = predictorStats; this.predictorStats = predictorStats;
} }
public void decodeString(String runResult) throws Exception { public void decodeString(String runResult) throws Exception {
System.out.println("String="+runResult);
SapforResult_json resultJson = Utils_.gson.fromJson(runResult, SapforResult_json.class); SapforResult_json resultJson = Utils_.gson.fromJson(runResult, SapforResult_json.class);
resultJson.Print(); resultJson.Print();
UI.Info("+");
//--- //---
setErrorCode(resultJson.errorCode); setErrorCode(resultJson.errorCode);
setOutput(resultJson.output); setOutput(resultJson.output);
setResult(resultJson.result);
setOutputMessage(resultJson.outputMessage); setOutputMessage(resultJson.outputMessage);
setPredictorStats(resultJson.predictorStats); setPredictorStats(resultJson.predictorStats);
//-- //--

View File

@@ -28,15 +28,15 @@ public class Visualizer_2 extends OSDComponent {
port = port_in; port = port_in;
} }
public static void UnpackVersionInfo(Component component, String packed) { public static void UnpackVersionInfo(Component component, String packed) {
/*
String[] data = packed.split("\\|"); String[] data = packed.split("\\|");
//лишний пробел. //лишний пробел.
String text = data[0].substring(0, data[0].length() - 1); String text = data[0].substring(0, data[0].length() - 1);
component.date_text = data[1] + data[2] + data[3]; component.date_text = data[1] + data[2] + data[3];
component.version = Long.parseLong(text); component.version = Long.parseLong(text);
*/
component.version = 6666; // component.version = 6666;
component.date_text = new Date().toString(); // component.date_text = new Date().toString();
} }
//<editor-fold desc="компонент"> //<editor-fold desc="компонент">
@Override @Override

View File

@@ -6,17 +6,20 @@ public class SapforResult_json {
@Expose @Expose
public int errorCode; public int errorCode;
@Expose @Expose
public String output; public String result; //запаковка результата конкретного прохода в json
@Expose @Expose
public String outputMessage; public String output; //журнал
@Expose @Expose
public String predictorStats; public String outputMessage; //запаковка сообщений в json
@Expose @Expose
public List<ModifiedFile_json> files; public String predictorStats; //запаковка оценок вариантов в json если есть для их построения и оценки.
@Expose
public List<ModifiedFile_json> files; //запаковка имен файлов в json если есть для модификации
//-- //--
public void Print(){ public void Print(){
System.out.println("------------------------------"); System.out.println("------------------------------");
System.out.println("codeIdx="+ errorCode ); System.out.println("codeIdx="+ errorCode );
System.out.println("result="+result);
System.out.println("output="+output); System.out.println("output="+output);
System.out.println("outputMessage="+outputMessage); System.out.println("outputMessage="+outputMessage);
System.out.println("predictorStats="+predictorStats); System.out.println("predictorStats="+predictorStats);