Add documentation loading for functions.

This commit is contained in:
Danila Fedorin 2017-08-25 01:51:14 -07:00
parent 1a47e07e97
commit 1f0addccea
2 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,6 @@ package org.nwapw.abacus.function;
*/
public enum DocumentationType {
FUNCTION
FUNCTION, TREE_VALUE_FUNCTION
}

View File

@ -360,6 +360,8 @@ public class AbacusController implements PluginListener {
PluginManager pluginManager = abacus.getPluginManager();
functionList.addAll(manager.getAllFunctions().stream().map(name -> pluginManager.documentationFor(name, DocumentationType.FUNCTION))
.collect(Collectors.toCollection(ArrayList::new)));
functionList.addAll(manager.getAllTreeValueFunctions().stream().map(name -> pluginManager.documentationFor(name, DocumentationType.TREE_VALUE_FUNCTION))
.collect(Collectors.toCollection(ArrayList::new)));
functionList.sort(Comparator.comparing(Documentation::getCodeName));
}