Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/pom.xml
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/pom.xml	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/pom.xml	(revision 420)
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.gvsig.expressionfield</artifactId>
+    <name>${project.artifactId}</name>
+    <version>2.0.78</version>
+    <description>Field calculator (Expression from assistant or from text file)</description>
+
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.desktop</artifactId>
+        <version>2.0.237</version>
+    </parent>
+
+    <url>https://devel.gvsig.org/redmine/projects/gvsig-expression-field</url>
+
+    <scm>
+        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-expression-field/org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-expression-field/org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78</developerConnection>
+        <url>scm:svn:https://devel.gvsig.org/svn/gvsig-expression-field/org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78</url>
+    </scm>
+
+  <repositories>
+    <repository>
+      <id>gvsig-public-http-repository</id>
+      <name>gvSIG maven public HTTP repository</name>
+      <url>http://devel.gvsig.org/m2repo/j2se</url>
+      <releases>
+        <enabled>true</enabled>
+        <updatePolicy>daily</updatePolicy>
+        <checksumPolicy>warn</checksumPolicy>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+        <updatePolicy>daily</updatePolicy>
+        <checksumPolicy>warn</checksumPolicy>
+      </snapshots>
+    </repository>
+  </repositories>
+
+    <dependencyManagement>
+        <dependencies>
+            <!-- Adding this dependency because this project is using a jython version
+            different to the version defined by the parent pom  -->
+            <dependency>
+                <groupId>org.python</groupId>
+                <artifactId>jython</artifactId>
+                <version>2.2.1</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.app.mainplugin</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.app.document.table.app.mainplugin</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>bsf</groupId>
+            <artifactId>bsf</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>bsh</groupId>
+            <artifactId>bsh</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.about.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.andami</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.swing.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.ui</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.control</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.utils</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.timesupport.lib.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.fifesoft</groupId>
+            <artifactId>rsyntaxtextarea</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.python</groupId>
+            <artifactId>jython</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+
+
+    <build>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-release-plugin</artifactId>
+                <version>2.0</version>
+                <configuration>
+                    <tagBase>https://devel.gvsig.org/svn/gvsig-expression-field/org.gvsig.expressionfield/tags</tagBase>
+                </configuration>
+            </plugin>
+
+        </plugins>
+
+    </build>
+
+
+    <properties>
+        <gvsig.package.info.name>Tools: Field calculator</gvsig.package.info.name>
+        <gvsig.package.info.dependencies>required: org.gvsig.app.document.table.app.mainplugin -ge 2</gvsig.package.info.dependencies>
+        <gvsig.package.info.javaVM>j1_6</gvsig.package.info.javaVM>
+        <gvsig.package.info.state>testing</gvsig.package.info.state>
+        <gvsig.package.info.official>true</gvsig.package.info.official>
+        <!-- alpha-devel -->
+        <gvsig.package.info.categories>Table</gvsig.package.info.categories>
+        <gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-expression-field/pool</gvsig.package.info.poolURL>
+
+    </properties>
+</project>
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/buildNumber.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/buildNumber.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/buildNumber.properties	(revision 420)
@@ -0,0 +1,2 @@
+#Mon Jan 28 17:48:55 CET 2019
+buildNumber=2156
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/test/java/org/gvsig/expressionfield/AllTests.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/test/java/org/gvsig/expressionfield/AllTests.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/test/java/org/gvsig/expressionfield/AllTests.java	(revision 420)
@@ -0,0 +1,17 @@
+package org.gvsig.expressionfield;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(
+				"Test for com.iver.cit.gvsig.expressionField");
+		//$JUnit-BEGIN$
+
+		//$JUnit-END$
+		return suite;
+	}
+
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/AboutExpressionFieldExtension.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/AboutExpressionFieldExtension.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/AboutExpressionFieldExtension.java	(revision 420)
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield;
+
+import org.gvsig.about.AboutManager;
+import org.gvsig.about.AboutParticipant;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.ApplicationManager;
+
+
+/**
+ * About extension.
+ *
+ * Add the about coments to the gvSIG About panel
+ */
+
+public class AboutExpressionFieldExtension extends Extension {
+
+	public void initialize() {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void postInitialize() {
+		ApplicationManager application = ApplicationLocator.getManager();
+		
+		AboutManager about = application.getAbout();
+
+		about.addDeveloper(
+				"IVER",
+				this.getClass().getClassLoader().getResource("iver.html"),
+				1
+		);
+		
+		AboutParticipant participant = about.getDeveloper("IVER");
+		participant.addContribution(
+			"Expression field",
+			"Extesión para el cálculo de una expresión sobre una columna de la tabla.", 
+			2007,1,1, 
+			2007,12,31
+		);
+	}
+
+	public void execute(String actionCommand) {
+
+	}
+
+	public boolean isEnabled() {
+		return false;
+	}
+
+	public boolean isVisible() {
+		return false;
+	}
+
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/ExpressionFieldExtension.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/ExpressionFieldExtension.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/ExpressionFieldExtension.java	(revision 420)
@@ -0,0 +1,307 @@
+/**
+ * *****************************************************************************
+ *
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ *
+ ******************************************************************************
+ */
+package org.gvsig.expressionfield;
+
+import java.awt.Component;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.swing.JOptionPane;
+
+import org.apache.bsf.BSFManager;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.app.project.documents.table.gui.FeatureTableDocumentPanel;
+import org.gvsig.expressionfield.gui.FieldExpressionPage;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+import org.gvsig.expressionfield.project.documents.table.gui.EvalExpressionDialog;
+import org.gvsig.expressionfield.project.documents.table.operators.Abs;
+import org.gvsig.expressionfield.project.documents.table.operators.Acos;
+import org.gvsig.expressionfield.project.documents.table.operators.After;
+import org.gvsig.expressionfield.project.documents.table.operators.Area;
+import org.gvsig.expressionfield.project.documents.table.operators.Asin;
+import org.gvsig.expressionfield.project.documents.table.operators.Atan;
+import org.gvsig.expressionfield.project.documents.table.operators.Before;
+import org.gvsig.expressionfield.project.documents.table.operators.Ceil;
+import org.gvsig.expressionfield.project.documents.table.operators.Cos;
+import org.gvsig.expressionfield.project.documents.table.operators.DateToString;
+import org.gvsig.expressionfield.project.documents.table.operators.Distinct;
+import org.gvsig.expressionfield.project.documents.table.operators.Division;
+import org.gvsig.expressionfield.project.documents.table.operators.E;
+import org.gvsig.expressionfield.project.documents.table.operators.EndsWith;
+import org.gvsig.expressionfield.project.documents.table.operators.Equal;
+import org.gvsig.expressionfield.project.documents.table.operators.Equals;
+import org.gvsig.expressionfield.project.documents.table.operators.Exp;
+import org.gvsig.expressionfield.project.documents.table.operators.Floor;
+import org.gvsig.expressionfield.project.documents.table.operators.Geometry;
+import org.gvsig.expressionfield.project.documents.table.operators.GetTimeDate;
+import org.gvsig.expressionfield.project.documents.table.operators.IndexOf;
+import org.gvsig.expressionfield.project.documents.table.operators.IsNumber;
+import org.gvsig.expressionfield.project.documents.table.operators.LastIndexOf;
+import org.gvsig.expressionfield.project.documents.table.operators.Length;
+import org.gvsig.expressionfield.project.documents.table.operators.LessEquals;
+import org.gvsig.expressionfield.project.documents.table.operators.LessThan;
+import org.gvsig.expressionfield.project.documents.table.operators.Log;
+import org.gvsig.expressionfield.project.documents.table.operators.Max;
+import org.gvsig.expressionfield.project.documents.table.operators.Min;
+import org.gvsig.expressionfield.project.documents.table.operators.Minus;
+import org.gvsig.expressionfield.project.documents.table.operators.MoreEquals;
+import org.gvsig.expressionfield.project.documents.table.operators.MoreThan;
+import org.gvsig.expressionfield.project.documents.table.operators.Perimeter;
+import org.gvsig.expressionfield.project.documents.table.operators.Pi;
+import org.gvsig.expressionfield.project.documents.table.operators.Plus;
+import org.gvsig.expressionfield.project.documents.table.operators.PointX;
+import org.gvsig.expressionfield.project.documents.table.operators.PointY;
+import org.gvsig.expressionfield.project.documents.table.operators.Pow;
+import org.gvsig.expressionfield.project.documents.table.operators.Random;
+import org.gvsig.expressionfield.project.documents.table.operators.RecordIndex;
+import org.gvsig.expressionfield.project.documents.table.operators.Replace;
+import org.gvsig.expressionfield.project.documents.table.operators.Round;
+import org.gvsig.expressionfield.project.documents.table.operators.SetTimeDate;
+import org.gvsig.expressionfield.project.documents.table.operators.Sin;
+import org.gvsig.expressionfield.project.documents.table.operators.Sqrt;
+import org.gvsig.expressionfield.project.documents.table.operators.StartsWith;
+import org.gvsig.expressionfield.project.documents.table.operators.SubString;
+import org.gvsig.expressionfield.project.documents.table.operators.Tan;
+import org.gvsig.expressionfield.project.documents.table.operators.Times;
+import org.gvsig.expressionfield.project.documents.table.operators.ToDate;
+import org.gvsig.expressionfield.project.documents.table.operators.ToDegrees;
+import org.gvsig.expressionfield.project.documents.table.operators.ToLowerCase;
+import org.gvsig.expressionfield.project.documents.table.operators.ToNumber;
+import org.gvsig.expressionfield.project.documents.table.operators.ToRadians;
+import org.gvsig.expressionfield.project.documents.table.operators.ToString;
+import org.gvsig.expressionfield.project.documents.table.operators.ToUpperCase;
+import org.gvsig.expressionfield.project.documents.table.operators.Trim;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+import org.gvsig.utils.swing.threads.AbstractMonitorableTask;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class ExpressionFieldExtension extends Extension {
+
+    private static Logger logger = LoggerFactory.getLogger(ExpressionFieldExtension.class);
+
+    public static final String JYTHON = "jython";
+    private static BSFManager interpreter = new BSFManager();
+    private FeatureTableDocumentPanel table = null;
+    private static ArrayList<IOperator> operators = new ArrayList<IOperator>();
+
+    public void initialize() {
+        registerIcons();
+        registerOperations();
+    }
+
+    public void execute(String actionCommand) {
+        if ( "table-expression-field".equalsIgnoreCase(actionCommand) ) {
+            org.gvsig.andami.ui.mdiManager.IWindow window = PluginServices.getMDIManager().getActiveWindow();
+            table = (FeatureTableDocumentPanel) window;
+            if ( !table.getModel().getStore().isEditing() ) {
+                int option = JOptionPane.showConfirmDialog((Component) PluginServices.getMainFrame(), PluginServices.getText(this, "is_not_in_editing_are_you_sure"));
+                if ( option != JOptionPane.OK_OPTION ) {
+                    return;
+                }
+            }
+            if ( operators.isEmpty() ) {
+                PluginServices.cancelableBackgroundExecution(new EvalOperatorsTask());
+            } else {
+                EvalExpressionDialog eed = new EvalExpressionDialog(table, interpreter, operators);
+                PluginServices.getMDIManager().addWindow(eed);
+            }
+        }
+    }
+
+    public void postInitialize() {
+
+    }
+
+    public boolean isEnabled() {
+        org.gvsig.andami.ui.mdiManager.IWindow window = PluginServices.getMDIManager().getActiveWindow();
+        if ( window instanceof FeatureTableDocumentPanel ) {
+            FeatureTableDocumentPanel table = (FeatureTableDocumentPanel) window;
+            int columnSelected = 0;
+            try {
+                columnSelected = table.getTablePanel().getTable().getSelectedColumnCount();
+            } catch (DataException e) {
+                logger.error("Can't get selected column in table.", e);
+            }
+            if ( columnSelected > 0 && table.getModel().getStore().isEditing() ) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public boolean isVisible() {
+
+        org.gvsig.andami.ui.mdiManager.IWindow window = PluginServices.getMDIManager().getActiveWindow();
+        if ( window instanceof FeatureTableDocumentPanel ) {
+            return true;
+        }
+        return false;
+    }
+
+    private void registerOperations() {
+        ExtensionPointManager extensionPointsManager =ToolsLocator.getExtensionPointManager();
+        ExtensionPoint ep = extensionPointsManager.add("AplicationPreferences", "");
+        ep.append("fieldExpression", "", new FieldExpressionPage());
+
+        ExtensionPoint extensionPoints = ToolsLocator.getExtensionPointManager().add(
+                "ColumnOperators", "");
+        extensionPoints.append(Abs.class.toString(), "", Abs.class);
+        extensionPoints.append(Acos.class.toString(), "", Acos.class);
+        extensionPoints.append(After.class.toString(), "", After.class);
+        extensionPoints.append(Area.class.toString(), "", Area.class);
+        extensionPoints.append(Asin.class.toString(), "", Asin.class);
+        extensionPoints.append(Atan.class.toString(), "", Atan.class);
+        extensionPoints.append(Acos.class.toString(), "", Acos.class);
+        extensionPoints.append(Before.class.toString(), "", Before.class);
+        extensionPoints.append(Ceil.class.toString(), "", Ceil.class);
+        extensionPoints.append(Cos.class.toString(), "", Cos.class);
+        extensionPoints.append(DateToString.class.toString(), "", DateToString.class);
+        extensionPoints.append(Distinct.class.toString(), "", Distinct.class);
+        extensionPoints.append(Division.class.toString(), "", Division.class);
+        extensionPoints.append(E.class.toString(), "", E.class);
+        extensionPoints.append(EndsWith.class.toString(), "", EndsWith.class);
+        extensionPoints.append(Equal.class.toString(), "", Equal.class);
+        extensionPoints.append(Equals.class.toString(), "", Equals.class);
+        extensionPoints.append(Exp.class.toString(), "", Exp.class);
+        extensionPoints.append(Floor.class.toString(), "", Floor.class);
+        extensionPoints.append(Geometry.class.toString(), "", Geometry.class);
+        extensionPoints.append(GetTimeDate.class.toString(), "", GetTimeDate.class);
+        extensionPoints.append(IndexOf.class.toString(), "", IndexOf.class);
+        extensionPoints.append(IsNumber.class.toString(), "", IsNumber.class);
+        extensionPoints.append(LastIndexOf.class.toString(), "", LastIndexOf.class);
+        extensionPoints.append(Length.class.toString(), "", Length.class);
+        extensionPoints.append(LessEquals.class.toString(), "", LessEquals.class);
+        extensionPoints.append(LessThan.class.toString(), "", LessThan.class);
+        extensionPoints.append(Log.class.toString(), "", Log.class);
+        extensionPoints.append(Max.class.toString(), "", Max.class);
+        extensionPoints.append(Min.class.toString(), "", Min.class);
+        extensionPoints.append(Minus.class.toString(), "", Minus.class);
+        extensionPoints.append(MoreEquals.class.toString(), "", MoreEquals.class);
+        extensionPoints.append(MoreThan.class.toString(), "", MoreThan.class);
+        extensionPoints.append(Perimeter.class.toString(), "", Perimeter.class);
+        extensionPoints.append(Pi.class.toString(), "", Pi.class);
+        extensionPoints.append(Plus.class.toString(), "", Plus.class);
+        extensionPoints.append(PointX.class.toString(), "", PointX.class);
+        extensionPoints.append(PointY.class.toString(), "", PointY.class);
+        extensionPoints.append(Pow.class.toString(), "", Pow.class);
+        extensionPoints.append(Random.class.toString(), "", Random.class);
+
+        // Added November 2013
+        extensionPoints.append(RecordIndex.class.toString(), "", RecordIndex.class);
+
+        extensionPoints.append(Replace.class.toString(), "", Replace.class);
+        extensionPoints.append(Round.class.toString(), "", Round.class);
+        extensionPoints.append(SetTimeDate.class.toString(), "", SetTimeDate.class);
+        extensionPoints.append(Sin.class.toString(), "", Sin.class);
+        extensionPoints.append(Sqrt.class.toString(), "", Sqrt.class);
+        extensionPoints.append(StartsWith.class.toString(), "", StartsWith.class);
+        extensionPoints.append(SubString.class.toString(), "", SubString.class);
+        extensionPoints.append(Tan.class.toString(), "", Tan.class);
+        extensionPoints.append(Times.class.toString(), "", Times.class);
+        extensionPoints.append(ToDate.class.toString(), "", ToDate.class);
+        extensionPoints.append(ToDegrees.class.toString(), "", ToDegrees.class);
+        extensionPoints.append(ToLowerCase.class.toString(), "", ToLowerCase.class);
+        extensionPoints.append(ToNumber.class.toString(), "", ToNumber.class);
+        extensionPoints.append(ToRadians.class.toString(), "", ToRadians.class);
+        extensionPoints.append(ToString.class.toString(), "", ToString.class);
+        extensionPoints.append(ToUpperCase.class.toString(), "", ToUpperCase.class);
+        extensionPoints.append(Trim.class.toString(), "", Trim.class);
+    }
+
+    private void registerIcons() {
+        IconThemeHelper.registerIcon("action", "table-expression-field", this);
+        IconThemeHelper.registerIcon("preferences", "expression-field-preferences", this);
+    }
+
+    private class EvalOperatorsTask extends AbstractMonitorableTask {
+
+        private ExtensionPoint extensionPoint;
+
+        public EvalOperatorsTask() {
+            setInitialStep(0);
+            setDeterminatedProcess(true);
+            setStatusMessage(PluginServices.getText(this, "charging_operators") + "...");
+            this.extensionPoint = ToolsLocator.getExtensionPointManager().get(
+                    "ColumnOperators");
+            setFinalStep(extensionPoint.getCount() + 1);
+        }
+
+        public void run() throws Exception {
+            NotificationManager.addInfo(PluginServices.getText(this, "charging_operators"));
+            long t1 = System.currentTimeMillis();
+            Iterator iterator = extensionPoint.iterator();
+            while ( iterator.hasNext() ) {
+                try {
+                    if ( isCanceled() ) {
+                        return;
+                    }
+                    org.gvsig.tools.extensionpoint.ExtensionPoint.Extension obj = (org.gvsig.tools.extensionpoint.ExtensionPoint.Extension) iterator.next();
+                    IOperator operator = (IOperator) extensionPoint.create(obj.getName());
+
+                    operator.eval(interpreter);
+                    operators.add(operator);
+                    reportStep();
+                    setNote(operator.getClass().getName());
+                } catch (InstantiationException e) {
+                    e.printStackTrace();
+                } catch (IllegalAccessException e) {
+                    e.printStackTrace();
+                } catch (ClassCastException e) {
+                    e.printStackTrace();
+                }
+            }
+            long t2 = System.currentTimeMillis();
+            System.out.println("Tiempo en evaluar y crear del extension point = " + (t2 - t1));
+            long t3 = System.currentTimeMillis();
+            System.out.println("Tiempo en añadir los operadores correctos = " + (t3 - t2));
+            reportStep();
+        }
+
+        public void finished() {
+            if ( isCanceled() ) {
+                return;
+            }
+            NotificationManager.addInfo(PluginServices.getText(this, "charged_operators"));
+            EvalExpressionDialog eed = new EvalExpressionDialog(table, interpreter, operators);
+            PluginServices.getMDIManager().addWindow(eed);
+        }
+
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/gui/FieldExpressionPage.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/gui/FieldExpressionPage.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/gui/FieldExpressionPage.java	(revision 420)
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.gui;
+
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.prefs.Preferences;
+
+import javax.swing.ImageIcon;
+import javax.swing.JCheckBox;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.preferences.AbstractPreferencePage;
+import org.gvsig.andami.preferences.StoreException;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class FieldExpressionPage extends AbstractPreferencePage {
+	private static Preferences prefs = Preferences.userRoot().node( "fieldExpressionOptions" );
+	private JTextArea jTextArea = null;
+	private JTextField txtLimit;
+	private JCheckBox ckLimit=null;
+	private ImageIcon icon;
+
+	public FieldExpressionPage() {
+		super();
+		
+		icon = IconThemeHelper.getImageIcon("expression-field-preferences");
+		
+		addComponent(getJTextArea());
+
+		addComponent(PluginServices.getText(this, "limit_rows_in_memory") + ":",
+			txtLimit = new JTextField("", 15));
+		addComponent(ckLimit = new JCheckBox(PluginServices.getText(this, "without_limit")));
+		ckLimit.addMouseListener(new MouseListener() {
+			public void mouseClicked(MouseEvent e) {
+				if (ckLimit.isSelected()) {
+					txtLimit.setText(PluginServices.getText(this, "without_limit"));
+				}else {
+					if (txtLimit.getText().equals(PluginServices.getText(this, "without_limit")))
+					txtLimit.setText("500000");
+				}
+
+			}
+			public void mouseEntered(MouseEvent e) {
+			}
+			public void mouseExited(MouseEvent e) {
+			}
+			public void mousePressed(MouseEvent e) {
+			}
+			public void mouseReleased(MouseEvent e) {
+			}
+
+		});
+	}
+
+	public void initializeValues() {
+		int limit = prefs.getInt("limit_rows_in_memory",-1);
+		if (limit==-1) {
+			ckLimit.setSelected(true);
+			txtLimit.setText(PluginServices.getText(this,"without_limit"));
+		}else {
+			ckLimit.setSelected(false);
+			txtLimit.setText(String.valueOf(limit));
+		}
+	}
+
+	public String getID() {
+		return this.getClass().getName();
+	}
+
+	public String getTitle() {
+		return PluginServices.getText(this, "limit_rows_in_memory");
+	}
+
+	public JPanel getPanel() {
+		return this;
+	}
+
+	public void storeValues() throws StoreException {
+		int limit;
+		try{
+			if (ckLimit.isSelected()) {
+				limit=-1;
+			}else {
+//			if (txtLimit.getText().equals(PluginServices.getText(this,"without_limit"))) {
+//				limit=-1;
+//			}else {
+				limit=Integer.parseInt(txtLimit.getText());
+			}
+		}catch (Exception e) {
+			throw new StoreException(PluginServices.getText(this,"limit_rows_in_memory")+PluginServices.getText(this,"error"));
+		}
+		prefs.putInt("limit_rows_in_memory", limit);
+	}
+
+	public void initializeDefaults() {
+		int limit=prefs.getInt("limit_rows_in_memory",-1);
+		if (limit==-1) {
+			ckLimit.setSelected(true);
+			txtLimit.setText(PluginServices.getText(this,"without_limit"));
+		}else {
+			ckLimit.setSelected(false);
+			txtLimit.setText(String.valueOf(limit));
+		}
+	}
+
+	public ImageIcon getIcon() {
+		return icon;
+	}
+	/**
+	 * This method initializes jTextArea
+	 *
+	 * @return javax.swing.JTextArea
+	 */
+	private JTextArea getJTextArea() {
+		if (jTextArea == null) {
+			jTextArea = new JTextArea();
+			jTextArea.setBounds(new java.awt.Rectangle(13,7,285,57));
+			jTextArea.setForeground(java.awt.Color.black);
+			jTextArea.setBackground(java.awt.SystemColor.control);
+			jTextArea.setRows(3);
+			jTextArea.setWrapStyleWord(true);
+			jTextArea.setLineWrap(true);
+			jTextArea.setEditable(false);
+			jTextArea.setText(PluginServices.getText(this,"specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression"));
+		}
+		return jTextArea;
+	}
+
+	public boolean isValueChanged() {
+		return super.hasChanged();
+	}
+
+	public void setChangesApplied() {
+		setChanged(false);
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/GraphicOperator.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/GraphicOperator.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/GraphicOperator.java	(revision 420)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table;
+
+import java.awt.geom.PathIterator;
+import java.util.ArrayList;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
+import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public abstract class GraphicOperator extends AbstractOperator{
+	private FLyrVect lv=null;
+	protected static final GeometryManager geomManager = GeometryLocator.getGeometryManager();
+	
+	public void setLayer(FLyrVect lv) {
+		this.lv=lv;
+	}
+	public FLyrVect getLayer() {
+		return lv;
+	}
+	public abstract double process(org.gvsig.fmap.dal.feature.Feature feature);
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/SubString.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/SubString.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/SubString.java	(revision 420)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class SubString extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+",,)";
+	}
+	public String toString() {
+		return "subString";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"String subString(String value1,int value2,int value3){return value1.substring(value2,value3);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def subString(value1,value2,value3):\n" +
+				"  return value1[value2:value3]");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+"("+PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2, "+PluginServices.getText(this,"parameter")+"3"+")"+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+        PluginServices.getText(this, "numeric_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "3"+": " +
+        PluginServices.getText(this, "numeric_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "string_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns a new string that is a substring of parameter1.\n" +
+        "The substring begins at the specified parameter2 and extends to the character at index parameter3 - 1.\n" +
+        "Thus the length of the substring is endIndex-beginIndex.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/LastIndexOf.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/LastIndexOf.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/LastIndexOf.java	(revision 420)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class LastIndexOf extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+", \"\")";
+	}
+	public String toString() {
+		return "lastIndexOf";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"int lastIndexOf(String value1,String value2){return value1.lastIndexOf(value2);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def lastIndexOf(value1,value2):\n" +
+				"  return value1.rfind(value2)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+"("+PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2"+")"+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the index within parameter1 of the last occurrence of the parameter2 character.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Log.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Log.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Log.java	(revision 420)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Log extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "log";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double log(double value){return java.lang.Math.log(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def log(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.log(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the natural logarithm (base e) of a double  value. Special cases:\n" +
+        "* If the argument is NaN or less than zero, then the result is NaN.\n" +
+        "* If the argument is positive infinity, then the result is positive infinity.\n" +
+        "* If the argument is positive zero or negative zero, then the result is negative infinity.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/PointX.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/PointX.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/PointX.java	(revision 420)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.GraphicOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.geom.primitive.Point;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class PointX extends GraphicOperator{
+
+	public String addText(String s) {
+		return s.concat(toString()+"()");
+	}
+	public double process(Feature feature){
+		org.gvsig.fmap.geom.Geometry geom=null;
+        geom = feature.getDefaultGeometry();
+//		ArrayList parts=getXY(geom);
+//		Double[][] xsys=(Double[][])parts.get(0);//getXY(geom);
+//		return xsys[0][0].doubleValue();
+        Point p = PointY.getFirstPoint(geom);
+        if( p==null ) {
+            return 0;
+        }
+        return p.getY();
+        
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+		interpreter.declareBean("pointX",this,PointX.class);
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double x(){return pointX.process(indexRow);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def x():\n" +
+				"  return pointX.process(featureContainer.getFeature())");
+	}
+	public String toString() {
+		return "x";
+	}
+	public boolean isEnable() {
+		if (getLayer()==null)
+			return false;
+		int geomType=org.gvsig.fmap.geom.Geometry.TYPES.POINT;
+		try {
+			FeatureStore store = getLayer().getFeatureStore();
+			geomType = store.getDefaultFeatureType().getAttributeDescriptor(store.getDefaultFeatureType().getDefaultGeometryAttributeIndex()).getGeometryType();
+		} catch (DataException e) {
+			NotificationManager.addError(e);
+		}
+		return (getType()==IOperator.NUMBER && geomType==org.gvsig.fmap.geom.Geometry.TYPES.POINT);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the X coordenate of point geometry of this row.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Times.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Times.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Times.java	(revision 420)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Times extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString());
+	}
+
+	public void eval(BSFManager interpreter) throws BSFException {
+	}
+	public String toString() {
+		return "*";
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the result of times.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Atan.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Atan.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Atan.java	(revision 420)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Atan extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "atan";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double atan(double value){return java.lang.Math.atan(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def atan(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.atan(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the arc tangent of an angle, in the range of -pi/2 through pi/2. Special cases:\n" +
+        "* If the argument is NaN, then the result is NaN.\n" +
+        "* If the argument is zero, then the result is a zero with the same sign as the argument.\n";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Plus.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Plus.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Plus.java	(revision 420)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Plus extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString());
+	}
+	public String toString() {
+		return "+";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER || getType()==IOperator.STRING);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the result of sum.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Min.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Min.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Min.java	(revision 420)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Min extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "min";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double min(double value1,double value2){return java.lang.Math.min(value1,value2);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def min(value1, value2):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.min(value1,value2)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+ "("+ PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2"+")\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+        PluginServices.getText(this, "numeric_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+        PluginServices.getText(this, "numeric_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the smaller of two int values. That is, the result the argument closer to the value of Integer.MIN_VALUE.\n" +
+        "If the arguments have the same value, the result is that same value.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Field.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Field.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Field.java	(revision 420)
@@ -0,0 +1,91 @@
+/**
+ * *****************************************************************************
+ *
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ *
+ ******************************************************************************
+ */
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.fmap.dal.DataTypes;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Field extends AbstractField {
+
+    private FeatureAttributeDescriptor fd;
+    private String typeField;
+
+    public Field() {
+    }
+
+    public void setFieldDescription(FeatureAttributeDescriptor fd) {
+        this.fd = fd;
+        switch (fd.getType()) {
+        case DataTypes.INT:
+        case DataTypes.LONG:
+        case DataTypes.FLOAT:
+        case DataTypes.DOUBLE:
+            typeField = PluginServices.getText(this, "numeric_value");
+            break;
+        case DataTypes.STRING:
+            typeField = PluginServices.getText(this, "string_value");
+            break;
+        case DataTypes.BOOLEAN:
+            typeField = PluginServices.getText(this, "boolean_value");
+            break;
+        case DataTypes.DATE:
+            typeField = PluginServices.getText(this, "date_value");
+            break;
+        }
+
+    }
+
+    public String addText(String s) {
+        return s.concat(toString());
+    }
+
+    public String toString() {
+        return "[" + fd.getName() + "]";
+    }
+
+    public boolean isEnable() {
+        return true;
+    }
+
+    public String getTooltip() {
+        return PluginServices.getText(this, "field") + ":  " + fd.getName() + "\n" + getDescription();
+    }
+
+    public String getDescription() {
+        return PluginServices.getText(this, "type") + ": "
+                + typeField;
+    }
+
+    public String getName() {
+        return this.fd.getName();
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToRadians.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToRadians.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToRadians.java	(revision 420)
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class ToRadians extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "toRadians";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double toRadians(double value){return java.lang.Math.toRadians(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def toRadians(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.toRadians(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Converts an angle measured in degrees to an approximately equivalent angle measured in radians. The conversion from degrees to radians is generally inexact.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Acos.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Acos.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Acos.java	(revision 420)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Acos extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "acos";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+		interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1,
+	            "def acos(value):\n" +
+	            "  import java.lang.Math\n"+
+	            "  return java.lang.Math.acos(value)\n");
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double acos(double value){return java.lang.Math.acos(value);};");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the arc cosine of an angle, in the range of 0.0 through pi. Special case:\n" +
+        "* If the argument is NaN or its absolute value is greater than 1, then the result is NaN.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Max.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Max.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Max.java	(revision 420)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Max extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "max";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double max(double value1,double value2){return java.lang.Math.max(value1,value2);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def max(value1,value2):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.max(value1,value2)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+ "("+ PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2"+")\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+        PluginServices.getText(this, "numeric_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+        PluginServices.getText(this, "numeric_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the greater of two double values. That is, the result is the argument closer to positive infinity. \n" +
+        "If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN.\n" +
+        "Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero.\n" +
+        "If one argument is positive zero and the other negative zero, the result is positive zero.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Sqrt.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Sqrt.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Sqrt.java	(revision 420)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Sqrt extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "sqrt";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double sqrt(double value){return java.lang.Math.sqrt(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def sqrt(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.sqrt(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the correctly rounded positive square root of a double value. Special cases:\n" +
+        "* If the argument is NaN or less than zero, then the result is NaN.\n" +
+        "* If the argument is positive infinity, then the result is positive infinity.\n" +
+        "* If the argument is positive zero or negative zero, then the result is the same as the argument.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Sin.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Sin.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Sin.java	(revision 420)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Sin extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "sin";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double sin(double value){return java.lang.Math.sin(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def sin(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.sin(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the trigonometric sine of an angle. Special cases:\n" +
+        "* If the argument is NaN or an infinity, then the result is NaN.\n" +
+        "* If the argument is zero, then the result is a zero with the same sign as the argument.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Equals.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Equals.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Equals.java	(revision 420)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Equals extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "equals";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"boolean equals(java.lang.Object value1,java.lang.Object value2){return value1.equals(value2);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,
+				"def equals(value1,value2):\n" +
+				"  return value1 == value2");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING || getType()==IOperator.DATE);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+"("+PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2"+")"+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+//        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+//        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Compares the parameter1 to the parameter2. The result is true if and only if the arguments are not null and represents the same object.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Minus.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Minus.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Minus.java	(revision 420)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Minus extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString());
+	}
+	public String toString() {
+		return "-";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the result of rest.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/IndexOf.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/IndexOf.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/IndexOf.java	(revision 420)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class IndexOf extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+", \"\")";
+	}
+	public String toString() {
+		return "indexOf";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def indexOf(value1,value2):\n" +
+				"  return value1.find(value2)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  " +
+		toString()+
+		"("+PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2)\n"+
+		getDescription();
+	}
+
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "integer_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the index within parameter1 of the first occurrence of the parameter2.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/GetTimeDate.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/GetTimeDate.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/GetTimeDate.java	(revision 420)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class GetTimeDate extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "getTimeDate";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double getTimeDate(java.lang.Object value){return value.getTime();};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,
+				"def getTimeDate(value):\n" +
+				"  return value.getTime()");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.DATE);
+	}
+
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") +": " +
+        PluginServices.getText(this, "date_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Exp.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Exp.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Exp.java	(revision 420)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Exp extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "exp";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double exp(double value){return java.lang.Math.exp(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def exp(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.exp(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns Euler's number e raised to the power of a double value. Special cases:\n" +
+        "* If the argument is NaN, the result is NaN.\n" +
+        "* If the argument is positive infinity, then the result is positive infinity.\n" +
+        "* If the argument is negative infinity, then the result is positive zero.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Perimeter.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Perimeter.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Perimeter.java	(revision 420)
@@ -0,0 +1,109 @@
+/**
+ * *****************************************************************************
+ *
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us at info AT
+ * gvsig.com, or visit our website www.gvsig.com.
+ *
+ ******************************************************************************
+ */
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.cresques.cts.IProjection;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.GraphicOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontrol.MapControlLocator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Perimeter extends GraphicOperator {
+
+    private static final Logger logger = LoggerFactory.getLogger(Area.class);
+    
+    public String addText(String s) {
+        return s.concat(toString() + "()");
+    }
+
+    public double process(Feature feature) {
+        org.gvsig.fmap.geom.Geometry geom = null;
+        geom = feature.getDefaultGeometry();
+        MapContext mapContext = getLayer().getMapContext();
+        IProjection proj = mapContext.getProjection();
+        int distanceUnits = mapContext.getViewPort().getDistanceArea();
+        return MapControlLocator.getMapControlManager().perimeter(geom, proj, distanceUnits);
+    }
+
+    public void eval(BSFManager interpreter) throws BSFException {
+        interpreter.declareBean("jperimeter", this, Perimeter.class);
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double perimeter(){return jperimeter.process(indexRow);};");
+        interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1, "def perimeter():\n"
+                + "  return jperimeter.process(featureContainer.getFeature())");
+    }
+
+    public String toString() {
+        return "perimeter";
+    }
+
+    public boolean isEnable() {
+        if (getLayer() == null) {
+            return false;
+        }
+        int geomType = org.gvsig.fmap.geom.Geometry.TYPES.POINT;
+        try {
+            FeatureStore store = getLayer().getFeatureStore();
+            geomType = store.getDefaultFeatureType().getDefaultGeometryAttribute().getGeomType().getType();
+        } catch (DataException e) {
+            logger.warn("Can't get geometry type for default geometry attribute of layer '"+getLayer().getName()+"'.",e);
+        }
+        GeometryManager geomManager = GeometryLocator.getGeometryManager();
+
+        return getType() == IOperator.NUMBER && (
+            geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.CURVE, geomType) ||
+            geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.MULTICURVE, geomType) ||
+            geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.SURFACE, geomType) ||
+            geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.MULTISURFACE, geomType) 
+        );
+    }
+
+    public String getTooltip() {
+        return PluginServices.getText(this, "operator") + ":  " + addText("") + "\n" + getDescription();
+    }
+
+    public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": "
+                + PluginServices.getText(this, "numeric_value") + "\n"
+                + PluginServices.getText(this, "description") + ": "
+                + "Returns the perimeter of polygon or line geometry  of this row in the units of the view.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/After.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/After.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/After.java	(revision 420)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class After extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+",)";
+	}
+	public String toString() {
+		return "after";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"boolean after(java.lang.Object value1,java.lang.Object value2){return value1.after(value2);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def after(value1, value2):\n" +
+				"  return value1.after(value2)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.DATE);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+"("+PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2"+")"+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+        PluginServices.getText(this, "date_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+        PluginServices.getText(this, "date_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Tests if parameter1 date is after the parameter2 date.";
+    }
+
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Abs.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Abs.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Abs.java	(revision 420)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+
+/**
+ *
+ * @author Vicente Caballero Navarro
+ */
+public class Abs extends AbstractOperator {
+    public String addText(String s) {
+        return toString() + "(" + s + ")";
+    }
+
+    public String toString() {
+        return "abs";
+    }
+
+    public void eval(BSFManager interpreter) throws BSFException {
+        interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1,
+            "def abs(value):\n" +
+            "  import java.lang.Math\n"+
+            "  return java.lang.Math.abs(value)\n");
+    }
+
+    public boolean isEnable() {
+        return (getType() == IOperator.NUMBER);
+    }
+
+    public double abs(double value) {
+        return java.lang.Math.abs(value);
+    }
+
+    public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the absolute value of a double value. If the argument is not negative, the argument is returned. " +
+        "If the argument is negative, the negation of the argument is returned.\n " +
+        "Special cases:\n" +
+        "* If the argument is positive zero or negative zero, the result is positive zero.\n" +
+        "* If the argument is infinite, the result is positive infinity.\n" +
+        "* If the argument is NaN, the result is NaN.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Pow.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Pow.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Pow.java	(revision 420)
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Pow extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+", )";
+	}
+
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double pow(double value1,double value2){return java.lang.Math.pow(value1,value2);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def pow(value1, value2):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.pow(value1,value2)");
+	}
+	public String toString() {
+		return "pow";
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+ toString()+ "(" +PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2"+")\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+        PluginServices.getText(this, "numeric_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+        PluginServices.getText(this, "numeric_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the value of the first argument raised to the power of the second argument. Special cases:\n" +
+        "* If the second argument is positive or negative zero, then the result is 1.0.\n" +
+        "* If the second argument is 1.0, then the result is the same as the first argument.\n" +
+        "* If the second argument is NaN, then the result is NaN.\n" +
+        "* If the first argument is NaN and the second argument is nonzero, then the result is NaN.\n" +
+        "* If\n" +
+        "   - the absolute value of the first argument is greater than 1 and the second argument is positive infinity, or\n" +
+        "   - the absolute value of the first argument is less than 1 and the second argument is negative infinity,\n" +
+        "then the result is positive infinity.\n" +
+        "* If\n" +
+        "   - the absolute value of the first argument is greater than 1 and the second argument is negative infinity, or\n" +
+        "   - the absolute value of the first argument is less than 1 and the second argument is positive infinity,\n" +
+        "then the result is positive zero.\n" +
+        "* If the absolute value of the first argument equals 1 and the second argument is infinite, then the result is NaN.\n" +
+        "* If\n" +
+        "   - the first argument is positive zero and the second argument is greater than zero, or\n" +
+        "   - the first argument is positive infinity and the second argument is less than zero,\n" +
+        "then the result is positive zero.\n" +
+        "* If\n" +
+        "   - the first argument is positive zero and the second argument is less than zero, or\n" +
+        "   - the first argument is positive infinity and the second argument is greater than zero,\n" +
+        "then the result is positive infinity.\n" +
+        "* If\n" +
+        "   - the first argument is negative zero and the second argument is greater than zero but not a finite odd integer, or\n" +
+        "   - the first argument is negative infinity and the second argument is less than zero but not a finite odd integer,\n" +
+        "then the result is positive zero.\n" +
+        "* If\n" +
+        "   - the first argument is negative zero and the second argument is a positive finite odd integer, or\n" +
+        "   - the first argument is negative infinity and the second argument is a negative finite odd integer,\n" +
+        "then the result is negative zero.\n" +
+        "* If\n" +
+        "   - the first argument is negative zero and the second argument is less than zero but not a finite odd integer, or\n" +
+        "   - the first argument is negative infinity and the second argument is greater than zero but not a finite odd integer,\n" +
+        "then the result is positive infinity.\n" +
+        "* If\n" +
+        "   - the first argument is negative zero and the second argument is a negative finite odd integer, or\n" +
+        "   - the first argument is negative infinity and the second argument is a positive finite odd integer,\n" +
+        "then the result is negative infinity.\n" +
+        "* If the first argument is finite and less than zero\n" +
+        "   - if the second argument is a finite even integer, the result is equal to the result of raising the absolute value of the first argument to the power of the second argument\n" +
+        "   - if the second argument is a finite odd integer, the result is equal to the negative of the result of raising the absolute value of the first argument to the power of the second argument\n" +
+        "   - if the second argument is finite and not an integer, then the result is NaN.\n" +
+        "* If both arguments are integers, then the result is exactly equal to the mathematical result of raising the first argument to the power of the second argument if that result can in fact be represented exactly as a double value.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/RecordIndex.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/RecordIndex.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/RecordIndex.java	(revision 420)
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.FeatureIndex;
+
+/**
+ * This operator returns the 0-based feature index
+ * by using the Jython bean 'featureIndex' previously declared 
+ * @author jldominguez
+ *
+ */
+public class RecordIndex extends AbstractOperator {
+
+	public String addText(String s) {
+		return toString()+"()";
+	}
+
+	public long process(FeatureIndex featIndex) {
+		
+		if (featIndex == null) {
+			return -1;
+		} else {
+			return featIndex.get();
+		}
+		
+	}
+	
+	public void eval(BSFManager interpreter) throws BSFException {
+		interpreter.declareBean("jrec",this,RecordIndex.class);
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def rec():\n" +
+				"  return jrec.process(featureIndex)");
+	}
+
+	public boolean isEnable() {
+		return true;
+	}
+
+	public String toString() {
+		return "rec";
+	}
+
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "The 0-based index of the current record (row or feature).";
+	}
+
+}
+
+
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/DateToString.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/DateToString.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/DateToString.java	(revision 420)
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author fdiaz
+ */
+public class DateToString extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "dateToString";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"String toString(java.lang.Object value){" +
+//				"if (value instanceof java.util.Date)" +
+//					"return ((java.util.Date)value).toString();" +
+//				"return String.valueOf(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,
+				"import java.util.Date as Date\n"+
+				"import java.text.DateFormat as DateFormat\n"+
+				"import java.text.SimpleDateFormat as SimpleDateFormat\n" +
+				"import java.text.NumberFormat as NumberFormat\n"+
+				"dateFormat = DateFormat.getInstance()\n"+
+				"myDateFormat = SimpleDateFormat()\n" +
+				"def dateToString(value, format=None):\n" +
+				"  if value == None:\n"+
+				"    return None\n"+
+				"  if value == '':\n"+
+				"    return ''\n"+
+				"  if isinstance(value,Date):\n"+
+				"    if format != None:\n"+
+				"      myDateFormat.applyPattern(format)\n"+
+				"      return myDateFormat.format(value)\n"+
+				"    else:\n"+
+				"      return dateFormat.format(value)\n"+
+				"  else:\n"+
+				"    raise InputError\n"+
+				"  return str(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.DATE);
+	}
+
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+"("+PluginServices.getText(this,"parameter")+"[,"+PluginServices.getText(this,"format")+"])"+"\n"+getDescription();
+	}
+
+	public String getDescription() {
+	    return PluginServices.getText(this, "parameter") + ": " +
+	    PluginServices.getText(this, "date_value") + "\n" +
+		PluginServices.getText(this, "format") + " ("+PluginServices.getText(this, "optional")+"): " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "returns") + ": " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "description") + ": " +
+	    "Returns the string representation of the Object date parameter\n" +
+	    "formatted according to the parameter format, if it is supplied.\n\n"+
+	    "The format should follow the specifications of\n" +
+	    "'http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html'.\n\n"+
+	    "Examples: (for the date of December 23, 2008)\n"+
+	    "  'dd/MM/yy'     23/12/08\n"+
+	    "  'dd/MM/yyyy'   23/12/2008\n"+
+	    "  'dd/MMM/yyyy'  23/dec/2008\n"+
+	    "  'dd/MMMM/yyyy' 23/december/2008\n";
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/AbstractField.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/AbstractField.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/AbstractField.java	(revision 420)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.fmap.dal.feature.Feature;
+
+
+public abstract class AbstractField extends AbstractOperator{
+	private boolean isEval=false;
+	public Object getValue(Feature feature, String nameField){
+		if (feature != null)
+			return feature.get(nameField);
+		return null;
+	}
+//	public Object getValue(String nameField,Index indexRow,SelectableDataSource sds) {
+//		try {
+//			int index=sds.getFieldIndexByName(nameField);
+//			Value value=sds.getFieldValue(indexRow.get(),index);
+//			if (value instanceof NumericValue) {
+//				double dv=((NumericValue)value).doubleValue();
+//				return new Double(dv);
+//			}else if (value instanceof DateValue) {
+//				Date date=((DateValue)value).getValue();
+//				return date;
+//			}else if (value instanceof BooleanValue){
+//				boolean b=((BooleanValue)value).getValue();
+//				return new Boolean(b);
+//			}else {
+//				return value.toString();
+//			}
+//		} catch (ReadDriverException e) {
+//			throw new RuntimeException(e.getMessage());
+//		}
+//	}
+	public void eval(BSFManager interpreter) throws BSFException {
+		if (!isEval){
+		interpreter.declareBean("jfield",this,Field.class);
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def field(nameField):\n" +
+				"  return jfield.getValue(featureContainer.getFeature(), nameField)");
+		isEval=true;
+		}
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Pi.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Pi.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Pi.java	(revision 420)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Pi extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString()+"()");
+	}
+	public String toString() {
+		return "pi";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double pi(){return java.lang.Math.PI;};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def pi():\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.PI");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Area.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Area.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Area.java	(revision 420)
@@ -0,0 +1,111 @@
+/**
+ * *****************************************************************************
+ *
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us at info AT
+ * gvsig.com, or visit our website www.gvsig.com.
+ *
+ ******************************************************************************
+ */
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.cresques.cts.IProjection;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.GraphicOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.geom.Geometry;
+
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontrol.MapControlLocator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Area extends GraphicOperator {
+
+    private static final Logger logger = LoggerFactory.getLogger(Area.class);
+    
+    @Override
+    public String addText(String s) {
+        return s.concat(toString() + "()");
+    }
+
+    @Override
+    public double process(org.gvsig.fmap.dal.feature.Feature feature) {
+        org.gvsig.fmap.geom.Geometry geom;
+        geom = feature.getDefaultGeometry();
+        MapContext mapContext = getLayer().getMapContext();
+        IProjection proj = mapContext.getProjection();
+        int areaUnits = mapContext.getViewPort().getDistanceArea();
+        return MapControlLocator.getMapControlManager().area(geom, proj, areaUnits);
+    }
+
+    @Override
+    public void eval(BSFManager interpreter) throws BSFException {
+        interpreter.declareBean("jarea", this, Area.class);
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double area(){return area.process(indexRow);};");
+        interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1, "def area():\n"
+                + "  return jarea.process(featureContainer.getFeature())");
+    }
+
+    @Override
+    public String toString() {
+        return "area";
+    }
+
+    @Override
+    public boolean isEnable() {
+        if (getLayer() == null) {
+            return false;
+        }
+        FeatureStore store;
+        int geomType = Geometry.TYPES.POINT;
+        try {
+            store = getLayer().getFeatureStore();
+            geomType = store.getDefaultFeatureType().getDefaultGeometryAttribute().getGeomType().getType();
+        } catch (DataException e) {
+            logger.warn("Can't get geometry type for default geometry attribute of layer '"+getLayer().getName()+"'.",e);
+        }
+//        GeometryManager geomManager = GeometryLocator.getGeometryManager();
+        
+        return getType() == IOperator.NUMBER && (
+            geomManager.isSubtype(Geometry.TYPES.SURFACE, geomType) ||
+            geomManager.isSubtype(Geometry.TYPES.MULTISURFACE, geomType) 
+        );
+    }
+
+    @Override
+    public String getTooltip() {
+        return PluginServices.getText(this, "operator") + ":  " + addText("") + "\n" + getDescription();
+    }
+
+    @Override
+    public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": "
+                + PluginServices.getText(this, "numeric_value") + "\n"
+                + PluginServices.getText(this, "description") + ": "
+                + "Returns the area of polygon geometry of this row in the units of the view.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/SetTimeDate.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/SetTimeDate.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/SetTimeDate.java	(revision 420)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class SetTimeDate extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "setTimeDate";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"java.util.Date setTimeDate(java.lang.Object value1,double value2){value1.setTime((long)value2);return value1;};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,
+				"import java.util.Date as jDate\n"+
+				"def setTimeDate(value):\n"+
+				"  aux = jDate()\n"+
+				"  aux.setTime(long(value))\n"+
+				"  return aux");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.DATE);
+	}
+
+	public String getDescription() {
+	       return PluginServices.getText(this, "parameter") + ": " +
+	        PluginServices.getText(this, "numeric_value") + "\n"+
+	        PluginServices.getText(this, "returns") + ": " +
+	        PluginServices.getText(this, "date_value") + "\n" +
+	        PluginServices.getText(this, "description") + ": " +
+	        "Returns a date object to represent a point in time that is 'parameter' milliseconds after January 1, 1970 00:00:00 GMT.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToString.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToString.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToString.java	(revision 420)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class ToString extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "toString";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"String toString(java.lang.Object value){" +
+//				"if (value instanceof java.util.Date)" +
+//					"return ((java.util.Date)value).toString();" +
+//				"return String.valueOf(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def toString(value):\n" +
+				"  return str(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);// || getType()==IOperator.DATE);
+	}
+	public String getDescription() {
+	    return PluginServices.getText(this, "parameter") + ": " +
+	    PluginServices.getText(this, "value") + "\n" +
+	    PluginServices.getText(this, "returns") + ": " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "description") + ": " +
+	    "Returns the string representation of the Object argument";
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/StartsWith.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/StartsWith.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/StartsWith.java	(revision 420)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class StartsWith extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+",\"\")";
+	}
+	public String toString() {
+		return "startsWith";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"boolean startsWith(String value1,String value2){return value1.startsWith(value2);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def startsWith(value1,value2):\n" +
+				" return value1.startswith(value2)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+"("+PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2"+")"+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Tests if this parameter1 starts with the specified parameter2.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Ceil.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Ceil.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Ceil.java	(revision 420)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Ceil extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "ceil";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double ceil(double value){return java.lang.Math.ceil(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def ceil(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.ceil(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer. Special cases:\n" +
+        "* If the argument value is already equal to a mathematical integer, then the result is the same as the argument.\n" +
+        "* If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.\n" +
+        "* If the argument value is less than zero but greater than -1.0, then the result is negative zero.\n";
+    }
+
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/MoreThan.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/MoreThan.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/MoreThan.java	(revision 420)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class MoreThan extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString());
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+
+	}
+	public String toString() {
+		return ">";
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns true if the first object value is more than the second value.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/MoreEquals.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/MoreEquals.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/MoreEquals.java	(revision 420)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class MoreEquals extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString());
+	}
+
+	public void eval(BSFManager interpreter) throws BSFException {
+	}
+	public String toString() {
+		return ">=";
+	}
+	public boolean isEnable() {
+		return ( getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns true if the first object value is more or equals than the second value.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/FieldCopy.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/FieldCopy.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/FieldCopy.java	(revision 420)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class FieldCopy extends AbstractOperator{
+	private FeatureAttributeDescriptor fd;
+	public FieldCopy() {
+	}
+	public void setFieldDescription(FeatureAttributeDescriptor fd) {
+		this.fd=fd;
+	}
+	public String addText(String s) {
+		return s.concat(toString());
+	}
+
+	public void eval(BSFManager interpreter) throws BSFException {
+		interpreter.declareBean(fd.getName(),this,FieldCopy.class);
+		interpreter.eval(ExpressionFieldExtension.JYTHON,null,-1,-1,"java.lang.Object "+ fd.getName()+ "(){return "+fd.getName()+".getValue(feature);};");
+	}
+	public Object getValue(Feature feature){
+		return feature.get(fd.getName());
+	}
+//	public Object getValue(Index indexRow,FeatureStore sds) {
+//		try {
+//			int index=sds.getFieldIndexByName(fd.getName());
+//			Value value=sds.getFieldValue(indexRow.get(),index);
+//			if (value instanceof NumericValue) {
+//				double dv=((NumericValue)value).doubleValue();
+//				return new Double(dv);
+//			}else if (value instanceof DateValue) {
+//				Date date=((DateValue)value).getValue();
+//				return date;
+//			}else if (value instanceof BooleanValue){
+//				boolean b=((BooleanValue)value).getValue();
+//				return new Boolean(b);
+//			}else {
+//				return value.toString();
+//			}
+//		} catch (ReadDriverException e) {
+//			throw new RuntimeException(e.getMessage());
+//		}
+//	}
+	public String toString() {
+		return "["+fd.getName()+"]";
+	}
+	public boolean isEnable() {
+		return true;
+	}
+	public String getDescription() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToDate.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToDate.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToDate.java	(revision 420)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class ToDate extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "toDate";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"java.util.Date toDate(String value){return new java.text.SimpleDateFormat().parse(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,
+				"import java.text.DateFormat as DateFormat\n" +
+				"import java.text.SimpleDateFormat as SimpleDateFormat\n" +
+				"dateFormat = DateFormat.getInstance()\n" +
+				"myDateFormat = SimpleDateFormat()\n" +
+				"def toDate(value, format=None):\n" +
+				"  if format != None:\n"+
+				"    myDateFormat.applyPattern(format)\n"+
+				"    return myDateFormat.parse(value)\n"+
+				"  return dateFormat.parse(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.DATE);
+	}
+
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+"("+PluginServices.getText(this,"parameter")+"[,"+PluginServices.getText(this,"format")+"])"+"\n"+getDescription();
+	}
+
+	public String getDescription() {
+		return PluginServices.getText(this, "parameter") + "1: " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+		PluginServices.getText(this, "format") + " ("+PluginServices.getText(this, "optional")+"): " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "returns") + ": " +
+	    PluginServices.getText(this, "date_value") + "\n" +
+	    PluginServices.getText(this, "description") + ": " +
+	    "Returns a date object from string parameter formatted according to\nthe parameter format if it is supplied.\n\n"+
+	    "The format should follow the specifications of\n" +
+	    "'http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html'.\n\n"+
+	    "Examples: (for the date of December 23, 2008)\n"+
+	    "  'dd/MM/yy'  23/12/08\n"+
+	    "  'dd/MM/yyyy'  23/12/2008\n"+
+	    "  'dd/MMM/yyyy'  23/dec/2008\n"+
+	    "  'dd/MMMM/yyyy'  23/december/2008\n";
+
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Random.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Random.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Random.java	(revision 420)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Random extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString()+"()");
+	}
+	public String toString() {
+		return "random";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double random(){return java.lang.Math.random();};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def random():\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.random()");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0. Returned values are chosen pseudorandomly with (approximately) uniform distribution from that range.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Floor.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Floor.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Floor.java	(revision 420)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Floor extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "floor";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def floor(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.floor(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer. Special cases:\n" +
+        "* If the argument value is already equal to a mathematical integer, then the result is the same as the argument.\n" +
+        "* If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.\n";
+    }
+
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToDegrees.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToDegrees.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToDegrees.java	(revision 420)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class ToDegrees extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "toDegrees";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double toDegrees(double value){return java.lang.Math.toDegrees(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def toDegrees(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.toDegrees(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+	    return PluginServices.getText(this, "parameter") + ": " +
+	    PluginServices.getText(this, "double_value") + "\n" +
+	    PluginServices.getText(this, "returns") + ": " +
+	    PluginServices.getText(this, "double_value") + "\n" +
+	    PluginServices.getText(this, "description") + ": " +
+	    "Converts an angle measured in radians to an approximately equivalent angle measured in degrees.\n" +
+	    "The conversion from radians to degrees is generally inexact; users should not expect cos(toRadians(90.0)) to exactly equal 0.0.";
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/LessThan.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/LessThan.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/LessThan.java	(revision 420)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class LessThan extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString());
+	}
+
+	public void eval(BSFManager interpreter) throws BSFException {
+	}
+	public String toString() {
+		return "<";
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns true if the first object value is less than the second value.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/LessEquals.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/LessEquals.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/LessEquals.java	(revision 420)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class LessEquals extends AbstractOperator {
+
+	public String addText(String s) {
+		return s.concat(toString());
+	}
+
+	public void eval(BSFManager interpreter) throws BSFException {
+	}
+	public String toString() {
+		return "<=";
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns true if the first object value is less or equals than the second value.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Length.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Length.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Length.java	(revision 420)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Length extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "length";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"int length(String value){return value.length();};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def length(value):\n" +
+				"  return len(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING);
+	}
+	public String getDescription() {
+	    return PluginServices.getText(this, "parameter") + ": " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "returns") + ": " +
+	    PluginServices.getText(this, "numeric_value") + "\n" +
+	    PluginServices.getText(this, "description") + ": " +
+	    "Returns the length of string parameter.";
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Distinct.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Distinct.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Distinct.java	(revision 420)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Distinct extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString());
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+	}
+	public String toString() {
+		return "<>";
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.DATE || getType()==IOperator.NUMBER || getType()==IOperator.STRING);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns true if the objects are diferents.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Tan.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Tan.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Tan.java	(revision 420)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Tan extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "tan";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double tan(double value){return java.lang.Math.tan(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def tan(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.tan(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the trigonometric tangent of an angle. Special cases:\n" +
+        "* If the argument is NaN or an infinity, then the result is NaN.\n" +
+        "* If the argument is zero, then the result is a zero with the same sign as the argument.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/PointY.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/PointY.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/PointY.java	(revision 420)
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import java.util.ArrayList;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.GraphicOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.geom.aggregate.Aggregate;
+import org.gvsig.fmap.geom.primitive.OrientablePrimitive;
+import org.gvsig.fmap.geom.primitive.Point;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class PointY extends GraphicOperator{
+
+	public String addText(String s) {
+		return s.concat(toString()+"()");
+	}
+    
+    public static Point getFirstPoint(org.gvsig.fmap.geom.Geometry geom) {
+        if( geom instanceof Aggregate ) {
+            geom = ((Aggregate)geom).getPrimitiveAt(0);
+        }
+        if( geom instanceof Point ) {
+            return (Point) geom;
+        }
+        if( geom instanceof OrientablePrimitive ) {
+            return ((OrientablePrimitive) geom).getVertex(0);
+        }
+        return null;
+    }
+    
+	public double process(Feature feature) {
+		org.gvsig.fmap.geom.Geometry geom=null;
+        geom = feature.getDefaultGeometry();
+//		ArrayList parts=getXY(geom);
+//		Double[][] xsys=(Double[][])parts.get(0);
+//		return xsys[1][0].doubleValue();
+        Point p = getFirstPoint(geom);
+        if( p==null ) {
+            return 0;
+        }
+        return p.getY();
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+		interpreter.declareBean("pointY",this,PointY.class);
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double y(){return pointY.process(indexRow);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def y():\n" +
+				"  return pointY.process(featureContainer.getFeature())");
+	}
+	public String toString() {
+		return "y";
+	}
+	public boolean isEnable() {
+		if (getLayer()==null)
+			return false;
+		int geomType=org.gvsig.fmap.geom.Geometry.TYPES.POINT;
+		try {
+			FeatureStore store = getLayer().getFeatureStore();
+			geomType = store.getDefaultFeatureType().getAttributeDescriptor(store.getDefaultFeatureType().getDefaultGeometryAttributeIndex()).getGeometryType();
+		} catch (DataException e) {
+			NotificationManager.addError(e);
+		}
+		return (getType()==IOperator.NUMBER && geomType==org.gvsig.fmap.geom.Geometry.TYPES.POINT);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the Y coordenate of point geometry of this row.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Cos.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Cos.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Cos.java	(revision 420)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Cos extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "cos";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double cos(double value){return java.lang.Math.cos(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def cos(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.cos(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the trigonometric cosine of an angle. Special cases:\n" +
+        "* If the argument is NaN or an infinity, then the result is NaN.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/E.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/E.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/E.java	(revision 420)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class E extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString()+"()");
+	}
+	public String toString() {
+		return "e";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double e(){return java.lang.Math.E;};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def e():\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.E");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "The double value that is closer than any other to e, the base of the natural logarithms.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/IsNumber.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/IsNumber.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/IsNumber.java	(revision 420)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class IsNumber extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "isNumber";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"boolean isNumber (String value){try{java.lang.Double.parseDouble(value);}catch(java.lang.NumberFormatException e){return false;}return true;};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def isNumber(value):\n" +
+				"  import java.lang.Double\n" +
+				"  import java.lang.NumberFormatException\n" +
+				"  try:\n" +
+				"    java.lang.Double.parseDouble(value)\n" +
+				"  except java.lang.NumberFormatException:\n" +
+				"    return 0==1 #false\n" +
+				"  return 1==1 #true\n");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING);
+	}
+	public String getDescription() {
+	    return PluginServices.getText(this, "parameter") + ": " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "returns") + ": " +
+	    PluginServices.getText(this, "boolean_value") + "\n" +
+	    PluginServices.getText(this, "description") + ": " +
+	    "Returns true if the string parameter is a number.";
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Division.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Division.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Division.java	(revision 420)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Division extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString());
+	}
+
+	public void eval(BSFManager interpreter) throws BSFException {
+	}
+	public String toString() {
+		return "/";
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the result of division.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/EndsWith.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/EndsWith.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/EndsWith.java	(revision 420)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class EndsWith extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+",\"\")";
+	}
+	public String toString() {
+		return "endsWith";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"boolean endsWith(String value1,String value2){return value1.endsWith(value2);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def endsWith(value1,value2):\n" +
+				"  return value1.endswith(value2)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+ "("+ PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2"+")\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Tests if this parameter1 ends with the specified parameter2.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Round.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Round.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Round.java	(revision 420)
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Round extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "round";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double round(double value){return java.lang.Math.round(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def round(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.round(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the closest long to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type long.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToLowerCase.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToLowerCase.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToLowerCase.java	(revision 420)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class ToLowerCase extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "toLowerCase";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"String toLowerCase(String value){return value.toLowerCase();};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def toLowerCase(value):\n" +
+				"  return value.lower()");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING);
+	}
+	public String getDescription() {
+	    return PluginServices.getText(this, "parameter") + ": " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "returns") + ": " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "description") + ": " +
+	    "Converts all of the characters in this String to lower case using the rules of the default locale.";
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToUpperCase.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToUpperCase.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToUpperCase.java	(revision 420)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class ToUpperCase extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "toUpperCase";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"String toUpperCase(String value){return value.toUpperCase();};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def toUpperCase(value):\n" +
+				"  return value.upper()");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING);
+	}
+	public String getDescription() {
+	    return PluginServices.getText(this, "parameter") + ": " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "returns") + ": " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "description") + ": " +
+	    "Converts all of the characters in this String to upper case using the rules of the given Locale.\n" +
+	    "Case mappings rely heavily on the Unicode specification's character data.\n" +
+	    "Since case mappings are not always 1:1 char mappings, the resulting String may be a different length than the original String.";
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Asin.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Asin.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Asin.java	(revision 420)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Asin extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "asin";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double asin(double value){return java.lang.Math.asin(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def asin(value):\n" +
+				"  import java.lang.Math\n" +
+				"  return java.lang.Math.asin(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER);
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the arc sine of an angle, in the range of -pi/2 through pi/2. Special cases:\n" +
+        "* If the argument is NaN or its absolute value is greater than 1, then the result is NaN.\n" +
+        "* If the argument is zero, then the result is a zero with the same sign as the argument.\n";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Geometry.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Geometry.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Geometry.java	(revision 420)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.GraphicOperator;
+import org.gvsig.fmap.dal.feature.Feature;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Geometry extends GraphicOperator{
+
+	public String addText(String s) {
+		return s.concat(toString()+"()");
+	}
+	public double process(Feature feature) {
+		return 0;
+	}
+	public org.gvsig.fmap.geom.Geometry getGeometry(Feature feature) {
+//		ReadableVectorial adapter = getLayer().getSource();
+	   	org.gvsig.fmap.geom.Geometry geom=feature.getDefaultGeometry();//adapter.getShape(index.get());
+	   	return geom;
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+		interpreter.declareBean("jgeometry",this,Geometry.class);
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"java.lang.Object geometry(){return geometry.getGeometry(indexRow);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def geometry():\n" +
+				"  return jgeometry.getGeometry(featureContainer.getFeature())");
+	}
+	public String toString() {
+		return "geometry";
+	}
+	public boolean isEnable() {
+		return false;
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "numeric_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns the geometry of this row.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToNumber.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToNumber.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/ToNumber.java	(revision 420)
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class ToNumber extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "toNumber";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"double toNumber(String value){return java.lang.Double.parseDouble(value);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def toNumber(value):\n" +
+				"  import java.lang.Double\n" +
+				"  return java.lang.Double.parseDouble(value)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.NUMBER );
+	}
+	public String getDescription() {
+	    return PluginServices.getText(this, "parameter") + ": " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "returns") + ": " +
+	    PluginServices.getText(this, "double_value") + "\n" +
+	    PluginServices.getText(this, "description") + ": " +
+	    "Returns a new number initialized to the value represented by the specified String";
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Before.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Before.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Before.java	(revision 420)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Before extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+",)";
+	}
+	public String toString() {
+		return "before";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"boolean before(java.lang.Object value1,java.lang.Object value2){return value1.before(value2);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def before(value1, value2):\n" +
+				"  return value1.before(value2)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.DATE);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+"("+PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2"+")"+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+        PluginServices.getText(this, "date_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+        PluginServices.getText(this, "date_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Tests if parameter1 date is before the parameter2 date.";
+    }
+
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Equal.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Equal.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Equal.java	(revision 420)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Equal extends AbstractOperator{
+
+	public String addText(String s) {
+		return s.concat(toString());
+	}
+
+	public void eval(BSFManager interpreter) throws BSFException {
+
+	}
+	public String toString() {
+		return " == ";
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.DATE || getType()==IOperator.NUMBER || getType()==IOperator.STRING);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText("")+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "boolean_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Returns true if the first object value is equals than the second value.";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Replace.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Replace.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Replace.java	(revision 420)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Replace extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+" , \"\",\"\")";
+	}
+	public String toString() {
+		return "replace";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"String replace(String value1,String value2,String value3){return value1.replaceAll(value2,value3);};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def replace(value1,value2,value3):\n" +
+				"  return value1.replace(value2,value3)");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING);
+	}
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+toString()+"("+PluginServices.getText(this,"parameter")+"1,"+PluginServices.getText(this,"parameter")+"2, "+PluginServices.getText(this,"parameter")+"3"+")"+"\n"+getDescription();
+	}
+	public String getDescription() {
+        return PluginServices.getText(this, "parameter") + "1"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "2"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "parameter") + "3"+": " +
+        PluginServices.getText(this, "string_value") + "\n"+
+        PluginServices.getText(this, "returns") + ": " +
+        PluginServices.getText(this, "string_value") + "\n" +
+        PluginServices.getText(this, "description") + ": " +
+        "Replaces each substring(parameter2) of parameter1 string that matches the given regular expression with the given replacement parameter3";
+    }
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Trim.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Trim.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/operators/Trim.java	(revision 420)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.operators;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.AbstractOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class Trim extends AbstractOperator{
+
+	public String addText(String s) {
+		return toString()+"("+s+")";
+	}
+	public String toString() {
+		return "trim";
+	}
+	public void eval(BSFManager interpreter) throws BSFException {
+//		interpreter.eval(ExpressionFieldExtension.BEANSHELL,null,-1,-1,"String trim(String value){return value.trim();};");
+		interpreter.exec(ExpressionFieldExtension.JYTHON,null,-1,-1,"def trim(value):\n" +
+				"  return value.strip()");
+	}
+	public boolean isEnable() {
+		return (getType()==IOperator.STRING);
+	}
+	public String getDescription() {
+	    return PluginServices.getText(this, "parameter") + ": " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "returns") + ": " +
+	    PluginServices.getText(this, "string_value") + "\n" +
+	    PluginServices.getText(this, "description") + ": " +
+	    "Returns a copy of the string, with leading and trailing whitespace omitted.";
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/AbstractOperator.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/AbstractOperator.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/AbstractOperator.java	(revision 420)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table;
+
+import org.gvsig.andami.PluginServices;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public abstract class AbstractOperator implements IOperator{
+	private int type;
+
+	public void setType(int type) {
+		this.type=type;
+	}
+	public int getType() {
+		return type;
+	}
+	public abstract String toString();
+
+	public String getTooltip(){
+		return PluginServices.getText(this,"operator")+":  "+addText(PluginServices.getText(this,"parameter"))+"\n"+getDescription();
+	}
+	public abstract String getDescription();
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/FeatureIndex.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/FeatureIndex.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/FeatureIndex.java	(revision 420)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table;
+
+/**
+ * Utility class to use in Jython bean
+ * 
+ * @author jldominguez
+ * 
+ */
+public class FeatureIndex {
+
+	private long index = -1;
+
+	public void next() {
+		index++;
+	}
+
+	public void previous() {
+		index--;
+	}
+
+	public long get() {
+		return index;
+	}
+
+	public void set(long i) {
+		index = i;
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/IOperator.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/IOperator.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/IOperator.java	(revision 420)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public interface IOperator {
+	int NUMBER = 0;
+	int STRING = 1;
+	int DATE = 2;
+	public String addText(String s);
+	public String toString();
+	public void eval(BSFManager interpreter) throws BSFException ;
+	public boolean isEnable();
+	public void setType(int fieldType);
+	public String getTooltip();
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/AdvancedPanelLayout.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/AdvancedPanelLayout.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/AdvancedPanelLayout.java	(revision 420)
@@ -0,0 +1,103 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.gvsig.expressionfield.project.documents.table.gui;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class AdvancedPanelLayout extends javax.swing.JPanel {
+
+    /**
+     * Creates new form AdvancedPanel
+     */
+    public AdvancedPanelLayout() {
+        initComponents();
+    }
+
+    /**
+     * This method is called from within the constructor to initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is always
+     * regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents() {
+        java.awt.GridBagConstraints gridBagConstraints;
+
+        filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4));
+        butLoad = new javax.swing.JButton();
+        butSave = new javax.swing.JButton();
+        butTest = new javax.swing.JButton();
+        filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));
+        filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4));
+        editorContainer = new javax.swing.JPanel();
+
+        java.awt.GridBagLayout layout = new java.awt.GridBagLayout();
+        layout.columnWidths = new int[] {0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0};
+        layout.rowHeights = new int[] {0, 5, 0, 5, 0, 5, 0};
+        setLayout(layout);
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 0;
+        add(filler2, gridBagConstraints);
+
+        butLoad.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/gvsig/expressionfield/project/documents/table/gui/document-open.png"))); // NOI18N
+        butLoad.setToolTipText("Load script from file"); // NOI18N
+        butLoad.setBorder(null);
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 2;
+        gridBagConstraints.gridy = 2;
+        add(butLoad, gridBagConstraints);
+
+        butSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/gvsig/expressionfield/project/documents/table/gui/document-save.png"))); // NOI18N
+        butSave.setToolTipText("Save script to file");
+        butSave.setBorder(null);
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 4;
+        gridBagConstraints.gridy = 2;
+        add(butSave, gridBagConstraints);
+
+        butTest.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/gvsig/expressionfield/project/documents/table/gui/tools-scripting-launcher.png"))); // NOI18N
+        butTest.setToolTipText("Run script for testing");
+        butTest.setBorder(null);
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 6;
+        gridBagConstraints.gridy = 2;
+        add(butTest, gridBagConstraints);
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 8;
+        gridBagConstraints.gridy = 2;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.weightx = 0.1;
+        add(filler3, gridBagConstraints);
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 10;
+        gridBagConstraints.gridy = 6;
+        add(filler4, gridBagConstraints);
+
+        editorContainer.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 2;
+        gridBagConstraints.gridy = 4;
+        gridBagConstraints.gridwidth = 7;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+        gridBagConstraints.weightx = 0.1;
+        gridBagConstraints.weighty = 0.1;
+        add(editorContainer, gridBagConstraints);
+    }// </editor-fold>//GEN-END:initComponents
+
+
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    protected javax.swing.JButton butLoad;
+    protected javax.swing.JButton butSave;
+    protected javax.swing.JButton butTest;
+    protected javax.swing.JPanel editorContainer;
+    protected javax.swing.Box.Filler filler2;
+    protected javax.swing.Box.Filler filler3;
+    protected javax.swing.Box.Filler filler4;
+    // End of variables declaration//GEN-END:variables
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/AdvancedPanel.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/AdvancedPanel.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/AdvancedPanel.java	(revision 420)
@@ -0,0 +1,169 @@
+package org.gvsig.expressionfield.project.documents.table.gui;
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.io.IOException;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.ApplicationManager;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.i18n.I18nManager;
+import org.gvsig.utils.GenericFileFilter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.gvsig.expressionfield.project.documents.table.gui.syntaxhighlight.JRSyntaxTextArea;
+import org.gvsig.expressionfield.project.documents.table.gui.syntaxhighlight.SyntaxtHighlightTextComponent;
+        
+public class AdvancedPanel extends AdvancedPanelLayout {
+
+    private static Logger logger = LoggerFactory.getLogger(AdvancedPanel.class);
+
+    private BSFManager interpreter = null;
+    private SyntaxtHighlightTextComponent textArea = null;
+
+    public AdvancedPanel(BSFManager interpreter) {
+        super();
+        this.interpreter = interpreter;
+        initComponents();
+        translate();
+    }
+
+    private void translate() {
+        I18nManager i18nManager = ToolsLocator.getI18nManager();
+        this.butLoad.setToolTipText(i18nManager.getTranslation("_Load_script_from_file"));
+        this.butSave.setToolTipText(i18nManager.getTranslation("_Save_script_to_file"));
+        this.butTest.setToolTipText(i18nManager.getTranslation("_Run_script_for_testing"));
+    }
+
+    private void initComponents() {
+        // this.butLoad.setIcon(...);
+        // this.butSave.setIcon(...);
+        // this.butTest.setIcon(...);
+        this.editorContainer.setLayout(new BorderLayout());
+        this.textArea = new JRSyntaxTextArea();
+        this.editorContainer.add(textArea.getJTextComponent(), BorderLayout.CENTER);
+        
+        this.butLoad.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent ae) {
+                doLoad();
+            }
+        });
+        this.butSave.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent ae) {
+                doSave();
+            }
+        });
+        this.butTest.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent ae) {
+                doTest();
+            }
+        });
+    }
+
+    private void doLoad() {
+        final I18nManager i18nManager = ToolsLocator.getI18nManager();
+        ApplicationManager application = ApplicationLocator.getManager();
+        File files[] = application.showChooserDialog(
+                i18nManager.getTranslation("_Seleccione_el_script_a_cargar"),
+                JFileChooser.OPEN_DIALOG,
+                JFileChooser.FILES_ONLY,
+                false,
+                null,
+                new GenericFileFilter(new String[]{"py", "txt"}, i18nManager.getTranslation("python")),
+                false
+        );
+        if (files != null && files.length >= 1) {
+            String code;
+            try {
+                code = FileUtils.readFileToString(files[0]);
+            } catch (IOException ex) {
+                logger.warn("Can't read file '" + files[0].getAbsolutePath() + "'.", ex);
+                application.messageDialog(
+                        i18nManager.getTranslation("_No_se_puede_cargar_el_fichero_seleccionado"),
+                        i18nManager.getTranslation("_Atencion"),
+                        JOptionPane.WARNING_MESSAGE);
+                return;
+            }
+            this.textArea.setText(code);
+        }
+    }
+
+    private void doSave() {
+        final I18nManager i18nManager = ToolsLocator.getI18nManager();
+        ApplicationManager application = ApplicationLocator.getManager();
+        String code = this.getCode();
+        if (code == null) {
+            application.messageDialog(
+                    i18nManager.getTranslation("_No_hay_ningun_script_cargado"),
+                    i18nManager.getTranslation("_Informacion"),
+                    JOptionPane.INFORMATION_MESSAGE);
+            return;
+        }
+        File files[] = application.showChooserDialog(
+                i18nManager.getTranslation("_Seleccione_el_script_a_cargar"),
+                JFileChooser.SAVE_DIALOG,
+                JFileChooser.FILES_ONLY,
+                false,
+                null,
+                new GenericFileFilter(new String[]{"py", "txt"}, i18nManager.getTranslation("python")),
+                false
+        );
+        if (files != null && files.length >= 1) {
+            try {
+                FileUtils.writeStringToFile(files[0], code);
+            } catch (IOException ex) {
+                logger.warn("Can't write file '" + files[0].getAbsolutePath() + "'.", ex);
+                application.messageDialog(
+                        i18nManager.getTranslation("_No_se_puede_guardar_en_el_fichero_seleccionado"),
+                        i18nManager.getTranslation("_Atencion"),
+                        JOptionPane.WARNING_MESSAGE);
+                return;
+            }
+        }
+    }
+
+    private void doTest() {
+        final I18nManager i18nManager = ToolsLocator.getI18nManager();
+        final ApplicationManager application = ApplicationLocator.getManager();
+        String code = this.getCode();
+        if (code == null) {
+            application.messageDialog(
+                    i18nManager.getTranslation("_No_hay_ningun_script_cargado"),
+                    i18nManager.getTranslation("_Informacion"),
+                    JOptionPane.INFORMATION_MESSAGE);
+            return;
+        }
+        try {
+            interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1, code);
+        } catch (BSFException ex) {
+            logger.warn("Can't execute script:\n" + code + "\n", ex);
+            application.messageDialog(
+                    i18nManager.getTranslation("_Se_han_producido_errores") + "\n\n" + ex.getMessage(),
+                    i18nManager.getTranslation("_Atencion"),
+                    JOptionPane.WARNING_MESSAGE);
+            return;
+        }
+        application.messageDialog(
+                i18nManager.getTranslation("_Ejecucion_correcta"),
+                i18nManager.getTranslation("_Informacion"),
+                JOptionPane.INFORMATION_MESSAGE);
+    }
+
+    public String getCode() {
+        String code = this.textArea.getText();
+        code = code.trim();
+        if (StringUtils.isBlank(code)) {
+            return null;
+        }
+        return code;
+    }
+
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/AdvancedPanelLayout.form
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/AdvancedPanelLayout.form	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/AdvancedPanelLayout.form	(revision 420)
@@ -0,0 +1,669 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.8" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="4"/>
+    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
+  </AuxValues>
+  <SubComponents>
+    <Component class="javax.swing.Box$Filler" name="filler2">
+      <Properties>
+        <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[4, 4]"/>
+        </Property>
+        <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[4, 4]"/>
+        </Property>
+        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[4, 4]"/>
+        </Property>
+      </Properties>
+      <AuxValues>
+        <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
+      </AuxValues>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
+    </Component>
+    <Component class="javax.swing.JButton" name="butLoad">
+      <Properties>
+        <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
+          <Image iconType="3" name="/org/gvsig/expressionfield/project/documents/table/gui/document-open.png"/>
+        </Property>
+        <Property name="toolTipText" type="java.lang.String" value="Load script from file" noResource="true"/>
+        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+          <Border info="null"/>
+        </Property>
+      </Properties>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
+    </Component>
+    <Component class="javax.swing.JButton" name="butSave">
+      <Properties>
+        <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
+          <Image iconType="3" name="/org/gvsig/expressionfield/project/documents/table/gui/document-save.png"/>
+        </Property>
+        <Property name="toolTipText" type="java.lang.String" value="Save script to file"/>
+        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+          <Border info="null"/>
+        </Property>
+      </Properties>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="4" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
+    </Component>
+    <Component class="javax.swing.JButton" name="butTest">
+      <Properties>
+        <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
+          <Image iconType="3" name="/org/gvsig/expressionfield/project/documents/table/gui/tools-scripting-launcher.png"/>
+        </Property>
+        <Property name="toolTipText" type="java.lang.String" value="Run script for testing"/>
+        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+          <Border info="null"/>
+        </Property>
+      </Properties>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="6" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
+    </Component>
+    <Component class="javax.swing.Box$Filler" name="filler3">
+      <Properties>
+        <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[32767, 0]"/>
+        </Property>
+      </Properties>
+      <AuxValues>
+        <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/>
+      </AuxValues>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="8" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.1" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
+    </Component>
+    <Component class="javax.swing.Box$Filler" name="filler4">
+      <Properties>
+        <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[4, 4]"/>
+        </Property>
+        <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[4, 4]"/>
+        </Property>
+        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[4, 4]"/>
+        </Property>
+      </Properties>
+      <AuxValues>
+        <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
+      </AuxValues>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="10" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
+    </Component>
+    <Container class="javax.swing.JPanel" name="editorContainer">
+      <Properties>
+        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+          <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
+            <LineBorder/>
+          </Border>
+        </Property>
+      </Properties>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="2" gridY="4" gridWidth="7" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.1" weightY="0.1"/>
+        </Constraint>
+      </Constraints>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
+    </Container>
+  </SubComponents>
+  <LayoutCode>
+    <CodeStatement>
+      <CodeExpression id="1_layout">
+        <CodeVariable name="layout" type="4096" declaredType="java.awt.GridBagLayout"/>
+        <ExpressionOrigin>
+          <ExpressionProvider type="CodeConstructor">
+            <CodeConstructor class="java.awt.GridBagLayout" parameterTypes=""/>
+          </ExpressionProvider>
+        </ExpressionOrigin>
+      </CodeExpression>
+      <StatementProvider type="CodeExpression">
+        <CodeExpression id="1_layout"/>
+      </StatementProvider>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="1_layout"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="columnWidths" class="java.awt.GridBagLayout"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="2">
+          <ExpressionOrigin>
+            <Value type="[I" editor="org.netbeans.modules.form.layoutsupport.delegates.GridBagLayoutSupport$IntArrayPropertyEditor">
+              <PropertyValue value="[0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0]"/>
+            </Value>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="1_layout"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="rowHeights" class="java.awt.GridBagLayout"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="3">
+          <ExpressionOrigin>
+            <Value type="[I" editor="org.netbeans.modules.form.layoutsupport.delegates.GridBagLayoutSupport$IntArrayPropertyEditor">
+              <PropertyValue value="[0, 5, 0, 5, 0, 5, 0]"/>
+            </Value>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="4">
+        <ExpressionOrigin>
+          <ExpressionProvider type="ComponentRef">
+            <ComponentRef name="."/>
+          </ExpressionProvider>
+        </ExpressionOrigin>
+      </CodeExpression>
+      <StatementProvider type="CodeMethod">
+        <CodeMethod name="setLayout" class="java.awt.Container" parameterTypes="java.awt.LayoutManager"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="1_layout"/>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="5_gridBagConstraints">
+        <CodeVariable name="gridBagConstraints" type="20480" declaredType="java.awt.GridBagConstraints"/>
+        <ExpressionOrigin>
+          <ExpressionProvider type="CodeConstructor">
+            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
+          </ExpressionProvider>
+        </ExpressionOrigin>
+      </CodeExpression>
+      <StatementProvider type="CodeExpression">
+        <CodeExpression id="5_gridBagConstraints"/>
+      </StatementProvider>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="5_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="6">
+          <ExpressionOrigin>
+            <Value type="int" value="0"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="5_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="7">
+          <ExpressionOrigin>
+            <Value type="int" value="0"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="4"/>
+      <StatementProvider type="CodeMethod">
+        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="8_filler2">
+          <CodeVariable name="filler2" type="8196" declaredType="javax.swing.Box$Filler"/>
+          <ExpressionOrigin>
+            <ExpressionProvider type="ComponentRef">
+              <ComponentRef name="filler2"/>
+            </ExpressionProvider>
+          </ExpressionOrigin>
+        </CodeExpression>
+        <CodeExpression id="5_gridBagConstraints"/>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="9_gridBagConstraints">
+        <CodeVariable name="gridBagConstraints"/>
+        <ExpressionOrigin>
+          <ExpressionProvider type="CodeConstructor">
+            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
+          </ExpressionProvider>
+        </ExpressionOrigin>
+      </CodeExpression>
+      <StatementProvider type="CodeExpression">
+        <CodeExpression id="9_gridBagConstraints"/>
+      </StatementProvider>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="9_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="10">
+          <ExpressionOrigin>
+            <Value type="int" value="2"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="9_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="11">
+          <ExpressionOrigin>
+            <Value type="int" value="2"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="4"/>
+      <StatementProvider type="CodeMethod">
+        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="12_butLoad">
+          <CodeVariable name="butLoad" type="8196" declaredType="javax.swing.JButton"/>
+          <ExpressionOrigin>
+            <ExpressionProvider type="ComponentRef">
+              <ComponentRef name="butLoad"/>
+            </ExpressionProvider>
+          </ExpressionOrigin>
+        </CodeExpression>
+        <CodeExpression id="9_gridBagConstraints"/>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="13_gridBagConstraints">
+        <CodeVariable name="gridBagConstraints"/>
+        <ExpressionOrigin>
+          <ExpressionProvider type="CodeConstructor">
+            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
+          </ExpressionProvider>
+        </ExpressionOrigin>
+      </CodeExpression>
+      <StatementProvider type="CodeExpression">
+        <CodeExpression id="13_gridBagConstraints"/>
+      </StatementProvider>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="13_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="14">
+          <ExpressionOrigin>
+            <Value type="int" value="4"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="13_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="15">
+          <ExpressionOrigin>
+            <Value type="int" value="2"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="4"/>
+      <StatementProvider type="CodeMethod">
+        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="16_butSave">
+          <CodeVariable name="butSave" type="8196" declaredType="javax.swing.JButton"/>
+          <ExpressionOrigin>
+            <ExpressionProvider type="ComponentRef">
+              <ComponentRef name="butSave"/>
+            </ExpressionProvider>
+          </ExpressionOrigin>
+        </CodeExpression>
+        <CodeExpression id="13_gridBagConstraints"/>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="17_gridBagConstraints">
+        <CodeVariable name="gridBagConstraints"/>
+        <ExpressionOrigin>
+          <ExpressionProvider type="CodeConstructor">
+            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
+          </ExpressionProvider>
+        </ExpressionOrigin>
+      </CodeExpression>
+      <StatementProvider type="CodeExpression">
+        <CodeExpression id="17_gridBagConstraints"/>
+      </StatementProvider>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="17_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="18">
+          <ExpressionOrigin>
+            <Value type="int" value="6"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="17_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="19">
+          <ExpressionOrigin>
+            <Value type="int" value="2"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="4"/>
+      <StatementProvider type="CodeMethod">
+        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="20_butTest">
+          <CodeVariable name="butTest" type="8196" declaredType="javax.swing.JButton"/>
+          <ExpressionOrigin>
+            <ExpressionProvider type="ComponentRef">
+              <ComponentRef name="butTest"/>
+            </ExpressionProvider>
+          </ExpressionOrigin>
+        </CodeExpression>
+        <CodeExpression id="17_gridBagConstraints"/>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="21_gridBagConstraints">
+        <CodeVariable name="gridBagConstraints"/>
+        <ExpressionOrigin>
+          <ExpressionProvider type="CodeConstructor">
+            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
+          </ExpressionProvider>
+        </ExpressionOrigin>
+      </CodeExpression>
+      <StatementProvider type="CodeExpression">
+        <CodeExpression id="21_gridBagConstraints"/>
+      </StatementProvider>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="21_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="22">
+          <ExpressionOrigin>
+            <Value type="int" value="8"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="21_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="23">
+          <ExpressionOrigin>
+            <Value type="int" value="2"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="21_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="24">
+          <ExpressionOrigin>
+            <Value type="int" value="2"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="21_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="25">
+          <ExpressionOrigin>
+            <Value type="double" value="0.1"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="4"/>
+      <StatementProvider type="CodeMethod">
+        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="26_filler3">
+          <CodeVariable name="filler3" type="8196" declaredType="javax.swing.Box$Filler"/>
+          <ExpressionOrigin>
+            <ExpressionProvider type="ComponentRef">
+              <ComponentRef name="filler3"/>
+            </ExpressionProvider>
+          </ExpressionOrigin>
+        </CodeExpression>
+        <CodeExpression id="21_gridBagConstraints"/>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="27_gridBagConstraints">
+        <CodeVariable name="gridBagConstraints"/>
+        <ExpressionOrigin>
+          <ExpressionProvider type="CodeConstructor">
+            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
+          </ExpressionProvider>
+        </ExpressionOrigin>
+      </CodeExpression>
+      <StatementProvider type="CodeExpression">
+        <CodeExpression id="27_gridBagConstraints"/>
+      </StatementProvider>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="27_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="28">
+          <ExpressionOrigin>
+            <Value type="int" value="10"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="27_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="29">
+          <ExpressionOrigin>
+            <Value type="int" value="6"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="4"/>
+      <StatementProvider type="CodeMethod">
+        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="30_filler4">
+          <CodeVariable name="filler4" type="8196" declaredType="javax.swing.Box$Filler"/>
+          <ExpressionOrigin>
+            <ExpressionProvider type="ComponentRef">
+              <ComponentRef name="filler4"/>
+            </ExpressionProvider>
+          </ExpressionOrigin>
+        </CodeExpression>
+        <CodeExpression id="27_gridBagConstraints"/>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="31_gridBagConstraints">
+        <CodeVariable name="gridBagConstraints"/>
+        <ExpressionOrigin>
+          <ExpressionProvider type="CodeConstructor">
+            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
+          </ExpressionProvider>
+        </ExpressionOrigin>
+      </CodeExpression>
+      <StatementProvider type="CodeExpression">
+        <CodeExpression id="31_gridBagConstraints"/>
+      </StatementProvider>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="31_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="32">
+          <ExpressionOrigin>
+            <Value type="int" value="2"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="31_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="33">
+          <ExpressionOrigin>
+            <Value type="int" value="4"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="31_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="gridwidth" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="34">
+          <ExpressionOrigin>
+            <Value type="int" value="7"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="31_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="35">
+          <ExpressionOrigin>
+            <Value type="int" value="1"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="31_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="36">
+          <ExpressionOrigin>
+            <Value type="double" value="0.1"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="31_gridBagConstraints"/>
+      <StatementProvider type="CodeField">
+        <CodeField name="weighty" class="java.awt.GridBagConstraints"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="37">
+          <ExpressionOrigin>
+            <Value type="double" value="0.1"/>
+          </ExpressionOrigin>
+        </CodeExpression>
+      </Parameters>
+    </CodeStatement>
+    <CodeStatement>
+      <CodeExpression id="4"/>
+      <StatementProvider type="CodeMethod">
+        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
+      </StatementProvider>
+      <Parameters>
+        <CodeExpression id="38_editorContainer">
+          <CodeVariable name="editorContainer" type="8196" declaredType="javax.swing.JPanel"/>
+          <ExpressionOrigin>
+            <ExpressionProvider type="ComponentRef">
+              <ComponentRef name="editorContainer"/>
+            </ExpressionProvider>
+          </ExpressionOrigin>
+        </CodeExpression>
+        <CodeExpression id="31_gridBagConstraints"/>
+      </Parameters>
+    </CodeStatement>
+  </LayoutCode>
+</Form>
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/EvalExpression.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/EvalExpression.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/EvalExpression.java	(revision 420)
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.gui;
+
+import java.util.Date;
+
+import org.apache.bsf.BSFException;
+import org.gvsig.app.project.documents.table.gui.FeatureTableDocumentPanel;
+import org.gvsig.fmap.dal.DataTypes;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.EditableFeature;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureSet;
+import org.gvsig.fmap.dal.feature.FeatureType;
+
+/**
+ * @author Vicente Caballero Navarro
+ */
+public class EvalExpression {
+	private FeatureType featureType;
+	private FeatureAttributeDescriptor selectedDescriptor;
+	public EvalExpression() {
+	}
+	public void setTable(FeatureTableDocumentPanel table) {
+		try {
+			selectedDescriptor = table.getTablePanel().getTable().getSelectedColumnsAttributeDescriptor()[0];
+		    featureType = table.getModel().getStore().getDefaultFeatureType();
+		} catch (DataException e) {
+			e.printStackTrace();
+		}
+	}
+
+	public void setValue(FeatureSet featureSet,Feature feature,Object obj) {
+		Object objBoolean=obj;
+		EditableFeature eFeature=feature.getEditable();
+		int type=((FeatureAttributeDescriptor)featureSet.getDefaultFeatureType().get(selectedDescriptor.getName())).getType();
+		if (type==DataTypes.BOOLEAN){
+			Integer integer=((Integer)obj).intValue();
+			if (integer==0){
+				objBoolean=new Boolean(false);
+			}else{
+				objBoolean=new Boolean(true);
+			}
+		}
+		eFeature.set(selectedDescriptor.getName(), objBoolean);
+		try {
+			featureSet.update(eFeature);
+		} catch (DataException e) {
+			e.printStackTrace();
+		}
+	}
+	 public void isCorrectValue(Object obj) throws BSFException {
+	        if (obj instanceof Number || obj instanceof Date || obj instanceof Boolean || obj instanceof String || obj == null ) {
+
+	        }else{
+	        	throw new BSFException("incorrect");
+	        }
+	 }
+
+	public FeatureAttributeDescriptor getFieldDescriptorSelected() {
+		return selectedDescriptor;
+	}
+	public FeatureType getFieldDescriptors() {
+		return featureType;
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/EvalExpressionDialog.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/EvalExpressionDialog.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/EvalExpressionDialog.java	(revision 420)
@@ -0,0 +1,1015 @@
+/**
+ * *****************************************************************************
+ *
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ *
+ ******************************************************************************
+ */
+package org.gvsig.expressionfield.project.documents.table.gui;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.GridLayout;
+import java.awt.Insets;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.prefs.Preferences;
+
+import javax.swing.BoxLayout;
+import javax.swing.ButtonGroup;
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.UIManager;
+import javax.swing.event.CaretEvent;
+import javax.swing.event.CaretListener;
+
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.app.project.documents.table.gui.FeatureTableDocumentPanel;
+import org.gvsig.expressionfield.ExpressionFieldExtension;
+import org.gvsig.expressionfield.project.documents.table.FeatureIndex;
+import org.gvsig.expressionfield.project.documents.table.GraphicOperator;
+import org.gvsig.expressionfield.project.documents.table.IOperator;
+import org.gvsig.expressionfield.project.documents.table.operators.Field;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureSelection;
+import org.gvsig.fmap.dal.feature.FeatureSet;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
+import org.gvsig.gui.beans.AcceptCancelPanel;
+import org.gvsig.gui.beans.swing.JButton;
+import org.gvsig.tools.dispose.DisposableIterator;
+import org.gvsig.tools.dispose.DisposeUtils;
+import org.gvsig.utils.GenericFileFilter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import bsh.EvalError;
+import org.apache.commons.lang3.StringUtils;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.ApplicationManager;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.i18n.I18nManager;
+
+public class EvalExpressionDialog extends JPanel implements IWindow {
+
+    private static Logger logger = LoggerFactory.getLogger(EvalExpressionDialog.class);
+    private static Preferences prefs = Preferences.userRoot().node("fieldExpressionOptions");
+    
+    private JPanel pNorth = null;
+    private JPanel pCentral = null;
+    private JScrollPane jScrollPane = null;
+    private JTextArea txtExp = null;
+    private AcceptCancelPanel acceptCancel;
+    private FeatureTableDocumentPanel table;
+    private FLyrVect lv;
+    private JPanel pNorthEast = null;
+    private JPanel pNorthCenter = null;
+    private JPanel pNorthWest = null;
+    private JScrollPane jScrollPane1 = null;
+    private JList listFields = null;
+    private JRadioButton rbNumber = null;
+    private JRadioButton rbString = null;
+    private JRadioButton rbDate = null;
+    private JScrollPane jScrollPane2 = null;
+    private JList listCommand = null;
+    private BSFManager interpreter = null; // Construct an interpreter
+    private Feature feature;
+    private FeatureStore featureStore = null;
+    private EvalExpression evalExpression = null;
+    /*
+     * Keeps index of row in feature set currently used.
+     */
+    private FeatureIndex fIndex = new FeatureIndex();
+
+    private JPanel pMessage;
+    private FeatureContainer featureContainer;
+    private static ArrayList<IOperator> operators = new ArrayList<IOperator>();
+
+    public EvalExpressionDialog(FeatureTableDocumentPanel table, BSFManager interpreter, ArrayList<IOperator> operators) {
+        super();
+        this.operators = operators;
+        this.interpreter = interpreter;
+        this.table = table;
+        initialize();
+
+    }
+
+    /**
+     * This method initializes this
+     */
+    private void initialize() {
+        try {
+            evalExpressions();
+        } catch (BSFException e) {
+            NotificationManager.addError(e);
+        }
+        evalExpression = new EvalExpression();
+        evalExpression.setTable(table);
+        /*
+         *  Keeps index of row in feature set currently used
+         */
+        try {
+            interpreter.declareBean("featureIndex", fIndex, FeatureIndex.class);
+        } catch (BSFException e) {
+            logger.error("While declaring featureIndex (Long).", e);
+        }
+
+        lv = (FLyrVect) table.getModel().getAssociatedLayer();
+        ButtonGroup bg = new ButtonGroup();
+        bg.add(getRbNumber());
+        bg.add(getRbString());
+        bg.add(getRbDate());
+        this.setLayout(new GridBagLayout());
+        this.setSize(549, 480);
+        GridBagConstraints constr = new GridBagConstraints();
+        constr.gridwidth = GridBagConstraints.REMAINDER;
+        constr.gridheight = 1;
+        constr.fill = GridBagConstraints.BOTH;
+        constr.ipadx = 5;
+        constr.ipady = 5;
+        constr.weightx = 1;
+        constr.weighty = 0.3;
+        this.add(getPMessage(), constr);
+        constr.gridheight = 5;
+        constr.weighty = 1;
+        this.add(getTabPrincipal(), constr);
+        GridBagConstraints constr2 = new GridBagConstraints();
+        constr2.gridwidth = GridBagConstraints.REMAINDER;
+        constr2.gridheight = 1;
+        constr2.fill = GridBagConstraints.HORIZONTAL;
+        constr2.anchor = GridBagConstraints.LAST_LINE_END;
+        constr2.weightx = 1;
+        constr2.weighty = 0;
+
+        this.add(getAcceptCancel(), constr2);
+
+    }
+
+    /**
+     * This method initializes pCentral
+     *
+     * @return javax.swing.JPanel
+     */
+    private JPanel getPNorth() {
+        if ( pNorth == null ) {
+            pNorth = new JPanel();
+            pNorth.setLayout(new GridBagLayout());
+            GridBagConstraints contr = new GridBagConstraints();
+            contr.ipadx = 5;
+            contr.ipady = 5;
+            contr.fill = GridBagConstraints.BOTH;
+            contr.weightx = 1;
+            contr.weighty = 1;
+            pNorth.add(getPNorthWest(), contr);
+
+            contr.fill = GridBagConstraints.VERTICAL;
+            contr.weightx = 0;
+            contr.weighty = 1;
+
+            pNorth.add(getPNorthCenter(), contr);
+
+            contr.fill = GridBagConstraints.BOTH;
+            contr.weightx = 0.5;
+            contr.weighty = 1;
+
+            pNorth.add(getPNorthEast(), contr);
+        }
+
+        return pNorth;
+    }
+
+    /**
+     * This method initializes pNorth
+     *
+     * @return javax.swing.JPanel
+     */
+    private JPanel getPCentral() {
+        if ( pCentral == null ) {
+            StringBuilder tit = new StringBuilder();
+            tit.append(PluginServices.getText(this, "expression"));
+            tit.append(" ");
+            tit.append(PluginServices.getText(this, "column"));
+            tit.append(" : ");
+            tit.append(evalExpression.getFieldDescriptorSelected().getName());
+            pCentral = new JPanel();
+            pCentral.setLayout(new GridBagLayout());
+            pCentral.setBorder(javax.swing.BorderFactory.createTitledBorder(
+                    null, tit.toString(),
+                    javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+                    javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+            GridBagConstraints contr = new GridBagConstraints();
+            contr.gridwidth = GridBagConstraints.REMAINDER;
+            contr.gridheight = 1;
+            contr.fill = GridBagConstraints.BOTH;
+            contr.ipadx = 5;
+            contr.ipady = 5;
+            contr.weightx = 1;
+            contr.weighty = 1;
+            pCentral.add(getJScrollPane(), contr);
+            GridBagConstraints contr1 = new GridBagConstraints();
+            contr1.gridwidth = 1;
+            contr1.gridheight = 1;
+            contr1.fill = GridBagConstraints.NONE;
+            contr1.ipadx = 5;
+            contr1.ipady = 5;
+            contr1.anchor = GridBagConstraints.CENTER;
+            pCentral.add(getBClear(), contr1);
+        }
+
+        return pCentral;
+    }
+
+    /**
+     * This method initializes pSouth
+     *
+     * @return javax.swing.JPanel
+     */
+    private AcceptCancelPanel getAcceptCancel() {
+        if ( this.acceptCancel == null ) {
+            this.acceptCancel = new AcceptCancelPanel(
+                    new java.awt.event.ActionListener() {
+                        public void actionPerformed(java.awt.event.ActionEvent e) {
+                            boolean isAccepted = true;
+                            Preferences prefs = Preferences.userRoot().node(
+                                    "fieldExpressionOptions");
+                            int limit;
+                            limit = prefs.getInt("limit_rows_in_memory", -1);
+                            if ( limit != -1 ) {
+                                int option = JOptionPane
+                                .showConfirmDialog(
+                                        (Component) PluginServices
+                                        .getMainFrame(),
+                                        PluginServices
+                                        .getText(
+                                                this,
+                                                "it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue"));
+                                if ( option != JOptionPane.OK_OPTION ) {
+                                    return;
+                                }
+                            }
+                            try {
+                                long t1 = System.currentTimeMillis();
+                                isAccepted = evalExpression();
+                                long t2 = System.currentTimeMillis();
+                                logger.info("Tiempo evaluar expresiones = " + (t2 - t1));
+                            } catch (BSFException e1) {
+                                NotificationManager.addError(e1);
+                            }
+                            if ( isAccepted ) {
+                                PluginServices.getMDIManager().closeWindow(
+                                        EvalExpressionDialog.this);
+                            }
+                        }
+                    }, new java.awt.event.ActionListener() {
+                        public void actionPerformed(java.awt.event.ActionEvent e) {
+                            PluginServices.getMDIManager().closeWindow(
+                                    EvalExpressionDialog.this);
+                        }
+                    });
+            acceptCancel.setOkButtonEnabled(false);
+        }
+
+        return this.acceptCancel;
+    }
+
+    private String replaceFields(String expression) {
+        String s = expression;
+
+        JList list = getListFields();
+        ListOperatorsModel model = (ListOperatorsModel) list.getModel();
+        for ( int i = 0; i < model.getSize(); i++ ) {
+            Field f = (Field) model.getElementAt(i);
+            s = StringUtils.replace(s, f.toString(), "field(\"" + f.getName() + "\")");
+        }
+        return s;
+    }
+
+    /**
+     * Evaluate the expression.
+     *
+     * @throws BSFException
+     */
+    private boolean evalExpression() throws BSFException {
+        final I18nManager i18nManager = ToolsLocator.getI18nManager();
+        final ApplicationManager application = ApplicationLocator.getManager();
+        String expression = getTxtExp().getText();
+        byte[] expressionBytes;
+        String encoding = System.getProperty("file.encoding");
+        try {
+            expressionBytes = expression.getBytes(encoding);
+            expression = new String(expressionBytes, "ISO-8859-1");
+        } catch (UnsupportedEncodingException e) {
+            logger.warn("Can't apply enconding ("+encoding+").",e);
+        }
+        String advancedCode = advancedPanel.getCode();
+        if( advancedCode != null ) {
+            try {
+                interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1, advancedCode);
+            } catch (BSFException ex) {
+                logger.warn("Can't execute script from advanced tab:\n" + advancedCode + "\n", ex);
+                application.messageDialog(
+                    i18nManager.getTranslation("_Se_han_producido_errores_ejecutando_el_codigo_de_la_pestaña_avanzado") + "\n\n" + ex.getMessage(),
+                    i18nManager.getTranslation("_Atencion"),
+                    JOptionPane.WARNING_MESSAGE);
+            }
+        }
+        expression = replaceFields(expression);
+        
+        interpreter.declareBean("evalExpression", evalExpression, EvalExpression.class);
+        interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1, "def expression():\n"
+                + "  return " + expression + "");
+
+        try {
+            interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1, "def isCorrect():\n"
+                    + "    evalExpression.isCorrectValue(expression())\n");
+            interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1, "isCorrect()");
+        } catch (BSFException ee) {
+            String message = ee.getMessage();
+            if ( message.length() > 200 ) {
+                message = message.substring(0, 200);
+            }
+            int option = JOptionPane.showConfirmDialog((Component) PluginServices.getMainFrame(),
+                    PluginServices.getText(this,
+                            "error_expression") + "\n" + message + "\n" + PluginServices.getText(this, "continue?"));
+            if ( option != JOptionPane.OK_OPTION ) {
+                return false;
+            }
+        }
+        try {
+            boolean select = true;
+            interpreter.declareBean("select", select, boolean.class);
+            if ( featureStore.isEditing() ) {
+                evalInEditing();
+            } else {
+                evalOutEditing();
+            }
+        } catch (DataException e) {
+            logger.warn("Can't evaluate expresion ("+expression+").",e);
+        }
+
+        return true;
+    }
+
+    private void evalInEditing() throws BSFException, DataException {
+        int limit = prefs.getInt("limit_rows_in_memory", -1);
+        ArrayList exceptions = new ArrayList();
+        interpreter.declareBean("exceptions", exceptions, ArrayList.class);
+        boolean emptySelection = ((FeatureSelection) featureStore.getSelection()).isEmpty();
+
+        FeatureSet set = null;
+        DisposableIterator iterator = null;
+
+        try {
+            set = featureStore.getFeatureSet(table.getModel().getQuery());
+            iterator = set.fastIterator();
+
+            interpreter.declareBean("featureSet", set, FeatureSet.class);
+            interpreter.declareBean("iterator", iterator, Iterator.class);
+            interpreter.declareBean("limit", limit, int.class);
+
+            if ( limit == -1 ) {
+                featureStore.beginEditingGroup(PluginServices.getText(this, "expression"));
+                if ( !emptySelection ) {
+                    interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1, "def p():\n"
+                            + "  \n"
+                            + "  featureIndex.set(0)\n"
+                            + "  while iterator.hasNext():\n"
+                            + "    feature=iterator.next()\n"
+                            + "    select=featureStore.getSelection().isSelected(feature)\n"
+                            + "    if select:\n"
+                            + "      featureContainer.setFeature(feature)\n"
+                            + "      obj=expression()\n"
+                            + "      evalExpression.setValue(featureSet,feature,obj)\n"
+                            + "      featureIndex.next()\n"
+                            + "  iterator.dispose()\n"
+                            + "  featureSet.dispose\n"
+                    );
+                } else {
+                    interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1, "def p():\n"
+                            + "  \n"
+                            + "  featureIndex.set(0)\n"
+                            + "  while iterator.hasNext():\n"
+                            + "    feature=iterator.next()\n"
+                            + "    featureContainer.setFeature(feature)\n"
+                            + "    obj=expression()\n"
+                            + "    evalExpression.setValue(featureSet,feature,obj)\n"
+                            + "    featureIndex.next()\n"
+                            + "  iterator.dispose()\n"
+                            + "  featureSet.dispose\n"
+                    );
+                }
+                try {
+                    interpreter.eval(ExpressionFieldExtension.JYTHON, null, -1, -1, "p()");
+                } catch (BSFException ee) {
+
+                    JOptionPane.showMessageDialog((Component) PluginServices.getMainFrame(),
+                            PluginServices.getText(this, "evaluate_expression_with_errors") + " " + exceptions.size() + ee.getMessage());
+                }
+                featureStore.endEditingGroup();
+            } else {
+                long size = set.getSize();
+                for ( int i = 0; i < size; i = i + limit ) {
+	//    			featureStore.finishEditing();
+                    //    			featureStore.edit();
+                    featureStore.beginEditingGroup(PluginServices.getText(this, "expression"));
+                    set = featureStore.getFeatureSet(table.getModel().getQuery());
+                    interpreter.declareBean("featureSet", set, FeatureSet.class);
+                    iterator = set.fastIterator(i);
+                    interpreter.declareBean("iterator", iterator, Iterator.class);
+                    if ( !emptySelection ) {
+                        interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1, "def p():\n"
+                                + "  \n"
+                                + "  pos=0\n"
+                                + "  featureIndex.set(0)\n"
+                                + "  while iterator.hasNext() and pos<limit:\n"
+                                + "    feature=iterator.next()\n"
+                                + "    select=featureStore.getSelection().isSelected(feature)\n"
+                                + "    if select:\n"
+                                + "      featureContainer.setFeature(feature)\n"
+                                + "      obj=expression()\n"
+                                + "      evalExpression.setValue(featureSet,feature,obj)\n"
+                                + "      featureIndex.next()\n"
+                                + "    pos=pos+1\n"
+                                + "  iterator.dispose()\n"
+                                + "  featureSet.dispose\n"
+                        );
+                    } else {
+                        interpreter.exec(ExpressionFieldExtension.JYTHON, null, -1, -1, "def p():\n"
+                                + "  \n"
+                                + "  pos=0\n"
+                                + "  featureIndex.set(0)\n"
+                                + "  while iterator.hasNext() and pos<limit:\n"
+                                + "    feature=iterator.next()\n"
+                                + "    featureContainer.setFeature(feature)\n"
+                                + "    obj=expression()\n"
+                                + "    evalExpression.setValue(featureSet,feature,obj)\n"
+                                + "    pos=pos+1\n"
+                                + "    featureIndex.next()\n"
+                                + "  iterator.dispose()\n"
+                                + "  featureSet.dispose\n"
+                        );
+                    }
+                    try {
+                        interpreter.eval(ExpressionFieldExtension.JYTHON, null, -1, -1, "p()");
+                    } catch (BSFException ee) {
+
+                        JOptionPane.showMessageDialog((Component) PluginServices.getMainFrame(),
+                                PluginServices.getText(this, "evaluate_expression_with_errors") + " " + exceptions.size() + ee.getMessage());
+                    }
+
+                    featureStore.endEditingGroup();
+                    featureStore.finishEditing();
+                    featureStore.edit();
+                }
+            }
+        } finally {
+            DisposeUtils.dispose(set);
+            DisposeUtils.dispose(iterator);
+        }
+
+    }
+
+    private void evalOutEditing() throws BSFException, DataException {
+
+    }
+
+    /**
+     * This method initializes pMessage
+     *
+     * @return javax.swing.JPanel
+     */
+    private JPanel getPMessage() {
+        if ( pMessage == null ) {
+
+            pMessage = new JPanel();
+            pMessage.setLayout(new GridLayout());
+            pMessage.setBorder(javax.swing.BorderFactory.createTitledBorder(null, PluginServices.getText(this, "information"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+            pMessage.add(getJScrollPane3(), null);
+        }
+        return pMessage;
+    }
+
+    private void evalExpressions() throws BSFException {
+        featureStore = table.getModel().getStore();
+        interpreter.declareBean("featureStore", featureStore, FeatureStore.class);
+        featureContainer = new FeatureContainer();
+        DisposableIterator iterator = null;
+        FeatureSet set = null;
+        try {
+            set = featureStore.getFeatureSet(table.getModel().getQuery());
+            iterator = set.iterator();
+
+            if ( iterator.hasNext() ) {
+                feature = (Feature) iterator.next();
+            }
+            featureContainer.setFeature(feature);
+            interpreter.declareBean("featureContainer", featureContainer, Feature.class);
+        } catch (DataException e) {
+            e.printStackTrace();
+        } finally {
+            if ( iterator != null ) {
+                iterator.dispose();
+            }
+            if ( set != null ) {
+                set.dispose();
+            }
+        }
+    }
+    /**
+     * Evaluate the fields.
+     *
+     * @param interpreter
+     *
+     * @throws EvalError
+     */
+    int lastType = -1;
+    private JButton bClear = null;
+    private JTabbedPane tabPrincipal = null;
+    private JPanel pPrincipal = null;
+    private JPanel pAdvanced = null;
+    private AdvancedPanel advancedPanel = null; 
+//    private JPanel pAdvancedNorth = null;
+//    private JTextField jTextField = null;
+//    private JButton bFile = null;
+//    private JPanel pAdvancedCenter = null;
+//    private JLabel lblLeng = null;
+//    private JButton bEval = null;
+    private JScrollPane jScrollPane3 = null;
+    private JTextArea txtMessage2 = null;
+
+    private void refreshOperators(int type) {
+        if ( lastType != -1 && lastType == type ) {
+            return;
+        }
+        lastType = type;
+        ListOperatorsModel lom = (ListOperatorsModel) getListCommand().getModel();
+        lom.clear();
+        for ( int i = 0; i < operators.size(); i++ ) {
+            IOperator operator = (IOperator) operators.get(i);
+            operator.setType(type);
+            //Comprobar si tiene una capa asociada y pasarsela al GraphicOperator.
+            if ( (lv != null) && operator instanceof GraphicOperator ) {
+                GraphicOperator igo = (GraphicOperator) operator;
+                igo.setLayer(lv);
+            }
+            if ( operator.isEnable() ) {
+                lom.addOperator(operator);
+                //System.out.println("Operator = "+operator.toString());
+            }
+        }
+        getListCommand().repaint();
+        getJScrollPane2().repaint();
+        getJScrollPane2().doLayout();
+        this.doLayout();
+
+    }
+
+    /**
+     * This method initializes jScrollPane
+     *
+     * @return javax.swing.JScrollPane
+     */
+    private JScrollPane getJScrollPane() {
+        if ( jScrollPane == null ) {
+            jScrollPane = new JScrollPane();
+            jScrollPane.setPreferredSize(new java.awt.Dimension(480, 80));
+            jScrollPane.setViewportView(getTxtExp());
+        }
+
+        return jScrollPane;
+    }
+
+    /**
+     * This method initializes txtExp
+     *
+     * @return javax.swing.JTextArea
+     */
+    private JTextArea getTxtExp() {
+        if ( txtExp == null ) {
+            txtExp = new JTextArea();
+            txtExp.addCaretListener(new CaretListener() {
+                public void caretUpdate(CaretEvent e) {
+                    if ( txtExp.getText().length() > 0 ) {
+                        getAcceptCancel().setOkButtonEnabled(true);
+                    } else {
+                        getAcceptCancel().setOkButtonEnabled(false);
+                    }
+                }
+
+            });
+        }
+
+        return txtExp;
+    }
+
+    public WindowInfo getWindowInfo() {
+        WindowInfo wi = new WindowInfo(WindowInfo.MODALDIALOG + WindowInfo.RESIZABLE);
+        wi.setTitle(PluginServices.getText(this, "calculate_expression"));
+
+        return wi;
+    }
+
+    /**
+     * This method initializes pNorthEast
+     *
+     * @return javax.swing.JPanel
+     */
+    private JPanel getPNorthEast() {
+        if ( pNorthEast == null ) {
+            pNorthEast = new JPanel(new GridLayout());
+            pNorthEast.setBorder(javax.swing.BorderFactory.createTitledBorder(
+                    null, PluginServices.getText(this, "commands"),
+                    javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+                    javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+            pNorthEast.add(getJScrollPane2(), null);
+        }
+
+        return pNorthEast;
+    }
+
+    /**
+     * This method initializes pNorthCenter
+     *
+     * @return javax.swing.JPanel
+     */
+    private JPanel getPNorthCenter() {
+        if ( pNorthCenter == null ) {
+            pNorthCenter = new JPanel();
+            pNorthCenter.setLayout(new BoxLayout(getPNorthCenter(),
+                    BoxLayout.Y_AXIS));
+            pNorthCenter.setBorder(javax.swing.BorderFactory.createTitledBorder(
+                    null, PluginServices.getText(this, "type"),
+                    javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+                    javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+            pNorthCenter.add(getRbNumber(), null);
+            pNorthCenter.add(getRbString(), null);
+            pNorthCenter.add(getRbDate(), null);
+        }
+
+        return pNorthCenter;
+    }
+
+    /**
+     * This method initializes pNorthWest
+     *
+     * @return javax.swing.JPanel
+     */
+    private JPanel getPNorthWest() {
+        if ( pNorthWest == null ) {
+            pNorthWest = new JPanel(new GridLayout());
+            pNorthWest.setBorder(javax.swing.BorderFactory.createTitledBorder(
+                    null, PluginServices.getText(this, "field"),
+                    javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+                    javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+            pNorthWest.add(getJScrollPane1(), null);
+        }
+
+        return pNorthWest;
+    }
+
+    /**
+     * This method initializes jScrollPane1
+     *
+     * @return javax.swing.JScrollPane
+     */
+    private JScrollPane getJScrollPane1() {
+        if ( jScrollPane1 == null ) {
+            jScrollPane1 = new JScrollPane();
+            jScrollPane1.setPreferredSize(new java.awt.Dimension(175, 100));
+            jScrollPane1.setViewportView(getListFields());
+        }
+
+        return jScrollPane1;
+    }
+
+    /**
+     * This method initializes listFields
+     *
+     * @return javax.swing.JList
+     */
+    private JList getListFields() {
+        if ( listFields == null ) {
+            listFields = new JList();
+            listFields.setModel(new ListOperatorsModel());
+
+            ListOperatorsModel lm = (ListOperatorsModel) listFields.getModel();
+            FeatureType fds = evalExpression.getFieldDescriptors();
+            for ( int i = 0; i < fds.size(); i++ ) {
+                Field field = new Field();
+                field.setFieldDescription(fds.getAttributeDescriptor(i));
+                try {
+                    field.eval(interpreter);
+                } catch (BSFException e) {
+                    e.printStackTrace();
+                }
+                lm.addOperator(field);
+            }
+
+            listFields.addMouseListener(new MouseListener() {
+                public void mouseClicked(MouseEvent e) {
+                    IOperator operator = ((IOperator) listFields.getSelectedValue());
+                    if ( operator != null ) {
+                        getTxtMessage2().setText(operator.getTooltip());
+                        if ( e.getClickCount() == 2 ) {
+                            getTxtExp().setText(operator.addText(
+                                    getTxtExp().getText()));
+                        }
+                    }
+                }
+
+                public void mouseEntered(MouseEvent e) {
+                }
+
+                public void mouseExited(MouseEvent e) {
+                }
+
+                public void mousePressed(MouseEvent e) {
+                }
+
+                public void mouseReleased(MouseEvent e) {
+                }
+            });
+        }
+
+        return listFields;
+    }
+
+    /**
+     * This method initializes rbNumber
+     *
+     * @return javax.swing.JRadioButton
+     */
+    private JRadioButton getRbNumber() {
+        if ( rbNumber == null ) {
+            rbNumber = new JRadioButton();
+            rbNumber.setText(PluginServices.getText(this, "numeric"));
+            rbNumber.setSelected(true);
+            rbNumber.addChangeListener(new javax.swing.event.ChangeListener() {
+                public void stateChanged(javax.swing.event.ChangeEvent e) {
+                    if ( rbNumber.isSelected() ) {
+                        refreshCommands();
+                    }
+                }
+            });
+        }
+
+        return rbNumber;
+    }
+
+    /**
+     * This method initializes rbString
+     *
+     * @return javax.swing.JRadioButton
+     */
+    private JRadioButton getRbString() {
+        if ( rbString == null ) {
+            rbString = new JRadioButton();
+            rbString.setText(PluginServices.getText(this, "string"));
+            rbString.addChangeListener(new javax.swing.event.ChangeListener() {
+                public void stateChanged(javax.swing.event.ChangeEvent e) {
+                    if ( rbString.isSelected() ) {
+                        refreshCommands();
+                    }
+                }
+            });
+        }
+
+        return rbString;
+    }
+
+    /**
+     * This method initializes rbData
+     *
+     * @return javax.swing.JRadioButton
+     */
+    private JRadioButton getRbDate() {
+        if ( rbDate == null ) {
+            rbDate = new JRadioButton();
+            rbDate.setText(PluginServices.getText(this, "date"));
+            rbDate.addChangeListener(new javax.swing.event.ChangeListener() {
+                public void stateChanged(javax.swing.event.ChangeEvent e) {
+                    if ( rbDate.isSelected() ) {
+                        refreshCommands();
+                    }
+                }
+            });
+        }
+
+        return rbDate;
+    }
+
+    /**
+     * This method initializes jScrollPane2
+     *
+     * @return javax.swing.JScrollPane
+     */
+    private JScrollPane getJScrollPane2() {
+        if ( jScrollPane2 == null ) {
+            jScrollPane2 = new JScrollPane();
+            jScrollPane2.setPreferredSize(new java.awt.Dimension(175, 100));
+            jScrollPane2.setViewportView(getListCommand());
+        }
+
+        return jScrollPane2;
+    }
+
+    /**
+     * Refresh the commands.
+     */
+    private void refreshCommands() {
+        int type = IOperator.NUMBER;
+        if ( getRbNumber().isSelected() ) {
+            type = IOperator.NUMBER;
+        } else if ( getRbString().isSelected() ) {
+            type = IOperator.STRING;
+        } else if ( getRbDate().isSelected() ) {
+            type = IOperator.DATE;
+        }
+        refreshOperators(type);
+
+    }
+
+    /**
+     * This method initializes ListCommand
+     *
+     * @return javax.swing.JList
+     */
+    private JList getListCommand() {
+        if ( listCommand == null ) {
+            listCommand = new JList();
+            listCommand.setModel(new ListOperatorsModel());
+            listCommand.addMouseListener(new MouseListener() {
+                public void mouseClicked(MouseEvent e) {
+                    IOperator operator = ((IOperator) listCommand.getSelectedValue());
+                    if ( operator != null ) {
+                        getTxtMessage2().setText(operator.getTooltip());
+                        if ( e.getClickCount() == 2 ) {
+                            if ( listCommand.getSelectedValue() == null ) {
+                                return;
+                            }
+                            getTxtExp().setText(operator.addText(
+                                    getTxtExp().getText()));
+                        }
+                    }
+                }
+
+                public void mouseEntered(MouseEvent e) {
+                }
+
+                public void mouseExited(MouseEvent e) {
+                }
+
+                public void mousePressed(MouseEvent e) {
+                }
+
+                public void mouseReleased(MouseEvent e) {
+                }
+            });
+            refreshOperators(IOperator.NUMBER);
+        }
+
+        return listCommand;
+    }
+
+    /**
+     * This method initializes bClear
+     *
+     * @return javax.swing.JButton
+     */
+    private JButton getBClear() {
+        if ( bClear == null ) {
+            bClear = new JButton();
+            bClear.setText(PluginServices.getText(this, "clear_expression"));
+            bClear.addActionListener(new java.awt.event.ActionListener() {
+                public void actionPerformed(java.awt.event.ActionEvent e) {
+                    getTxtExp().setText("");
+                }
+            });
+        }
+        return bClear;
+    }
+
+    /**
+     * This method initializes tabPrincipal
+     *
+     * @return javax.swing.JTabbedPane
+     */
+    private JTabbedPane getTabPrincipal() {
+        if ( tabPrincipal == null ) {
+            tabPrincipal = new JTabbedPane();
+            tabPrincipal.addTab(PluginServices.getText(this, "general"), null, getPPrincipal(), null);
+            tabPrincipal.addTab(PluginServices.getText(this, "advanced"), null, getPAdvanced(), null);
+        }
+        return tabPrincipal;
+    }
+
+    /**
+     * This method initializes pPrincipal
+     *
+     * @return javax.swing.JPanel
+     */
+    private JPanel getPPrincipal() {
+        if ( pPrincipal == null ) {
+            pPrincipal = new JPanel();
+            pPrincipal.setLayout(new BorderLayout());
+//			pPrincipal.setPreferredSize(new java.awt.Dimension(540,252));
+            pPrincipal.add(getPNorth(), java.awt.BorderLayout.NORTH);
+            pPrincipal.add(getPCentral(), java.awt.BorderLayout.CENTER);
+
+        }
+        return pPrincipal;
+    }
+
+    /**
+     * This method initializes pAdvanced
+     *
+     * @return javax.swing.JPanel
+     */
+    private JPanel getPAdvanced() {
+        if ( pAdvanced == null ) {
+            pAdvanced = new JPanel();
+            pAdvanced.setLayout(new BorderLayout());
+//            pAdvanced.add(getPAdvancedNorth(), java.awt.BorderLayout.NORTH);
+//            pAdvanced.add(getPAdvancedCenter(), java.awt.BorderLayout.CENTER);
+            advancedPanel = new AdvancedPanel(interpreter);
+            pAdvanced.add(advancedPanel, java.awt.BorderLayout.CENTER);
+        }
+        return pAdvanced;
+    }
+
+    /**
+     * This method initializes jScrollPane3
+     *
+     * @return javax.swing.JScrollPane
+     */
+    private JScrollPane getJScrollPane3() {
+        if ( jScrollPane3 == null ) {
+            jScrollPane3 = new JScrollPane();
+            jScrollPane3.setPreferredSize(new java.awt.Dimension(530, 80));
+            jScrollPane3.setViewportView(getTxtMessage2());
+        }
+        return jScrollPane3;
+    }
+
+    /**
+     * This method initializes txtMessage2
+     *
+     * @return javax.swing.JTextArea
+     */
+    private JTextArea getTxtMessage2() {
+        if ( txtMessage2 == null ) {
+            txtMessage2 = new JTextArea();
+            txtMessage2.setText(PluginServices.getText(this, "eval_expression_will_be_carried_out_right_now_with_current_values_in_table"));
+            txtMessage2.setEditable(false);
+            txtMessage2.setBackground(UIManager.getColor(this));
+        }
+        return txtMessage2;
+    }
+
+    public Object getWindowProfile() {
+        return WindowInfo.DIALOG_PROFILE;
+    }
+} //  @jve:decl-index=0:visual-constraint="10,10"
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/ListOperatorsModel.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/ListOperatorsModel.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/ListOperatorsModel.java	(revision 420)
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.gui;
+
+import java.util.ArrayList;
+
+import javax.swing.AbstractListModel;
+
+
+/**
+ * Modelo de la Lista de operadores a seleccionar.
+ *
+ * @author Vicente Caballero Navarro
+ */
+public class ListOperatorsModel extends AbstractListModel {
+	private ArrayList operators = new ArrayList();
+
+	/**
+	 * Añade los comandos que tiene el proyecto a la lista.
+	 */
+	public void addOperator(Object command) {
+		operators.add(command);
+	}
+
+	/**
+	 * @see javax.swing.ListModel#getSize()
+	 */
+	public int getSize() {
+		return operators.size();
+	}
+
+	/**
+	 * @see javax.swing.ListModel#getElementAt(int)
+	 */
+	public Object getElementAt(int index) {
+		return operators.get(index);
+	}
+	public void clear() {
+		operators.clear();
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/FeatureContainer.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/FeatureContainer.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/FeatureContainer.java	(revision 420)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ *
+ *   gvSIG. Desktop Geographic Information System.
+ *  
+ *   Copyright (C) 2007-2013 gvSIG Association.
+ *  
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 3
+ *   of the License, or (at your option) any later version.
+ *  
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *  
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *   MA  02110-1301, USA.
+ *  
+ *   For any additional information, do not hesitate to contact us
+ *   at info AT gvsig.com, or visit our website www.gvsig.com.
+ *   
+ *******************************************************************************/
+package org.gvsig.expressionfield.project.documents.table.gui;
+
+import org.gvsig.fmap.dal.feature.Feature;
+
+public class FeatureContainer {
+private Feature feature = null;
+
+public Feature getFeature() {
+	return feature;
+}
+
+public void setFeature(Feature feature) {
+	this.feature = feature;
+}
+
+public boolean containsFeature() {
+	return feature!=null;
+}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/JRSyntaxTextArea.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/JRSyntaxTextArea.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/JRSyntaxTextArea.java	(revision 420)
@@ -0,0 +1,115 @@
+package org.gvsig.expressionfield.project.documents.table.gui.syntaxhighlight;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyListener;
+
+import javax.swing.JScrollPane;
+import javax.swing.event.CaretEvent;
+import javax.swing.event.CaretListener;
+import javax.swing.text.JTextComponent;
+
+import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
+import org.fife.ui.rsyntaxtextarea.SyntaxConstants;
+import org.fife.ui.rtextarea.RTextScrollPane;
+
+
+public class JRSyntaxTextArea implements SyntaxtHighlightTextComponent {
+
+	public class DefaultUpdateCaretPositionActionEvent extends ActionEvent implements UpdateCaretPositionActionEvent {
+
+		/**
+		 * 
+		 */
+		private static final long serialVersionUID = 8238486105726094074L;
+		int line = -1;
+		int column = -1;
+		
+		public DefaultUpdateCaretPositionActionEvent(Object source, int id,
+				String command, int line, int column) {
+			super(source, id, command);
+			this.line = line;
+			this.column = column;
+		}
+
+		public int getLine() {
+			return this.line+1;
+		}
+
+		public int getColumn() {
+			return this.column;
+		}
+
+		public boolean hasLineAndColumn() {
+			return this.line >=0 && this.column >= 0;
+		}
+		
+	}
+	
+	protected ActionListener updateCaretPosition = null;
+	protected RSyntaxTextArea textArea = null;
+	
+	public JRSyntaxTextArea() {
+		this.textArea = new RSyntaxTextArea(20, 60);
+		this.init();
+	}
+	
+	protected void init() {
+		textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_PYTHON);
+		textArea.setCodeFoldingEnabled(true);
+		textArea.setClearWhitespaceLinesEnabled(true);
+		textArea.setAutoIndentEnabled(true);
+		textArea.setCloseCurlyBraces(true);
+		textArea.setWhitespaceVisible(true);
+		textArea.setAnimateBracketMatching(true);
+		textArea.setBracketMatchingEnabled(true);
+		textArea.setAutoIndentEnabled(true);
+		textArea.setTabsEmulated(true);
+		textArea.setTabSize(2);
+		textArea.setAntiAliasingEnabled(true);
+		
+		textArea.addCaretListener(new CaretListener() {
+			public void caretUpdate(CaretEvent e) {
+				if( updateCaretPosition== null ) {
+					return;
+				}
+				updateCaretPosition.actionPerformed(
+						new DefaultUpdateCaretPositionActionEvent(textArea, 1, "position", textArea.getCaretLineNumber(), textArea.getCaretOffsetFromLineStart() ) 
+				);
+			}
+			
+		});
+	}
+	
+	public void setContentType(String contentType) {
+		this.textArea.setSyntaxEditingStyle(contentType);
+	}
+	
+	public JScrollPane getJScrollPane() {
+		return  new RTextScrollPane(this.textArea);
+	}
+
+	public JTextComponent getJTextComponent() {
+		return this.textArea;
+	}
+
+	public String getContentType() {
+		return this.textArea.getSyntaxEditingStyle();
+	}
+	
+	public void addUpdateCaretPositionActionListener(ActionListener updateCaretPosition) {
+		this.updateCaretPosition = updateCaretPosition;  
+	}
+
+	public void setText(String text) {
+		this.textArea.setText(text);
+	}
+
+	public String getText() {
+		return this.textArea.getText();
+	}
+	
+	public void addKeyListener(KeyListener keyListener) {
+		this.textArea.addKeyListener(keyListener);
+	}
+}
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/styles/JavaStyledDocument.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/styles/JavaStyledDocument.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/styles/JavaStyledDocument.java	(revision 420)
@@ -0,0 +1,584 @@
+package org.gvsig.expressionfield.project.documents.table.gui.syntaxhighlight.styles;
+
+import java.awt.Color;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.swing.text.AttributeSet;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.DefaultEditorKit;
+import javax.swing.text.DefaultStyledDocument;
+import javax.swing.text.Element;
+import javax.swing.text.MutableAttributeSet;
+import javax.swing.text.SimpleAttributeSet;
+import javax.swing.text.StyleConstants;
+
+
+public class JavaStyledDocument extends DefaultStyledDocument {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 2859530660266127826L;
+	
+	private final DefaultStyledDocument doc;
+	private final Element rootElement;
+
+	private boolean multiLineComment;
+	private final MutableAttributeSet normal;
+	private final MutableAttributeSet keyword;
+	private final MutableAttributeSet comment;
+	private final MutableAttributeSet quote;
+
+    private final Set<String> keywords;
+
+	public JavaStyledDocument()
+	{
+		doc = this;
+		rootElement = doc.getDefaultRootElement();
+		putProperty( DefaultEditorKit.EndOfLineStringProperty, "\n" );
+
+		normal = new SimpleAttributeSet();
+		StyleConstants.setForeground(normal, Color.black);
+
+		comment = new SimpleAttributeSet();
+		StyleConstants.setForeground(comment, Color.gray);
+		StyleConstants.setItalic(comment, true);
+
+		keyword = new SimpleAttributeSet();
+		StyleConstants.setForeground(keyword, Color.blue);
+
+		quote = new SimpleAttributeSet();
+		StyleConstants.setForeground(quote, Color.red);
+
+        keywords = new HashSet<String>();
+		keywords.add( "abstract" );
+		keywords.add( "boolean" );
+		keywords.add( "break" );
+		keywords.add( "byte" );
+		keywords.add( "byvalue" );
+		keywords.add( "case" );
+		keywords.add( "cast" );
+		keywords.add( "catch" );
+		keywords.add( "char" );
+		keywords.add( "class" );
+		keywords.add( "const" );
+		keywords.add( "continue" );
+		keywords.add( "default" );
+		keywords.add( "do" );
+		keywords.add( "double" );
+		keywords.add( "else" );
+		keywords.add( "extends" );
+		keywords.add( "false" );
+		keywords.add( "final" );
+		keywords.add( "finally" );
+		keywords.add( "float" );
+		keywords.add( "for" );
+		keywords.add( "future" );
+		keywords.add( "generic" );
+		keywords.add( "goto" );
+		keywords.add( "if" );
+		keywords.add( "implements" );
+		keywords.add( "import" );
+		keywords.add( "inner" );
+		keywords.add( "instanceof" );
+		keywords.add( "int" );
+		keywords.add( "interface" );
+		keywords.add( "long" );
+		keywords.add( "native" );
+		keywords.add( "new" );
+		keywords.add( "null" );
+		keywords.add( "operator" );
+		keywords.add( "outer" );
+		keywords.add( "package" );
+		keywords.add( "private" );
+		keywords.add( "protected" );
+		keywords.add( "public" );
+		keywords.add( "rest" );
+		keywords.add( "return" );
+		keywords.add( "short" );
+		keywords.add( "static" );
+		keywords.add( "super" );
+		keywords.add( "switch" );
+		keywords.add( "synchronized" );
+		keywords.add( "this" );
+		keywords.add( "throw" );
+		keywords.add( "throws" );
+		keywords.add( "transient" );
+		keywords.add( "true" );
+		keywords.add( "try" );
+		keywords.add( "var" );
+		keywords.add( "void" );
+		keywords.add( "volatile" );
+		keywords.add( "while" );
+	}
+
+	/*
+	 *  Override to apply syntax highlighting after the document has been updated
+	 */
+	@Override
+    public void insertString(int offset, String str, AttributeSet a) throws BadLocationException
+	{
+		if (str.equals("{"))
+			str = addMatchingBrace(offset);
+
+		super.insertString(offset, str, a);
+		processChangedLines(offset, str.length());
+	}
+
+	/*
+	 *  Override to apply syntax highlighting after the document has been updated
+	 */
+	@Override
+    public void remove(int offset, int length) throws BadLocationException
+	{
+		super.remove(offset, length);
+		processChangedLines(offset, 0);
+	}
+
+	/*
+	 *  Determine how many lines have been changed,
+	 *  then apply highlighting to each line
+	 */
+	public void processChangedLines(int offset, int length)
+		throws BadLocationException
+	{
+		String content = doc.getText(0, doc.getLength());
+
+		//  The lines affected by the latest document update
+
+		int startLine = rootElement.getElementIndex( offset );
+		int endLine = rootElement.getElementIndex( offset + length );
+
+		//  Make sure all comment lines prior to the start line are commented
+		//  and determine if the start line is still in a multi line comment
+
+		setMultiLineComment( commentLinesBefore( content, startLine ) );
+
+		//  Do the actual highlighting
+
+		for (int i = startLine; i <= endLine; i++)
+		{
+			applyHighlighting(content, i);
+		}
+
+		//  Resolve highlighting to the next end multi line delimiter
+
+		if (isMultiLineComment())
+			commentLinesAfter(content, endLine);
+		else
+			highlightLinesAfter(content, endLine);
+	}
+
+	/*
+	 *  Highlight lines when a multi line comment is still 'open'
+	 *  (ie. matching end delimiter has not yet been encountered)
+	 */
+	private boolean commentLinesBefore(String content, int line)
+	{
+		int offset = rootElement.getElement( line ).getStartOffset();
+
+		//  Start of comment not found, nothing to do
+
+		int startDelimiter = lastIndexOf( content, getStartDelimiter(), offset - 2 );
+
+		if (startDelimiter < 0)
+			return false;
+
+		//  Matching start/end of comment found, nothing to do
+
+		int endDelimiter = indexOf( content, getEndDelimiter(), startDelimiter );
+
+		if (endDelimiter < offset & endDelimiter != -1)
+			return false;
+
+		//  End of comment not found, highlight the lines
+
+		doc.setCharacterAttributes(startDelimiter, offset - startDelimiter + 1, comment, false);
+		return true;
+	}
+
+	/*
+	 *  Highlight comment lines to matching end delimiter
+	 */
+	private void commentLinesAfter(String content, int line)
+	{
+		int offset = rootElement.getElement( line ).getEndOffset();
+
+		//  End of comment not found, nothing to do
+
+		int endDelimiter = indexOf( content, getEndDelimiter(), offset );
+
+		if (endDelimiter < 0)
+			return;
+
+		//  Matching start/end of comment found, comment the lines
+
+		int startDelimiter = lastIndexOf( content, getStartDelimiter(), endDelimiter );
+
+		if (startDelimiter < 0 || startDelimiter <= offset)
+		{
+			doc.setCharacterAttributes(offset, endDelimiter - offset + 1, comment, false);
+		}
+	}
+
+	/*
+	 *  Highlight lines to start or end delimiter
+	 */
+	private void highlightLinesAfter(String content, int line)
+		throws BadLocationException
+	{
+		int offset = rootElement.getElement( line ).getEndOffset();
+
+		//  Start/End delimiter not found, nothing to do
+
+		int startDelimiter = indexOf( content, getStartDelimiter(), offset );
+		int endDelimiter = indexOf( content, getEndDelimiter(), offset );
+
+		if (startDelimiter < 0)
+			startDelimiter = content.length();
+
+		if (endDelimiter < 0)
+			endDelimiter = content.length();
+
+		int delimiter = Math.min(startDelimiter, endDelimiter);
+
+		if (delimiter < offset)
+			return;
+
+		//	Start/End delimiter found, reapply highlighting
+
+		int endLine = rootElement.getElementIndex( delimiter );
+
+		for (int i = line + 1; i < endLine; i++)
+		{
+			Element branch = rootElement.getElement( i );
+			Element leaf = doc.getCharacterElement( branch.getStartOffset() );
+			AttributeSet as = leaf.getAttributes();
+
+			if ( as.isEqual(comment) )
+				applyHighlighting(content, i);
+		}
+	}
+
+	/*
+	 *  Parse the line to determine the appropriate highlighting
+	 */
+	private void applyHighlighting(String content, int line)
+		throws BadLocationException
+	{
+		int startOffset = rootElement.getElement( line ).getStartOffset();
+		int endOffset = rootElement.getElement( line ).getEndOffset() - 1;
+
+		int lineLength = endOffset - startOffset;
+		int contentLength = content.length();
+
+		if (endOffset >= contentLength)
+			endOffset = contentLength - 1;
+
+		//  check for multi line comments
+		//  (always set the comment attribute for the entire line)
+
+		if (endingMultiLineComment(content, startOffset, endOffset)
+		||  isMultiLineComment()
+		||  startingMultiLineComment(content, startOffset, endOffset) )
+		{
+			doc.setCharacterAttributes(startOffset, endOffset - startOffset + 1, comment, false);
+			return;
+		}
+
+		//  set normal attributes for the line
+
+		doc.setCharacterAttributes(startOffset, lineLength, normal, true);
+
+		//  check for single line comment
+
+		int index = content.indexOf(getSingleLineDelimiter(), startOffset);
+
+		if ( (index > -1) && (index < endOffset) )
+		{
+			doc.setCharacterAttributes(index, endOffset - index + 1, comment, false);
+			endOffset = index - 1;
+		}
+
+		//  check for tokens
+
+		checkForTokens(content, startOffset, endOffset);
+	}
+
+	/*
+	 *  Does this line contain the start delimiter
+	 */
+	private boolean startingMultiLineComment(String content, int startOffset, int endOffset)
+		throws BadLocationException
+	{
+		int index = indexOf( content, getStartDelimiter(), startOffset );
+
+		if ( (index < 0) || (index > endOffset) )
+			return false;
+		else
+		{
+			setMultiLineComment( true );
+			return true;
+		}
+	}
+
+	/*
+	 *  Does this line contain the end delimiter
+	 */
+	private boolean endingMultiLineComment(String content, int startOffset, int endOffset)
+		throws BadLocationException
+	{
+		int index = indexOf( content, getEndDelimiter(), startOffset );
+
+		if ( (index < 0) || (index > endOffset) )
+			return false;
+		else
+		{
+			setMultiLineComment( false );
+			return true;
+		}
+	}
+
+	/*
+	 *  We have found a start delimiter
+	 *  and are still searching for the end delimiter
+	 */
+	private boolean isMultiLineComment()
+	{
+		return multiLineComment;
+	}
+
+	private void setMultiLineComment(boolean value)
+	{
+		multiLineComment = value;
+	}
+
+	/*
+	 *	Parse the line for tokens to highlight
+	 */
+	private void checkForTokens(String content, int startOffset, int endOffset)
+	{
+		while (startOffset <= endOffset)
+		{
+			//  skip the delimiters to find the start of a new token
+
+			while ( isDelimiter( content.substring(startOffset, startOffset + 1) ) )
+			{
+				if (startOffset < endOffset)
+					startOffset++;
+				else
+					return;
+			}
+
+			//  Extract and process the entire token
+
+			if ( isQuoteDelimiter( content.substring(startOffset, startOffset + 1) ) )
+				startOffset = getQuoteToken(content, startOffset, endOffset);
+			else
+				startOffset = getOtherToken(content, startOffset, endOffset);
+		}
+	}
+
+	/*
+	 *
+	 */
+	private int getQuoteToken(String content, int startOffset, int endOffset)
+	{
+		String quoteDelimiter = content.substring(startOffset, startOffset + 1);
+		String escapeString = getEscapeString(quoteDelimiter);
+
+		int index;
+		int endOfQuote = startOffset;
+
+		//  skip over the escape quotes in this quote
+
+		index = content.indexOf(escapeString, endOfQuote + 1);
+
+		while ( (index > -1) && (index < endOffset) )
+		{
+			endOfQuote = index + 1;
+			index = content.indexOf(escapeString, endOfQuote);
+		}
+
+		// now find the matching delimiter
+
+		index = content.indexOf(quoteDelimiter, endOfQuote + 1);
+
+		if ( (index < 0) || (index > endOffset) )
+			endOfQuote = endOffset;
+		else
+			endOfQuote = index;
+
+		doc.setCharacterAttributes(startOffset, endOfQuote - startOffset + 1, quote, false);
+
+		return endOfQuote + 1;
+	}
+
+	/*
+	 *
+	 */
+	private int getOtherToken(String content, int startOffset, int endOffset)
+	{
+		int endOfToken = startOffset + 1;
+
+		while ( endOfToken <= endOffset )
+		{
+			if ( isDelimiter( content.substring(endOfToken, endOfToken + 1) ) )
+				break;
+
+			endOfToken++;
+		}
+
+		String token = content.substring(startOffset, endOfToken);
+
+		if ( isKeyword( token ) )
+		{
+			doc.setCharacterAttributes(startOffset, endOfToken - startOffset, keyword, false);
+		}
+
+		return endOfToken + 1;
+	}
+
+	/*
+	 *  Assume the needle will the found at the start/end of the line
+	 */
+	private int indexOf(String content, String needle, int offset)
+	{
+		int index;
+
+		while ( (index = content.indexOf(needle, offset)) != -1 )
+		{
+			String text = getLine( content, index ).trim();
+
+			if (text.startsWith(needle) || text.endsWith(needle))
+				break;
+			else
+				offset = index + 1;
+		}
+
+		return index;
+	}
+
+	/*
+	 *  Assume the needle will the found at the start/end of the line
+	 */
+	private int lastIndexOf(String content, String needle, int offset)
+	{
+		int index;
+
+		while ( (index = content.lastIndexOf(needle, offset)) != -1 )
+		{
+			String text = getLine( content, index ).trim();
+
+			if (text.startsWith(needle) || text.endsWith(needle))
+				break;
+			else
+				offset = index - 1;
+		}
+
+		return index;
+	}
+
+	private String getLine(String content, int offset)
+	{
+		int line = rootElement.getElementIndex( offset );
+		Element lineElement = rootElement.getElement( line );
+		int start = lineElement.getStartOffset();
+		int end = lineElement.getEndOffset();
+		return content.substring(start, end - 1);
+	}
+
+	/*
+	 *  Override for other languages
+	 */
+	protected boolean isDelimiter(String character)
+	{
+		String operands = ";:{}()[]+-/%<=>!&|^~*";
+
+		if (Character.isWhitespace( character.charAt(0) ) ||
+			operands.indexOf(character) != -1 )
+			return true;
+		else
+			return false;
+	}
+
+	/*
+	 *  Override for other languages
+	 */
+	protected boolean isQuoteDelimiter(String character)
+	{
+		String quoteDelimiters = "\"'";
+
+		if (quoteDelimiters.indexOf(character) < 0)
+			return false;
+		else
+			return true;
+	}
+
+	/*
+	 *  Override for other languages
+	 */
+	protected boolean isKeyword(String token)
+	{
+		return keywords.contains( token );
+	}
+
+	/*
+	 *  Override for other languages
+	 */
+	protected String getStartDelimiter()
+	{
+		return "/*";
+	}
+
+	/*
+	 *  Override for other languages
+	 */
+	protected String getEndDelimiter()
+	{
+		return "*/";
+	}
+
+	/*
+	 *  Override for other languages
+	 */
+	protected String getSingleLineDelimiter()
+	{
+		return "//";
+	}
+
+	/*
+	 *  Override for other languages
+	 */
+	protected String getEscapeString(String quoteDelimiter)
+	{
+		return "\\" + quoteDelimiter;
+	}
+
+	/*
+	 *
+	 */
+	protected String addMatchingBrace(int offset) throws BadLocationException
+	{
+		StringBuffer whiteSpace = new StringBuffer();
+		int line = rootElement.getElementIndex( offset );
+		int i = rootElement.getElement(line).getStartOffset();
+
+		while (true)
+		{
+			String temp = doc.getText(i, 1);
+
+			if (temp.equals(" ") || temp.equals("\t"))
+			{
+				whiteSpace.append(temp);
+				i++;
+			}
+			else
+				break;
+		}
+
+		return "{\n" + whiteSpace.toString() + "\t\n" + whiteSpace.toString() + "}";
+	}
+
+}
+
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/styles/PythonStyledDocument.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/styles/PythonStyledDocument.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/styles/PythonStyledDocument.java	(revision 420)
@@ -0,0 +1,703 @@
+package org.gvsig.expressionfield.project.documents.table.gui.syntaxhighlight.styles;
+
+import java.awt.Color;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.swing.text.AttributeSet;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.DefaultEditorKit;
+import javax.swing.text.DefaultStyledDocument;
+import javax.swing.text.Element;
+import javax.swing.text.MutableAttributeSet;
+import javax.swing.text.SimpleAttributeSet;
+import javax.swing.text.StyleConstants;
+
+public class PythonStyledDocument extends DefaultStyledDocument {
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 2859530660266127826L;
+
+    private static int TABSIZE = 4;
+    
+    private final DefaultStyledDocument doc;
+    private final Element rootElement;
+
+    private boolean multiLineComment;
+    private final MutableAttributeSet normal;
+    private final MutableAttributeSet keyword1;
+    private final MutableAttributeSet keyword2;
+    private final MutableAttributeSet keyword3;
+    private final MutableAttributeSet keyword4;
+    private final MutableAttributeSet builtin;
+    private final MutableAttributeSet comment;
+    private final MutableAttributeSet quote;
+    private final MutableAttributeSet identifiers;
+    
+    private final Set<String> keywords1;
+    private final Set<String> keywords2;
+    private final Set<String> keywords3;
+    private final Set<String> keywords4;
+    private final Set<String> builtins;
+
+//    private int lineNumber;
+
+    private int columnNumber;
+
+    public PythonStyledDocument() {
+        doc = this;
+        rootElement = doc.getDefaultRootElement();
+        putProperty(DefaultEditorKit.EndOfLineStringProperty, "\n");
+        
+        int fontSize = 14;
+
+        normal = new SimpleAttributeSet();
+        StyleConstants.setForeground(normal, Color.BLACK);
+        StyleConstants.setFontFamily(normal, "monospaced");
+        StyleConstants.setBold(normal, true);
+        StyleConstants.setFontSize(normal, fontSize);
+
+        comment = new SimpleAttributeSet();
+        StyleConstants.setForeground(comment,Color.GRAY);
+        StyleConstants.setItalic(comment, true);
+        StyleConstants.setBold(comment, true);
+        StyleConstants.setFontFamily(comment, "monospaced");
+        StyleConstants.setFontSize(comment, fontSize);
+
+
+        keyword1 = new SimpleAttributeSet();
+        StyleConstants.setForeground(keyword1, Color.BLACK);
+        StyleConstants.setFontFamily(keyword1, "monospaced");
+        StyleConstants.setBold(keyword1, true);
+        StyleConstants.setFontSize(keyword1, fontSize);
+
+        keyword2 = new SimpleAttributeSet();
+        StyleConstants.setForeground(keyword2, Color.CYAN);
+        StyleConstants.setFontFamily(keyword2, "monospaced");
+        StyleConstants.setBold(keyword2, false);
+        StyleConstants.setFontSize(keyword2, fontSize);
+
+        keyword3 = new SimpleAttributeSet();
+        StyleConstants.setForeground(keyword3, Color.GREEN.darker());
+        StyleConstants.setFontFamily(keyword3, "monospaced");
+        StyleConstants.setBold(keyword3, false);
+        StyleConstants.setFontSize(keyword3, fontSize);
+
+        keyword4 = new SimpleAttributeSet();
+        StyleConstants.setForeground(keyword4, Color.BLUE.darker());
+        StyleConstants.setFontFamily(keyword4, "monospaced");
+        StyleConstants.setBold(keyword4, true);
+        StyleConstants.setFontSize(keyword4, fontSize);
+
+        builtin = new SimpleAttributeSet();
+        StyleConstants.setForeground(builtin, Color.RED.darker());
+        StyleConstants.setFontFamily(builtin, "monospaced");
+        StyleConstants.setBold(builtin, false);
+        StyleConstants.setFontSize(builtin, fontSize);
+
+        identifiers = new SimpleAttributeSet();
+        StyleConstants.setForeground(identifiers, Color.BLACK);
+        StyleConstants.setFontFamily(identifiers, "monospaced");
+        StyleConstants.setBold(identifiers, false);
+        StyleConstants.setFontSize(identifiers, fontSize);
+
+        
+        quote = new SimpleAttributeSet();
+        StyleConstants.setForeground(quote,  Color.RED.darker());
+        StyleConstants.setFontFamily(quote, "monospaced");
+        StyleConstants.setBold(quote, true);
+        StyleConstants.setFontSize(quote, fontSize);
+        
+        keywords1 = new HashSet<String>();
+        keywords1.add("except");
+        keywords1.add("class");
+        keywords1.add("continue");
+        keywords1.add("else");
+        keywords1.add("finally");
+        keywords1.add("if");
+        keywords1.add("elif");
+        keywords1.add("in");
+        keywords1.add("return");
+        keywords1.add("raise");
+        keywords1.add("try");
+        keywords1.add("while");
+        keywords1.add("def");
+        keywords1.add("print");
+        keywords1.add("globals");
+        keywords1.add("for");
+        keywords1.add("pass");
+
+        keywords2 = new HashSet<String>();
+        keywords2.add("from");
+        keywords2.add("import");
+
+        keywords3 = new HashSet<String>();
+        keywords3.add("True");
+        keywords3.add("False");
+        keywords3.add("None");
+        keywords3.add("self");
+
+        keywords4 = new HashSet<String>();
+        keywords4.add("__init__");
+        keywords4.add("__len__");
+        keywords4.add("__str__");
+        keywords4.add("__repr__");
+        keywords4.add("__call__");
+        keywords4.add("__iter__");
+        keywords4.add("__class__");
+
+        keywords4.add("__getattr__");
+        keywords4.add("__setattr__");
+        keywords4.add("__delattr__");
+
+        keywords4.add("__getitem__");
+        keywords4.add("__setitem__");
+        keywords4.add("__delitem__");
+
+        keywords4.add("__getslice__");
+        keywords4.add("__setslice__");
+        keywords4.add("__delslice__");
+
+        keywords4.add("__getattribute__");
+        keywords4.add("__setattribute__");
+
+        keywords4.add("__contains__");
+        keywords4.add("__reduce__");
+        keywords4.add("__cmp__");
+        keywords4.add("__eq__");
+        keywords4.add("__ne__");
+        keywords4.add("__lt__");
+        keywords4.add("__le__");
+        keywords4.add("__gt__");
+        keywords4.add("__ge__");
+        keywords4.add("__mul__");
+        keywords4.add("__imul__");
+        keywords4.add("__rmul__");
+        keywords4.add("__add__");
+        keywords4.add("__iadd__");
+        keywords4.add("__radd__");
+        keywords4.add("__mod__");
+        keywords4.add("__rmod__");
+
+        builtins = new HashSet<String>();
+        builtins.add("int");
+        builtins.add("unicode");
+        builtins.add("str");
+        builtins.add("float");
+        builtins.add("long");
+        builtins.add("list");
+        builtins.add("tuple");
+        builtins.add("dict");
+        builtins.add("iter");
+        builtins.add("vars");
+        builtins.add("isinstance");
+        builtins.add("dir");
+        builtins.add("repr");
+        builtins.add("reduce");
+        builtins.add("zip");
+        builtins.add("chr");
+        builtins.add("hex");
+        builtins.add("id");
+        builtins.add("max");
+        builtins.add("min");
+        builtins.add("oct");
+        builtins.add("pow");
+        builtins.add("ord");
+        builtins.add("unichr");
+        builtins.add("range");
+        builtins.add("xrange");
+        builtins.add("abs");
+        builtins.add("len");
+        builtins.add("apply");
+        builtins.add("open");
+        builtins.add("getattr");
+        builtins.add("setattr");
+        builtins.add("hasattr");
+
+    }
+
+    /*
+     * Override to apply syntax highlighting after the document has been updated
+     */
+    @Override
+    public void insertString(int offset, String str, AttributeSet a)
+            throws BadLocationException {
+        super.insertString(offset, processTab(offset, str, a), a);
+        processChangedLines(offset, str.length());
+    }
+
+    public void setPosition(int lineNumber, int columnNumber) {
+//        this.lineNumber= lineNumber;
+        this.columnNumber= columnNumber; 
+    }
+
+    private String processTab(int offset, String str, AttributeSet a ) {
+        if( !"\t".equals(str)) {
+            return str;
+        }
+        try {
+            int numberOfSpacesToInsert = (TABSIZE -((this.columnNumber -1)%TABSIZE));
+            
+            str = "                                                   ".substring(0, numberOfSpacesToInsert);
+        } catch (Exception e) {
+            return  "                    ".substring(0, TABSIZE);
+        }
+        return str; 
+    }
+    
+    /*
+     * Override to apply syntax highlighting after the document has been updated
+     */
+    @Override
+    public void remove(int offset, int length) throws BadLocationException {
+        super.remove(offset, length);
+        processChangedLines(offset, 0);
+    }
+
+    /*
+     * Determine how many lines have been changed, then apply highlighting to
+     * each line
+     */
+    public void processChangedLines(int offset, int length)
+            throws BadLocationException {
+        String content = doc.getText(0, doc.getLength());
+
+        // The lines affected by the latest document update
+
+        int startLine = rootElement.getElementIndex(offset);
+        int endLine = rootElement.getElementIndex(offset + length);
+
+        // Make sure all comment lines prior to the start line are commented
+        // and determine if the start line is still in a multi line comment
+
+        setMultiLineComment(commentLinesBefore(content, startLine));
+
+        // Do the actual highlighting
+
+        for (int i = startLine; i <= endLine; i++) {
+            applyHighlighting(content, i);
+        }
+
+        // Resolve highlighting to the next end multi line delimiter
+
+        if (isMultiLineComment())
+            commentLinesAfter(content, endLine);
+        else
+            highlightLinesAfter(content, endLine);
+    }
+
+    /*
+     * Highlight lines when a multi line comment is still 'open' (ie. matching
+     * end delimiter has not yet been encountered)
+     */
+    private boolean commentLinesBefore(String content, int line) {
+        int offset = rootElement.getElement(line).getStartOffset();
+
+        // Start of comment not found, nothing to do
+
+        int startDelimiter = lastIndexOf(content, getStartDelimiter(),
+                offset - 2);
+
+        if (startDelimiter < 0)
+            return false;
+
+        // Matching start/end of comment found, nothing to do
+
+        int endDelimiter = indexOf(content, getEndDelimiter(), startDelimiter);
+
+        if (endDelimiter < offset & endDelimiter != -1)
+            return false;
+
+        // End of comment not found, highlight the lines
+
+        doc.setCharacterAttributes(startDelimiter, offset - startDelimiter + 1,
+                comment, false);
+        return true;
+    }
+
+    /*
+     * Highlight comment lines to matching end delimiter
+     */
+    private void commentLinesAfter(String content, int line) {
+        int offset = rootElement.getElement(line).getEndOffset();
+
+        // End of comment not found, nothing to do
+
+        int endDelimiter = indexOf(content, getEndDelimiter(), offset);
+
+        if (endDelimiter < 0)
+            return;
+
+        // Matching start/end of comment found, comment the lines
+
+        int startDelimiter = lastIndexOf(content, getStartDelimiter(),
+                endDelimiter);
+
+        if (startDelimiter < 0 || startDelimiter <= offset) {
+            doc.setCharacterAttributes(offset, endDelimiter - offset + 1,
+                    comment, false);
+        }
+    }
+
+    /*
+     * Highlight lines to start or end delimiter
+     */
+    private void highlightLinesAfter(String content, int line)
+            throws BadLocationException {
+        int offset = rootElement.getElement(line).getEndOffset();
+
+        // Start/End delimiter not found, nothing to do
+
+        int startDelimiter = indexOf(content, getStartDelimiter(), offset);
+        int endDelimiter = indexOf(content, getEndDelimiter(), offset);
+
+        if (startDelimiter < 0)
+            startDelimiter = content.length();
+
+        if (endDelimiter < 0)
+            endDelimiter = content.length();
+
+        int delimiter = Math.min(startDelimiter, endDelimiter);
+
+        if (delimiter < offset)
+            return;
+
+        // Start/End delimiter found, reapply highlighting
+
+        int endLine = rootElement.getElementIndex(delimiter);
+
+        for (int i = line + 1; i < endLine; i++) {
+            Element branch = rootElement.getElement(i);
+            Element leaf = doc.getCharacterElement(branch.getStartOffset());
+            AttributeSet as = leaf.getAttributes();
+
+            if (as.isEqual(comment))
+                applyHighlighting(content, i);
+        }
+    }
+
+    /*
+     * Parse the line to determine the appropriate highlighting
+     */
+    private void applyHighlighting(String content, int line)
+            throws BadLocationException {
+        int startOffset = rootElement.getElement(line).getStartOffset();
+        int endOffset = rootElement.getElement(line).getEndOffset() - 1;
+
+        int lineLength = endOffset - startOffset;
+        int contentLength = content.length();
+
+        if (endOffset >= contentLength)
+            endOffset = contentLength - 1;
+
+        // check for multi line comments
+        // (always set the comment attribute for the entire line)
+
+        if (endingMultiLineComment(content, startOffset, endOffset)
+                || isMultiLineComment()
+                || startingMultiLineComment(content, startOffset, endOffset)) {
+            doc.setCharacterAttributes(startOffset,
+                    endOffset - startOffset + 1, comment, false);
+            return;
+        }
+
+        // set normal attributes for the line
+
+        doc.setCharacterAttributes(startOffset, lineLength, normal, true);
+
+        // check for single line comment
+
+        int index = content.indexOf(getSingleLineDelimiter(), startOffset);
+
+        if ((index > -1) && (index < endOffset)) {
+            doc.setCharacterAttributes(index, endOffset - index + 1, comment,
+                    false);
+            endOffset = index - 1;
+        }
+
+        // check for tokens
+
+        checkForTokens(content, startOffset, endOffset);
+    }
+
+    /*
+     * Does this line contain the start delimiter
+     */
+    private boolean startingMultiLineComment(String content, int startOffset,
+            int endOffset) throws BadLocationException {
+        int index = indexOf(content, getStartDelimiter(), startOffset);
+
+        if ((index < 0) || (index > endOffset))
+            return false;
+        else {
+            setMultiLineComment(true);
+            return true;
+        }
+    }
+
+    /*
+     * Does this line contain the end delimiter
+     */
+    private boolean endingMultiLineComment(String content, int startOffset,
+            int endOffset) throws BadLocationException {
+        int index = indexOf(content, getEndDelimiter(), startOffset);
+
+        if ((index < 0) || (index > endOffset))
+            return false;
+        else {
+            setMultiLineComment(false);
+            return true;
+        }
+    }
+
+    /*
+     * We have found a start delimiter and are still searching for the end
+     * delimiter
+     */
+    private boolean isMultiLineComment() {
+        return multiLineComment;
+    }
+
+    private void setMultiLineComment(boolean value) {
+        multiLineComment = value;
+    }
+
+    /*
+     * Parse the line for tokens to highlight
+     */
+    private void checkForTokens(String content, int startOffset, int endOffset) {
+        while (startOffset <= endOffset) {
+            // skip the delimiters to find the start of a new token
+
+            while (isDelimiter(content.substring(startOffset, startOffset + 1))) {
+                if (startOffset < endOffset)
+                    startOffset++;
+                else
+                    return;
+            }
+
+            // Extract and process the entire token
+
+            if (isQuoteDelimiter(content
+                    .substring(startOffset, startOffset + 1)))
+                startOffset = getQuoteToken(content, startOffset, endOffset);
+            else
+                startOffset = getOtherToken(content, startOffset, endOffset);
+        }
+    }
+
+    /*
+     *
+     */
+    private int getQuoteToken(String content, int startOffset, int endOffset) {
+        String quoteDelimiter = content.substring(startOffset, startOffset + 1);
+        String escapeString = getEscapeString(quoteDelimiter);
+
+        int index;
+        int endOfQuote = startOffset;
+
+        // skip over the escape quotes in this quote
+
+        index = content.indexOf(escapeString, endOfQuote + 1);
+
+        while ((index > -1) && (index < endOffset)) {
+            endOfQuote = index + 1;
+            index = content.indexOf(escapeString, endOfQuote);
+        }
+
+        // now find the matching delimiter
+
+        index = content.indexOf(quoteDelimiter, endOfQuote + 1);
+
+        if ((index < 0) || (index > endOffset))
+            endOfQuote = endOffset;
+        else
+            endOfQuote = index;
+
+        doc.setCharacterAttributes(startOffset, endOfQuote - startOffset + 1,
+                quote, false);
+
+        return endOfQuote + 1;
+    }
+
+    /*
+     *
+     */
+    private int getOtherToken(String content, int startOffset, int endOffset) {
+        int endOfToken = startOffset + 1;
+
+        while (endOfToken <= endOffset) {
+            if (isDelimiter(content.substring(endOfToken, endOfToken + 1)))
+                break;
+
+            endOfToken++;
+        }
+
+        String token = content.substring(startOffset, endOfToken);
+
+        if (isKeyword(token)) {
+            doc.setCharacterAttributes(startOffset, endOfToken - startOffset,
+                    keyword1, false);
+
+        } else if ( keywords2.contains(token) ) {
+            doc.setCharacterAttributes(startOffset, endOfToken - startOffset,
+                    keyword2, false);
+
+        } else if ( keywords3.contains(token) ) {
+            doc.setCharacterAttributes(startOffset, endOfToken - startOffset,
+                    keyword3, false);
+
+        } else if ( keywords4.contains(token) ) {
+            doc.setCharacterAttributes(startOffset, endOfToken - startOffset,
+                    keyword4, false);
+
+        } else if (isBuiltin(token)) {
+            doc.setCharacterAttributes(startOffset, endOfToken - startOffset,
+                builtin, false);
+        } else if (isIdentifier(token)) {
+            doc.setCharacterAttributes(startOffset, endOfToken - startOffset,
+                identifiers, false);
+        }
+                
+
+        return endOfToken + 1;
+    }
+
+    private boolean isIdentifier(String token) {
+        return token.matches("[A-Za-z_][A-Za-z0-9_]*");
+    }
+
+    /*
+     * Assume the needle will the found at the start/end of the line
+     */
+    private int indexOf(String content, String needle, int offset) {
+        int index;
+
+        while ((index = content.indexOf(needle, offset)) != -1) {
+            String text = getLine(content, index).trim();
+
+            if (text.startsWith(needle) || text.endsWith(needle))
+                break;
+            else
+                offset = index + 1;
+        }
+
+        return index;
+    }
+
+    /*
+     * Assume the needle will the found at the start/end of the line
+     */
+    private int lastIndexOf(String content, String needle, int offset) {
+        int index;
+
+        while ((index = content.lastIndexOf(needle, offset)) != -1) {
+            String text = getLine(content, index).trim();
+
+            if (text.startsWith(needle) || text.endsWith(needle))
+                break;
+            else
+                offset = index - 1;
+        }
+
+        return index;
+    }
+
+    private String getLine(String content, int offset) {
+        int line = rootElement.getElementIndex(offset);
+        Element lineElement = rootElement.getElement(line);
+        int start = lineElement.getStartOffset();
+        int end = lineElement.getEndOffset();
+        return content.substring(start, end - 1);
+    }
+
+    /*
+     * Override for other languages
+     */
+    protected boolean isDelimiter(String character) {
+        String operands = ";:()[]+-/%<=>!&|^~*.,";
+
+        if (Character.isWhitespace(character.charAt(0))
+                || operands.indexOf(character) != -1)
+            return true;
+        else
+            return false;
+    }
+
+    /*
+     * Override for other languages
+     */
+    protected boolean isQuoteDelimiter(String character) {
+        String quoteDelimiters = "\"'";
+
+        if (quoteDelimiters.indexOf(character) < 0)
+            return false;
+        else
+            return true;
+    }
+
+    /*
+     * Override for other languages
+     */
+    protected boolean isKeyword(String token) {
+        return keywords1.contains(token);
+    }
+
+    protected boolean isBuiltin(String token) {
+        return builtins.contains(token);
+    }
+
+    /*
+     * Override for other languages
+     */
+    protected String getStartDelimiter() {
+        return "\"\"\"";
+    }
+
+    /*
+     * Override for other languages
+     */
+    protected String getEndDelimiter() {
+        return "\"\"\"";
+    }
+
+    /*
+     * Override for other languages
+     */
+    protected String getSingleLineDelimiter() {
+        return "#";
+    }
+
+    /*
+     * Override for other languages
+     */
+    protected String getEscapeString(String quoteDelimiter) {
+        return "\\" + quoteDelimiter;
+    }
+
+    /*
+     *
+    protected String addMatchingBrace(int offset) throws BadLocationException {
+        StringBuffer whiteSpace = new StringBuffer();
+        int line = rootElement.getElementIndex(offset);
+        int i = rootElement.getElement(line).getStartOffset();
+
+        while (true) {
+            String temp = doc.getText(i, 1);
+
+            if (temp.equals(" ") || temp.equals("\t")) {
+                whiteSpace.append(temp);
+                i++;
+            } else
+                break;
+        }
+
+        return "{\n" + whiteSpace.toString() + "\t\n" + whiteSpace.toString()
+                + "}";
+    }
+     */
+
+}
+
+
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/SyntaxtHighlightTextComponent.java
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/SyntaxtHighlightTextComponent.java	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/SyntaxtHighlightTextComponent.java	(revision 420)
@@ -0,0 +1,33 @@
+package org.gvsig.expressionfield.project.documents.table.gui.syntaxhighlight;
+
+import java.awt.event.ActionListener;
+import java.awt.event.KeyListener;
+
+import javax.swing.JScrollPane;
+import javax.swing.text.JTextComponent;
+
+public interface SyntaxtHighlightTextComponent {
+
+	public interface UpdateCaretPositionActionEvent {
+		public int getLine();
+		public int getColumn();
+		public boolean hasLineAndColumn();
+	}
+	
+	public JTextComponent getJTextComponent();
+	
+	public JScrollPane getJScrollPane();
+	
+	public void setText(String text);
+	
+	public String getText();
+	
+	public void setContentType(String contentType);
+	
+	public String getContentType();
+	
+	public void addUpdateCaretPositionActionListener(ActionListener updateCaretPosition);
+	
+	public void addKeyListener(KeyListener keyListener);
+	
+}

Property changes on: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/java/org/gvsig/expressionfield/project/documents/table/gui
___________________________________________________________________
Added: svn:ignore
   + .AdvancedPanelLayout.form.kate-swp


Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/config.xml
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/config.xml	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/config.xml	(revision 420)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<libraries library-dir="lib"/>
+    <depends plugin-name="org.gvsig.app.document.table.app.mainplugin" />
+	<resourceBundle name="text"/>
+	<extensions>
+		<extension class-name="org.gvsig.expressionfield.ExpressionFieldExtension"
+			description="Extension that evaluate the expression to a column."
+			active="true">
+
+            <action
+                name="table-expression-field"
+                label="_Expression_field"
+                tooltip="_Expression_field"
+                position="501100000"
+                action-command="table-expression-field"
+                icon="table-expression-field"
+                accelerator=""
+                />
+
+            <menu
+                name="table-expression-field"
+                text="Table/_Expression_field"
+                />
+
+            <tool-bar name="table_tools">
+                <action-tool
+                    name="table-expression-field"
+                    />
+            </tool-bar>
+
+		</extension>
+
+		<extension class-name="org.gvsig.expressionfield.AboutExpressionFieldExtension"
+			description="Extension to add about panel."
+			active="false"
+			priority="1">
+		</extension>
+	</extensions>
+</plugin-config>
\ No newline at end of file
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/images/preferences/expression-field-preferences.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/images/preferences/expression-field-preferences.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/images/action/table-expression-field.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/images/action/table-expression-field.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/iver-logo.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/iver-logo.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/iver.html
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/iver.html	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/iver.html	(revision 420)
@@ -0,0 +1,13 @@
+<html>
+<body>
+
+<img src="iver-logo.png"><br>
+
+<h2>IVER</h2>
+<br>
+
+<p>Expression field</p>
+<p>EN CONSTRUCCION</p>
+
+</body>
+</html>
\ No newline at end of file
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_ca.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_ca.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_ca.properties	(revision 420)
@@ -0,0 +1,42 @@
+#Translations for language [ca]
+#Mon Aug 13 13:40:45 CEST 2007
+advanced=Avan\u00e7ada
+boolean_value=Valor boole\u00e0
+calculate_expression=Calcular l'expressi\u00f3
+charging_operators=Carregant operadors
+clear_expression=Esborrar expressi\u00f3
+column=Columna
+commands=Comandaments
+continue?=Vol continuar?
+date=Data
+date_value=Valor data
+description=Descripci\u00f3
+double_value=
+error=Error
+error_expression=Error en l'expressi\u00f3
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=El c\u00e0lcul de l'expressi\u00f3 es realitzar\u00e0 en este moment sobre els registres existents en la taula\n
+evaluate=Avaluar
+evaluate_expression_with_errors=Expressions avaluades amb errors
+explorer=Explorar
+expression=Expressi\u00f3
+expressions=Expressions
+expressions_from_file=Expressions de fitxer
+field=Camp
+general=General
+incorrect_file=Fitxer incorrecte
+information=Informaci\u00f3
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=T\u00e9 establit un l\u00edmit de registres en prefer\u00e8ncies, perdr\u00e0 la possibilitat de desfer. Vol continuar?\n
+limit_rows_in_memory=L\u00edmit de registres en mem\u00f2ria
+numeric=Num\u00e8ric
+numeric_value=Valor num\u00e8ric
+operator=
+parameter=Par\u00e0metre
+python=
+returns=Torna
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=en mem\u00f2ria quan s'avalue l'expressi\u00f3, i es redu\u00efx dr\u00e0sticament la velocitat quan es limite
+string=Cadena
+string_value=Valor cadena
+type=Tipus
+value=Valor
+without_limit=Sense l\u00edmit
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_pt.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_pt.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_pt.properties	(revision 420)
@@ -0,0 +1,42 @@
+#Translations for language [pt]
+#Mon Aug 06 08:50:49 CEST 2007
+advanced=
+boolean_value=
+calculate_expression=
+charging_operators=
+clear_expression=
+column=
+commands=
+continue?=
+date=
+date_value=
+description=Descri\u00e7\u00e3o
+double_value=
+error=Error
+error_expression=
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
+evaluate=
+evaluate_expression_with_errors=
+explorer=
+expression=
+expressions=
+expressions_from_file=
+field=
+general=Geral
+incorrect_file=
+information=
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
+limit_rows_in_memory=
+numeric=
+numeric_value=
+operator=
+parameter=
+python=
+returns=
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
+string=
+string_value=
+type=Tipo
+value=Valor
+without_limit=
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_cs.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_cs.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_cs.properties	(revision 420)
@@ -0,0 +1,42 @@
+#Translations for language [cs]
+#Thu Aug 16 08:33:37 CEST 2007
+advanced=Pokro\u010dil\u00fd
+boolean_value=Boolean hodnota
+calculate_expression=Vypo\u010d\u00edtat v\u00fdraz
+charging_operators=Napln\u011bn\u00ed oper\u00e1tor\u016f
+clear_expression=Vymazat v\u00fdraz
+column=Sloupec
+commands=P\u0159\u00edkazy
+continue?=Pokra\u010dovat?
+date=Datum
+date_value=Datum
+description=Popis
+double_value=
+error=Error
+error_expression=Chybn\u00fd v\u00fdraz
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=V\u00fdraz bude vyhodnocen te\u010f na z\u00e1klad\u011b\nsou\u010dasn\u00fdch hodnot v tabulce.
+evaluate=Vyhodnotit
+evaluate_expression_with_errors=Vyhodnotit v\u00fdraz s chybami
+explorer=Pr\u016fzkumn\u00edk
+expression=V\u00fdraz
+expressions=V\u00fdrazy
+expressions_from_file=V\u00fdrazy ze souboru
+field=Polo\u017eka
+general=Obecn\u00fd
+incorrect_file=Chybn\u00fd soubor
+information=Informace
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=Byl dosa\u017een \u0159\u00e1dkov\u00fd limit v nastaven\u00ed, bude ztracena mo\u017enost vracen\u00ed zm\u011bn. Chcete pokra\u010dovat?
+limit_rows_in_memory=Omezen\u00ed \u0159\u00e1dk\u016f v pam\u011bti
+numeric=\u010c\u00edseln\u00fd
+numeric_value=\u010c\u00edseln\u00e1 hodnota
+operator=
+parameter=Parametr
+python=
+returns=Vr\u00e1tit se
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=Ud\u00e1v\u00e1 \u0159\u00e1dkov\u00e9 omezen\u00ed v pam\u011bti kdy\u017e prokram vyhodnocuje v\u00fdraz\n Omezen\u00ed sni\u017euje v\u00fdkon
+string=\u0158et\u011bzec
+string_value=Hodnota \u0159et\u011bzce
+type=Typ
+value=Hodnota
+without_limit=Bez omezen\u00ed
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_ru.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_ru.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_ru.properties	(revision 420)
@@ -0,0 +1,38 @@
+#text_ru.properties
+advanced=\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u043D\u044B\u0439
+boolean_value=\u041B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435
+calculate_expresion=\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044C \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435
+charging_operators=\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u044B
+clear_expresion=\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435
+column=\u041F\u043E\u043B\u0435
+commands=\u041A\u043E\u043C\u0430\u043D\u0434\u044B
+continue?=\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C?
+date=\u0414\u0430\u0442\u0430
+date_value=\u0412\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435
+description=\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435
+error=\u041E\u0448\u0438\u0431\u043A\u0430
+error_expresion=\u041E\u0448\u0438\u0431\u043E\u0447\u043D\u043E\u0435 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435
+eval_expresion_will_be_carried_out_right_now_with_current_values_in_table=\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E \n\u0441 \u0442\u0435\u043A\u0443\u0449\u0438\u043C\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F\u043C\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435
+evaluate=\u0412\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C
+evaluate_expresion_with_errors=\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u043C\u044B\u0435 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442 \u043E\u0448\u0438\u0431\u043A\u0438
+explorer=\u041E\u0431\u0437\u043E\u0440
+expresion=\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044C \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435
+expresions=\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F
+expresions_from_file=\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0438\u0437 \u0444\u0430\u0439\u043B\u0430
+field=\u041F\u043E\u043B\u0435
+general=\u041E\u0431\u0449\u0438\u0435
+incorrect_file=\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u0444\u0430\u0439\u043B
+information=\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0431\u0443\u0434\u0435\u0442 \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044E, \u0442.\u043A. \u043B\u0438\u043C\u0438\u0442 \u0441\u0442\u0440\u043E\u043A \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445. \u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C?
+limit_rows_in_memory=\u041B\u0438\u043C\u0438\u0442 \u0441\u0442\u0440\u043E\u043A \u0432 \u043F\u0430\u043C\u044F\u0442\u0438
+numeric=\u0427\u0438\u0441\u043B\u043E
+numeric_value=\u0427\u0438\u0441\u043B\u043E\u0432\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435
+operator=\u041A\u043E\u043C\u0430\u043D\u0434\u0430
+parameter=\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B
+returns=\u0412\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expresion=\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043B\u0438\u043C\u0438\u0442 \u0441\u0442\u0440\u043E\u043A \u0432 \u043F\u0430\u043C\u044F\u0442\u0438 \u043F\u0440\u0438 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0438 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F. \n\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u043B\u0438\u043C\u0438\u0442\u0430 \u0441\u043D\u0438\u0436\u0430\u0435\u0442 \u0441\u043A\u043E\u0440\u043E\u0441\u0442\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F.
+string=\u0422\u0435\u043A\u0441\u0442
+string_value=\u0422\u0435\u043A\u0441\u0442\u043E\u0432\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435
+type=\u0422\u0438\u043F
+value=\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435
+without_limit=\u0411\u0435\u0437 \u043B\u0438\u043C\u0438\u0442\u0430
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_fr.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_fr.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_fr.properties	(revision 420)
@@ -0,0 +1,42 @@
+#Translations for language [fr]
+#Mon Aug 06 08:50:49 CEST 2007
+advanced=
+boolean_value=
+calculate_expression=
+charging_operators=
+clear_expression=
+column=
+commands=
+continue?=
+date=
+date_value=
+description=Description
+double_value=
+error=Error
+error_expression=
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
+evaluate=
+evaluate_expression_with_errors=
+explorer=
+expression=
+expressions=
+expressions_from_file=
+field=Colonne
+general=G\u00e9n\u00e9ral
+incorrect_file=
+information=
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
+limit_rows_in_memory=
+numeric=
+numeric_value=
+operator=
+parameter=
+python=
+returns=
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
+string=
+string_value=
+type=Type
+value=Valeur
+without_limit=
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_de.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_de.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_de.properties	(revision 420)
@@ -0,0 +1,46 @@
+#Translations for language [de]
+#Tue Jan 20 17:39:04 CET 2009
+advanced=Erweitert
+boolean_value=Boolscher Wert
+calculate_expression=
+charged_operators=
+charging_operators=Ladezeit Operator
+clear_expression=
+column=Spalte
+commands=Kommandos
+continue?=Fortfahren?
+date=Datum
+date_value=Datums-Wert
+description=Beschreibung
+double_value=
+error=Fehler
+error_expression=
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
+evaluate=Auswerten
+evaluate_expression_with_errors=
+explorer=Durchsuchen
+expression=
+expressions=
+expressions_from_file=
+field=Feld
+field_toolbar=
+format=Format
+general=Allgemein
+incorrect_file=Ung\u00fcltige Datei
+information=Information
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=Zeilen- Limit wurde erreicht in den Eigenschaften, dieser Schritt kann nicht r\u00fcckg\u00e4ngi gemacht werden. Wollen Sie fortfahren?
+limit_rows_in_memory=Zeilen- Limit erreicht
+numeric=Numerisch
+numeric_value=Numerischer Wert
+operator=
+optional=
+parameter=Parameter
+python=
+returns=Ergebnis
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
+string=Zeichenkette
+string_value=Wert der Zeichenkette
+type=Typ
+value=Wert
+without_limit=Ohne Beschr\u00e4nkung
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_eu.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_eu.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_eu.properties	(revision 420)
@@ -0,0 +1,42 @@
+#Translations for language [eu]
+#Mon Aug 06 08:50:49 CEST 2007
+advanced=Aurreratua
+boolean_value=
+calculate_expression=
+charging_operators=
+clear_expression=
+column=Zutabea
+commands=
+continue?=
+date=
+date_value=
+description=Deskripzioa
+double_value=
+error=Errorea
+error_expression=
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
+evaluate=
+evaluate_expression_with_errors=
+explorer=
+expression=
+expressions=
+expressions_from_file=
+field=Eremua
+general=Orokorra
+incorrect_file=
+information=
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
+limit_rows_in_memory=
+numeric=
+numeric_value=
+operator=
+parameter=
+python=
+returns=
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
+string=
+string_value=
+type=Mota
+value=Balioa
+without_limit=
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_nl.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_nl.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_nl.properties	(revision 420)
@@ -0,0 +1,42 @@
+#Translations for language [nl]
+#Mon Aug 06 08:50:49 CEST 2007
+advanced=
+boolean_value=
+calculate_expression=
+charging_operators=
+clear_expression=
+column=
+commands=
+continue?=
+date=
+date_value=
+description=
+double_value=
+error=
+error_expression=
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
+evaluate=
+evaluate_expression_with_errors=
+explorer=
+expression=
+expressions=
+expressions_from_file=
+field=
+general=
+incorrect_file=
+information=
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
+limit_rows_in_memory=
+numeric=
+numeric_value=
+operator=
+parameter=
+python=
+returns=
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
+string=
+string_value=
+type=
+value=
+without_limit=
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_pl.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_pl.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_pl.properties	(revision 420)
@@ -0,0 +1,42 @@
+#Translations for language [pl]
+#Mon Aug 06 12:43:02 CEST 2007
+advanced=Zaawansowane
+boolean_value=
+calculate_expression=
+charging_operators=
+clear_expression=
+column=
+commands=
+continue?=
+date=
+date_value=
+description=Opis
+double_value=
+error=B\u0142\u0105d
+error_expression=
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
+evaluate=
+evaluate_expression_with_errors=
+explorer=
+expression=
+expressions=
+expressions_from_file=
+field=Kolumna
+general=Og\u00f3lne
+incorrect_file=
+information=
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
+limit_rows_in_memory=
+numeric=
+numeric_value=
+operator=
+parameter=
+python=
+returns=
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
+string=
+string_value=
+type=Typ
+value=warto\u015b\u0107
+without_limit=
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_it.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_it.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_it.properties	(revision 420)
@@ -0,0 +1,42 @@
+#Translations for language [it]
+#Mon Aug 13 13:02:41 CEST 2007
+advanced=Avanzata
+boolean_value=Valore boleano
+calculate_expression=Calcola espressione
+charging_operators=Caricamento operatori
+clear_expression=Cancella espressione
+column=Colonna
+commands=Comandi
+continue?=Continuare?
+date=Data
+date_value=Valore della data
+description=Descrizione
+double_value=
+error=Errore
+error_expression=Errore nell'espressione
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=L'espressione verr\u00e0 processata ora, \ncon gli attuali dati della tabella
+evaluate=Processa
+evaluate_expression_with_errors=Espressione processata con errori
+explorer=Esplorare
+expression=Espressione
+expressions=Espressioni
+expressions_from_file=Espressioni da un file
+field=Campo
+general=Generale
+incorrect_file=File incorretto
+information=Informazione
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=E' stato stabilito un limite di righe nelle preferenze, non sar\u00e0 possibile annullare l'operazione. Proseguire?
+limit_rows_in_memory=Limite di righe in memoria
+numeric=Numerico
+numeric_value=Valore numerico
+operator=
+parameter=Parametro
+python=
+returns=Torna
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=Specifica il numero di righe \n in memoria quando viene processata un'espressione,\n riducendo drasticamente il tempo di esecuzione\n quando viene diminuito.
+string=Stringa
+string_value=Valore stringa
+type=Tipo
+value=Valore
+without_limit=Senza limite
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text.properties	(revision 420)
@@ -0,0 +1,47 @@
+#Translations for language [es]
+#Tue Jan 20 18:42:35 CET 2009
+advanced=Avanzada
+boolean_value=Valor booleano
+calculate_expression=Calcular expresi\u00f3n
+charged_operators=Operadores cargados.
+charging_operators=Cargando operadores
+clear_expression=Borrar expresi\u00f3n
+column=Columna
+commands=Comandos
+continue?=\u00bfQuiere continuar?
+date=Fecha
+date_value=Valor fecha
+description=Descripci\u00f3n
+double_value=
+error=Error
+error_expression=Error en la expresi\u00f3n
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=El c\u00e1lculo de la expresi\u00f3n se realizar\u00e1 en este momento\nsobre los registros existentes en la tabla.
+evaluate=Evaluar
+evaluate_expression_with_errors=Expresiones evaluadas con errores
+explorer=Explorar
+expression=Expresi\u00f3n
+expressions=Expresiones
+expressions_from_file=Expresiones de fichero
+field=Campo
+field_toolbar=
+format=Formato
+general=General
+incorrect_file=Fichero incorrecto
+information=Informaci\u00f3n
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=Tiene establecido un l\u00edmite de registros en preferencias, perder\u00e1 la posibilidad de deshacer. \u00bfQuiere continuar?
+limit_rows_in_memory=L\u00edmite de registros en memoria
+numeric=Num\u00e9rico
+numeric_value=Valor num\u00e9rico
+operator=
+optional=Opcional
+parameter=Par\u00e1metro
+python=
+returns=Devuelve
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=Especifica el n\u00famero de registros\n  en memoria cuando se evalue la expresi\u00f3n,\n  reduciendose dr\u00e1sticamente la velocidad\n cuando se limite.
+string=Cadena
+string_value=Valor String
+type=Tipo
+value=Valor
+without_limit=Sin l\u00edmite
+_Expression_field=Calculadora de campos
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_ro.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_ro.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_ro.properties	(revision 420)
@@ -0,0 +1,42 @@
+#Translations for language [ro]
+#Mon Aug 06 08:50:49 CEST 2007
+advanced=Inainta
+boolean_value=
+calculate_expression=
+charging_operators=
+clear_expression=
+column=
+commands=
+continue?=
+date=
+date_value=
+description=Descriere
+double_value=
+error=Eroare
+error_expression=
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
+evaluate=
+evaluate_expression_with_errors=
+explorer=
+expression=
+expressions=
+expressions_from_file=
+field=Camp
+general=General
+incorrect_file=
+information=
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
+limit_rows_in_memory=
+numeric=
+numeric_value=
+operator=
+parameter=
+python=
+returns=
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
+string=
+string_value=
+type=Mod
+value=Valoare
+without_limit=
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_zh.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_zh.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_zh.properties	(revision 420)
@@ -0,0 +1,42 @@
+#Translations for language [zh]
+#Mon Aug 06 08:50:49 CEST 2007
+advanced=\u9ad8\u7ea7
+boolean_value=
+calculate_expression=
+charging_operators=
+clear_expression=
+column=
+commands=
+continue?=
+date=
+date_value=
+description=\u63cf\u8ff0
+double_value=
+error=\u9519\u8bef
+error_expression=
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
+evaluate=
+evaluate_expression_with_errors=
+explorer=
+expression=
+expressions=
+expressions_from_file=
+field=\u5b57\u6bb5
+general=\u57fa\u672c\u8bbe\u7f6e
+incorrect_file=
+information=
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
+limit_rows_in_memory=
+numeric=
+numeric_value=
+operator=
+parameter=
+python=
+returns=
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
+string=
+string_value=
+type=\u7c7b\u578b
+value=\u6570\u636e
+without_limit=
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_en.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_en.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_en.properties	(revision 420)
@@ -0,0 +1,48 @@
+#Translations for language [en]
+#Tue Jan 20 17:39:04 CET 2009
+advanced=Advanced
+boolean_value=Boolean value
+calculate_expression=Calculate expression
+charged_operators=
+charging_operators=Charging operators
+clear_expression=Clear expression
+column=Column
+commands=Commands
+continue?=Continue?
+date=Date
+date_value=Date value
+description=Description
+double_value=
+error=Error
+error_expression=Error expression
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=Eval expression will be carried out right now\nwith current values in table.
+evaluate=Evaluate
+evaluate_expression_with_errors=Evaluated expressions with errors
+explorer=Explorer
+expression=Expression
+expressions=Expressions
+expressions_from_file=Expressions from file
+field=Field
+field_toolbar=
+format=Format
+general=General
+incorrect_file=Incorrect file
+information=Information
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=It has established a limit of rows in preferences, will lose the possibility to undo.  Wants to continue?
+limit_rows_in_memory=Limit rows in memory
+numeric=Numeric
+numeric_value=Numeric value
+operator=
+optional=Optional
+parameter=Parameter
+python=
+returns=Returns
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=Speficies the limit rows in memory when the program eval the expression\n The limit down the velocity.
+string=String
+string_value=String value
+type=Type
+value=Value
+without_limit=Without limit
+_Expression_field=Field calculator
+
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_gl.properties
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_gl.properties	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources-plugin/i18n/text_gl.properties	(revision 420)
@@ -0,0 +1,42 @@
+#Translations for language [gl]
+#Mon Aug 06 08:50:49 CEST 2007
+advanced=Avanzada
+boolean_value=
+calculate_expression=
+charging_operators=
+clear_expression=
+column=Columna
+commands=
+continue?=
+date=
+date_value=
+description=Descripci\u00f3n
+double_value=
+error=Erro
+error_expression=
+eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
+evaluate=
+evaluate_expression_with_errors=
+explorer=
+expression=
+expressions=
+expressions_from_file=
+field=Campo
+general=Xeral
+incorrect_file=
+information=
+integer_value=
+it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
+limit_rows_in_memory=
+numeric=
+numeric_value=
+operator=
+parameter=
+python=
+returns=
+specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
+string=
+string_value=
+type=Tipo
+value=Valor
+without_limit=
Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources/org/gvsig/expressionfield/project/documents/table/gui/document-save.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources/org/gvsig/expressionfield/project/documents/table/gui/document-save.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources/org/gvsig/expressionfield/project/documents/table/gui/document-open.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources/org/gvsig/expressionfield/project/documents/table/gui/document-open.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources/org/gvsig/expressionfield/project/documents/table/gui/tools-scripting-launcher.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/resources/org/gvsig/expressionfield/project/documents/table/gui/tools-scripting-launcher.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/assembly/gvsig-plugin-package.xml
===================================================================
--- org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/assembly/gvsig-plugin-package.xml	(revision 0)
+++ org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78/src/main/assembly/gvsig-plugin-package.xml	(revision 420)
@@ -0,0 +1,64 @@
+<!--
+
+    gvSIG. Desktop Geographic Information System.
+
+    Copyright (C) 2007-2013 gvSIG Association.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License
+    as published by the Free Software Foundation; either version 3
+    of the License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA  02110-1301, USA.
+
+    For any additional information, do not hesitate to contact us
+    at info AT gvsig.com, or visit our website www.gvsig.com.
+
+-->
+<assembly>
+  <id>gvsig-plugin-package</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <baseDirectory>${project.artifactId}</baseDirectory>
+  <includeBaseDirectory>true</includeBaseDirectory>
+  <files>
+    <file>
+      <source>target/${project.artifactId}-${project.version}.jar</source>
+      <outputDirectory>lib</outputDirectory>
+    </file>
+    <file>
+      <source>target/package.info</source>
+    </file>
+  </files>
+
+  <fileSets>
+    <fileSet>
+      <directory>src/main/resources-plugin</directory>
+      <outputDirectory>.</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <useTransitiveDependencies>false</useTransitiveDependencies>
+      <outputDirectory>lib</outputDirectory>
+      <includes>
+        <include>bsf:bsf</include>
+        <include>org.python:jython</include>
+        <include>com.fifesoft:rsyntaxtextarea</include>
+      </includes>
+    </dependencySet>
+  </dependencySets>
+
+</assembly>
+

Property changes on: org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.78
___________________________________________________________________
Added: svn:ignore
   + target


