NIHVIVO-1562 Show class of template directive/model in dump. Use LinkedHashMap in help data structure to ensure ordering of the entries.
This commit is contained in:
parent
b6ea045503
commit
1b9f4bbdce
11 changed files with 37 additions and 25 deletions
|
@ -54,6 +54,7 @@ public abstract class BaseDumpDirective implements TemplateDirectiveModel {
|
|||
private static final Pattern PROPERTY_NAME_PATTERN = Pattern.compile("^(get|is)\\w");
|
||||
|
||||
enum Key {
|
||||
CLASS("class"),
|
||||
DATE_TYPE("dateType"),
|
||||
HELP("help"),
|
||||
METHODS("methods"),
|
||||
|
@ -430,6 +431,7 @@ public abstract class BaseDumpDirective implements TemplateDirectiveModel {
|
|||
private Map<String, Object> getTemplateModelDump(TemplateMethodModel model, String varName) throws TemplateModelException {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put(Key.TYPE.toString(), Type.METHOD);
|
||||
map.put(Key.CLASS.toString(), model.getClass().getName());
|
||||
map.put(Key.HELP.toString(), getHelp(model, varName));
|
||||
return map;
|
||||
}
|
||||
|
@ -437,6 +439,7 @@ public abstract class BaseDumpDirective implements TemplateDirectiveModel {
|
|||
private Map<String, Object> getTemplateModelDump(TemplateDirectiveModel model, String varName) throws TemplateModelException {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put(Key.TYPE.toString(), Type.DIRECTIVE);
|
||||
map.put(Key.CLASS.toString(), model.getClass().getName());
|
||||
map.put(Key.HELP.toString(), getHelp(model, varName));
|
||||
return map;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue