no message
This commit is contained in:
8
.idea/workspace.xml
generated
8
.idea/workspace.xml
generated
@@ -6,7 +6,13 @@
|
||||
</artifacts-to-build>
|
||||
</component>
|
||||
<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="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"collapseProjectTrees": false,
|
||||
"BackupWorkspace": "_sapfor_x64_backups",
|
||||
"Workspace": "E:\\Workspace",
|
||||
"ProjectsSearchDirectory": "E:\\Workspace\\bugreport_1736951081\\test_routine_7",
|
||||
"ProjectsSearchDirectory": "E:\\BUG",
|
||||
"EditorFontSize": 16,
|
||||
"BackupHour": 5,
|
||||
"BackupMinute": 0,
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Tables.ColumnInfo;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.SapforProfile.SapforProfile;
|
||||
import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting;
|
||||
|
||||
@@ -17,7 +18,7 @@ public class SapforProfileSettingsForm extends DataSetControlForm<SapforProfileS
|
||||
new ColumnInfo<SapforProfileSetting>("имя") {
|
||||
@Override
|
||||
public Object getFieldAt(SapforProfileSetting object) {
|
||||
return "?"; // object.name.getDescription();
|
||||
return Global.mainModule.getProject().sapforProperties.getFieldDescription(object.name);
|
||||
}
|
||||
},
|
||||
new ColumnInfo<SapforProfileSetting>("значение") {
|
||||
|
||||
@@ -35,11 +35,6 @@ public class ApplyProfile extends Pass<SapforProfile> {
|
||||
if (sapforProfileSetting.sapforprofile_id == target.id)
|
||||
settings.add(sapforProfileSetting);
|
||||
//--
|
||||
/*
|
||||
for (SapforProfileSetting setting : settings)
|
||||
if (Global.mainModule.getDb().settings.containsKey(setting.name))
|
||||
Global.mainModule.getPass(PassCode.UpdateSetting).Do(setting.name, setting.value);
|
||||
//--
|
||||
*/
|
||||
Global.mainModule.getProject().sapforProperties.applyProfile(settings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Properties;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Utils.Vector_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Repository.BugReport.Json.VisualiserSettingJson;
|
||||
import _VisualDVM.Repository.BugReport.Json.VisualiserSettingsJson;
|
||||
@@ -224,4 +225,51 @@ public class SapforProperties extends Properties {
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user