Index: applications/editors/josm/plugins/CommandLine/nbproject/project.xml
===================================================================
--- applications/editors/josm/plugins/CommandLine/nbproject/project.xml	(revision 29769)
+++ applications/editors/josm/plugins/CommandLine/nbproject/project.xml	(revision 29769)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <name>CommandLine</name>
+        </general-data>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
+            <!-- Не используйте диалоговое окно свойств проекта при редактировании данного файла вручную. -->
+            <name>CommandLine</name>
+            <properties/>
+            <folders>
+                <source-folder>
+                    <label>src</label>
+                    <type>java</type>
+                    <location>src</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+                <source-folder>
+                    <label>CommandLine</label>
+                    <location>.</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <target>compile</target>
+                </action>
+                <action name="clean">
+                    <target>clean</target>
+                </action>
+                <action name="run">
+                    <target>runjosm</target>
+                </action>
+                <action name="rebuild">
+                    <target>clean</target>
+                    <target>compile</target>
+                </action>
+            </ide-actions>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>src</label>
+                        <location>src</location>
+                    </source-folder>
+                    <source-file>
+                        <location>build.xml</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="run"/>
+                </context-menu>
+            </view>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3">
+            <compilation-unit>
+                <package-root>src</package-root>
+                <classpath mode="compile">../../core/src</classpath>
+                <source-level>1.6</source-level>
+            </compilation-unit>
+        </java-data>
+    </configuration>
+</project>
Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/AnyAction.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/AnyAction.java	(revision 29620)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/AnyAction.java	(revision 29769)
@@ -107,8 +107,9 @@
     }
 
+        @Override
 	public void eventDispatched(AWTEvent arg0) {
-		if (!(arg0 instanceof KeyEvent))
-			return;
-		KeyEvent ev = (KeyEvent) arg0;
+        if (!(arg0 instanceof KeyEvent))
+                return;
+        KeyEvent ev = (KeyEvent) arg0;
         isCtrlDown = (ev.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0;
         if (ev.getKeyCode() == KeyEvent.VK_ESCAPE && ev.getID() == KeyEvent.KEY_PRESSED) {
@@ -142,4 +143,5 @@
             // We invoke this to prevent strange things from happening
             EventQueue.invokeLater(new Runnable() {
+                @Override
                 public void run() {
                     // Don't change cursor when mode has changed already
Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 29620)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 29769)
@@ -190,6 +190,7 @@
 
         if ( Main.main.menu != null ) {
-            commandMenu = Main.main.menu.addMenu(marktr("Commands") , KeyEvent.VK_M, Main.main.menu.defaultMenuPos, ht("/Plugin/CommandLine"));
-            MainMenu.add(Main.main.menu.toolsMenu, new CommandLineAction(this));
+            boolean oldMenu = org.openstreetmap.josm.data.Version.getInstance().getVersion() < 6082;
+            commandMenu = Main.main.menu.addMenu(marktr("Commands") , oldMenu?KeyEvent.VK_M : KeyEvent.VK_O, Main.main.menu.defaultMenuPos, ht("/Plugin/CommandLine"));
+            MainMenu.add(commandMenu, new CommandLineAction(this));
         }
         loadCommands();
Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/DummyAction.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/DummyAction.java	(revision 29620)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/DummyAction.java	(revision 29769)
@@ -18,15 +18,16 @@
 
 public class DummyAction extends MapMode implements AWTEventListener {
-	private CommandLine parentPlugin;
+    private CommandLine parentPlugin;
 
-	public DummyAction(MapFrame mapFrame, CommandLine parentPlugin) {
-		super(null, "addsegment.png", null, mapFrame, ImageProvider.getCursor("normal", null));
-		this.parentPlugin = parentPlugin;
-	}
+    public DummyAction(MapFrame mapFrame, CommandLine parentPlugin) {
+            super(null, "addsegment.png", null, mapFrame, ImageProvider.getCursor("normal", null));
+            this.parentPlugin = parentPlugin;
+    }
 
-	public void eventDispatched(AWTEvent arg0) {
-		if (!(arg0 instanceof KeyEvent))
-			return;
-		KeyEvent ev = (KeyEvent) arg0;
+    @Override
+    public void eventDispatched(AWTEvent arg0) {
+        if (!(arg0 instanceof KeyEvent))
+                return;
+        KeyEvent ev = (KeyEvent) arg0;
         if (ev.getKeyCode() == KeyEvent.VK_ESCAPE && ev.getID() == KeyEvent.KEY_PRESSED) {
             ev.consume();
Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/Loader.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/Loader.java	(revision 29620)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/Loader.java	(revision 29769)
@@ -67,4 +67,5 @@
 	}
 
+        @Override
 	public void startElement(String namespaceURI, String localName, String rawName, Attributes attrs) {
 		int len = attrs.getLength();
@@ -125,4 +126,5 @@
 	}
 
+        @Override
 	public void characters(char ch[], int start, int length) 
 	{
@@ -165,12 +167,15 @@
 	}
 
+        @Override
 	public void warning(SAXParseException ex) {
 	  System.err.println("Warning in command xml file " + currentFile + ": " + ex.getMessage());
 	}
 
+        @Override
 	public void error(SAXParseException ex) {
 	  System.err.println("Error in command xml file " + currentFile + ": " + ex.getMessage());
 	}
 
+        @Override
 	public void fatalError(SAXParseException ex) throws SAXException {
 	  System.err.println("Error in command xml file " + currentFile + ": " + ex.getMessage());
Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/NodeAction.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/NodeAction.java	(revision 29620)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/NodeAction.java	(revision 29769)
@@ -109,8 +109,9 @@
     }
 
+        @Override
 	public void eventDispatched(AWTEvent arg0) {
-		if (!(arg0 instanceof KeyEvent))
-			return;
-		KeyEvent ev = (KeyEvent) arg0;
+        if (!(arg0 instanceof KeyEvent))
+                return;
+        KeyEvent ev = (KeyEvent) arg0;
         isCtrlDown = (ev.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0;
         if (ev.getKeyCode() == KeyEvent.VK_ESCAPE && ev.getID() == KeyEvent.KEY_PRESSED) {
@@ -144,4 +145,5 @@
             // We invoke this to prevent strange things from happening
             EventQueue.invokeLater(new Runnable() {
+                @Override
                 public void run() {
                     // Don't change cursor when mode has changed already
Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/PointAction.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/PointAction.java	(revision 29620)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/PointAction.java	(revision 29769)
@@ -120,4 +120,5 @@
 	}
 
+        @Override
 	public void eventDispatched(AWTEvent arg0) {
 		if (!(arg0 instanceof KeyEvent))
@@ -157,4 +158,5 @@
 			// We invoke this to prevent strange things from happening
 			EventQueue.invokeLater(new Runnable() {
+                                @Override
 				public void run() {
 					// Don't change cursor when mode has changed already
Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/RelationAction.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/RelationAction.java	(revision 29620)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/RelationAction.java	(revision 29769)
@@ -25,4 +25,5 @@
 	}
 
+        @Override
 	public void eventDispatched(AWTEvent arg0) {
 		if (!(arg0 instanceof KeyEvent))
Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/WayAction.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/WayAction.java	(revision 29620)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/WayAction.java	(revision 29769)
@@ -130,8 +130,9 @@
     }
 
+        @Override
 	public void eventDispatched(AWTEvent arg0) {
-		if (!(arg0 instanceof KeyEvent))
-			return;
-		KeyEvent ev = (KeyEvent) arg0;
+        if (!(arg0 instanceof KeyEvent))
+                return;
+        KeyEvent ev = (KeyEvent) arg0;
         isCtrlDown = (ev.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0;
         if (ev.getKeyCode() == KeyEvent.VK_ESCAPE && ev.getID() == KeyEvent.KEY_PRESSED) {
@@ -143,19 +144,19 @@
     private void updCursor() {
         if (mousePos != null) {
-			if (!Main.isDisplayingMapView())
-				return;
-			nearestWay = Main.map.mapView.getNearestWay(mousePos, OsmPrimitive.isUsablePredicate);
-			if (nearestWay != null) {
-				setCursor(cursorActive);
-			}
-			else {
-				setCursor(cursorNormal);
-			}
-		}
+            if (!Main.isDisplayingMapView())
+                    return;
+            nearestWay = Main.map.mapView.getNearestWay(mousePos, OsmPrimitive.isUsablePredicate);
+            if (nearestWay != null) {
+                setCursor(cursorActive);
+            }
+            else {
+                setCursor(cursorNormal);
+            }
+        }
     }
 
-	private void processMouseEvent(MouseEvent e) {
-		if (e != null) { mousePos = e.getPoint(); }
-	}
+    private void processMouseEvent(MouseEvent e) {
+        if (e != null) { mousePos = e.getPoint(); }
+    }
 
     private void setCursor(final Cursor c) {
@@ -165,4 +166,5 @@
             // We invoke this to prevent strange things from happening
             EventQueue.invokeLater(new Runnable() {
+                @Override
                 public void run() {
                     // Don't change cursor when mode has changed already
