Index: /applications/editors/josm/plugins/lakewalker/build.xml
===================================================================
--- /applications/editors/josm/plugins/lakewalker/build.xml	(revision 11923)
+++ /applications/editors/josm/plugins/lakewalker/build.xml	(revision 11924)
@@ -59,4 +59,5 @@
         <attribute name="Plugin-Description" value="Interface to Lakewalker module" />
         <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
+        <attribute name="Plugin-Mainversion" value="1065"/>
         <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
         <attribute name="Author" value="Brent Easton &lt;b.easton@uws.edu.au>, Jason Reid &lt;jrreid@ucalgary.ca>"/>
Index: /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java
===================================================================
--- /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java	(revision 11923)
+++ /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java	(revision 11924)
@@ -33,4 +33,5 @@
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.command.SequenceCommand;
+import org.openstreetmap.josm.tools.ShortCut;
 
 import org.xml.sax.SAXException;
@@ -54,6 +55,7 @@
   
   public LakewalkerAction(String name) {
-    super(name, "lakewalker-sml", tr("Lake Walker."), KeyEvent.VK_L, KeyEvent.CTRL_MASK
-        | KeyEvent.SHIFT_MASK, true);
+    super(name, "lakewalker-sml", tr("Lake Walker."),
+    ShortCut.registerShortCut("tools:lakewalker", tr("Tool: {0}", tr("Lake Walker")),
+    KeyEvent.VK_L, ShortCut.GROUP_EDIT, ShortCut.SHIFT_DEFAULT), true);
     this.name = name;
     setEnabled(true);
@@ -61,4 +63,6 @@
   
   public void actionPerformed(ActionEvent e) {
+    if(Main.map == null || Main.map.mapView == null)
+      return;
 
     Main.map.mapView.setCursor(oldCursor);
@@ -150,9 +154,9 @@
 	 */
 	
-	setStatus("Running vertex reduction...");
+	setStatus(tr("Running vertex reduction..."));
 	
 	nodelist = lw.vertexReduce(nodelist, epsilon);
 	
-	System.out.println("After vertex reduction "+nodelist.size()+" nodes remain.");
+	//System.out.println("After vertex reduction "+nodelist.size()+" nodes remain.");
 	
 	/**
@@ -160,9 +164,9 @@
 	 */
 	
-	setStatus("Running Douglas-Peucker approximation...");
+	setStatus(tr("Running Douglas-Peucker approximation..."));
 	
 	nodelist = lw.douglasPeucker(nodelist, epsilon);
 	
-	System.out.println("After Douglas-Peucker approximation "+nodelist.size()+" nodes remain.");
+	//System.out.println("After Douglas-Peucker approximation "+nodelist.size()+" nodes remain.");
 	  
 	/**
@@ -170,9 +174,9 @@
 	 */
 	
-	setStatus("Removing duplicate nodes...");
+	setStatus(tr("Removing duplicate nodes..."));
 	
 	nodelist = lw.duplicateNodeRemove(nodelist);
 	
-	System.out.println("After removing duplicate nodes, "+nodelist.size()+" nodes remain.");
+	//System.out.println("After removing duplicate nodes, "+nodelist.size()+" nodes remain.");
 	  
 	
Index: plications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerActionOld.java
===================================================================
--- /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerActionOld.java	(revision 11923)
+++ 	(revision )
@@ -1,233 +1,0 @@
-package org.openstreetmap.josm.plugins.lakewalker;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
-
-import java.awt.Cursor;
-import java.awt.Point;
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.JOptionPane;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.actions.JosmAction;
-import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.data.osm.OsmPrimitive;
-import org.openstreetmap.josm.gui.PleaseWaitRunnable;
-import org.openstreetmap.josm.tools.ImageProvider;
-import org.xml.sax.SAXException;
-
-/**
- * Interface to Darryl Shpak's Lakewalker module
- * 
- * @author Brent Easton
- */
-class LakewalkerActionOld extends JosmAction implements MouseListener {
-
-  private static final long serialVersionUID = 1L;
-  protected String name;
-  protected Cursor oldCursor;
-  protected List<Node> selectedNodes;
-  protected Thread executeThread;
-  
-  public LakewalkerActionOld(String name) {
-    super(name, "lakewalker-sml", tr("Lake Walker (Old)"), KeyEvent.VK_L, KeyEvent.ALT_MASK | KeyEvent.CTRL_MASK
-        | KeyEvent.SHIFT_MASK, false);
-    this.name = name;
-    setEnabled(true);
-  }
-  
-  public void actionPerformed(ActionEvent e) {
-
-    Main.map.mapView.setCursor(oldCursor);
-
-    if (Main.map == null) {
-      JOptionPane.showMessageDialog(Main.parent, tr("No data loaded."));
-      return;
-    }
-
-    selectedNodes = new ArrayList<Node>();
-    for (OsmPrimitive osm : Main.ds.getSelected()) {
-      if (osm instanceof Node) {
-        Node node = (Node) osm;
-        selectedNodes.add(node);
-      }
-    }
-
-    if (selectedNodes.isEmpty()) {
-      oldCursor = Main.map.mapView.getCursor();
-      Main.map.mapView.setCursor(ImageProvider.getCursor("crosshair", "lakewalker-sml"));
-      Main.map.mapView.addMouseListener(this);
-    }
-    else {
-      lakewalk(selectedNodes);
-    }
-  }  
-  
-  protected void lakewalk(Point clickPoint) {
-    LatLon pos = Main.map.mapView.getLatLon(clickPoint.x, clickPoint.y);
-
-    /*
-     * Collect options
-     */
-    File working_dir = new File(Main.pref.getPreferencesDir(), "plugins");
-    working_dir = new File(working_dir, "Lakewalker");
-    String target = Main.pref.get(LakewalkerPreferences.PREF_PYTHON) + " lakewalker.py";
-    LatLon topLeft = Main.map.mapView.getLatLon(0, 0);
-    LatLon botRight = Main.map.mapView.getLatLon(Main.map.mapView.getWidth(), Main.map.mapView
-        .getHeight());
-
-    /*
-     * Build command line
-     */
-    target += " --lat=" + pos.lat();
-    target += " --lon=" + pos.lon();
-    target += " --left=" + topLeft.lon();
-    target += " --right=" + botRight.lon();
-    target += " --top=" + topLeft.lat();
-    target += " --bottom=" + botRight.lat();
-    target += " --waylength=" + Main.pref.get(LakewalkerPreferences.PREF_MAX_SEG, "500");
-    target += " --maxnodes=" + Main.pref.get(LakewalkerPreferences.PREF_MAX_NODES, "50000");
-    target += " --threshold=" + Main.pref.get(LakewalkerPreferences.PREF_THRESHOLD, "35");
-    target += " --dp-epsilon=" + Main.pref.get(LakewalkerPreferences.PREF_EPSILON, "0.0003");
-    target += " --landsat-res=" + Main.pref.get(LakewalkerPreferences.PREF_LANDSAT_RES, "4000");
-    target += " --tilesize=" + Main.pref.get(LakewalkerPreferences.PREF_LANDSAT_SIZE, "2000");
-    target += " --startdir=" + Main.pref.get(LakewalkerPreferences.PREF_START_DIR, "east");
-    target += " --wms=" + Main.pref.get(LakewalkerPreferences.PREF_WMS, "IR1");    
-    target += " --josm";
-    
-
-    try {
-      /*
-       * Start the Lakewalker
-       */
-      Runtime rt = Runtime.getRuntime();
-      System.out.println("dir: " + working_dir + ", target: " + target);
-      final Process p = rt.exec(target, null, working_dir);
-      final BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
-      
-      /*
-       * Start a thread to read the output
-       */
-      final LakewalkerReader reader = new LakewalkerReader();
-      
-      PleaseWaitRunnable lakewalkerTask = new PleaseWaitRunnable(tr("Tracing")){
-        @Override protected void realRun() throws SAXException {
-          reader.read(input);
-        }
-        @Override protected void finish() {
-          
-        }
-        @Override protected void cancel() {
-          reader.cancel();
-          executeThread.interrupt();
-          p.destroy();
-        }
-      };
-      Thread executeThread = new Thread(lakewalkerTask);
-      executeThread.start();
-    }
-    catch (Exception ex) {
-      System.out.println("Exception caught: " + ex.getMessage());
-    }
-
-
-  }
-
-  protected void lakewalk(List nodes) {
-
-  }
-
-  public void mouseClicked(MouseEvent e) {
-    Main.map.mapView.removeMouseListener(this);
-    Main.map.mapView.setCursor(oldCursor);
-    lakewalk(e.getPoint());
-  }
-
-  public void mouseEntered(MouseEvent e) {
-  }
-
-  public void mouseExited(MouseEvent e) {
-  }
-
-  public void mousePressed(MouseEvent e) {
-  }
-
-  public void mouseReleased(MouseEvent e) {
-  }
-
-
-  // class DuplicateDialog extends JDialog {
-  // private static final long serialVersionUID = 1L;
-  // protected Box mainPanel;
-  // protected IntConfigurer offset;
-  // protected boolean cancelled;
-  // protected String right;
-  // protected String left;
-  // protected JComboBox moveCombo;
-  //
-  // public DuplicateDialog(String title) {
-  // super();
-  // this.setTitle(title);
-  // this.setModal(true);
-  // initComponents();
-  // }
-  //
-  // protected void initComponents() {
-  // mainPanel = Box.createVerticalBox();
-  // offset = new IntConfigurer("", tr("Offset (metres): "), new Integer(15));
-  // mainPanel.add(offset.getControls());
-  // getContentPane().add(mainPanel);
-  //
-  // right = tr("right/down");
-  // left = tr("left/up");
-  // Box movePanel = Box.createHorizontalBox();
-  // movePanel.add(new JLabel(tr("Create new segments to the ")));
-  // moveCombo = new JComboBox(new String[] {right, left});
-  // movePanel.add(moveCombo);
-  // movePanel.add(new JLabel(tr(" of existing segments.")));
-  // mainPanel.add(movePanel);
-  //
-  // Box buttonPanel = Box.createHorizontalBox();
-  // JButton okButton = new JButton(tr("Ok"));
-  // okButton.addActionListener(new ActionListener() {
-  // public void actionPerformed(ActionEvent e) {
-  // cancelled = false;
-  // setVisible(false);
-  //
-  // }
-  // });
-  // JButton canButton = new JButton(tr("Cancel"));
-  // canButton.addActionListener(new ActionListener() {
-  // public void actionPerformed(ActionEvent e) {
-  // cancelled = true;
-  // setVisible(false);
-  // }
-  // });
-  // buttonPanel.add(okButton);
-  // buttonPanel.add(canButton);
-  // mainPanel.add(buttonPanel);
-  //
-  // pack();
-  // }
-  //
-  // protected int getOffset() {
-  // int off = offset.getIntValue(15);
-  // return right.equals(moveCombo.getSelectedItem()) ? off : -off;
-  // }
-  //
-  // protected boolean isCancelled() {
-  // return cancelled;
-  // }
-  //
-  // }
-  
-}
Index: /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPlugin.java
===================================================================
--- /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPlugin.java	(revision 11923)
+++ /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPlugin.java	(revision 11924)
@@ -16,36 +16,8 @@
  */
 public class LakewalkerPlugin extends Plugin {
+  public LakewalkerPlugin() {
+    Main.main.menu.add(Main.main.menu.toolsMenu, new LakewalkerAction(tr("Lake Walker")));
+  }
 
-  public static final String VERSION = "0.4";
-  
-  protected String name;
-  protected String name2;
-
-  public LakewalkerPlugin() {
-    name = tr("Lake Walker");
-    name2 = tr("Lake Walker (Old)");
-    JMenu toolsMenu = null;
-    for (int i = 0; i < Main.main.menu.getMenuCount() && toolsMenu == null; i++) {
-      JMenu menu = Main.main.menu.getMenu(i);
-      String name = menu.getText();
-      if (name != null && name.equals(tr("Tools"))) {
-        toolsMenu = menu;
-      }
-    }
-
-    if (toolsMenu == null) {
-      toolsMenu = new JMenu(name);
-      toolsMenu.add(new JMenuItem(new LakewalkerActionOld(name2)));
-      toolsMenu.add(new JMenuItem(new LakewalkerAction(name)));
-      Main.main.menu.add(toolsMenu, 2);
-    }
-    else {
-      toolsMenu.addSeparator();
-      toolsMenu.add(new JMenuItem(new LakewalkerAction(name)));
-      toolsMenu.add(new JMenuItem(new LakewalkerActionOld(name2)));
-    }
-    
-  }
-  
   public PreferenceSetting getPreferenceSetting() 
   {
Index: /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerWMS.java
===================================================================
--- /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerWMS.java	(revision 11923)
+++ /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerWMS.java	(revision 11924)
@@ -1,3 +1,5 @@
 package org.openstreetmap.josm.plugins.lakewalker;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
 
 import org.openstreetmap.josm.Main;
@@ -41,5 +43,5 @@
 	public BufferedImage getTile(int x, int y) throws LakewalkerException {
 		String status = getStatus();
-		setStatus("Downloading image tile...");
+		setStatus(tr("Downloading image tile..."));
 		
 		String layer = "global_mosaic_base";
@@ -144,5 +146,5 @@
 	    
 	    if(this.image == null){
-	    	throw new LakewalkerException("Could not acquire image");
+	    	throw new LakewalkerException(tr("Could not acquire image"));
 	    }
 		
