no message

This commit is contained in:
2025-01-11 02:09:44 +03:00
parent fcc2bbaf04
commit d495a5afb7
4 changed files with 21 additions and 45 deletions

2
.idea/workspace.xml generated
View File

@@ -10,7 +10,7 @@
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <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$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalProperties.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalProperties.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/VisualiserSettingsMenu/VisualiserSettingsMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/VisualiserSettingsMenu/VisualiserSettingsMenu.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateProperty.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateProperty.java" afterDir="false" />
</list> </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" />

View File

@@ -48,5 +48,5 @@
"FortranWrapsOn": false, "FortranWrapsOn": false,
"ExtensionsOn": false, "ExtensionsOn": false,
"ComparsionDiffMergeOn": true, "ComparsionDiffMergeOn": true,
"BugReportsAgeLimit": 6 "BugReportsAgeLimit": 3
} }

View File

@@ -299,18 +299,9 @@ public class GlobalProperties {
menuItem.addActionListener(new ActionListener() { menuItem.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
switch (fieldName){ if (Global.mainModule.getPass(PassCode.UpdateProperty).Do(fieldName))
case "BugReportsAgeLimit":
SliderNumberForm f = new SliderNumberForm();
if (f.ShowDialog(getFieldDescription(fieldName), getValue(fieldName), 1, 12)) {
int newValue = f.Result;
if (Global.mainModule.getPass(PassCode.UpdateProperty).Do(fieldName, newValue)) {
Mark(fieldName, menuItem); Mark(fieldName, menuItem);
} }
}
break;
}
}
}); });
controls.put(fieldName,menuItem); controls.put(fieldName,menuItem);
} }
@@ -333,32 +324,4 @@ public class GlobalProperties {
ex.printStackTrace(); ex.printStackTrace();
} }
} }
/*
public ActionListener getChangeAction(String fieldName){
try {
String description = getFieldDescription(fieldName);
Object oldValue = this.getClass().getField(fieldName).get(this);
return new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
switch (fieldName) {
case "BugReportsAgeLimit":
SliderNumberForm f = new SliderNumberForm();
if (f.ShowDialog(description, oldValue, 1, 12)) {
int newValue = f.Result;
if (Global.mainModule.getPass(PassCode.UpdateProperty).Do(fieldName, newValue)) {
menu_item.setText(description + " : " + newValue);
}
}
break;
}
}
};
}
catch (Exception ex){
ex.printStackTrace();
}
}
*/
} }

View File

@@ -1,7 +1,9 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.Passes.Pass; import Common.Passes.Pass;
import Common.Visual.Windows.Dialog.SliderNumberForm;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.GlobalProperties; import _VisualDVM.GlobalProperties;
import _VisualDVM.Passes.PassCode;
import java.lang.reflect.Field; import java.lang.reflect.Field;
public class UpdateProperty extends Pass<Object> { public class UpdateProperty extends Pass<Object> {
@@ -13,12 +15,23 @@ public class UpdateProperty extends Pass<Object> {
@Override @Override
protected boolean canStart(Object... args) throws Exception { protected boolean canStart(Object... args) throws Exception {
name = (String) args[0]; name = (String) args[0];
newValue = args[1]; String description = Global.properties.getFieldDescription(name);
//--
field = GlobalProperties.class.getField(name); field = GlobalProperties.class.getField(name);
oldValue = field.get(Global.properties); oldValue = field.get(Global.properties);
//--- newValue = null;
return !newValue.equals(oldValue); SliderNumberForm sliderNumberForm = new SliderNumberForm();
//-
if (args.length==1){
switch (name){
case "BugReportsAgeLimit":
if (sliderNumberForm.ShowDialog(description, oldValue, 1, 12))
newValue=sliderNumberForm.Result;
break;
}
}else
newValue = args[1];
//--
return newValue!=null&&!newValue.equals(oldValue);
} }
@Override @Override
protected void body() throws Exception { protected void body() throws Exception {