From 8c9835f8fd3c7b9c73c2756096c16efbb2836821 Mon Sep 17 00:00:00 2001 From: 02090095 Date: Thu, 23 Jan 2025 20:44:13 +0300 Subject: [PATCH] =?UTF-8?q?v++=20fix=20=D0=B2=D0=B8=D0=B7=D1=83=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=B1=D0=B0=D0=B3=D0=B0?= =?UTF-8?q?=20=D1=81=20=D0=B4=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=BC.=20?= =?UTF-8?q?=D0=94=D0=BB=D1=8F=20=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82?= =?UTF-8?q?=D0=BD=D0=BE=D0=B9=20=D0=BF=D0=B5=D1=80=D0=B5=D1=80=D0=B8=D1=81?= =?UTF-8?q?=D0=BE=D0=B2=D0=BA=D0=B8=20=D1=83=D0=B7=D0=BB=D0=B0=20=D0=BD?= =?UTF-8?q?=D1=83=D0=B6=D0=BD=D0=BE=20=D0=BF=D0=B5=D1=80=D0=B5=D1=80=D0=B8?= =?UTF-8?q?=D1=81=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D0=B5=D0=B3=D0=BE=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D1=81=D0=BE=D0=BD=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=BE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- properties | 4 ++-- src/Common/Visual/Trees/TreeForm.java | 4 ++-- src/_VisualDVM/Passes/All/SPF_GetGraphFunctions.java | 5 +++++ src/_VisualDVM/Passes/All/SPF_ParseFilesWithOrder.java | 2 ++ src/_VisualDVM/ProjectData/Project/db_project_info.java | 7 +++++++ src/_VisualDVM/Repository/Component/Visualiser.java | 2 +- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/properties b/properties index 9069739e..46b317e3 100644 --- a/properties +++ b/properties @@ -1,6 +1,6 @@ { "Workspace": "E:\\Tests", - "ProjectsSearchDirectory": "E:\\BUG", + "ProjectsSearchDirectory": "C:\\Users\\misha\\Documents\\visual_sapfor_2023\\Downloads\\bugreport_1732787997\\reg_detect_titan\\v7", "VisualiserPath": "C:\\Users\\misha\\Downloads", "Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F", "Visualizer_2Path": "C:\\Users\\misha\\Documents", @@ -11,7 +11,7 @@ "AutoTestsLoad": true, "ConfirmPassesStart": true, "ShowPassesDone": true, - "FocusPassesResult": true, + "FocusPassesResult": false, "collapseCredentials": false, "collapseFileGraphs": false, "collapseFileMessages": false, diff --git a/src/Common/Visual/Trees/TreeForm.java b/src/Common/Visual/Trees/TreeForm.java index 0b8e1a74..41aaaa89 100644 --- a/src/Common/Visual/Trees/TreeForm.java +++ b/src/Common/Visual/Trees/TreeForm.java @@ -12,7 +12,7 @@ public class TreeForm extends ControlForm { } @Override protected void redrawControl() { - getTree().revalidate(); - getTree().repaint(); + getTree().revalidate(); + getTree().repaint(); } } diff --git a/src/_VisualDVM/Passes/All/SPF_GetGraphFunctions.java b/src/_VisualDVM/Passes/All/SPF_GetGraphFunctions.java index d17a1ab8..220095b8 100644 --- a/src/_VisualDVM/Passes/All/SPF_GetGraphFunctions.java +++ b/src/_VisualDVM/Passes/All/SPF_GetGraphFunctions.java @@ -141,5 +141,10 @@ public class SPF_GetGraphFunctions extends SapforAnalysis { if (Global.mainModule.HasFile()) Global.mainModule.getFile().form.ShowFunctions(); Global.mainModule.getPass(PassCode.SPF_GetGraphFunctionPositions).Do(); + //-- + DBProjectFile main=target.getMainProgramUnit(); + if (main!=null){ + Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(main.node); + } } } \ No newline at end of file diff --git a/src/_VisualDVM/Passes/All/SPF_ParseFilesWithOrder.java b/src/_VisualDVM/Passes/All/SPF_ParseFilesWithOrder.java index 271acc4f..54c1071c 100644 --- a/src/_VisualDVM/Passes/All/SPF_ParseFilesWithOrder.java +++ b/src/_VisualDVM/Passes/All/SPF_ParseFilesWithOrder.java @@ -11,6 +11,8 @@ import _VisualDVM.Repository.Component.Sapfor.Sapfor; import _VisualDVM.Repository.Component.Sapfor.TransformationPermission; import org.apache.commons.io.FileUtils; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.TreeNode; import java.util.Vector; public class SPF_ParseFilesWithOrder extends SapforAnalysis { public static boolean silent = false; diff --git a/src/_VisualDVM/ProjectData/Project/db_project_info.java b/src/_VisualDVM/ProjectData/Project/db_project_info.java index bc9eb06f..f478d70f 100644 --- a/src/_VisualDVM/ProjectData/Project/db_project_info.java +++ b/src/_VisualDVM/ProjectData/Project/db_project_info.java @@ -1539,4 +1539,11 @@ public class db_project_info extends DBObject { } return true; } + public DBProjectFile getMainProgramUnit(){ + for (DBProjectFile file: db.files.Data.values()){ + if (file.isMain!=0) + return file; + } + return null; + } } diff --git a/src/_VisualDVM/Repository/Component/Visualiser.java b/src/_VisualDVM/Repository/Component/Visualiser.java index 5f35f9c1..9a44a2d6 100644 --- a/src/_VisualDVM/Repository/Component/Visualiser.java +++ b/src/_VisualDVM/Repository/Component/Visualiser.java @@ -60,7 +60,7 @@ public class Visualiser extends Component { //http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html @Override public void GetVersionInfo() { - version = 1139; + version = 1140; String pattern = "MMM dd yyyy HH:mm:ss"; DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH); date_text = df.format(getClassBuildTime());