Add default value to config comments

This commit is contained in:
makamys committed 2023-02-17 01:38:11 +01:00
1 parent 56b2f4c651
commit a05507f043
1 file changed
+6
@@ -27,6 +27,11 @@ public class AnnotatedProperties {
prop = new PropertyToken(comment, key, def);
}
prop.defaultValue = def;
prop.comment.removeIf(s -> s.startsWith("[default:"));
prop.comment.add("[default: " + prop.defaultValue + "]");
setFieldValue(f, prop.value);
propertyTokens.put(key, prop);
@@ -105,6 +110,7 @@ public class AnnotatedProperties {
public List<String> comment;
public String key;
public String value;
public String defaultValue;
public PropertyToken(List<String> comment, String propertyString) {
this.comment = comment;