Index: /applications/editors/josm/plugins/CommandLine/.classpath
===================================================================
--- /applications/editors/josm/plugins/CommandLine/.classpath	(revision 25179)
+++ /applications/editors/josm/plugins/CommandLine/.classpath	(revision 25179)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
+	<classpathentry kind="output" path="build"/>
+</classpath>
Index: /applications/editors/josm/plugins/CommandLine/.project
===================================================================
--- /applications/editors/josm/plugins/CommandLine/.project	(revision 25179)
+++ /applications/editors/josm/plugins/CommandLine/.project	(revision 25179)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>commandline</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>
+</projectDescription>
Index: /applications/editors/josm/plugins/CommandLine/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- /applications/editors/josm/plugins/CommandLine/.settings/org.eclipse.jdt.ui.prefs	(revision 25179)
+++ /applications/editors/josm/plugins/CommandLine/.settings/org.eclipse.jdt.ui.prefs	(revision 25179)
@@ -0,0 +1,55 @@
+#Sat Jan 29 19:56:56 CET 2011
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
Index: /applications/editors/josm/plugins/CommandLine/build.xml
===================================================================
--- /applications/editors/josm/plugins/CommandLine/build.xml	(revision 25178)
+++ /applications/editors/josm/plugins/CommandLine/build.xml	(revision 25179)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="Moar bugfixes" />
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="3751" />
+    <property name="plugin.main.version" value="3826" />
 
 
Index: /applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java
===================================================================
--- /applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 25178)
+++ /applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 25179)
@@ -1,17 +1,17 @@
 /*
  *      CommandLine.java
- *      
+ * 
  *      Copyright 2011 Hind <foxhind@gmail.com>
- *      
+ * 
  *      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
@@ -23,6 +23,6 @@
 
 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
+import static org.openstreetmap.josm.tools.I18n.marktr;
 import static org.openstreetmap.josm.tools.I18n.tr;
-import static org.openstreetmap.josm.tools.I18n.marktr;
 
 import java.awt.BorderLayout;
@@ -35,45 +35,32 @@
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
-import java.io.FileOutputStream;
 import java.io.PrintWriter;
-import java.nio.charset.Charset;
 import java.util.ArrayList;
-import java.util.List;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.Iterator;
-import java.util.regex.*;
+import java.util.List;
+
+import javax.swing.JMenu;
 import javax.swing.JTextField;
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
 import javax.swing.JToolBar;
 
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.mapmode.MapMode;
-import org.openstreetmap.josm.command.MoveCommand;
 import org.openstreetmap.josm.command.SequenceCommand;
-import org.openstreetmap.josm.data.gpx.GpxData;
-import org.openstreetmap.josm.data.gpx.GpxTrack;
-import org.openstreetmap.josm.data.gpx.GpxTrackSegment;
-import org.openstreetmap.josm.data.gpx.WayPoint;
 import org.openstreetmap.josm.data.imagery.ImageryInfo;
-import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
 import org.openstreetmap.josm.data.osm.BBox;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.data.osm.DataSet;
-import org.openstreetmap.josm.data.osm.DataSetMerger;
+import org.openstreetmap.josm.gui.MainMenu;
+import org.openstreetmap.josm.gui.MapFrame;
+import org.openstreetmap.josm.gui.PleaseWaitRunnable;
 import org.openstreetmap.josm.gui.layer.GpxLayer;
 import org.openstreetmap.josm.gui.layer.ImageryLayer;
 import org.openstreetmap.josm.gui.layer.Layer;
-import org.openstreetmap.josm.gui.MainMenu;
-import org.openstreetmap.josm.gui.MapFrame;
-import org.openstreetmap.josm.gui.PleaseWaitRunnable;
-import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
-import org.openstreetmap.josm.io.IllegalDataException;
+import org.openstreetmap.josm.io.GpxWriter;
 import org.openstreetmap.josm.io.OsmWriter;
-import org.openstreetmap.josm.io.GpxWriter;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
@@ -106,30 +93,30 @@
 						String commandText = textField.getText().substring(prefix.length());
 						switch (mode) {
-							case IDLE:
-								if (commandText.isEmpty()) {
-									commandText = history.getLastItem();
-								}
-								else {
-									history.addItem(commandText);
-								}
-								Command command = findCommand(commandText, true);
-								if (command != null) {
-									startCommand(command);
-								}
-								else
-									setMode(Mode.IDLE);
-								break;
-							case SELECTION:
-								if (currentMapFrame.mapMode instanceof WayAction || currentMapFrame.mapMode instanceof NodeAction || currentMapFrame.mapMode instanceof RelationAction || currentMapFrame.mapMode instanceof AnyAction) {
-										Collection<OsmPrimitive> selected = Main.main.getCurrentDataSet().getSelected();
-										if (selected.size() > 0)
-											loadParameter(selected, true);
-								}
-								else {
-									loadParameter(commandText, currentCommand.parameters.get(currentCommand.currentParameterNum).maxInstances == 1);
-								}
-								break;
-							case ADJUSTMENT:
-								break;
+						case IDLE:
+							if (commandText.isEmpty()) {
+								commandText = history.getLastItem();
+							}
+							else {
+								history.addItem(commandText);
+							}
+							Command command = findCommand(commandText, true);
+							if (command != null) {
+								startCommand(command);
+							}
+							else
+								setMode(Mode.IDLE);
+							break;
+						case SELECTION:
+							if (currentMapFrame.mapMode instanceof WayAction || currentMapFrame.mapMode instanceof NodeAction || currentMapFrame.mapMode instanceof RelationAction || currentMapFrame.mapMode instanceof AnyAction) {
+								Collection<OsmPrimitive> selected = Main.main.getCurrentDataSet().getSelected();
+								if (selected.size() > 0)
+									loadParameter(selected, true);
+							}
+							else {
+								loadParameter(commandText, currentCommand.parameters.get(currentCommand.currentParameterNum).maxInstances == 1);
+							}
+							break;
+						case ADJUSTMENT:
+							break;
 						}
 						e.consume();
@@ -165,11 +152,11 @@
 					if (textField.getCaretPosition() < prefix.length() || (textField.getSelectionStart() < prefix.length() && textField.getSelectionStart() > 0) )
 						e.consume();
-					}
-					if (e.getID() == KeyEvent.KEY_TYPED)
-						if (textField.getCaretPosition() < prefix.length() || (textField.getSelectionStart() < prefix.length() && textField.getSelectionStart() > 0) )
-							e.consume();
-					super.processKeyEvent(e);
-					if (textField.getText().length() < prefix.length()) { // Safe
-						setMode(mode);
+				}
+				if (e.getID() == KeyEvent.KEY_TYPED)
+					if (textField.getCaretPosition() < prefix.length() || (textField.getSelectionStart() < prefix.length() && textField.getSelectionStart() > 0) )
+						e.consume();
+				super.processKeyEvent(e);
+				if (textField.getText().length() < prefix.length()) { // Safe
+					setMode(mode);
 				}
 				if (e.getID() == KeyEvent.KEY_TYPED) {
@@ -230,4 +217,5 @@
 	}
 
+	@Override
 	public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame)
 	{
@@ -271,5 +259,5 @@
 		return null;
 	}
-	
+
 	protected void setMode(Mode targetMode) {
 		DataSet currentDataSet = Main.main.getCurrentDataSet();
@@ -296,70 +284,70 @@
 			MapMode action = null;
 			switch (currentType) {
-				case POINT:
-					action = new PointAction(currentMapFrame, this);
-					break;
-				case WAY:
-					action = new WayAction(currentMapFrame, this);
-					break;
-				case NODE:
-					action = new NodeAction(currentMapFrame, this);
-					break;
-				case RELATION:
-					action = new RelationAction(currentMapFrame, this);
-					break;
-				case ANY:
-					action = new AnyAction(currentMapFrame, this);
-					break;
-				case LENGTH:
-					action = new LengthAction(currentMapFrame, this);
-					break;
-				case USERNAME:
-					loadParameter((Object)Main.pref.get("osm-server.username", null), true);
-					action = new DummyAction(currentMapFrame, this);
-					break;
-				case IMAGERYURL:
-					Layer layer = Main.map.mapView.getActiveLayer();
-					if (layer != null) {
-						if (layer instanceof ImageryLayer) {
+			case POINT:
+				action = new PointAction(currentMapFrame, this);
+				break;
+			case WAY:
+				action = new WayAction(currentMapFrame, this);
+				break;
+			case NODE:
+				action = new NodeAction(currentMapFrame, this);
+				break;
+			case RELATION:
+				action = new RelationAction(currentMapFrame, this);
+				break;
+			case ANY:
+				action = new AnyAction(currentMapFrame, this);
+				break;
+			case LENGTH:
+				action = new LengthAction(currentMapFrame, this);
+				break;
+			case USERNAME:
+				loadParameter(Main.pref.get("osm-server.username", null), true);
+				action = new DummyAction(currentMapFrame, this);
+				break;
+			case IMAGERYURL:
+				Layer layer = Main.map.mapView.getActiveLayer();
+				if (layer != null) {
+					if (layer instanceof ImageryLayer) {
+					}
+					else {
+						List<ImageryLayer> imageryLayers = Main.map.mapView.getLayersOfType(ImageryLayer.class);
+						if (imageryLayers.size() == 1) {
+							layer = imageryLayers.get(0);
 						}
 						else {
-							List<ImageryLayer> imageryLayers = Main.map.mapView.getLayersOfType(ImageryLayer.class);
-							if (imageryLayers.size() == 1) {
-								layer = imageryLayers.get(0);
-							}
-							else {
-								endInput();
-								return;
-							}
-						}
-					}
-					ImageryInfo info = ((ImageryLayer)layer).getInfo();
-					String url = info.getURL();
-					String itype = info.getImageryType().getUrlString();
-					loadParameter((Object)(url.equals("") ? itype : url), true);
-					action = new DummyAction(currentMapFrame, this);
-					break;
-				case IMAGERYOFFSET:
-					Layer olayer = Main.map.mapView.getActiveLayer();
-					if (olayer != null) {
-						if (olayer instanceof ImageryLayer) {
+							endInput();
+							return;
+						}
+					}
+				}
+				ImageryInfo info = ((ImageryLayer)layer).getInfo();
+				String url = info.getUrl();
+				String itype = info.getImageryType().getUrlString();
+				loadParameter((url.equals("") ? itype : url), true);
+				action = new DummyAction(currentMapFrame, this);
+				break;
+			case IMAGERYOFFSET:
+				Layer olayer = Main.map.mapView.getActiveLayer();
+				if (olayer != null) {
+					if (olayer instanceof ImageryLayer) {
+					}
+					else {
+						List<ImageryLayer> imageryLayers = Main.map.mapView.getLayersOfType(ImageryLayer.class);
+						if (imageryLayers.size() == 1) {
+							olayer = imageryLayers.get(0);
 						}
 						else {
-							List<ImageryLayer> imageryLayers = Main.map.mapView.getLayersOfType(ImageryLayer.class);
-							if (imageryLayers.size() == 1) {
-								olayer = imageryLayers.get(0);
-							}
-							else {
-								endInput();
-								return;
-							}
-						}
-					}
-					loadParameter((Object)(String.valueOf(((ImageryLayer)olayer).getDx()) + "," + String.valueOf(((ImageryLayer)olayer).getDy())), true);
-					action = new DummyAction(currentMapFrame, this);
-					break;
-				default:
-					action = new DummyAction(currentMapFrame, this);
-					break;
+							endInput();
+							return;
+						}
+					}
+				}
+				loadParameter((String.valueOf(((ImageryLayer)olayer).getDx()) + "," + String.valueOf(((ImageryLayer)olayer).getDy())), true);
+				action = new DummyAction(currentMapFrame, this);
+				break;
+			default:
+				action = new DummyAction(currentMapFrame, this);
+				break;
 			}
 			currentMapFrame.selectMapMode(action);
@@ -483,4 +471,5 @@
 		// redirect child process's stderr to JOSM stderr
 		new Thread(new Runnable() {
+			@Override
 			public void run() {
 				try {
@@ -501,4 +490,5 @@
 		// Write stdin stream
 		Thread osmWriteThread = new Thread(new Runnable() {
+			@Override
 			public void run() {
 				BBox bbox = null;
@@ -512,9 +502,9 @@
 				osmWriter.header();
 				for (OsmPrimitive primitive : refObjects) {
-					if (primitive instanceof Node) 
+					if (primitive instanceof Node)
 						osmWriter.visit((Node)primitive);
-					else if (primitive instanceof Way) 
-						osmWriter.visit((Way)primitive);	
-					else if (primitive instanceof Relation) 
+					else if (primitive instanceof Way)
+						osmWriter.visit((Way)primitive);
+					else if (primitive instanceof Relation)
 						osmWriter.visit((Relation)primitive);
 					if (bbox == null)
@@ -531,9 +521,9 @@
 					pObjects = parameter.getParameterObjects();
 					for (OsmPrimitive primitive : pObjects) {
-						if (primitive instanceof Node) 
+						if (primitive instanceof Node)
 							osmWriter.visit((Node)primitive);
-						else if (primitive instanceof Way) 
-							osmWriter.visit((Way)primitive);	
-						else if (primitive instanceof Relation) 
+						else if (primitive instanceof Way)
+							osmWriter.visit((Way)primitive);
+						else if (primitive instanceof Relation)
 							osmWriter.visit((Relation)primitive);
 						if (bbox == null)
@@ -567,4 +557,5 @@
 		final OsmToCmd osmToCmd = new OsmToCmd(this, Main.main.getCurrentDataSet());
 		Thread osmParseThread = new Thread(new Runnable() {
+			@Override
 			public void run() {
 				try {
