no message
This commit is contained in:
@@ -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