Index: DefaultFunctionElement.java
===================================================================
--- DefaultFunctionElement.java	(revision 44258)
+++ DefaultFunctionElement.java	(revision 44259)
@@ -28,17 +28,16 @@
         implements FunctionElement {
 
     private final Function function;
-    private final ExpressionBuilderConfig config;
 
-    public DefaultFunctionElement(ExpressionBuilderConfig config, Function function) {
+    public DefaultFunctionElement(Function function) {
         super(
                 function.name(),
+                function.name(),
                 function.isSQLCompatible()
                 ? "expressionbuilder-element-function-sql"
                 : "expressionbuilder-element-function"
         );
         this.function = function;
-        this.config = config;
     }
 
     @Override
@@ -48,7 +47,7 @@
 
     @Override
     public boolean isEnabled() {
-        if( this.config.isSQLCompatible() ) {
+        if( this.getConfig().getPreferences().isSQLCompatible() ) {
             return this.function.isSQLCompatible();
         }
         return true;
@@ -65,6 +64,26 @@
     }
 
     @Override
+    public String getName() {
+        return this.function.name();
+    }
+
+    @Override
+    public Object getValue() {
+        return this.function.name();
+    }
+
+    @Override
+    public String getLabel() {
+        return "<html><b>" + function.name() + "</b> return " + function.returnType() + "</html>";
+    }
+
+    @Override
+    public String getRenderedValue() {
+        return function.template() == null ? function.name() + "({{}})" : function.template();
+    }
+
+    @Override
     public String getDescription() {
         I18nManager i18n = ToolsLocator.getI18nManager();
 
@@ -72,42 +91,36 @@
         html.append("<html>\n");
 
         Function theFunction = this.getFunction();
-        if (theFunction == null) {
-            html.append("<b>").append(i18n.getTranslation("_Function")).append("</b> ").append(this.getName()).append("<br>\n<br>\n");
-            html.append("<b>").append(i18n.getTranslation("_Return")).append("</b> Object<br>\n<br>\n");
-            html.append("<b>").append(i18n.getTranslation("_Template")).append(":</b> ").append(this.getName()).append("()<br>\n");
-        } else {
-            html.append("<b>").append(i18n.getTranslation("_Function")).append("</b> ").append(this.getName()).append("<br>\n<br>\n");
-            List<String> aliases = theFunction.aliases();
-            if( aliases!=null && !aliases.isEmpty() ) {
-                html.append("<b>").append(i18n.getTranslation("_Aliases")).append(":</b> ").append("<ul>\n");
-                for (String alias : aliases) {
-                    html.append("<li>").append(alias).append("</li>\n");
-                }
-                html.append("</ul>\n");
+        html.append("<b>").append(i18n.getTranslation("_Function")).append("</b> ").append(this.getName()).append("<br>\n<br>\n");
+        List<String> aliases = theFunction.aliases();
+        if( aliases!=null && !aliases.isEmpty() ) {
+            html.append("<b>").append(i18n.getTranslation("_Aliases")).append(":</b> ").append("<ul>\n");
+            for (String alias : aliases) {
+                html.append("<li>").append(alias).append("</li>\n");
             }
-            html.append("<b>").append(i18n.getTranslation("_Return")).append("</b> ");
-            html.append(StringUtils.isEmpty(theFunction.returnType()) ? "Objec" : theFunction.returnType());
-            html.append("<br>\n");
-            html.append("<b>").append(i18n.getTranslation("_Template")).append("</b> ");
-            html.append(StringUtils.isEmpty(theFunction.template()) ? this.getName() + "()" : theFunction.template());
-            html.append("<br>\n");
+            html.append("</ul>\n");
+        }
+        html.append("<b>").append(i18n.getTranslation("_Return")).append("</b> ");
+        html.append(StringUtils.isEmpty(theFunction.returnType()) ? "Objec" : theFunction.returnType());
+        html.append("<br>\n");
+        html.append("<b>").append(i18n.getTranslation("_Template")).append("</b> ");
+        html.append(StringUtils.isEmpty(theFunction.template()) ? this.getName() + "()" : theFunction.template());
+        html.append("<br>\n");
 
-            String[] args = theFunction.descriptionArgs();
-            if (args != null) {
-                html.append("<b>").append(i18n.getTranslation("_Arguments")).append(":</b> ").append("<ul>\n");
-                for (String arg : args) {
-                    html.append("<li>").append(arg).append("</li>\n");
-                }
-                html.append("</ul>\n");
-                html.append("<br>\n");
+        String[] args = theFunction.descriptionArgs();
+        if (args != null) {
+            html.append("<b>").append(i18n.getTranslation("_Arguments")).append(":</b> ").append("<ul>\n");
+            for (String arg : args) {
+                html.append("<li>").append(arg).append("</li>\n");
             }
-            String functionDescription = theFunction.description();
-            if( !StringUtils.isBlank(functionDescription) ) {
-                html.append("<b>").append(i18n.getTranslation("_Description")).append("</b><br>\n");
-                html.append(functionDescription.replace("\n", "<br>")).append("<br>\n");
-            }            
+            html.append("</ul>\n");
+            html.append("<br>\n");
         }
+        String functionDescription = theFunction.description();
+        if( !StringUtils.isBlank(functionDescription) ) {
+            html.append("<b>").append(i18n.getTranslation("_Description")).append("</b><br>\n");
+            html.append(functionDescription.replace("\n", "<br>")).append("<br>\n");
+        }            
 
         html.append("</html>\n");
         return html.toString();
