Index: /applications/editors/josm/plugins/Create_grid_of_ways/.classpath
===================================================================
--- /applications/editors/josm/plugins/Create_grid_of_ways/.classpath	(revision 14370)
+++ /applications/editors/josm/plugins/Create_grid_of_ways/.classpath	(revision 14370)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="build" path="src"/>
+	<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
+	<classpathentry kind="lib" path="/home/chamorro/workspace/JOSM/dist/josm-custom.jar" sourcepath="/JOSM"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
Index: /applications/editors/josm/plugins/Create_grid_of_ways/.project
===================================================================
--- /applications/editors/josm/plugins/Create_grid_of_ways/.project	(revision 14370)
+++ /applications/editors/josm/plugins/Create_grid_of_ways/.project	(revision 14370)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Create_grid_of_ways</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+	<linkedResources>
+		<link>
+			<name>build</name>
+			<type>2</type>
+			<location>/home/chamorro/workspace/Create_grid_of_ways/build</location>
+		</link>
+		<link>
+			<name>src</name>
+			<type>2</type>
+			<location>/home/chamorro/workspace/Create_grid_of_ways/src</location>
+		</link>
+	</linkedResources>
+</projectDescription>
Index: /applications/editors/josm/plugins/Create_grid_of_ways/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- /applications/editors/josm/plugins/Create_grid_of_ways/.settings/org.eclipse.jdt.core.prefs	(revision 14370)
+++ /applications/editors/josm/plugins/Create_grid_of_ways/.settings/org.eclipse.jdt.core.prefs	(revision 14370)
@@ -0,0 +1,12 @@
+#Tue Jan 13 11:05:34 ARST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Index: /applications/editors/josm/plugins/Create_grid_of_ways/build.xml
===================================================================
--- /applications/editors/josm/plugins/Create_grid_of_ways/build.xml	(revision 14370)
+++ /applications/editors/josm/plugins/Create_grid_of_ways/build.xml	(revision 14370)
@@ -0,0 +1,56 @@
+<project name="Create_grid_of_ways" default="dist" basedir=".">
+    <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
+    <property name="plugin.dist.dir"        value="../../dist"/>
+    <property name="plugin.build.dir"       value="build"/>
+    <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
+    <property name="ant.build.javac.target" value="1.5"/>
+    <target name="init">
+        <mkdir dir="${plugin.build.dir}"/>
+    </target>
+    <target name="compile" depends="init">
+        <echo message="creating ${plugin.jar}"/>
+        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
+            <compilerarg value="-Xlint:deprecation"/>
+            <compilerarg value="-Xlint:unchecked"/>
+        </javac>
+    </target>
+    <target name="dist" depends="compile,revision">
+        <copy todir="${plugin.build.dir}/images">
+            <fileset dir="images"/>
+        </copy>
+        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
+            <manifest>
+                <attribute name="Author" value="Jorge Luis Chamorro"/>
+                <attribute name="Plugin-Class" value="CreateGridOfWaysPlugin.CreateGridOfWaysPlugin"/>
+                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
+                <attribute name="Plugin-Description" value="Create a grid of ways."/>
+                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/Create_grid_of_ways"/>
+                <attribute name="Plugin-Mainversion" value="1208"/>
+                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
+            </manifest>
+        </jar>
+    </target>
+    <target name="revision">
+        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
+            <env key="LANG" value="C"/>
+            <arg value="info"/>
+            <arg value="--xml"/>
+            <arg value="."/>
+        </exec>
+        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
+        <delete file="REVISION"/>
+    </target>
+    <target name="clean">
+        <delete dir="${plugin.build.dir}"/>
+        <delete file="${plugin.jar}"/>
+    </target>
+    <target name="install" depends="dist">
+        <property environment="env"/>
+        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
+            <and>
+                <os family="windows"/>
+            </and>
+        </condition>
+        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
+    </target>
+</project>
Index: /applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java
===================================================================
--- /applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java	(revision 14370)
+++ /applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java	(revision 14370)
@@ -0,0 +1,106 @@
+package CreateGridOfWaysPlugin;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+import java.util.Collection;
+import java.util.LinkedList;
+import javax.swing.JOptionPane;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.command.AddCommand;
+import org.openstreetmap.josm.command.Command;
+import org.openstreetmap.josm.command.SequenceCommand;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.data.coor.LatLon;
+
+/**
+ * Crea una grilla de vías usando como base las dos seleccionadas que tengan un nodo en común
+ * y probablemente sean perpendiculares entre si , deben tener ambas vías un nodo en cada esquina
+ * (Please if you understand this translate to English)
+ *
+ * @author Jorge Luis Chamorro
+ */
+@SuppressWarnings("serial")
+public final class CreateGridOfWaysAction extends JosmAction {
+
+    public CreateGridOfWaysAction() {
+        super(tr("Create grid of ways"), "creategridofways", tr("Forms a grid of ways in base to two existing that have various nodes and one in common"), Shortcut.registerShortcut("tools:CreateGridOfWays", tr("Tool: {0}", tr("Create grid of ways")),
+        KeyEvent.VK_G, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
+/* en mis otras pruebas esto terminaba : Shortcut.GROUP_EDIT), true);
+/* le puse tecla G de shortcut pero parece que esta usado por tools:unglue , buscar otro */
+    }
+
+    /**
+     * Dadas 2 vias seleccionadas buscamos el punto en comun entre ambas y luego las recorremos para crear una grilla
+     * de vias paralelas a esas dos creando los nodos que son sus puntos de union y reusando los existentes
+     * (Please if you understand this translate to English)
+     * They given 2 ways selected we seek the point in common between both and then we travel through them to
+     * create a grid of ways parallel to those creating the nodes that are its points of union and reusing the
+     * existing ones (--this is from a translation machine--)
+     */
+    public void actionPerformed(ActionEvent e) {
+        Collection<OsmPrimitive> sel = Main.ds.getSelected();
+        Collection<Node> nodesWay1 = new LinkedList<Node>();
+        Collection<Node> nodesWay2 = new LinkedList<Node>();
+        if ((sel.size() != 2) || !(sel.toArray()[0] instanceof Way) || !(sel.toArray()[1] instanceof Way)) {
+            JOptionPane.showMessageDialog(Main.parent, tr("Select two ways with a node in common"));
+            return;
+        }
+        nodesWay1.addAll(((Way)sel.toArray()[0]).nodes);
+        nodesWay2.addAll(((Way)sel.toArray()[1]).nodes);
+        Node nodeCommon = null;
+        for (Node n : nodesWay1)
+            for (Node m : nodesWay2)
+                if (n.equals(m)) {
+                    if ( nodeCommon != null ) {
+                        JOptionPane.showMessageDialog(Main.parent, tr("Select two ways with alone a node in common"));
+                        return;
+                    }
+                    nodeCommon = n;
+                }
+        Way w2[] = new Way[nodesWay2.size()-1];
+        for (int c=0;c<w2.length;c++)
+            w2[c]=new Way();
+        Way w1[] = new Way[nodesWay1.size()-1];
+        for (int c=0;c<w1.length;c++)
+            w1[c]=new Way();
+        Collection<Command> cmds = new LinkedList<Command>();
+        int c1=0,c2;
+        double latDif,lonDif;
+        for (Node n1 : nodesWay1) {
+            latDif = n1.coor.lat()-nodeCommon.coor.lat();
+            lonDif = n1.coor.lon()-nodeCommon.coor.lon();
+            c2=0;
+            for (Node n2 : nodesWay2) {
+                if (n1.equals(nodeCommon) && n2.equals(nodeCommon))
+                    continue;
+                if (n2.equals(nodeCommon)) {
+                    w1[c1].nodes.add(n1);
+                    continue;
+                }
+                if (n1.equals(nodeCommon)) {
+                    w2[c2++].nodes.add(n2);
+                    continue;
+                }
+                Node nodeOfGrid = new Node(new LatLon(n2.coor.lat()+latDif,n2.coor.lon()+lonDif));
+                cmds.add(new AddCommand(nodeOfGrid));
+                w1[c1].nodes.add(nodeOfGrid);
+                w2[c2++].nodes.add(nodeOfGrid);
+            }
+            if (!n1.equals(nodeCommon))
+               c1++;
+        }
+        for (int c=0;c<w1.length;c++)
+            cmds.add(new AddCommand(w1[c]));
+        for (int c=0;c<w2.length;c++)
+            cmds.add(new AddCommand(w2[c]));
+        Main.main.undoRedo.add(new SequenceCommand(tr("Create a grid of ways"), cmds));
+        Main.map.repaint();
+    }
+}
Index: /applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysPlugin.java
===================================================================
--- /applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysPlugin.java	(revision 14370)
+++ /applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysPlugin.java	(revision 14370)
@@ -0,0 +1,11 @@
+package CreateGridOfWaysPlugin;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.plugins.Plugin;
+import org.openstreetmap.josm.gui.MainMenu;
+
+public class CreateGridOfWaysPlugin extends Plugin {
+    public CreateGridOfWaysPlugin() {
+        MainMenu.add(Main.main.menu.toolsMenu, new CreateGridOfWaysAction());
+    }
+}
Index: /applications/editors/josm/plugins/build.xml
===================================================================
--- /applications/editors/josm/plugins/build.xml	(revision 14369)
+++ /applications/editors/josm/plugins/build.xml	(revision 14370)
@@ -39,5 +39,4 @@
         <ant antfile="build.xml" target="dist" dir="duplicateway"/>
         <ant antfile="build.xml" target="dist" dir="grid"/>
-        <ant antfile="build.xml" target="dist" dir="navigator"/>
     </target>
     <target name="clean">
@@ -54,5 +53,4 @@
         <ant antfile="build.xml" target="clean" dir="livegps"/>
         <ant antfile="build.xml" target="clean" dir="measurement"/>
-        <ant antfile="build.xml" target="clean" dir="navigator"/>
         <ant antfile="build.xml" target="clean" dir="nearclick"/>
         <ant antfile="build.xml" target="clean" dir="openlayers"/>
