проверка на пустоту сообщений при распаковке
++
This commit is contained in:
3
.idea/workspace.xml
generated
3
.idea/workspace.xml
generated
@@ -8,7 +8,10 @@
|
|||||||
<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 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$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_InsertIncludesPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_InsertIncludesPass.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_InsertIncludesPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_InsertIncludesPass.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Includes/Transformation/IncludeToInsertJson.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Includes/Transformation/IncludeToInsertJson.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Includes/Transformation/IncludeToInsertJson.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Includes/Transformation/IncludeToInsertJson.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ServerUserPassword": "mprit_2011",
|
"ServerUserPassword": "mprit_2011",
|
||||||
"OfferRegistrationOnStart": true,
|
"OfferRegistrationOnStart": true,
|
||||||
"Workspace": "E:\\Tests",
|
"Workspace": "E:\\Tests",
|
||||||
"ProjectsSearchDirectory": "E:\\Tests\\Downloads\\composit_1749198959",
|
"ProjectsSearchDirectory": "E:\\Tests\\Downloads\\bugreport_1749652835\\tmp_influxsys\\v3",
|
||||||
"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",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Common.Utils.Vector_;
|
|||||||
|
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
public class Constants {
|
public class Constants {
|
||||||
public static final int version = 1252;
|
public static final int version = 1253;
|
||||||
public static final int planner_version = 24;
|
public static final int planner_version = 24;
|
||||||
public static final int testingMaxKernels = 64;
|
public static final int testingMaxKernels = 64;
|
||||||
//--
|
//--
|
||||||
|
|||||||
@@ -6,14 +6,9 @@ import _VisualDVM.Passes.PassCode;
|
|||||||
import _VisualDVM.Passes.Sapfor.SapforTransformation;
|
import _VisualDVM.Passes.Sapfor.SapforTransformation;
|
||||||
import _VisualDVM.ProjectData.SapforData.Includes.Analysis.FileInfo;
|
import _VisualDVM.ProjectData.SapforData.Includes.Analysis.FileInfo;
|
||||||
import _VisualDVM.ProjectData.SapforData.Includes.Analysis.Include;
|
import _VisualDVM.ProjectData.SapforData.Includes.Analysis.Include;
|
||||||
import _VisualDVM.ProjectData.SapforData.Includes.Transformation.IncludeToInsertJson;
|
|
||||||
import _VisualDVM.ProjectData.SapforData.Includes.Transformation.IncludesToInsertJson;
|
|
||||||
|
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class SPF_InsertIncludesPass extends SapforTransformation {
|
public class SPF_InsertIncludesPass extends SapforTransformation {
|
||||||
@Override
|
@Override
|
||||||
protected PassCode necessary() {
|
protected PassCode necessary() {
|
||||||
@@ -21,6 +16,34 @@ public class SPF_InsertIncludesPass extends SapforTransformation {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected boolean canStart(Object... args) throws Exception {
|
protected boolean canStart(Object... args) throws Exception {
|
||||||
|
if (super.canStart(args)) {
|
||||||
|
if (target.numAddicted <= 0) {
|
||||||
|
Log.Writeln_("Не найдено файлов, имеющих зависимости по включению.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Vector<String> Result = new Vector<>();
|
||||||
|
for (FileInfo fileInfo : target.addictedFiles.values()) {
|
||||||
|
Vector<Include> selected_children = fileInfo.dependencies.stream().filter(Selectable::isSelected).collect(Collectors.toCollection(Vector::new));
|
||||||
|
if (!selected_children.isEmpty()) {
|
||||||
|
Result.add(fileInfo.file);
|
||||||
|
Result.add(String.valueOf(selected_children.size()));
|
||||||
|
for (Include di : selected_children) {
|
||||||
|
Result.add(String.valueOf(di.line));
|
||||||
|
Result.add(di.dependencyFileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Result.isEmpty()) {
|
||||||
|
Log.Writeln_("Не отмечено ни одного заголовка для подстановки");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Options = Utils_.toU(String.join("|", Result));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (super.canStart(args)) {
|
if (super.canStart(args)) {
|
||||||
if (target.numAddicted <= 0) {
|
if (target.numAddicted <= 0) {
|
||||||
Log.Writeln_("Не найдено файлов, имеющих зависимости по включению.");
|
Log.Writeln_("Не найдено файлов, имеющих зависимости по включению.");
|
||||||
@@ -41,7 +64,8 @@ public class SPF_InsertIncludesPass extends SapforTransformation {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void FocusBeforeStart() {
|
protected void FocusBeforeStart() {
|
||||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusDependencies();
|
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusDependencies();
|
||||||
|
|||||||
@@ -1141,16 +1141,18 @@ public class db_project_info extends DBObject {
|
|||||||
}
|
}
|
||||||
///------------------------------------------------------------------------------------------->>>>>
|
///------------------------------------------------------------------------------------------->>>>>
|
||||||
public void unpackMessagesAndLog(String packed_messages, String log_in) throws Exception {
|
public void unpackMessagesAndLog(String packed_messages, String log_in) throws Exception {
|
||||||
|
if (!packed_messages.isEmpty()) {
|
||||||
MessagesJson messages = Utils_.gson.fromJson(packed_messages, MessagesJson.class);
|
MessagesJson messages = Utils_.gson.fromJson(packed_messages, MessagesJson.class);
|
||||||
for (FileMessagesJson fileMessages: messages.allMessages){
|
for (FileMessagesJson fileMessages : messages.allMessages) {
|
||||||
fileMessages.file=Utils_.toW(fileMessages.file);
|
fileMessages.file = Utils_.toW(fileMessages.file);
|
||||||
//--
|
//--
|
||||||
DBProjectFile messageFile = db.files.Data.get(fileMessages.file);
|
DBProjectFile messageFile = db.files.Data.get(fileMessages.file);
|
||||||
for (Message message: fileMessages.messages){
|
for (Message message : fileMessages.messages) {
|
||||||
messageFile.AddNewMessage(message);
|
messageFile.AddNewMessage(message);
|
||||||
}
|
}
|
||||||
messageFile.father.db.Update(messageFile);
|
messageFile.father.db.Update(messageFile);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Log = log_in;
|
Log = log_in;
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,13 +9,12 @@ public class IncludeToInsertJson {
|
|||||||
@Expose
|
@Expose
|
||||||
public int line;
|
public int line;
|
||||||
//--
|
//--
|
||||||
public IncludeToInsertJson(){
|
public IncludeToInsertJson() {
|
||||||
|
|
||||||
}
|
}
|
||||||
//--
|
//--
|
||||||
public IncludeToInsertJson(String includeName_in, String fileName_in, int line_in){
|
public IncludeToInsertJson(String includeName_in, String fileName_in, int line_in) {
|
||||||
includeName = Utils_.toU(includeName_in);
|
includeName = Utils_.toU(includeName_in);
|
||||||
fileName = Utils_.toU(fileName_in);
|
fileName = Utils_.toU(fileName_in);
|
||||||
line= line_in;
|
line = line_in;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user