diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index fec036c6..4518021e 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -11,9 +11,7 @@
-
-
-
+
diff --git a/properties b/properties
index 0939001d..3cbde860 100644
--- a/properties
+++ b/properties
@@ -4,7 +4,7 @@
"ServerUserPassword": "mprit_2011",
"OfferRegistrationOnStart": true,
"Workspace": "E:\\Tests",
- "ProjectsSearchDirectory": "E:\\Tests\\Downloads\\bug_1643809587",
+ "ProjectsSearchDirectory": "E:\\Tests\\Downloads",
"DocumentsDirectory": "C:\\Users\\misha\\Documents\\_testing_system",
"VisualiserPath": "C:\\Users\\misha\\Downloads",
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",
diff --git a/src/_VisualDVM/Passes/All/CombineFiles.java b/src/_VisualDVM/Passes/All/CombineFiles.java
index d76a34a6..fcfb0eed 100644
--- a/src/_VisualDVM/Passes/All/CombineFiles.java
+++ b/src/_VisualDVM/Passes/All/CombineFiles.java
@@ -55,7 +55,7 @@ public class CombineFiles extends Transformation {
Vector all_includes = new Vector<>();
//-----------------------------
result_lines.add("!-Found " + target.allIncludes.size() + " headers");
- for (String name : target.allIncludes.keySet()) {
+ for (String name : target.allIncludes) {
all_includes.add(" include " + Utils_.Quotes(Utils_.toU(name)));
result_lines.add("! include " + Utils_.Quotes(Utils_.toU(name)));
}
diff --git a/src/_VisualDVM/Passes/All/SPF_GetIncludeDependencies.java b/src/_VisualDVM/Passes/All/SPF_GetIncludeDependencies.java
index 8e5c2894..25363206 100644
--- a/src/_VisualDVM/Passes/All/SPF_GetIncludeDependencies.java
+++ b/src/_VisualDVM/Passes/All/SPF_GetIncludeDependencies.java
@@ -35,66 +35,36 @@ public class SPF_GetIncludeDependencies extends SapforAnalysis {
}
@Override
public void unpack(String packed) throws Exception {
- /*
IncludesJson includesJson = Utils_.gson.fromJson(packed, IncludesJson.class);
- System.out.println("packed="+packed);
- for (FileIncludesJson fileIncludesJson : includesJson.allIncludes) {
- String file_name = Utils_.toW(fileIncludesJson.file);
- DBProjectFile dbProjectFile = target.db.files.get(file_name);
- for (Include include : fileIncludesJson.includes)
- dbProjectFile.dependencies.add(include.dependencyFileName);
- }
- */
- //--
update_current = false;
- FileInfo fileInfo = null;
- String[] data_ = packed.split("@");
- for (int i = 0; i < data_.length; ++i) {
- String s = Utils_.toW(data_[i]);
- if (i % 2 == 0) {
- if (target.db.files.Data.containsKey(s)) {
- fileInfo = new FileInfo(s);
- } else fileInfo = null;
- } else {
- if ((fileInfo != null) && (s != "")) {
- String[] data__ = s.split("\\|");
- for (int j = 0; j < data__.length; ++j) {
- if (data__[j].length() > 0) {
- fileInfo.dependencies.add(
- new Include(fileInfo.file, data__[j]));
- //-------------------------------------
- if (!target.addictedFiles.containsKey(fileInfo.file))
- target.addictedFiles.put(fileInfo.file, fileInfo);
- //-------------------------------------
- String include_name = data__[j];
- if (target.db.files.containsKey(include_name)) {
- DBProjectFile d_file = target.db.files.Data.get(include_name);
- //----------------->>
- if (!target.allIncludes.containsKey(d_file.name))
- target.allIncludes.put(d_file.name, d_file);
- //----------------->>
- //--
- DBProjectFile father = target.db.files.Data.get(fileInfo.file);
- if (!father.dependencies.contains(include_name))
- father.dependencies.add(include_name);
- //--
- d_file.UpdateType(FileType.header);
- if (d_file.languageName == LanguageName.n)
- d_file.UpdateLanguage(father.languageName);
- if (d_file.style == LanguageStyle.none)
- d_file.UpdateStyle(father.style);
- //----------------------------------------
- if (Global.mainModule.HasFile() && Global.mainModule.getFile().name.equals(d_file.name))
- update_current = true;
- //-----------------------------------------
- }
- }
- }
+ for (FileIncludesJson fileIncludesJson : includesJson.allIncludes) {
+ fileIncludesJson.file = Utils_.toW(fileIncludesJson.file);
+ FileInfo fileInfo = new FileInfo(fileIncludesJson.file);
+ //---
+ DBProjectFile file = target.db.files.get(fileIncludesJson.file);
+ for (Include include : fileIncludesJson.includes) {
+ fileInfo.dependencies.add(include);
+ if (!target.allIncludes.contains(include.file))
+ target.allIncludes.add(include.file);
+ //- определение типов языков инклудов по файлу куда они цепляютс.
+ if (!file.dependencies.contains(include.dependencyFileName)) {
+ file.dependencies.add(include.dependencyFileName);
+ //---
+ DBProjectFile include_file = target.db.files.get(include.dependencyFileName);
+ include_file.UpdateType(FileType.header);
+ if (include_file.languageName == LanguageName.n)
+ include_file.UpdateLanguage(file.languageName);
+ if (include_file.style == LanguageStyle.none)
+ include_file.UpdateStyle(file.style);
+ if (Global.mainModule.HasFile() && Global.mainModule.getFile().name.equals(include_file.name))
+ update_current = true;
}
- fileInfo = null;
}
+ //----
+ if (!target.addictedFiles.containsKey(fileInfo.file))
+ target.addictedFiles.put(fileInfo.file, fileInfo);
}
- //-теперь строим граф
+ //-теперь строим граф. todo отображать его аналогично графу процедур?
for (FileInfo file : target.addictedFiles.values()) {
DefaultMutableTreeNode node = new DefaultMutableTreeNode(
file);
diff --git a/src/_VisualDVM/ProjectData/Project/db_project_info.java b/src/_VisualDVM/ProjectData/Project/db_project_info.java
index f5eb9a1d..4d2e051b 100644
--- a/src/_VisualDVM/ProjectData/Project/db_project_info.java
+++ b/src/_VisualDVM/ProjectData/Project/db_project_info.java
@@ -145,7 +145,7 @@ public class db_project_info extends DBObject {
public File Home = null;
public DefaultMutableTreeNode filesTreeRoot = null;
public ProjectDatabase db = null;
- public LinkedHashMap allIncludes = new LinkedHashMap<>();
+ public Vector allIncludes = new Vector<>();
public SapforProperties sapforProperties = null;
DBLastProject info = null; //обновляется при открытии проекта.
public db_project_info() {