Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/buildNumber.properties
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/buildNumber.properties	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/buildNumber.properties	(revision 38690)
@@ -0,0 +1,3 @@
+#maven.buildNumber.plugin properties file
+#Thu Aug 09 12:38:19 CEST 2012
+buildNumber=2065
Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/prepare-workspace.xml
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/prepare-workspace.xml	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/prepare-workspace.xml	(revision 38690)
@@ -0,0 +1,151 @@
+<project name="org.gvsig.initial.build" default="prepare-workspace">
+
+	<dirname property="org.gvsig.initial.build.basedir" file="${ant.file.org.gvsig.initial.build}" />
+
+	<property name="workspace.basedir" value="${org.gvsig.initial.build.basedir}/.." />
+	<property name="build.basedir" value="${workspace.basedir}/org.gvsig.maven.base.build" description="Eclipse workspace location" />
+	<property name="build.jar.version" value="1.0.8-SNAPSHOT" />
+	<property name="build.jar.file" value="org.gvsig.maven.base.build-${build.jar.version}.jar" />
+
+	<property name="ant.libs.dir" location="${build.basedir}" description="Additional ant tasks libs folder" />
+
+	<target name="check-maven-base-build-available">
+		<available file="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" property="maven-base-build-available" />
+	</target>
+
+	<target name="get-maven-base-build-local" depends="check-maven-base-build-available" if="maven-base-build-available">
+		<!-- Unzip de build jar file from the maven repository into the workspace root folder -->
+		<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false">
+			<zipfileset src="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}">
+				<patternset>
+					<exclude name="META-INF/**" />
+				</patternset>
+			</zipfileset>
+		</copy>
+	</target>
+
+	<target name="get-maven-base-build-remote" depends="check-maven-base-build-available" unless="maven-base-build-available">
+		<mkdir dir="target" />
+
+		<!-- Download the build jar file -->
+		<get src="http://devel.gvsig.org/m2repo/j2se/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" dest="target/${build.jar.file}" verbose="true" />
+
+		<!-- Unzip de build jar file into the workspace root folder -->
+		<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false">
+			<zipfileset src="target/${build.jar.file}">
+				<patternset>
+					<exclude name="META-INF/**" />
+				</patternset>
+			</zipfileset>
+		</copy>
+
+	</target>
+	
+	<target name="find.depends.natives.file">
+	    <condition property="depends.natives.file.exists">
+            <available file="${org.gvsig.initial.build.basedir}/DEPENDS_ON_NATIVE_LIBRARIES"/>
+	    </condition>	
+	</target>
+	
+	<target name="find.gvsig.platform.properties.file" 
+			depends="find.depends.natives.file"
+			if="depends.natives.file.exists">
+	    <condition property="gvsig.platform.exists">
+            <available file="${user.home}/.gvsig.platform.properties"/>
+	    </condition>	
+	</target>
+	
+	<target name="check.gvsig.platform.properties" 
+			depends="find.gvsig.platform.properties.file">
+		<fail if="depends.natives.file.exists" unless="gvsig.platform.exists">
+ERROR!!
+	
+You have to define your gvSIG platform properties, 
+by creating the file: ${user.home}/.gvsig.platform.properties
+with the following content:
+
+native_platform=linux
+native_distribution=all
+native_compiler=gcc4
+native_arch=i386
+native_libraryType=dynamic
+export native_classifier=${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType}
+
+Replace the fifth initial variables values with the ones appropiate 
+to your platform.
+	
+If you use maven in the command line, you can use the previous file also
+to define the MAVEN_OPTS environment variable, by adding to your 
+.bash_rc file something like this:
+
+if [ -f "${HOME}/.gvsig.platform.properties" ]
+then
+    . ${HOME}/.gvsig.platform.properties
+    export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m -Dnative-classifier=${native_classifier}"
+else
+    export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m"
+fi
+
+It will work if you use the bash shell. In any other case or platform, you'll
+have to define your MAVEN_OPTS environment variable and set the 
+"native-classifier" parameter directly.
+		</fail>			
+	
+	</target>
+
+	<target name="prepare-workspace" depends="get-maven-base-build-local,get-maven-base-build-remote,check.gvsig.platform.properties">
+
+		<mkdir dir="target" />
+
+		<chmod dir="${build.basedir}/maven/bin" perm="u+x" includes="m2,mvn,mvnDebug" />
+
+		<!-- Copy the maven launchers to the workspace metadata folder -->
+		<copy todir="${workspace.basedir}/.metadata">
+			<fileset dir="${build.basedir}/eclipse-launchers">
+				<exclude name="**/org.eclipse.jdt.core.prefs" />
+				<exclude name="**/org.eclipse.core.variables.prefs" />
+			</fileset>
+		</copy>
+
+		<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" append="true">
+			<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.jdt.core.prefs" />
+		</concat>
+		<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" append="true">
+			<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.core.variables.prefs" />
+		</concat>
+
+		<!-- Configure the eclipse workspace -->
+		<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-configure-eclipse-workspace" />
+
+		<!-- Configure the gvSIG profile -->
+		<ant antfile="${build.basedir}/check-gvsig-profile.xml" />
+
+		<property name="user-settings-file-location" value="${user.home}/.m2/settings.xml" />
+
+		<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask">
+			<classpath>
+				<pathelement location="${ant.libs.dir}/com.oopsconsultancy.xmltask-1.16.1.jar" />
+			</classpath>
+		</taskdef>
+
+		<xmltask source="${user-settings-file-location}" dest="${user-settings-file-location}">
+			<copy path="//:settings/:profiles/:profile[:id/text() = 'gvsig-install']/:properties/:gvsig.install.dir/text()" property="current-gvsig-location" />
+		</xmltask>
+
+		<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" />
+		<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" />
+
+		<!-- Compile, install and generate eclipse projects -->
+		<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-install-and-eclipse-eclipse" />
+
+		<echo>INFORMATION!!!</echo>
+		<echo>Restart eclipse and then proceed to import the subprojects contained into the main project</echo>
+
+		<!-- TODO: copiar al proyecto de configuración general -->
+	</target>
+
+	<target name="clean">
+		<delete dir="target" />
+	</target>
+	
+</project>

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/prepare-workspace.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/pom.xml
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/pom.xml	(revision 38690)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<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.geometrymeasurement.app</artifactId>
+	<packaging>pom</packaging>
+	<version>1.0.0-SNAPSHOT</version>
+	<name>org.gvsig.geometrymeasurement.app</name>
+	<description>Extension of the GeometryMeasurement example project</description>
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.maven.base.extension.pom</artifactId>
+        <version>1.0.8-SNAPSHOT</version>
+    </parent>
+    <scm>
+        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/extensions/org.gvsig.geometrymeasurement.app</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/extensions/org.gvsig.geometrymeasurement.app</developerConnection>
+        <url>https://devel.gvsig.org/redmine/projects/gvsig-desktop/repository/show/branches/v2_0_0_prep/extensions/org.gvsig.geometrymeasurement.app</url>
+    </scm>
+
+	<developers>
+		<developer>
+			<id>vcaballero</id>
+			<name>Vicente Caballero Navarro</name>
+			<email>vicente.caballero@iver.es</email>
+			<roles>				
+				<role>Developer</role>
+			</roles>
+		</developer>
+		<developer>
+			<id>jpiera</id>
+			<name>Jorge Piera Llodr�</name>
+			<email>jpiera@gvsig.org</email>
+			<roles>
+				<role>Developer</role>
+			</roles>
+		</developer>		
+	</developers>
+
+	<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>          
+            <dependency>
+                <groupId>org.gvsig</groupId>
+                <artifactId>org.gvsig.core.maven.dependencies</artifactId>
+                <version>2.0.1-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+	<modules>
+		<module>org.gvsig.geometrymeasurement.app.extension</module>
+	</modules>
+	<properties>
+		<package.info.state>devel</package.info.state>
+		<!-- alpha-devel -->
+	</properties>
+</project>
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/README.txt
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/README.txt	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/README.txt	(revision 38690)
@@ -0,0 +1,18 @@
+The first time you checkout the current project to a new workspace, 
+you have to prepare it to be able to work easily with maven from
+eclipse itself.
+
+Perform the following steps:
+
+1.- Launch the *prepare-workspace.xml* ant build file. 
+    You can do it by loading the file into the ant view, 
+    and running the default task, or right-clicking the 
+    file from the package explorer or the navigator and
+    select the option: *Run as > Ant build*. 
+    
+2.- Restart eclipse.
+
+3.- Import the subprojects of the project you have just checked out.
+
+Those steps are only needed once per workspace.     
+

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/distribution/distribution.xml
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/distribution/distribution.xml	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/distribution/distribution.xml	(revision 38690)
@@ -0,0 +1,2 @@
+<assembly>
+</assembly>
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/distribution/distribution.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/buildNumber.properties
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/buildNumber.properties	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/buildNumber.properties	(revision 38690)
@@ -0,0 +1,3 @@
+#maven.buildNumber.plugin properties file
+#Thu Aug 09 12:38:20 CEST 2012
+buildNumber=2057
Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/AddXYPointThemeExtension.java
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/AddXYPointThemeExtension.java	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/AddXYPointThemeExtension.java	(revision 38690)
@@ -0,0 +1,55 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * 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 2
+ * 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.
+ *
+ */
+package org.gvsig.geometrymeasurement.app.extension;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.app.project.documents.table.TableDocument;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.geometrymeasurement.app.extension.utils.Operations;
+
+/**
+ * Andami extension to show PerimeterMeasurementExtension in the application.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class AddXYPointThemeExtension extends
+    AbstractGeometryMeasurementExtension {
+
+    public void initialize() {
+        super.initialize();
+        IconThemeHelper.registerIcon("action", "table-add-xy", this);
+    }
+
+    @Override
+    protected void execute(String actionCommand, FeatureStore featureStore)
+        throws Exception {
+        new Operations().addXYPoints(featureStore, "X", "Y");
+    }
+
+    @Override
+    protected boolean isVisibleForTable(TableDocument tableDocument) {
+        return isStoreOfAnyType(tableDocument, new int[] { Geometry.TYPES.POINT });
+    }
+}

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/AddXYPointThemeExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/AreaMeasurementExtension.java
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/AreaMeasurementExtension.java	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/AreaMeasurementExtension.java	(revision 38690)
@@ -0,0 +1,56 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * 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 2
+ * 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.
+ *
+ */
+package org.gvsig.geometrymeasurement.app.extension;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.app.project.documents.table.TableDocument;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.geometrymeasurement.app.extension.utils.Operations;
+
+/**
+ * Andami extension to show AreaMeasurementExtension in the application.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class AreaMeasurementExtension extends
+    AbstractGeometryMeasurementExtension {
+
+    public void initialize() {
+    super.initialize();
+        IconThemeHelper.registerIcon("action", "table-add-area", this);
+    }
+
+    @Override
+    protected void execute(String actionCommand, FeatureStore featureStore)
+        throws Exception {
+        new Operations().addDoubleFieldFromOperation(featureStore, "AREA",
+            "area");
+    }
+
+    @Override
+    protected boolean isVisibleForTable(TableDocument tableDocument) {
+        return isStoreOfAnyType(tableDocument, new int[] { Geometry.TYPES.SURFACE,
+            Geometry.TYPES.MULTISURFACE });
+    }
+}

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/AreaMeasurementExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/PerimeterMeasurementExtension.java
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/PerimeterMeasurementExtension.java	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/PerimeterMeasurementExtension.java	(revision 38690)
@@ -0,0 +1,58 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * 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 2
+ * 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.
+ *
+ */
+package org.gvsig.geometrymeasurement.app.extension;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.app.project.documents.table.TableDocument;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.geometrymeasurement.app.extension.utils.Operations;
+
+/**
+ * Andami extension to show PerimeterMeasurementExtension in the application.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class PerimeterMeasurementExtension extends
+    AbstractGeometryMeasurementExtension {
+
+    public void initialize() {
+    	super.initialize();
+        IconThemeHelper.registerIcon("action", "table-add-perimeter", this);
+    }
+
+    @Override
+    protected void execute(String actionCommand, FeatureStore featureStore)
+        throws Exception {
+        new Operations().addDoubleFieldFromOperation(featureStore, "PERIMETER",
+            "perimeter");
+    }
+
+    @Override
+    protected boolean isVisibleForTable(TableDocument tableDocument) {
+        return !isStoreOfAnyType(tableDocument, new int[] { Geometry.TYPES.POINT,
+            Geometry.TYPES.MULTIPOINT});
+    }
+
+}

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/PerimeterMeasurementExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/utils/Operations.java
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/utils/Operations.java	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/utils/Operations.java	(revision 38690)
@@ -0,0 +1,189 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * 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 2
+ * 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.
+ *
+ */
+package org.gvsig.geometrymeasurement.app.extension.utils;
+
+import java.util.Iterator;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.gvsig.app.project.documents.table.TableOperations;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.EditableFeature;
+import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.EditableFeatureType;
+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.FeatureStore;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.dal.feature.exception.NeedEditingModeException;
+import org.gvsig.fmap.geom.operation.GeometryOperationException;
+import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.tools.dataTypes.DataTypes;
+import org.gvsig.tools.dispose.DisposableIterator;
+
+/**
+ * Andami extension to show PerimeterMeasurementExtension in the application.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class Operations {
+
+    private static final Logger LOG = LoggerFactory.getLogger(Operations.class);
+
+    private static final int NUM_DECIMALS = 5;
+
+    public void addDoubleFieldFromOperation(FeatureStore featureStore,
+        String fieldName, String operationName) throws DataException,
+        GeometryOperationNotSupportedException, GeometryOperationException {
+        boolean isEditing = false;
+        if (featureStore.isEditing()) {
+            isEditing = true;
+        } else {
+            featureStore.edit();
+        }
+
+        featureStore.beginEditingGroup(operationName);
+
+        // Adding the new attribute type
+        FeatureType featureType = featureStore.getDefaultFeatureType();
+        EditableFeatureType editableFeatureType = featureType.getEditable();
+
+        String realFieldName = getFieldName(featureStore, fieldName, 0);
+        EditableFeatureAttributeDescriptor editableFeatureAttributeDescriptor =
+            editableFeatureType.add(realFieldName, DataTypes.DOUBLE);
+        editableFeatureAttributeDescriptor.setPrecision(NUM_DECIMALS);
+        editableFeatureAttributeDescriptor
+            .setSize(TableOperations.MAX_FIELD_LENGTH);
+
+        featureStore.update(editableFeatureType);
+
+        DisposableIterator disposableIterator = null;
+        FeatureSet featureSet = null;
+        try {
+            // Adding the attribute value
+            featureSet = featureStore.getFeatureSet();
+            disposableIterator = featureSet.fastIterator();
+            while (disposableIterator.hasNext()) {
+                Feature feature = (Feature) disposableIterator.next();
+                EditableFeature editableFeature = feature.getEditable();
+                editableFeature.setDouble(realFieldName, (Double) feature
+                    .getDefaultGeometry().invokeOperation(operationName, null));
+                featureSet.update(editableFeature);
+            }
+        } finally {
+            if (disposableIterator != null) {
+                disposableIterator.dispose();
+            }
+            if (featureSet != null) {
+                featureSet.dispose();
+            }
+            try {
+                featureStore.endEditingGroup();
+            } catch (NeedEditingModeException e) {
+                LOG.error("Exception endEditingGroup", e);
+            }
+        }
+
+        if (!isEditing) {
+            featureStore.finishEditing();
+        }
+    }
+
+    public String getFieldName(FeatureStore featureStore, String fieldName,
+        int index) throws DataException {
+        String fullName = fieldName;
+        if (index != 0) {
+            fullName = fullName + index;
+        }
+        @SuppressWarnings("unchecked")
+        Iterator<FeatureAttributeDescriptor> it =
+            featureStore.getDefaultFeatureType().iterator();
+        while (it.hasNext()) {
+            FeatureAttributeDescriptor featureAttributeDescriptor = it.next();
+            if (featureAttributeDescriptor.getName().equals(fullName)) {
+                return getFieldName(featureStore, fieldName, index + 1);
+            }
+        }
+        return fullName;
+    }
+
+    /**
+     * @param featureStore
+     * @param string
+     * @param string2
+     * @throws DataException
+     */
+    public void addXYPoints(FeatureStore featureStore, String xFieldName,
+        String yFieldName) throws DataException {
+        boolean isEditing = false;
+        if (featureStore.isEditing()) {
+            isEditing = true;
+        } else {
+            featureStore.edit();
+        }
+
+        // Adding the new attribute type
+        FeatureType featureType = featureStore.getDefaultFeatureType();
+        EditableFeatureType editableFeatureType = featureType.getEditable();
+
+        String realXFieldName = getFieldName(featureStore, xFieldName, 0);
+        EditableFeatureAttributeDescriptor editableFeatureAttributeDescriptor =
+            editableFeatureType.add(realXFieldName, DataTypes.DOUBLE);
+        editableFeatureAttributeDescriptor.setPrecision(NUM_DECIMALS);
+        editableFeatureAttributeDescriptor
+            .setSize(TableOperations.MAX_FIELD_LENGTH);
+
+        String realYFieldName = getFieldName(featureStore, yFieldName, 0);
+        editableFeatureAttributeDescriptor =
+            editableFeatureType.add(realYFieldName, DataTypes.DOUBLE);
+        editableFeatureAttributeDescriptor.setPrecision(NUM_DECIMALS);
+        editableFeatureAttributeDescriptor
+            .setSize(TableOperations.MAX_FIELD_LENGTH);
+
+        featureStore.update(editableFeatureType);
+
+        // Adding the attribute value
+        FeatureSet featureSet = featureStore.getFeatureSet();
+        DisposableIterator disposableIterator = featureSet.fastIterator();
+        while (disposableIterator.hasNext()) {
+            Feature feature = (Feature) disposableIterator.next();
+            EditableFeature editableFeature = feature.getEditable();
+            editableFeature.setDouble(realXFieldName,
+                ((Point) feature.getDefaultGeometry()).getX());
+            editableFeature.setDouble(realYFieldName,
+                ((Point) feature.getDefaultGeometry()).getY());
+            featureSet.update(editableFeature);
+        }
+
+        featureSet.dispose();
+
+        if (!isEditing) {
+            featureStore.finishEditing();
+        }
+
+    }
+
+}

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/utils/Operations.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/AbstractGeometryMeasurementExtension.java
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/AbstractGeometryMeasurementExtension.java	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/java/org/gvsig/geometrymeasurement/app/extension/AbstractGeometryMeasurementExtension.java	(revision 38690)
@@ -0,0 +1,192 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * 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 2
+ * 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.
+ *
+ */
+package org.gvsig.geometrymeasurement.app.extension;
+
+import java.awt.Component;
+import java.util.Locale;
+
+import javax.swing.JOptionPane;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.project.documents.table.TableDocument;
+import org.gvsig.app.project.documents.table.gui.FeatureTableDocumentPanel;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.i18n.Messages;
+
+/**
+ * Abstract class for Geometry measurement operations extensions.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public abstract class AbstractGeometryMeasurementExtension extends Extension {
+
+    private static final Logger LOG = LoggerFactory
+        .getLogger(AbstractGeometryMeasurementExtension.class);
+    
+    //Just to know if the resources has been initialized
+    private static boolean isInitialized = false;
+       
+    public void initialize() {
+        if (!isInitialized){
+            //Register the strings
+            if (!Messages.hasLocales()) {
+                Messages.addLocale(Locale.getDefault());
+            }
+            
+            Messages.addResourceFamily(
+                    "org.gvsig.geometrymeasurement.app.extension.i18n.text",
+                    AbstractGeometryMeasurementExtension.class.getClassLoader(),
+                    AbstractGeometryMeasurementExtension.class.getClass().getName());
+            
+            //Register the icons
+            
+            isInitialized = true;
+        }        
+    }
+
+    public boolean isEnabled() {
+        TableDocument tableDocument;
+        String name = "unknow";
+        try {
+            tableDocument = getActiveTableDocument();
+            if (tableDocument != null) {
+                name = tableDocument.getName();
+            	return (tableDocument != null && tableDocument.getStore().allowWrite());
+            }
+        } catch (Throwable e) {
+            LOG.info("Error accesing to the table document ("+name+")", e);
+        }
+        return false;
+    }
+
+    public final boolean isVisible() {
+        TableDocument tableDocument;
+        String name = "unknow";
+        try {
+            tableDocument = getActiveTableDocument();
+            if (tableDocument != null) {
+                name = tableDocument.getName();
+                return isVisibleForTable(tableDocument);
+            }
+        } catch (Throwable e) {
+            LOG.info("Error accesing to the table document ("+name+")", e);
+        }       
+        return false;
+    }
+
+    /**
+     * Returns if the current extension is visible for the provided 
+     * table.
+     * 
+     * The provided table will be always non null.
+     * 
+     * @param layer
+     *            the active table
+     * @return if the extension is visible
+     */
+    protected abstract boolean isVisibleForTable(TableDocument tableDocument);
+
+    /**
+     * Returns the active table document. If the active document is not a table,
+     * or if the table has not a geometry, return null.
+     * 
+     * @return the active table document
+     * @throws DataException 
+     */
+    protected TableDocument getActiveTableDocument() throws DataException {
+        IWindow window = PluginServices.getMDIManager().getActiveWindow();
+
+        if (window instanceof FeatureTableDocumentPanel) {
+            FeatureTableDocumentPanel table = (FeatureTableDocumentPanel) window;
+            TableDocument tableDocument = (TableDocument)table.getDocument();
+            if (tableDocument.getStore().getDefaultFeatureType().getDefaultGeometryAttribute() != null){
+                return tableDocument;
+            }
+           
+        }
+        return null;
+    }
+
+    protected boolean isStoreOfAnyType(TableDocument tableDocument, int[] geomTypes) {
+        try {
+            FeatureType featureType = tableDocument.getStore().getDefaultFeatureType();
+            GeometryType geometryType = featureType.getDefaultGeometryAttribute().getGeomType();
+            for (int i = 0; i < geomTypes.length; i++) {
+                if (geometryType.isTypeOf(geomTypes[i])) {
+                    return true;
+                }
+            }
+        } catch (ReadException e) {
+            LOG.error("Error reading the geometry type", e);
+        } catch (DataException e) {
+            LOG.error("Error reading the geometry type", e);
+        }
+        return false;
+    }
+
+    public void execute(String actionCommand) {
+        try {
+            TableDocument tableDocument = getActiveTableDocument();
+            if (tableDocument == null) {
+                return;
+            }
+            Component parentWindow = 
+                (Component)ApplicationLocator.getManager().getUIManager().getActiveWindow();
+            int addField = JOptionPane.showConfirmDialog(parentWindow, Messages.getText("new_field_query"),
+                Messages.getText("info"), JOptionPane.YES_NO_OPTION);
+            
+            if (addField == JOptionPane.YES_OPTION){
+                FeatureStore featureStore = tableDocument.getStore();
+                execute(actionCommand, featureStore);
+            }
+        } catch (Exception e) {
+            LOG.error("Not possible to add the new field", e);
+            NotificationManager.addError(e);
+        }
+    }
+
+    /**
+     * Executes a command for the given {@link FeatureStore}.
+     * 
+     * @param actionCommand
+     *            to execute
+     * @param featureStore
+     *            to use
+     * @throws Exception
+     *             if there is an error while executing
+     */
+    protected abstract void execute(String actionCommand,
+        FeatureStore featureStore) throws Exception;
+
+}
Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/config.xml
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/config.xml	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/config.xml	(revision 38690)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<depends plugin-name="org.gvsig.app" />
+    <depends plugin-name="org.gvsig.app.document.table.app.mainplugin" />
+   	<resourceBundle name="text"/>
+	<libraries library-dir="lib"/>
+	<extensions>
+		<extension class-name="org.gvsig.geometrymeasurement.app.extension.AreaMeasurementExtension"
+			description="Extension that measures the area of all the polygonos they selected."
+            active="true">
+            <menu text="Table/Add/area" tooltip="area"
+                action-command="AREA"
+                position="500800100"
+                icon="add-area" />
+            <tool-bar name="area">
+                <action-tool icon="add-area"
+                    action-command="AREA" tooltip="area" position="500800100"
+                    enable-text="deber�a de estar activada" last="true"/>
+            </tool-bar>
+		</extension>	
+		
+		<extension class-name="org.gvsig.geometrymeasurement.app.extension.PerimeterMeasurementExtension"
+           description="Extension that measures the perimeter of all the lines they selected."
+            active="true">
+            <menu text="Table/Add/perimeter" tooltip="perimeter"
+                action-command="PERIMETER"
+                position="500800200"
+                icon="add-perimeter" />
+            <tool-bar name="perimeter">
+                <action-tool icon="add-perimeter"
+                    action-command="PERIMETER" tooltip="perimeter" position="500800200"
+                    enable-text="deber�a de estar activada" last="true"/>
+            </tool-bar>
+        </extension>
+        
+        <extension class-name="org.gvsig.geometrymeasurement.app.extension.AddXYPointThemeExtension"
+            description="Extension that add the coordinates x and y."
+            active="true">
+            <menu text="Tabla/add_x_y" tooltip="add_x_y"
+                action-command="ADDXYPOINT"
+                icon="add-xy-point" />
+            <tool-bar name="add_x_y">
+                <action-tool icon="add-xy-point"
+                    action-command="ADDXYPOINT" tooltip="add_x_y"
+                    enable-text="deber�a de estar activada" last="true"/>
+            </tool-bar>
+        </extension>    	
+	</extensions>
+</plugin-config>

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/config.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/build.number
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/build.number	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/build.number	(revision 38690)
@@ -0,0 +1,3 @@
+#Build Number for ANT. Do not edit!
+#Tue Apr 28 16:00:47 CEST 2009
+build.number=2005
Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/org/gvsig/geometrymeasurement/app/extension/i18n/text.properties
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/org/gvsig/geometrymeasurement/app/extension/i18n/text.properties	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/org/gvsig/geometrymeasurement/app/extension/i18n/text.properties	(revision 38690)
@@ -0,0 +1,3 @@
+new_field_query=Se van a a�adir nuevos campo en la tabla.\nDesea continuar?
+perimeter=Per�metro
+add_x_y=A�adir X e Y
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/org/gvsig/geometrymeasurement/app/extension/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/org/gvsig/geometrymeasurement/app/extension/i18n/text_en.properties
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/org/gvsig/geometrymeasurement/app/extension/i18n/text_en.properties	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/org/gvsig/geometrymeasurement/app/extension/i18n/text_en.properties	(revision 38690)
@@ -0,0 +1,3 @@
+new_field_query=New fields are going to be added to the table.\nDo you want to continue?
+perimeter=Perimeter
+add_x_y=Add X and Y
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/main/resources/org/gvsig/geometrymeasurement/app/extension/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/test/resources/README.txt
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/test/resources/README.txt	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/test/resources/README.txt	(revision 38690)
@@ -0,0 +1,8 @@
+Put into this folder the resources needed by your test classes.
+
+This folder is added to the Tests classpath, so you can load any resources 
+through the ClassLoader.
+
+By default, in this folder you can find an example of log4j configuration,
+prepared to log messages through the console, so logging works when you
+run your tests classes.
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/test/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/test/resources/log4j.xml
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/test/resources/log4j.xml	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/test/resources/log4j.xml	(revision 38690)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- 
+Log4J configuration file for unit tests execution.
+ -->
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+	<!-- Appender configuration to show logging messages through the console -->
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
+		</layout>
+	</appender>
+
+	<!-- 
+	Activate logging messages of DEBUG level of higher only for the
+	org.gvsig.tools packages.
+	You can put full classes names or packages instead, to configure
+	logging for all the classes and subpackages of the package.
+	-->
+	<category name="org.gvsig.tools">
+		<priority value="DEBUG" />
+	</category>
+	<category name="org.gvsig.geometrymeasurement">
+		<priority value="DEBUG" />
+	</category>
+
+	<!-- 
+	By default, show only logging messages of INFO level or higher, 
+	through the previously configured CONSOLE appender. 
+	-->
+	<root>
+		<priority value="INFO" />
+		<appender-ref ref="CONSOLE" />
+	</root>
+</log4j:configuration>
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/src/test/resources/log4j.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/pom.xml
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/pom.xml	(revision 38690)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<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/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.geometrymeasurement.app.extension</artifactId>
+	<packaging>jar</packaging>
+	<name>Tools: Geometry measurement</name>
+    <description>Add 3 tools to gvSIG:
+- Add a new attribute to the data source with the geometry area
+- Add a new attribute to the data source with the geometry perimeter
+- Add a new attribute to a Point type data source two new columns, one with the X Point value, and another with the Y Point value. 
+    </description>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.geometrymeasurement.app</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+	</parent>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.andami</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+           <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.app</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.app.document.table.app.mainplugin</artifactId>
+            <version>2.0.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.i18n</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.fmap.dal</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry</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.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+	</dependencies>
+	<profiles>
+		<profile>
+			<id>gvsig-install</id>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+			</activation>
+			<properties>
+				<!--
+					Default gvSIG installation folder relative to the current workspace
+				-->
+				<gvsig.install.dir>${basedir}/../../build/product</gvsig.install.dir>
+			</properties>
+		</profile>
+	</profiles>
+    <properties>
+        <package.info.dependencies>required: org.gvsig.app.document.table.app.mainplugin -ge 2</package.info.dependencies>
+        <package.info.categories>View,Vector</package.info.categories>
+    </properties>    
+</project>
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/distribution/distribution.xml
===================================================================
--- tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/distribution/distribution.xml	(revision 0)
+++ tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/distribution/distribution.xml	(revision 38690)
@@ -0,0 +1,29 @@
+<assembly>
+	<id>distribution</id>
+	<formats>
+		<format>dir</format>
+	</formats>
+	<fileSets>
+		<!-- Estructure for the extension -->
+		<fileSet>
+			<directory>src/main/resources</directory>
+			<outputDirectory>${extension.install.dir.name}
+			</outputDirectory>
+		</fileSet>
+	</fileSets>
+    <files>
+        <file>
+            <source>package.info</source>
+            <outputDirectory>${extension.install.dir.name}</outputDirectory>
+        </file>
+    </files>
+	<dependencySets>
+		<dependencySet>
+			<outputDirectory>${extension.install.dir.name}/${library-dir}
+			</outputDirectory>
+			<includes>
+				<include>org.gvsig:org.gvsig.geometrymeasurement.app.extension</include>
+			</includes>
+		</dependencySet>
+	</dependencySets>
+</assembly>

Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension/distribution/distribution.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.extension
___________________________________________________________________
Added: svn:ignore
   + target
bin
.settings
.classpath
.project
package.info



Property changes on: tags/v2_0_0_Build_2050/extensions/org.gvsig.geometrymeasurement.app
___________________________________________________________________
Added: svn:ignore
   + target
bin
.settings
.classpath

.project


