Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionBuilder.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionBuilder.java	(revision 43969)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionBuilder.java	(revision 43970)
@@ -36,9 +36,9 @@
     
     private class ElementsTreeModel implements TreeModel {
 
-        private final DefaultGroupElement root;
+        private final GroupElement root;
         
-        public ElementsTreeModel(DefaultGroupElement root) {
+        public ElementsTreeModel(GroupElement root) {
             this.root = root;
         }
         
@@ -47,7 +47,7 @@
             return this.root;
         }
 
-        private List<Element> getChilds(final DefaultGroupElement node) {
+        private List<Element> getChilds(final GroupElement node) {
             return node.getElements();
         }
         
@@ -105,7 +105,9 @@
         toolsSwingManager.setDefaultPopupMenu(this.txtDescription);
         toolsSwingManager.addClearButton(this.txtSimpleElementFilter);
         
-        TreeModel model = new ElementsTreeModel(new DefaultGroupElement("Elements", this.getElements()));
+        TreeModel model = new ElementsTreeModel(
+                this.manager.createGroup("Elements", this.getElements())
+        );
         this.treeElements.setModel(model);
         this.treeElements.addTreeSelectionListener(new TreeSelectionListener() {
             @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionEvaluatorSwingManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionEvaluatorSwingManager.java	(revision 43969)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionEvaluatorSwingManager.java	(revision 43970)
@@ -78,6 +78,12 @@
     }
     
     @Override
+    public GroupElement createGroup(String name, List<Element>elements) {
+        DefaultGroupElement g = new DefaultGroupElement(name);
+        return g;
+    }
+    
+    @Override
     public Element createElement(Function function) {
         Element f = new DefaultFunctionElement(function);
         return f;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultGroupElement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultGroupElement.java	(revision 43969)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultGroupElement.java	(revision 43970)
@@ -8,6 +8,8 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+import org.gvsig.expressionevaluator.Function;
+import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager;
 import org.gvsig.expressionevaluator.swing.JExpressionBuilder;
 
 /**
@@ -18,8 +20,10 @@
     
     private final String name;
     private final List<JExpressionBuilder.Element> elements;
+    private ExpressionEvaluatorSwingManager manager;
 
-    public DefaultGroupElement(String name, List<JExpressionBuilder.Element> elements) {
+    public DefaultGroupElement(ExpressionEvaluatorSwingManager manager, String name, List<JExpressionBuilder.Element> elements) {
+        this.manager = manager;
         this.name = name;
         this.elements = elements;
     }
@@ -62,5 +66,11 @@
     public String getDescription() {
         return null;
     }
+
+    @Override
+    public void addElement(Function function) {
+        JExpressionBuilder.Element item = this.manager.createElement(function);
+        this.addElement(item);
+    }
     
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/ExpressionEvaluatorSwingManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/ExpressionEvaluatorSwingManager.java	(revision 43969)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/ExpressionEvaluatorSwingManager.java	(revision 43970)
@@ -2,13 +2,20 @@
 package org.gvsig.expressionevaluator.swing;
 
 import java.util.List;
+import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.swing.JExpressionBuilder.Element;
+import org.gvsig.expressionevaluator.swing.JExpressionBuilder.GroupElement;
 
-
 public interface ExpressionEvaluatorSwingManager {
 
     public List<Element> getElements();
     
     public JExpressionBuilder createJExpressionBuilder();
+    
+    public GroupElement createGroup(String name);
+    
+    public GroupElement createGroup(String name, List<Element> elements);
 
+    public Element createElement(Function function);
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/JExpressionBuilder.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/JExpressionBuilder.java	(revision 43969)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/JExpressionBuilder.java	(revision 43970)
@@ -34,6 +34,8 @@
         
         public void addElement(Element element);
         public void addElement(Function function);
+
+        public List<Element> getElements();
     }
 
 
