старый код пока не удален а закомментирован.
This commit is contained in:
6
.idea/workspace.xml
generated
6
.idea/workspace.xml
generated
@@ -7,10 +7,12 @@
|
|||||||
</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/SapforResult_json.java" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/ModifiedFile_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/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Utils.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" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Visualizer_2.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Visualizer_2.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/SapforResult_json.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/SapforResult_json.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ServerUserPassword": "mprit_2011",
|
"ServerUserPassword": "mprit_2011",
|
||||||
"OfferRegistrationOnStart": true,
|
"OfferRegistrationOnStart": true,
|
||||||
"Workspace": "E:\\Tests",
|
"Workspace": "E:\\Tests",
|
||||||
"ProjectsSearchDirectory": "E:\\Tests\\Downloads\\bugreport_1750768139\\DIFF3DSYS\\v1\\v1\\v1",
|
"ProjectsSearchDirectory": "E:\\Tests\\Downloads\\33136",
|
||||||
"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",
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import _VisualDVM.Passes.Sapfor.SapforAnalysis;
|
|||||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||||
import _VisualDVM.ProjectData.Files.UI.Editor.SPFEditor;
|
import _VisualDVM.ProjectData.Files.UI.Editor.SPFEditor;
|
||||||
import _VisualDVM.ProjectData.Project.db_project_info;
|
import _VisualDVM.ProjectData.Project.db_project_info;
|
||||||
|
import _VisualDVM.ProjectData.SapforData.ModifiedFile_json;
|
||||||
|
import _VisualDVM.ProjectData.SapforData.SapforResult_json;
|
||||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||||
import _VisualDVM.Utils;
|
import _VisualDVM.Utils;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
@@ -33,8 +35,6 @@ public abstract class Sapfor extends OSDComponent {
|
|||||||
public Vector<String> Intrinsics = new Vector<>();
|
public Vector<String> Intrinsics = new Vector<>();
|
||||||
public LinkedHashMap<String, String> ModifiedFiles = new LinkedHashMap<>();
|
public LinkedHashMap<String, String> ModifiedFiles = new LinkedHashMap<>();
|
||||||
public LinkedHashMap<String, String> OldFiles = new LinkedHashMap<>();
|
public LinkedHashMap<String, String> OldFiles = new LinkedHashMap<>();
|
||||||
int size;
|
|
||||||
int[] sizes;
|
|
||||||
String PID = "";
|
String PID = "";
|
||||||
private int errorCode;
|
private int errorCode;
|
||||||
private String result;
|
private String result;
|
||||||
@@ -502,6 +502,21 @@ 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 {
|
||||||
|
SapforResult_json resultJson = Utils_.gson.fromJson(runResult, SapforResult_json.class);
|
||||||
|
resultJson.Print();
|
||||||
|
//---
|
||||||
|
setErrorCode(resultJson.errorCode);
|
||||||
|
setOutput(resultJson.output);
|
||||||
|
setOutputMessage(resultJson.outputMessage);
|
||||||
|
setPredictorStats(resultJson.predictorStats);
|
||||||
|
//--
|
||||||
|
if (resultJson.files!=null && !resultJson.files.isEmpty()){
|
||||||
|
for (ModifiedFile_json file: resultJson.files){
|
||||||
|
ModifiedFiles.put(Utils_.toW(file.name), file.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//--
|
||||||
|
/*
|
||||||
int codeIdx = runResult.indexOf(' ');
|
int codeIdx = runResult.indexOf(' ');
|
||||||
if (codeIdx == -1) throw new PassException("Wrong input parameter");
|
if (codeIdx == -1) throw new PassException("Wrong input parameter");
|
||||||
setErrorCode(Integer.parseInt(runResult.substring(0, codeIdx)));
|
setErrorCode(Integer.parseInt(runResult.substring(0, codeIdx)));
|
||||||
@@ -545,13 +560,12 @@ public abstract class Sapfor extends OSDComponent {
|
|||||||
}
|
}
|
||||||
codeIdx += count;
|
codeIdx += count;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
//-
|
//-
|
||||||
public void Command(String request_in) throws Exception {
|
public void Command(String request_in) throws Exception {
|
||||||
setErrorCode(empty_code);
|
setErrorCode(empty_code);
|
||||||
outputMessage = output = result = predictorStats = "";
|
outputMessage = output = result = predictorStats = "";
|
||||||
size = 0;
|
|
||||||
sizes = null;
|
|
||||||
ModifiedFiles.clear();
|
ModifiedFiles.clear();
|
||||||
//модификации.-------------------------------------------------------------->>>>
|
//модификации.-------------------------------------------------------------->>>>
|
||||||
decodeString(Global.visualizer_2.Command(request_in).replace((char) 1, '\n'));
|
decodeString(Global.visualizer_2.Command(request_in).replace((char) 1, '\n'));
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import java.io.PrintWriter;
|
|||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
import java.util.Date;
|
||||||
public class Visualizer_2 extends OSDComponent {
|
public class Visualizer_2 extends OSDComponent {
|
||||||
public String PID = "";
|
public String PID = "";
|
||||||
//</editor-fold>
|
//</editor-fold>
|
||||||
@@ -27,11 +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.date_text = new Date().toString();
|
||||||
}
|
}
|
||||||
//<editor-fold desc="компонент">
|
//<editor-fold desc="компонент">
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package _VisualDVM.ProjectData.SapforData;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
public class ModifiedFile_json {
|
||||||
|
@Expose
|
||||||
|
public String name;
|
||||||
|
@Expose
|
||||||
|
public String text;
|
||||||
|
}
|
||||||
@@ -1,12 +1,25 @@
|
|||||||
package _VisualDVM.ProjectData.SapforData;
|
package _VisualDVM.ProjectData.SapforData;
|
||||||
import com.google.gson.annotations.Expose;
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
public class SapforResult_json {
|
public class SapforResult_json {
|
||||||
@Expose
|
@Expose
|
||||||
public int codeIdx;
|
public int errorCode;
|
||||||
@Expose
|
@Expose
|
||||||
public String output;
|
public String output;
|
||||||
@Expose
|
@Expose
|
||||||
public String outputMessage;
|
public String outputMessage;
|
||||||
@Expose
|
@Expose
|
||||||
public String predictorStats;
|
public String predictorStats;
|
||||||
|
@Expose
|
||||||
|
public List<ModifiedFile_json> files;
|
||||||
|
//--
|
||||||
|
public void Print(){
|
||||||
|
System.out.println("------------------------------");
|
||||||
|
System.out.println("codeIdx="+ errorCode);
|
||||||
|
System.out.println("output="+output);
|
||||||
|
System.out.println("outputMessage="+outputMessage);
|
||||||
|
System.out.println("predictorStats="+predictorStats);
|
||||||
|
System.out.println("-------------------------------");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user