no message
This commit is contained in:
2
.idea/workspace.xml
generated
2
.idea/workspace.xml
generated
@@ -7,7 +7,7 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<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$/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" />
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ServerUserPassword": "mprit_2011",
|
||||
"OfferRegistrationOnStart": true,
|
||||
"Workspace": "E:\\Tests",
|
||||
"ProjectsSearchDirectory": "E:\\Tests\\Downloads\\33136",
|
||||
"ProjectsSearchDirectory": "E:\\Tests\\Downloads",
|
||||
"DocumentsDirectory": "C:\\Users\\misha\\Documents\\_testing_system",
|
||||
"VisualiserPath": "C:\\Users\\misha\\Downloads",
|
||||
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import Common.Utils.Pair;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI;
|
||||
import _VisualDVM.ComponentsServer.Component.OSDComponent;
|
||||
import _VisualDVM.ComponentsServer.Component.Visualizer_2;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -21,10 +20,7 @@ import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
import java.util.*;
|
||||
public abstract class Sapfor extends OSDComponent {
|
||||
public static final int empty_code = -100;
|
||||
public static final int canceled_code = -99;
|
||||
@@ -420,7 +416,12 @@ public abstract class Sapfor extends OSDComponent {
|
||||
public void GetVersionInfo() {
|
||||
try {
|
||||
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) {
|
||||
Utils_.MainLog.PrintException(e);
|
||||
UI.Error("Не удалось получить версию компонента " + Utils_.DQuotes(getComponentType().getDescription()));
|
||||
@@ -502,11 +503,15 @@ public abstract class Sapfor extends OSDComponent {
|
||||
this.predictorStats = predictorStats;
|
||||
}
|
||||
public void decodeString(String runResult) throws Exception {
|
||||
System.out.println("String="+runResult);
|
||||
|
||||
SapforResult_json resultJson = Utils_.gson.fromJson(runResult, SapforResult_json.class);
|
||||
resultJson.Print();
|
||||
UI.Info("+");
|
||||
//---
|
||||
setErrorCode(resultJson.errorCode);
|
||||
setOutput(resultJson.output);
|
||||
setResult(resultJson.result);
|
||||
setOutputMessage(resultJson.outputMessage);
|
||||
setPredictorStats(resultJson.predictorStats);
|
||||
//--
|
||||
|
||||
@@ -28,15 +28,15 @@ public class Visualizer_2 extends OSDComponent {
|
||||
port = port_in;
|
||||
}
|
||||
public static void UnpackVersionInfo(Component component, String packed) {
|
||||
/*
|
||||
|
||||
String[] data = packed.split("\\|");
|
||||
//лишний пробел.
|
||||
String text = data[0].substring(0, data[0].length() - 1);
|
||||
component.date_text = data[1] + data[2] + data[3];
|
||||
component.version = Long.parseLong(text);
|
||||
*/
|
||||
component.version = 6666;
|
||||
component.date_text = new Date().toString();
|
||||
|
||||
// component.version = 6666;
|
||||
// component.date_text = new Date().toString();
|
||||
}
|
||||
//<editor-fold desc="компонент">
|
||||
@Override
|
||||
|
||||
@@ -6,17 +6,20 @@ public class SapforResult_json {
|
||||
@Expose
|
||||
public int errorCode;
|
||||
@Expose
|
||||
public String output;
|
||||
public String result; //запаковка результата конкретного прохода в json
|
||||
@Expose
|
||||
public String outputMessage;
|
||||
public String output; //журнал
|
||||
@Expose
|
||||
public String predictorStats;
|
||||
public String outputMessage; //запаковка сообщений в json
|
||||
@Expose
|
||||
public List<ModifiedFile_json> files;
|
||||
public String predictorStats; //запаковка оценок вариантов в json если есть для их построения и оценки.
|
||||
@Expose
|
||||
public List<ModifiedFile_json> files; //запаковка имен файлов в json если есть для модификации
|
||||
//--
|
||||
public void Print(){
|
||||
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("outputMessage="+outputMessage);
|
||||
System.out.println("predictorStats="+predictorStats);
|
||||
|
||||
Reference in New Issue
Block a user