no message

This commit is contained in:
2025-01-16 19:53:51 +03:00
parent 328a00063e
commit 095c0bad9a
5 changed files with 59 additions and 9 deletions

8
.idea/workspace.xml generated
View File

@@ -6,7 +6,13 @@
</artifacts-to-build> </artifacts-to-build>
</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 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/GlobalData/SapforProfileSetting/UI/SapforProfileSettingsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/SapforProfileSetting/UI/SapforProfileSettingsForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ApplyProfile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ApplyProfile.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/SapforProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/SapforProperties.java" afterDir="false" />
</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" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />

View File

@@ -16,7 +16,7 @@
"collapseProjectTrees": false, "collapseProjectTrees": false,
"BackupWorkspace": "_sapfor_x64_backups", "BackupWorkspace": "_sapfor_x64_backups",
"Workspace": "E:\\Workspace", "Workspace": "E:\\Workspace",
"ProjectsSearchDirectory": "E:\\Workspace\\bugreport_1736951081\\test_routine_7", "ProjectsSearchDirectory": "E:\\BUG",
"EditorFontSize": 16, "EditorFontSize": 16,
"BackupHour": 5, "BackupHour": 5,
"BackupMinute": 0, "BackupMinute": 0,

View File

@@ -3,6 +3,7 @@ import Common.Database.Tables.DataSet;
import Common.MainModule_; import Common.MainModule_;
import Common.Visual.DataSetControlForm; import Common.Visual.DataSetControlForm;
import Common.Visual.Tables.ColumnInfo; import Common.Visual.Tables.ColumnInfo;
import _VisualDVM.Global;
import _VisualDVM.GlobalData.SapforProfile.SapforProfile; import _VisualDVM.GlobalData.SapforProfile.SapforProfile;
import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting; import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting;
@@ -17,7 +18,7 @@ public class SapforProfileSettingsForm extends DataSetControlForm<SapforProfileS
new ColumnInfo<SapforProfileSetting>("имя") { new ColumnInfo<SapforProfileSetting>("имя") {
@Override @Override
public Object getFieldAt(SapforProfileSetting object) { public Object getFieldAt(SapforProfileSetting object) {
return "?"; // object.name.getDescription(); return Global.mainModule.getProject().sapforProperties.getFieldDescription(object.name);
} }
}, },
new ColumnInfo<SapforProfileSetting>("значение") { new ColumnInfo<SapforProfileSetting>("значение") {

View File

@@ -35,11 +35,6 @@ public class ApplyProfile extends Pass<SapforProfile> {
if (sapforProfileSetting.sapforprofile_id == target.id) if (sapforProfileSetting.sapforprofile_id == target.id)
settings.add(sapforProfileSetting); settings.add(sapforProfileSetting);
//-- //--
/* Global.mainModule.getProject().sapforProperties.applyProfile(settings);
for (SapforProfileSetting setting : settings)
if (Global.mainModule.getDb().settings.containsKey(setting.name))
Global.mainModule.getPass(PassCode.UpdateSetting).Do(setting.name, setting.value);
//--
*/
} }
} }

View File

@@ -3,6 +3,7 @@ import Common.Properties;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Utils.Vector_; import Common.Utils.Vector_;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting;
import _VisualDVM.Passes.PassCode; import _VisualDVM.Passes.PassCode;
import _VisualDVM.Repository.BugReport.Json.VisualiserSettingJson; import _VisualDVM.Repository.BugReport.Json.VisualiserSettingJson;
import _VisualDVM.Repository.BugReport.Json.VisualiserSettingsJson; import _VisualDVM.Repository.BugReport.Json.VisualiserSettingsJson;
@@ -224,4 +225,51 @@ public class SapforProperties extends Properties {
ex.printStackTrace(); ex.printStackTrace();
} }
} }
public void applyProfile(Vector<SapforProfileSetting> settings){
Vector<String> changedFields = new Vector<>();
try {
for (SapforProfileSetting setting : settings) {
System.out.println(setting.name+"="+ Utils_.Brackets(setting.value));
Field field = null;
try {
field = getClass().getField(setting.name);
}
catch (Exception ex){
ex.printStackTrace();
}
if (field!=null) {
if (field.getName().equals(setting.name)) {
changedFields.add(setting.name);
switch (setting.name) {
case "GCOVLimit":
GCOVLimit = Integer.parseInt(setting.value);
break;
case "MAX_SHADOW_WIDTH":
MAX_SHADOW_WIDTH = Integer.parseInt(setting.value);
break;
case "ANALYSIS_OPTIONS":
ANALYSIS_OPTIONS = setting.value;
break;
case "DVMConvertationOptions":
DVMConvertationOptions = setting.value;
break;
default:
int value_ = Integer.parseInt(setting.value);
field.set(this, value_ != 0);
break;
}
}
}
}
if (!changedFields.isEmpty()) {
this.Update();
for (String fieldName: changedFields){
Mark(fieldName, getMenuItem(fieldName));
}
}
}
catch (Exception ex) {
ex.printStackTrace();
}
}
} }