Add minimal description to ad-hoc properties
This commit is contained in:
@@ -108,7 +108,8 @@ public class AdHocSpringPropertyIndexProvider implements SpringPropertyIndexProv
|
||||
if (props!=null) {
|
||||
for (Object p : props.keySet()) {
|
||||
if (p instanceof String) {
|
||||
index.add(new PropertyInfo((String)p));
|
||||
String filename = file.getName();
|
||||
index.add(new PropertyInfo((String)p).setDescription("Ad-hoc property defined in '"+filename+"'"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class PropertyInfo {
|
||||
private String type;
|
||||
final private String name;
|
||||
final private Object defaultValue;
|
||||
final private String description;
|
||||
private String description;
|
||||
private List<PropertySource> sources;
|
||||
private Deprecation deprecation;
|
||||
private ImmutableList<ValueHint> valueHints;
|
||||
@@ -194,6 +194,11 @@ public class PropertyInfo {
|
||||
return new PropertyInfo(alias, type, name, defaultValue, description, deprecation, valueHints, keyHints, valueProvider, keyProvider, sources);
|
||||
}
|
||||
|
||||
public PropertyInfo setDescription(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setDeprecation(Deprecation d) {
|
||||
this.deprecation = d;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user